Author: pwang
Date: 2013-03-08 10:09:55 -0800 (Fri, 08 Mar 2013)
New Revision: 31152

Modified:
   new_cytoscape_website/bugreport/bugreport.php
Log:
Add reporter to bug e-mail list

Modified: new_cytoscape_website/bugreport/bugreport.php
===================================================================
--- new_cytoscape_website/bugreport/bugreport.php       2013-03-05 22:13:40 UTC 
(rev 31151)
+++ new_cytoscape_website/bugreport/bugreport.php       2013-03-08 18:09:55 UTC 
(rev 31152)
@@ -90,6 +90,8 @@
                submitNewBug2Remine( $bugReport, $submitResult1);
                
                $bug_id_redmine = getBugID_redmine(); 
+
+               addReporter2BugWatch($bug_id_redmine, $bugReport['email']);
                
                sendNotificationEmail($bugReport, $bug_id_redmine);
        } 
@@ -105,6 +107,21 @@
 
 <?php 
 
+function addReporter2BugWatch($bug_id_redmine, $reporterEmail){
+
+       $url = 
"http://code.cytoscape.org/redmine/issues/".$bug_id_redmine."/add_cc?email=".$reporterEmail."&key=e0ea356348ee0786edd64a56bb3a87eb8a07b082";;
+
+       $ch = curl_init($url);
+       $fp = fopen("_addReporter2bugWatch.txt", "w");
+
+       curl_setopt($ch, CURLOPT_FILE, $fp);
+       curl_setopt($ch, CURLOPT_HEADER, 0);
+
+       curl_exec($ch);
+       curl_close($ch);
+       fclose($fp);
+}
+
 function isEmailInBlackList($email) {
 
        $file_handle = fopen("_blacklist_email.txt", "r");
@@ -153,7 +170,7 @@
                $description = $description."\\n\\n\\nAttached file is at 
".$submitResult."\\n\\n\\n";
        }
 
-       $description = $description.'\\n\\n\\nReported by: 
'.$bugReport['name'].'\nE-mail: '.$bugReport['email'];
+       $description = $description.'\\n\\n\\nReported by: 
'.$bugReport['name']; //.'\nE-mail: '.$bugReport['email'];
                
        $json =         
                "{
@@ -175,17 +192,18 @@
 
 
 // To prevent JSON injection attack
-function clean_unwanted_characters($oneStr){
-       $cleaned_str = str_ireplace("\"", "/", $oneStr);
-       $cleaned_str = str_ireplace("\\", "/", $cleaned_str);
-       $cleaned_str = str_ireplace("\\b", " ", $cleaned_str);
-       $cleaned_str = str_ireplace("\\f", " / ", $cleaned_str);
-       $cleaned_str = str_ireplace("\\r", " / ", $cleaned_str);
-       $cleaned_str = str_ireplace("\t", "  ", $cleaned_str);
-       $cleaned_str = str_ireplace("\\u", " ", $cleaned_str);
-       $cleaned_str = str_ireplace("</", "<\/", $cleaned_str);
+function clean_unwanted_characters($oneStr){
+       $cleaned_str = $oneStr;
+//     $cleaned_str = str_ireplace("\"", "/", $oneStr);
+//     $cleaned_str = str_ireplace("\\", "/", $cleaned_str);
+//     $cleaned_str = str_ireplace("\\b", " ", $cleaned_str);
+//     $cleaned_str = str_ireplace("\\f", " / ", $cleaned_str);
+//     $cleaned_str = str_ireplace("\\r", " / ", $cleaned_str);
+//     $cleaned_str = str_ireplace("\t", "  ", $cleaned_str);
+//     $cleaned_str = str_ireplace("\\u", " ", $cleaned_str);
+//     $cleaned_str = str_ireplace("</", "<\/", $cleaned_str);
+       return $cleaned_str;
 
-       return $cleaned_str;
 }
 
 

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cytoscape-cvs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to