Passed
Push — dpa_web15 ( 443889 )
by David
10:43
created
html/user/openid_login.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 // You should have received a copy of the GNU Lesser General Public License
17 17
 // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
18 18
 
19
-NOT FINISHED.   DON'T USE
19
+NOT FINISHED.DON'T USE
20 20
 
21 21
 require 'openid.php';
22 22
 include_once("../inc/boinc_db.inc");
@@ -26,14 +26,14 @@  discard block
 block discarded – undo
26 26
 
27 27
 function show_error($str) {
28 28
     page_head("Can't create account");
29
-    echo "$str<br>\n";
29
+    echo "$str < br > \n";
30 30
     page_tail();
31 31
     exit();
32 32
 }
33 33
 
34 34
 try {
35 35
     $openid = new LightOpenID;
36
-    echo "<pre>";
36
+    echo " < pre > ";
37 37
     if(!$openid->mode) {
38 38
         if(isset($_POST['openid_identifier'])) {
39 39
             $openid->identity = $_POST['openid_identifier'];
Please login to merge, or discard this patch.
html/user/prefs_edit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 $subset = sanitize_tags(get_str("subset"));
28 28
 $venue = sanitize_tags(get_str("venue", true));
29 29
 $columns = get_int("cols", true);
30
-$c = $columns?"&cols=$columns":"";
30
+$c = $columns ? "&cols=$columns" : "";
31 31
 check_subset($subset);
32 32
 if ($action) {
33 33
     check_tokens($user->authenticator);
Please login to merge, or discard this patch.
html/user/job_file.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 require_once("../inc/submit_util.inc");
80 80
 
81 81
 function upload_error_description($errno) {
82
-    switch($errno) {
82
+    switch ($errno) {
83 83
         case UPLOAD_ERR_INI_SIZE:
84 84
             return "The uploaded file exceeds upload_max_filesize of php.ini."; break;
85 85
         case UPLOAD_ERR_FORM_SIZE:
@@ -105,16 +105,16 @@  discard block
 block discarded – undo
105 105
     $delete_time = (int)$r->delete_time;
106 106
     $batch_id = (int)$r->batch_id;
107 107
     $fanout = parse_config(get_config(), "<uldl_dir_fanout>");
108
-    $phys_names= array();
109
-    foreach($r->phys_name as $f) {
108
+    $phys_names = array();
109
+    foreach ($r->phys_name as $f) {
110 110
         $phys_names[] = (string)$f;
111 111
     }
112 112
     $i = 0;
113
-    foreach($phys_names as $fname) {
113
+    foreach ($phys_names as $fname) {
114 114
         if (!is_valid_filename($fname)) {
115 115
             xml_error(-1, 'bad filename');
116 116
         }
117
-        $path = dir_hier_path($fname, project_dir() . "/download", $fanout);
117
+        $path = dir_hier_path($fname, project_dir()."/download", $fanout);
118 118
 
119 119
         // if the job_file record is there,
120 120
         // update the delete time first to avoid race condition
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
     foreach ($_FILES as $f) {
229 229
         $tmp_name = $f['tmp_name'];
230 230
         $fname = $phys_names[$i];
231
-        $path = dir_hier_path($fname, project_dir() . "/download", $fanout);
231
+        $path = dir_hier_path($fname, project_dir()."/download", $fanout);
232 232
 
233 233
         // see if file is in download hierarchy
234 234
         //
235
-        switch(check_download_file($tmp_name, $path)) {
235
+        switch (check_download_file($tmp_name, $path)) {
236 236
         case 0:
237 237
             // file is already there
238 238
             // note: check_download_file() generates .md5 in cases 1 and 2
@@ -287,10 +287,10 @@  discard block
 block discarded – undo
287 287
 if ($request_log) {
288 288
     $request_log_dir = parse_config(get_config(), "<log_dir>");
289 289
     if ($request_log_dir) {
290
-        $request_log = $request_log_dir . "/" . $request_log;
290
+        $request_log = $request_log_dir."/".$request_log;
291 291
     }
292 292
     if ($file = fopen($request_log, "a+")) {
293
-        fwrite($file, "\n<job_file date=\"" . date(DATE_ATOM) . "\">\n" . $_POST['request'] . "\n</job_file>\n");
293
+        fwrite($file, "\n<job_file date=\"".date(DATE_ATOM)."\">\n".$_POST['request']."\n</job_file>\n");
294 294
         fclose($file);
295 295
     }
296 296
 }
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
     xml_error(-1, "can't parse request message: $req", __FILE__, __LINE__);
303 303
 }
304 304
 
305
-switch($r->getName()) {
305
+switch ($r->getName()) {
306 306
 case 'query_files':
307 307
     query_files($r);
308 308
     break;
Please login to merge, or discard this patch.
html/inc/util_basic.inc 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
     return file_exists("$d/stop_sched");
57 57
 }
58 58
 
59
-function xml_error($num=-1, $msg=null, $file=null, $line=null) {
59
+function xml_error($num = -1, $msg = null, $file = null, $line = null) {
60 60
     global $xml_outer_tag;
61 61
     if (!$msg) {
62
-        switch($num) {
62
+        switch ($num) {
63 63
         case -112: $msg = "Invalid XML"; break;
64 64
         case -136: $msg = "Not found"; break;
65 65
         case -137: $msg = "Name or email address is not unique"; break;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 // If it's a single-tag element, and it's present, just return the tag
106 106
 //
107 107
 function parse_element($xml, $tag) {
108
-    $closetag = "</" . substr($tag,1);
108
+    $closetag = "</".substr($tag, 1);
109 109
     $x = strstr($xml, $tag);
110 110
     if ($x) {
111 111
         if (strstr($tag, "/>")) return $tag;
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 
122 122
 function parse_next_element($xml, $tag, &$cursor) {
123 123
     $element = null;
124
-    $closetag = "</" . substr($tag,1);
125
-    $pos = substr($xml,$cursor);
124
+    $closetag = "</".substr($tag, 1);
125
+    $pos = substr($xml, $cursor);
126 126
     $x = strstr($pos, $tag);
127 127
     if ($x) {
128 128
         if (strstr($tag, "/>")) return $tag;
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 // whose OSs may have such restrictions.
223 223
 //
224 224
 function is_valid_filename($x) {
225
-    if (strlen($x)>255) return false;
225
+    if (strlen($x) > 255) return false;
226 226
     // \w means A-Za-z0-9_
227 227
     return preg_match('/^[\w\-.]+$/', $x);
228 228
 }
Please login to merge, or discard this patch.