Passed
Push — dpa_get_output ( 1f92a4 )
by David
10:50
created
html/user/account_ownership.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,8 @@
 block discarded – undo
120 120
   // GET request - the user has navigated to the page.
121 121
   page_head(tra("Generate proof of account ownership"), null, null, null, boinc_recaptcha_get_head_extra());
122 122
 
123
-  if ($user) { // Verify the user is logged in
123
+  if ($user) {
124
+// Verify the user is logged in
124 125
       require_once("../inc/account_ownership.inc");
125 126
 
126 127
       if (!file_exists($account_ownership_private_key_file_path)) {
Please login to merge, or discard this patch.
sites/default/boinc/modules/flag_abuse_reason/flag_abuse_reason.module 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
         $vars['action'] = 'none';
67 67
         $vars['link_text'] = t('Reset Completely');
68 68
         $vars['link_title'] = t('Reset everying, allows users to re-flag content.');
69
-      }
70
-      else {
69
+      } else {
71 70
         $vars['action'] = 'none';
72 71
         $vars['link_text'] = t('Locked');
73 72
         $vars['link_title'] = t('Reporting locked by moderator.');
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
         $vars['link_href'] = '';
76 75
         $vars['flag_classes'] = 'flag style-like-link';
77 76
       }
78
-    }
79
-    else {
77
+    } else {
80 78
       // If there are flags on this content, clear the flags and
81 79
       // lock the content.
82 80
       if (user_access('reset abuse flags', $myuser)) {
@@ -121,8 +119,7 @@  discard block
 block discarded – undo
121 119
         drupal_set_message(bts('INFO: Reset everything. Users may reflag this content.', array(), NULL, 'boinc:flag-abuse-reset'), 'info');
122 120
         // unlock flag; effectively resets flags for this content
123 121
         variable_del($flag->name.'-'.$content_id);
124
-      }
125
-      else {
122
+      } else {
126 123
         // Clear and Lock all flags on this content.
127 124
         $dbresult = db_query("SELECT DISTINCT fid FROM {flag_content} WHERE content_id = %d", $content_id);
128 125
         $rows = 0;
Please login to merge, or discard this patch.
drupal/sites/all/features/boinc_standard/boinc_standard.features.inc 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,14 +7,11 @@
 block discarded – undo
7 7
   list($module, $api) = func_get_args();
8 8
   if ($module == "input_formats" && $api == "input_formats") {
9 9
     return array("version" => 1);
10
-  }
11
-  elseif ($module == "page_manager" && $api == "pages_default") {
10
+  } elseif ($module == "page_manager" && $api == "pages_default") {
12 11
     return array("version" => 1);
13
-  }
14
-  elseif ($module == "panels_mini" && $api == "panels_default") {
12
+  } elseif ($module == "panels_mini" && $api == "panels_default") {
15 13
     return array("version" => 1);
16
-  }
17
-  elseif ($module == "strongarm" && $api == "strongarm") {
14
+  } elseif ($module == "strongarm" && $api == "strongarm") {
18 15
     return array("version" => 1);
19 16
   }
20 17
 }
Please login to merge, or discard this patch.
html/inc/translation.inc 1 patch
Braces   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             continue;
69 69
         }
70 70
         // only do files ending in .po
71
-        if (substr($file,-3) != ".po"){
71
+        if (substr($file,-3) != ".po") {
72 72
             //debug("File $file with unknown extension found in $info_dir");
73 73
             continue;
74 74
         }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             "-------------Compiling $transdir$file------------", 0
77 77
         );
78 78
         $language = parse_po_file($langdir.$transdir.$file);
79
-        if (!$language){
79
+        if (!$language) {
80 80
             language_log(
81 81
                 "WARNING: Could not parse language ".$file
82 82
             );
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             );
96 96
             exit;
97 97
         }
98
-        foreach ($language as $key => $value){
98
+        foreach ($language as $key => $value) {
99 99
             if ($value !== "") {
100 100
                 // Skip if the msgstr is empty
101 101
                 fwrite($fh, "\$language_lookup_array[\"".str_replace("\"", "\\\"", substr($file,0,-3))."\"][\"".$key."\"] = \"".$value."\";\n");
@@ -121,13 +121,13 @@  discard block
 block discarded – undo
121 121
     $parsing_text = false;
122 122
     $size = sizeof($translation_file);
123 123
     $output = array();
124
-    for ($i=0; $i<$size; $i++){
124
+    for ($i=0; $i<$size; $i++) {
125 125
         $entry = trim($translation_file[$i]);
126 126
         //echo "line $i: $entry\n";
127 127
         if (substr($entry, 0, 1)=="#") {
128 128
             continue;
129 129
         } elseif (strpos($entry, "msgid") !== false) {
130
-            if (!$first_entry){
130
+            if (!$first_entry) {
131 131
                 //If this is not the first, save the previous entry
132 132
                 $output[$current_token]=$current_token_text;
133 133
             }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
     // Get the last token
151 151
     //
152
-    if ($current_token && $current_token_text){
152
+    if ($current_token && $current_token_text) {
153 153
         $output[$current_token] = $current_token_text;
154 154
     }
155 155
     return $output;
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
 
181 181
     // Find the string in the user's language
182 182
     //
183
-    foreach ($languages_in_use as $language){
183
+    foreach ($languages_in_use as $language) {
184 184
         if (isset($language_lookup_array[$language][$text])) {
185 185
             $text = $language_lookup_array[$language][$text];
186 186
             break;
187
-        } else if ($language=="en"){
187
+        } else if ($language=="en") {
188 188
             // This language is defined in the code and is always available
189 189
             break;
190 190
         }
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     // Replace relevant substrings with given arguments.
194 194
     // Use strtr to avoid problems if an argument contains %n.
195 195
     $replacements = array();
196
-    for ($i=1; $i<func_num_args(); $i++){
196
+    for ($i=1; $i<func_num_args(); $i++) {
197 197
         $replacements["%".$i] = func_get_arg($i);
198 198
     }
199 199
 
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     if ($loglevel==1) $msg = "[ Warning  ]";
218 218
     if ($loglevel==2) $msg = "[ CRITICAL ]";
219 219
 
220
-    if ($loglevel >= $lang_log_level){
220
+    if ($loglevel >= $lang_log_level) {
221 221
         echo gmdate("Y-m-d H:i:s", time())." ".$msg." ".$message."\n";
222 222
     }
223 223
 }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 // (by looking at cookies and browser settings)
227 227
 // cookies have highest priority.
228 228
 
229
-if (isset($_COOKIE['lang'])){
229
+if (isset($_COOKIE['lang'])) {
230 230
     $language_string = $_COOKIE['lang'].",";
231 231
 } else {
232 232
     $language_string = '';
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 for ($i=0; $i<$size; $i++) {
261 261
     if ((strlen($client_languages[$i])>2)
262 262
         && (substr($client_languages[$i], 2, 1) == "_" || substr($client_languages[$i], 2, 1) == "-")
263
-    ){
263
+    ) {
264 264
         // If this is defined as primary-secondary, represent it as xx_YY
265 265
         //
266 266
         $language = substr(
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
     //
288 288
     $file_name = $lang_language_dir.$lang_compiled_dir.$language.".po.inc";
289 289
     if (file_exists($file_name)) {
290
-        if (!in_array($language, $languages_in_use)){
290
+        if (!in_array($language, $languages_in_use)) {
291 291
             require_once($file_name);
292 292
             $languages_in_use[] = $language;
293 293
         }
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
     if ($language2) {
296 296
         $file_name = $lang_language_dir.$lang_compiled_dir.$language2.".po.inc";
297 297
         if (file_exists($file_name)) {
298
-            if (!in_array($language2, $languages_in_use)){
298
+            if (!in_array($language2, $languages_in_use)) {
299 299
                 require_once($file_name);
300 300
                 $languages_in_use[] = $language2;
301 301
             }
Please login to merge, or discard this patch.
html/inc/forum.inc 1 patch
Braces   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
 // return a string for navigating pages
240 240
 //
241
-function page_links($url, $nitems, $items_per_page, $start){
241
+function page_links($url, $nitems, $items_per_page, $start) {
242 242
     // How many pages to potentially show before and after this one:
243 243
     $preshow = 3;
244 244
     $postshow = 3;
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 
252 252
     // If this is not the first page, display "previous"
253 253
     //
254
-    if ($curpage > 0){
254
+    if ($curpage > 0) {
255 255
         $x .= page_link(
256 256
             $url, $curpage-1, $items_per_page,
257 257
             tra("Previous")." &middot; "
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     }
269 269
     // Display a list of pages surrounding this one
270 270
     //
271
-    for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++){
271
+    for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++) {
272 272
         $page_str = (string)($i+1);
273 273
         if ($i < 0) continue;
274 274
         if ($i >= $npages) break;
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     }
290 290
     // If there is a next page
291 291
     //
292
-    if ($curpage < $npages-1){
292
+    if ($curpage < $npages-1) {
293 293
         $x .= page_link(
294 294
             $url, $curpage+1, $items_per_page,
295 295
             " &middot; ".tra("Next")
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 
519 519
     // If the user no longer exists, skip the post
520 520
     //
521
-    if (!$user){
521
+    if (!$user) {
522 522
         return;
523 523
     }
524 524
 
@@ -539,9 +539,9 @@  discard block
 block discarded – undo
539 539
     // check whether the poster is on the list of people to ignore
540 540
     //
541 541
     $ignore_poster = false;
542
-    if ($logged_in_user){
542
+    if ($logged_in_user) {
543 543
         $tokens = url_tokens($logged_in_user->authenticator);
544
-        if (is_ignoring($logged_in_user, $user)){
544
+        if (is_ignoring($logged_in_user, $user)) {
545 545
             $ignore_poster = true;
546 546
         }
547 547
     }
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 
579 579
     // Highlight special users if set in prefs;
580 580
     //
581
-    if ($logged_in_user && $logged_in_user->prefs){
581
+    if ($logged_in_user && $logged_in_user->prefs) {
582 582
         $highlight = $logged_in_user->prefs->highlight_special && $is_posted_by_special;
583 583
     } else {
584 584
         $highlight = $is_posted_by_special;
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
     echo "<span class=\"small\">";
600 600
     if ($fstatus) echo "$fstatus";
601 601
 
602
-    if (!$filter || !$ignore_poster){
602
+    if (!$filter || !$ignore_poster) {
603 603
         if ($user->prefs && $user->prefs->avatar!="" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars==false))) {
604 604
             echo "<img width=\"".AVATAR_WIDTH."\" height=\"".AVATAR_HEIGHT."\" src=\"".avatar_url($user->prefs->avatar)."\" alt=\"Avatar\"><br>";
605 605
         }
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
         $user->nposts = BoincPost::count("user=$user->id");
616 616
     }
617 617
 
618
-    if (function_exists('project_forum_user_info')){
618
+    if (function_exists('project_forum_user_info')) {
619 619
         project_forum_user_info($user);
620 620
     } else {
621 621
         echo tra("Posts: %1", $user->nposts)."<br>";
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
         echo "<form action=\"forum_rate.php?post=", $post->id, "\" method=\"post\">";
655 655
     }
656 656
 
657
-    if ($logged_in_user && $post->timestamp > $latest_viewed){
657
+    if ($logged_in_user && $post->timestamp > $latest_viewed) {
658 658
         show_image(NEW_IMAGE, tra("You haven't read this message yet"), tra("Unread"), NEW_IMAGE_HEIGHT);
659 659
     }
660 660
 
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
     if ($post->modified) {
675 675
         echo "<br>".tra("Last modified: %1", pretty_time_Str($post->modified));
676 676
     }
677
-    if ($ignore_poster && $filter){
677
+    if ($ignore_poster && $filter) {
678 678
         echo "<br>" .tra(
679 679
             "This post is hidden because the sender is on your 'ignore' list.  Click %1 here %2 to view hidden posts",
680 680
             "<a href=\"?id=".$thread->id."&amp;filter=false&amp;start=$start#".$post->id."\">",
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
         <p>
689 689
     ";
690 690
 
691
-    if (!$filter || !$ignore_poster){
691
+    if (!$filter || !$ignore_poster) {
692 692
         $posttext = $post->content;
693 693
 
694 694
         // If the creator of this post has a signature and
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
         // user has signatures enabled: show it
697 697
         //
698 698
         $posttext = output_transform($posttext, $options);
699
-        if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)){
699
+        if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)) {
700 700
             $sig = output_transform($user->prefs->signature, $options);
701 701
             $posttext .= "<hr>$sig\n";
702 702
         }
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
     $content = output_transform($post->content, $options);
756 756
     $when = time_diff_str($post->timestamp, time());
757 757
     $user = BoincUser::lookup_id($post->user);
758
-    if (!$user){
758
+    if (!$user) {
759 759
         return;
760 760
     }
761 761
 
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
 
1090 1090
     $sql = 'forum = ' . $forumID ;
1091 1091
     $stickysql = "";
1092
-    if ($sticky){
1092
+    if ($sticky) {
1093 1093
         $stickysql = "sticky DESC, ";
1094 1094
     }
1095 1095
     if (!$show_hidden) {
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
 //
1171 1171
 function show_post_moderation_links(
1172 1172
     $config, $logged_in_user, $post, $forum, $tokens
1173
-){
1173
+) {
1174 1174
     $moderators_allowed_to_ban = parse_bool($config, "moderators_allowed_to_ban");
1175 1175
     $moderators_vote_to_ban = parse_bool($config, "moderators_vote_to_ban");
1176 1176
 
Please login to merge, or discard this patch.
html/inc/host.inc 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -259,10 +259,10 @@
 block discarded – undo
259 259
 // "[vbox|5.0.0|1|1]", where now two additional flags give information about
260 260
 // hardware virtualization support. Older clients may have the old-style
261 261
 // serialnum in the DB despite the server being upgraded.
262
-function vbox_desc($x){
263
-    if (preg_match("/\[vbox\|(.*?)(\|([01])\|([01]))?\]/",$x,$matches)){
262
+function vbox_desc($x) {
263
+    if (preg_match("/\[vbox\|(.*?)(\|([01])\|([01]))?\]/",$x,$matches)) {
264 264
         $desc = "Virtualbox (".$matches[1].") ".tra("installed");
265
-        if (sizeof($matches)>2){
265
+        if (sizeof($matches)>2) {
266 266
             if ($matches[3]=="1" and $matches[4]=="1") {
267 267
                 return $desc.tra(", CPU has hardware virtualization support and it is enabled");
268 268
             } elseif ($matches[3]=="1" and $matches[4]=="0") {
Please login to merge, or discard this patch.
html/inc/db_ops.inc 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -98,7 +98,9 @@  discard block
 block discarded – undo
98 98
     if (!isset($types)) {
99 99
         $types = array();
100 100
         $constants = get_defined_constants(true);
101
-        foreach ($constants['mysqli'] as $c => $n) if (preg_match('/^MYSQLI_TYPE_(.*)/', $c, $m)) $types[$n] = $m[1];
101
+        foreach ($constants['mysqli'] as $c => $n) {
102
+            if (preg_match('/^MYSQLI_TYPE_(.*)/', $c, $m)) $types[$n] = $m[1];
103
+        }
102 104
     }
103 105
     return array_key_exists($type_id, $types)? strtolower($types[$type_id]) : "unknown";
104 106
 }
@@ -381,13 +383,13 @@  discard block
 block discarded – undo
381 383
 
382 384
 
383 385
 function link_results($n, $mq, $query, $clauses) {
384
-    if ($n == '0') { // intentional compare by string
386
+    if ($n == '0') {
387
+// intentional compare by string
385 388
         return "0";
386 389
     } else {
387 390
         if(strlen($clauses)) {
388 391
             return "<a href=\"db_action.php?table=result&query=$mq&$query&clauses=".urlencode($clauses)."&sort_by=mod_time&detail=low\">$n</a>";
389
-        }
390
-        else {
392
+        } else {
391 393
             return "<a href=\"db_action.php?table=result&query=$mq&$query&sort_by=mod_time&detail=low\">$n</a>";
392 394
         }
393 395
 
@@ -397,7 +399,7 @@  discard block
 block discarded – undo
397 399
 // Determines if in stderr_out is an error reported and prints as human readable String
398 400
 // @return String A human readable string if error otherwise FALSE
399 401
 // @param String $stderr_out the stderr_out value to parse
400
-function stderr_error_string($stderr_out){
402
+function stderr_error_string($stderr_out) {
401 403
     $y = parse_element($stderr_out, "<error_code>");
402 404
     $x = 0;
403 405
     if ($y) {
@@ -1176,7 +1178,7 @@  discard block
 block discarded – undo
1176 1178
         // result has not been received yet, so show report deadline either
1177 1179
         // in green if in the future or in red if in the past.
1178 1180
         $timenow=time();
1179
-        if ($result->report_deadline==0)  {
1181
+        if ($result->report_deadline==0) {
1180 1182
             // not sent -- show create time in purple
1181 1183
             $received = "<font color=\"9900cc\">". time_str($result->create_time) . "</font>";
1182 1184
         } else if ($result->report_deadline>=$timenow) {
Please login to merge, or discard this patch.
html/user/forum_thread_status.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@
 block discarded – undo
35 35
 }
36 36
 
37 37
 $owner = BoincUser::lookup_id($thread->owner);
38
-if ($logged_in_user->id == $owner->id){
38
+if ($logged_in_user->id == $owner->id) {
39 39
     $action = get_str("action");
40 40
     if ($action == "set") {
41 41
         $ret = $thread->update("status=1");
42 42
     } else {
43 43
         $ret = $thread->update("status=0");
44 44
     }
45
-    if (!$ret){
45
+    if (!$ret) {
46 46
         error_page("Could not update the status of the thread: ".$thread->id);
47 47
     }
48 48
 } else {
Please login to merge, or discard this patch.
html/user/lammps.php 1 patch
Braces   +19 added lines, -20 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
      proc_terminate($p);
39 39
     // echo "child process is $ret\n";
40 40
     $pids=preg_split('/\s+/',$ret);
41
-    foreach($pids as $pid){
42
-        if(is_numeric($pid)){
41
+    foreach($pids as $pid) {
42
+        if(is_numeric($pid)) {
43 43
             if($GLOBALS["debug"])echo "killing child process $pid\n";
44 44
             posix_kill($pid,9);
45 45
         }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     $p = proc_open("$cmd", $descs, $pipes);
61 61
     while (1) {
62 62
         $ctime=time();
63
-        if($ctime-$stime >=2 and ! file_exists("log.1")){
63
+        if($ctime-$stime >=2 and ! file_exists("log.1")) {
64 64
            if($GLOBALS["debug"]) echo "time out "."<br>";
65 65
            terminate_job($p);
66 66
            break;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 $steps = $end_step-$start_step;
158 158
                 $avg_cpu = $cpu/$steps;
159 159
                 #$avg_cpu = $cpu/$count;
160
-                if ($GLOBALS["debug"]){
160
+                if ($GLOBALS["debug"]) {
161 161
                     echo "test steps is ".$steps."<br>";
162 162
                     echo "avg_cpu is ".$avg_cpu."<br>";
163 163
                 }
@@ -169,20 +169,19 @@  discard block
 block discarded – undo
169 169
     return array($avg_cpu,$test_steps);
170 170
 }
171 171
 
172
-function calc_est_size($lammps_script, $structure_file, $cmd_file,$test_steps){
172
+function calc_est_size($lammps_script, $structure_file, $cmd_file,$test_steps) {
173 173
     $dump_types = 0;
174 174
     $fd = fopen($lammps_script,"r");
175
-    if (!$fd){
175
+    if (!$fd) {
176 176
         echo "can not open file $lammps_script\n";
177 177
         exit(-1);
178 178
     }
179
-    while (!feof($fd)){
179
+    while (!feof($fd)) {
180 180
         $line = fgets($fd, 4096);
181 181
         //if (preg_match("/^\s*dump/", $line)
182 182
         //    and preg_match_all("/dump\S+\.\w{3}/", $line, $matches, PREG_PATTERN_ORDER))
183 183
 
184
-        if(preg_match("/^\s*dump\s+(\d)\s+/", $line,$matches))
185
-        {
184
+        if(preg_match("/^\s*dump\s+(\d)\s+/", $line,$matches)) {
186 185
              if($GLOBALS["debug"]){print "matches=";print_r($matches);}
187 186
 
188 187
             $dump_types=(int)$matches[1];
@@ -194,7 +193,7 @@  discard block
 block discarded – undo
194 193
 
195 194
     $structure_file_size = filesize($structure_file);
196 195
     $fd = fopen($cmd_file,"r");
197
-    if (!$fd){
196
+    if (!$fd) {
198 197
         echo "can not open file $cmd_file\n";
199 198
         exit(-1);
200 199
     }
@@ -202,10 +201,10 @@  discard block
 block discarded – undo
202 201
 
203 202
     $loopno=1;
204 203
     $looprun=1;
205
-    while (!feof($fd)){
204
+    while (!feof($fd)) {
206 205
         $line = fgets($fd,4096);
207
-        if(preg_match("/loopnumber\s+\d+/", $line, $matches)){
208
-            if(preg_match("/\d+/", $matches[0], $no)){
206
+        if(preg_match("/loopnumber\s+\d+/", $line, $matches)) {
207
+            if(preg_match("/\d+/", $matches[0], $no)) {
209 208
                 //$loopno=$no[0];
210 209
                 if($no[0]>$loopno)$loopno=$no[0];
211 210
             }
@@ -215,7 +214,7 @@  discard block
 block discarded – undo
215 214
         }
216 215
     }
217 216
     fclose($fd);
218
-    if($GLOBALS["debug"]){
217
+    if($GLOBALS["debug"]) {
219 218
          print "max loopno(number of loops to run)=".$loopno."<br>";
220 219
          print "max looprun(steps for each loop)=".$looprun."<br>";
221 220
     }
@@ -231,7 +230,7 @@  discard block
 block discarded – undo
231 230
     $app_fixed_size = 5e7;
232 231
     $est_size = $log_size+$dump_size+$app_fixed_size;
233 232
 
234
-    if($GLOBALS["debug"]){
233
+    if($GLOBALS["debug"]) {
235 234
         print "test_steps=".$test_steps."<br>";
236 235
         print "test_log_size=".$test_log_size."<br>";
237 236
         print "log_size1=".$log_size1."<br>";
@@ -367,7 +366,7 @@  discard block
 block discarded – undo
367 366
         $err="Your test job <strong>failed</strong>
368 367
             <br>Please refer to the following Error Message:<br><p>
369 368
         ";
370
-        foreach($err_msgs as $line){
369
+        foreach($err_msgs as $line) {
371 370
              $err=$err.$line."<br>";
372 371
         }
373 372
         $err=$err." <p>
@@ -380,9 +379,9 @@  discard block
 block discarded – undo
380 379
     $info->rsc_fpops_est = $est_cpu_time * 1.5e9;
381 380
     $info->rsc_fpops_bound = $info->rsc_fpops_est * 20;
382 381
 
383
-    if ($disk==0){
382
+    if ($disk==0) {
384 383
         $info->rsc_disk_bound=1000000;
385
-    } else{
384
+    } else {
386 385
         $info->rsc_disk_bound = $disk;
387 386
     }
388 387
 
@@ -444,7 +443,7 @@  discard block
 block discarded – undo
444 443
 
445 444
     $njobs=0;
446 445
     $cmdlines = file($info->cmdline_file_path);
447
-    foreach ($cmdlines as $cmdline){
446
+    foreach ($cmdlines as $cmdline) {
448 447
         if (preg_match("/^\s*-var/", $cmdline)) {
449 448
             $njobs++;
450 449
         }
@@ -460,7 +459,7 @@  discard block
 block discarded – undo
460 459
 
461 460
     $i = 0;
462 461
     foreach ($cmdlines as $cmdline) {
463
-        if (preg_match("/^\s*-var/", $cmdline)){
462
+        if (preg_match("/^\s*-var/", $cmdline)) {
464 463
             submit_job($app, $batch_id, $info, $cmdline, $i);
465 464
             $i++;
466 465
         }
Please login to merge, or discard this patch.