Passed
Push — master ( 197ef2...8f787b )
by Kevin
15:18 queued 11s
created
drupal/sites/all/themes/zen/STARTERKIT/template.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,13 +65,13 @@
 block discarded – undo
65 65
  * Implementation of HOOK_theme().
66 66
  */
67 67
 function STARTERKIT_theme(&$existing, $type, $theme, $path) {
68
-  $hooks = zen_theme($existing, $type, $theme, $path);
69
-  // Add your theme hooks like this:
70
-  /*
68
+    $hooks = zen_theme($existing, $type, $theme, $path);
69
+    // Add your theme hooks like this:
70
+    /*
71 71
   $hooks['hook_name_here'] = array( // Details go here );
72 72
   */
73
-  // @TODO: Needs detailed comments. Patches welcome!
74
-  return $hooks;
73
+    // @TODO: Needs detailed comments. Patches welcome!
74
+    return $hooks;
75 75
 }
76 76
 
77 77
 /**
Please login to merge, or discard this patch.
drupal/sites/all/themes/zen/STARTERKIT/theme-settings.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -13,17 +13,17 @@  discard block
 block discarded – undo
13 13
  */
14 14
 function STARTERKIT_settings($saved_settings) {
15 15
 
16
-  // Get the default values from the .info file.
17
-  $defaults = zen_theme_get_default_settings('STARTERKIT');
16
+    // Get the default values from the .info file.
17
+    $defaults = zen_theme_get_default_settings('STARTERKIT');
18 18
 
19
-  // Merge the saved variables and their default values.
20
-  $settings = array_merge($defaults, $saved_settings);
19
+    // Merge the saved variables and their default values.
20
+    $settings = array_merge($defaults, $saved_settings);
21 21
 
22
-  /*
22
+    /*
23 23
    * Create the form using Forms API: http://api.drupal.org/api/6
24 24
    */
25
-  $form = array();
26
-  /* -- Delete this line if you want to use this setting
25
+    $form = array();
26
+    /* -- Delete this line if you want to use this setting
27 27
   $form['STARTERKIT_example'] = array(
28 28
     '#type'          => 'checkbox',
29 29
     '#title'         => t('Use this sample setting'),
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
   );
33 33
   // */
34 34
 
35
-  // Add the base theme's settings.
36
-  $form += zen_settings($saved_settings, $defaults);
35
+    // Add the base theme's settings.
36
+    $form += zen_settings($saved_settings, $defaults);
37 37
 
38
-  // Remove some of the base theme's settings.
39
-  unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
38
+    // Remove some of the base theme's settings.
39
+    unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
40 40
 
41
-  // Return the form
42
-  return $form;
41
+    // Return the form
42
+    return $form;
43 43
 }
Please login to merge, or discard this patch.
html/user/lammps.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     $ppid=$pstatus['pid'];
36 36
     $ret=`ps -o pid --no-heading --ppid $ppid`;
37 37
     //echo "parent pid is $ppid\nterninate it\n";
38
-     proc_terminate($p);
38
+        proc_terminate($p);
39 39
     // echo "child process is $ret\n";
40 40
     $pids=preg_split('/\s+/',$ret);
41 41
     foreach($pids as $pid){
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
     while (1) {
62 62
         $ctime=time();
63 63
         if($ctime-$stime >=2 and ! file_exists("log.1")){
64
-           if($GLOBALS["debug"]) echo "time out "."<br>";
65
-           terminate_job($p);
66
-           break;
64
+            if($GLOBALS["debug"]) echo "time out "."<br>";
65
+            terminate_job($p);
66
+            break;
67 67
         } 
68 68
         if (file_exists("log.1")) {
69 69
             list($avg_cpu, $test_steps) = calc_step_cpu("log.1");
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     }
113 113
     fclose($fd);
114 114
     //$total_steps = $loopno*$looprun;
115
-     if($GLOBALS["debug"])print "total_steps = ".$total_steps."<br>";
115
+        if($GLOBALS["debug"])print "total_steps = ".$total_steps."<br>";
116 116
     return $total_steps;
117 117
 }
118 118
 
@@ -147,12 +147,12 @@  discard block
 block discarded – undo
147 147
         $cpu = (float)$arr[2];
148 148
         //echo "step=".$step." cpu=".$cpu."\n";
149 149
         if ($cpu==0) {
150
-           $count=0;
151
-           $start_step = $step;
150
+            $count=0;
151
+            $start_step = $step;
152 152
         } else {
153 153
             $count+=1;
154 154
             if($GLOBALS["debug"])echo "step=".$step." cpu=".$cpu."count=".$count."<br>";
155
-           if($count >= 10) {
155
+            if($count >= 10) {
156 156
                 $end_step = $step;
157 157
                 $steps = $end_step-$start_step;
158 158
                 $avg_cpu = $cpu/$steps;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         
184 184
         if(preg_match("/^\s*dump\s+(\d)\s+/", $line,$matches))
185 185
         {        
186
-             if($GLOBALS["debug"]){print "matches=";print_r($matches);}
186
+                if($GLOBALS["debug"]){print "matches=";print_r($matches);}
187 187
 
188 188
             $dump_types=(int)$matches[1];
189 189
             break;
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         echo "can not open file $cmd_file\n";
199 199
         exit(-1);
200 200
     }
201
-     if($GLOBALS["debug"]) print "structure_file_size=".$structure_file_size."<br>";
201
+        if($GLOBALS["debug"]) print "structure_file_size=".$structure_file_size."<br>";
202 202
    
203 203
     $loopno=1;
204 204
     $looprun=1;
@@ -216,8 +216,8 @@  discard block
 block discarded – undo
216 216
     }
217 217
     fclose($fd);
218 218
     if($GLOBALS["debug"]){
219
-         print "max loopno(number of loops to run)=".$loopno."<br>";
220
-         print "max looprun(steps for each loop)=".$looprun."<br>";
219
+            print "max loopno(number of loops to run)=".$loopno."<br>";
220
+            print "max looprun(steps for each loop)=".$looprun."<br>";
221 221
     }
222 222
     //$est_size = $loopno*$structure_file_size*0.8*$dump_types;
223 223
     $test_log_size = filesize("log.1");
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
             <br>Please refer to the following Error Message:<br><p>
369 369
         ";
370 370
         foreach($err_msgs as $line){
371
-             $err=$err.$line."<br>";
371
+                $err=$err.$line."<br>";
372 372
         }
373 373
         $err=$err." <p>
374 374
             <a href=sandbox.php><strong> File_Sandbox </strong></a>
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
     //
394 394
     $njobs = count(file($cmdline_file_path));
395 395
     $secs_est = estimated_makespan($njobs, $info->rsc_fpops_est);
396
-     if($GLOBALS["debug"])echo "secs_est is $secs_est\n";
396
+        if($GLOBALS["debug"])echo "secs_est is $secs_est\n";
397 397
     //assume the server's flops is 1.5G and the average client's flops is 1G
398 398
     $hrs_est = number_format($secs_est*1.5/60, 2);
399 399
     //$hrs_est = number_format($secs_est, 2);
Please login to merge, or discard this patch.
html/user/friend.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
     $friend = BoincFriend::lookup($srcid, $user->id);
139 139
     if (!$friend) error_page("Request not found");
140 140
     page_head(tra("Friend request"));
141
-	echo time_str($friend->create_time)."<p>\n";
141
+    echo time_str($friend->create_time)."<p>\n";
142 142
     $x = user_links($srcuser, BADGE_HEIGHT_MEDIUM);
143 143
     echo tra("%1 has requested friendship with you.", $x);
144 144
     if (strlen($friend->message)) {
Please login to merge, or discard this patch.
html/user/tree_threader.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -31,18 +31,18 @@  discard block
 block discarded – undo
31 31
     global $app_name,$log;
32 32
 
33 33
     $timestamp = date("Y-m-d H:i",time());
34
-	// read the list of template filenames
35
-	//
36
-	$files = file("../../tree_threader_template_files");
37
-	if ($files === false) { 
34
+    // read the list of template filenames
35
+    //
36
+    $files = file("../../tree_threader_template_files");
37
+    if ($files === false) { 
38 38
         fwrite($log,"$timestamp\ttemplate file tree_threader_template_files\n");
39 39
         error("no templates file");
40 40
         
41 41
     }
42
-	$njobs = sizeof($files);
43
-	$now = time();
42
+    $njobs = sizeof($files);
43
+    $now = time();
44 44
     $batch_id = BoincBatch::insert(
45
-		"(user_id, create_time, njobs, name, app_id, state) values ($user->id, $now, $njobs, 'tree_threader batch', $app->id, ".BATCH_STATE_IN_PROGRESS.")"
45
+        "(user_id, create_time, njobs, name, app_id, state) values ($user->id, $now, $njobs, 'tree_threader batch', $app->id, ".BATCH_STATE_IN_PROGRESS.")"
46 46
     );
47 47
     if (!$batch_id) {
48 48
         $log_msg = "$timestamp\tfailed to create batch for user $user->id\n";
@@ -68,20 +68,20 @@  discard block
 block discarded – undo
68 68
     }
69 69
 
70 70
     $i = 1;
71
-	foreach ($files as $file) {
71
+    foreach ($files as $file) {
72 72
         $file = trim($file);
73 73
         $wu_name = "ICT_".$batch_id."_$i";
74 74
 
75
-		$cmd = "cd ../..; ./bin/create_work --appname $app_name --batch $batch_id --wu_name $wu_name --wu_template templates/ICT_in --result_template templates/ICT_out $seq_fname $file";
75
+        $cmd = "cd ../..; ./bin/create_work --appname $app_name --batch $batch_id --wu_name $wu_name --wu_template templates/ICT_in --result_template templates/ICT_out $seq_fname $file";
76 76
         fwrite($log, "$timestamp\t$cmd\n");
77 77
         system($cmd, $ret);
78
-		if ($ret != 0) {
78
+        if ($ret != 0) {
79 79
             fwrite($log, "can not creat job $wu_name\n");
80
-			error("can't create job");
80
+            error("can't create job");
81 81
         }
82 82
         $i++;
83
-	}
84
-	echo "<tt_reply>\n<batch_id>$batch_id</batch_id>\n</tt_reply>\n";
83
+    }
84
+    echo "<tt_reply>\n<batch_id>$batch_id</batch_id>\n</tt_reply>\n";
85 85
 }
86 86
 
87 87
 // Enumerate all the successfully completed WUs for this batch.
@@ -93,51 +93,51 @@  discard block
 block discarded – undo
93 93
 function handle_get_output($r, $batch) {
94 94
     global $log;
95 95
     $timestamp = date("Y-m-d H:i",time());
96
-	$wus = BoincWorkUnit::enum("batch=$batch->id");
97
-	$outdir = "/tmp/treeThreader_result_".$batch->id;
96
+    $wus = BoincWorkUnit::enum("batch=$batch->id");
97
+    $outdir = "/tmp/treeThreader_result_".$batch->id;
98 98
     @mkdir($outdir);
99
-	foreach ($wus as $wu) {
100
-		if (!$wu->canonical_resultid) continue;
101
-		$result = BoincResult::lookup_id($wu->canonical_resultid);
102
-		if (!$result) continue;
103
-		$paths = get_outfile_paths($result);
104
-		if (sizeof($paths) < 1) continue;
105
-
106
-		// there's only one output file
107
-		//
108
-		$path = $paths[0];
109
-
110
-		// unzip it into a directory in /tmp
111
-		//
112
-		$dir = "/tmp/$wu->name";
99
+    foreach ($wus as $wu) {
100
+        if (!$wu->canonical_resultid) continue;
101
+        $result = BoincResult::lookup_id($wu->canonical_resultid);
102
+        if (!$result) continue;
103
+        $paths = get_outfile_paths($result);
104
+        if (sizeof($paths) < 1) continue;
105
+
106
+        // there's only one output file
107
+        //
108
+        $path = $paths[0];
109
+
110
+        // unzip it into a directory in /tmp
111
+        //
112
+        $dir = "/tmp/$wu->name";
113 113
         @mkdir($dir);
114
-		$cmd = "cd $dir; unzip -q $path";
115
-		system($cmd, $ret);
116
-		if ($ret != 0) {
117
-			error("can't unzip output file");
118
-		}
119
-		$cmd = "cp $dir/Aln/* $outdir";
120
-		system($cmd, $ret);
121
-		if ($ret != 0) {
122
-			error("can't copy output files");
123
-		}
114
+        $cmd = "cd $dir; unzip -q $path";
115
+        system($cmd, $ret);
116
+        if ($ret != 0) {
117
+            error("can't unzip output file");
118
+        }
119
+        $cmd = "cp $dir/Aln/* $outdir";
120
+        system($cmd, $ret);
121
+        if ($ret != 0) {
122
+            error("can't copy output files");
123
+        }
124 124
 
125 125
         system("rm -rf $dir");
126
-	}
127
-
128
-	$cmd = "zip -r -q $outdir $outdir";
129
-	system($cmd, $ret);
130
-	if ($ret != $ret) {
131
-		error("can't zip output files");
132
-	}
133
-	$fname = "treeThreader_result_".$batch->id.".zip";
126
+    }
127
+
128
+    $cmd = "zip -r -q $outdir $outdir";
129
+    system($cmd, $ret);
130
+    if ($ret != $ret) {
131
+        error("can't zip output files");
132
+    }
133
+    $fname = "treeThreader_result_".$batch->id.".zip";
134 134
     $treeThreader_dir="treeThreaderResult";
135 135
     if(!is_dir("../../download/$treeThreader_dir"))mkdir("../../download/$treeThreader_dir");
136
-	@symlink("/tmp/$fname", "../../download/$treeThreader_dir/$fname");
136
+    @symlink("/tmp/$fname", "../../download/$treeThreader_dir/$fname");
137 137
     system("rm -fr $outdir");
138 138
     $config = simplexml_load_string(file_get_contents("../../config.xml"));
139 139
     $download_url = trim((string)$config->config->download_url);
140
-	echo "<tt_reply>\n<url>$download_url/$treeThreader_dir/$fname</url>\n</tt_reply>\n";
140
+    echo "<tt_reply>\n<url>$download_url/$treeThreader_dir/$fname</url>\n</tt_reply>\n";
141 141
     $log_msg="$timestamp\tuser $batch->user_id downloads results for batch $batch->id : $download_url/$treeThreader_dir/$fname\n";
142 142
     fwrite($log, $log_msg);
143 143
 }
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
         handle_submit($r, $user, $app);
178 178
         break;
179 179
     case 'get_output':
180
-		$batch_id = (int)$r->batch_id;
181
-		$batch = BoincBatch::lookup_id($batch_id);
182
-		if (!$batch) error("no such batch");
183
-		if ($batch->user_id != $user->id) error("not owner of batch");
184
-		handle_get_output($r, $batch);
185
-		break;
180
+        $batch_id = (int)$r->batch_id;
181
+        $batch = BoincBatch::lookup_id($batch_id);
182
+        if (!$batch) error("no such batch");
183
+        if ($batch->user_id != $user->id) error("not owner of batch");
184
+        handle_get_output($r, $batch);
185
+        break;
186 186
     default: error("bad command");
187 187
 }
188 188
 
Please login to merge, or discard this patch.
html/user/forum_banishment_vote_action.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 // See if "action" is provided - either through post or get
39 39
 if (!post_str('action', true)) {
40 40
     if (!get_str('action', true)){
41
-	    error_page(tra("You must specify an action..."));
41
+        error_page(tra("You must specify an action..."));
42 42
     } else {
43 43
         $action = get_str('action');
44 44
     }
Please login to merge, or discard this patch.
html/user/forum_user_posts.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
         if ($forum->parent_type == 1) {
90 90
             // post to team msg board
91 91
             if ($forum->category == $teamid) {
92
-				if ($thread->hidden && !$show_team_hidden) {
93
-					continue;
94
-				}
92
+                if ($thread->hidden && !$show_team_hidden) {
93
+                    continue;
94
+                }
95 95
                 if ($post->hidden && !$show_team_hidden) {
96 96
                     continue;
97 97
                 }
@@ -99,18 +99,18 @@  discard block
 block discarded – undo
99 99
                 continue;
100 100
             }
101 101
         } else {
102
-			if ($thread->hidden && !$show_hidden) {
103
-				continue;
104
-			}
102
+            if ($thread->hidden && !$show_hidden) {
103
+                continue;
104
+            }
105 105
             if ($post->hidden && !$show_hidden) {
106 106
                 continue;
107 107
             }
108 108
         }
109 109
     }
110
-	if ($n == $offset + $items_per_page) {
111
-		$show_next = true;
112
-		break;
113
-	}
110
+    if ($n == $offset + $items_per_page) {
111
+        $show_next = true;
112
+        break;
113
+    }
114 114
     if ($n >= $offset) {
115 115
         show_post_and_context($post, $thread, $forum, $options, $n+1);
116 116
     }
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
 echo "</table><br><br>\n";
120 120
 
121 121
 if ($offset) {
122
-	$x = $offset - $items_per_page;
122
+    $x = $offset - $items_per_page;
123 123
     echo "<a href=forum_user_posts.php?userid=$userid&offset=$x>
124 124
 		<b>".tra("Previous %1", $items_per_page)."</b>
125 125
 		</a>
126 126
     ";
127
-	if ($show_next) echo " &middot; ";
127
+    if ($show_next) echo " &middot; ";
128 128
 }
129 129
 
130 130
 if ($show_next) {
Please login to merge, or discard this patch.
html/user/openid.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
 class LightOpenID
48 48
 {
49 49
     public $returnUrl
50
-         , $required = array()
51
-         , $optional = array()
52
-         , $verify_peer = null
53
-         , $capath = null
54
-         , $cainfo = null;
50
+            , $required = array()
51
+            , $optional = array()
52
+            , $verify_peer = null
53
+            , $capath = null
54
+            , $cainfo = null;
55 55
     private $identity, $claimed_id;
56 56
     protected $server, $version, $trustRoot, $aliases, $identifier_select = false
57 57
             , $ax = false, $sreg = false, $data, $setup_url = null;
@@ -261,8 +261,8 @@  discard block
 block discarded – undo
261 261
                         $parsed_url = parse_url($this->claimed_id);
262 262
                         $this->identity =
263 263
                         $this->claimed_id = $parsed_url['scheme'] . '://'
264
-                                          . $parsed_url['host']
265
-                                          . $headers[$name];
264
+                                            . $parsed_url['host']
265
+                                            . $headers[$name];
266 266
                     }
267 267
                 }
268 268
             }
@@ -301,14 +301,14 @@  discard block
 block discarded – undo
301 301
 
302 302
         $url = $parts + $url;
303 303
         $url = $url['scheme'] . '://'
304
-             . (empty($url['username'])?''
304
+                . (empty($url['username'])?''
305 305
                  :(empty($url['password'])? "{$url['username']}@"
306 306
                  :"{$url['username']}:{$url['password']}@"))
307
-             . $url['host']
308
-             . (empty($url['port'])?'':":{$url['port']}")
309
-             . (empty($url['path'])?'':$url['path'])
310
-             . (empty($url['query'])?'':"?{$url['query']}")
311
-             . (empty($url['fragment'])?'':"#{$url['fragment']}");
307
+                . $url['host']
308
+                . (empty($url['port'])?'':":{$url['port']}")
309
+                . (empty($url['path'])?'':$url['path'])
310
+                . (empty($url['query'])?'':"?{$url['query']}")
311
+                . (empty($url['fragment'])?'':"#{$url['fragment']}");
312 312
         return $url;
313 313
     }
314 314
 
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 
534 534
     protected function authUrl_v1($immediate)
535 535
     {
536
-	$returnUrl = $this->returnUrl;
536
+    $returnUrl = $this->returnUrl;
537 537
         # If we have an openid.delegate that is different from our claimed id,
538 538
         # we need to somehow preserve the claimed id between requests.
539 539
         # The simplest way is to just send it along with the return_to url.
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
             ) + $this->sregParams();
550 550
 
551 551
         return $this->build_url(parse_url($this->server)
552
-                               , array('query' => http_build_query($params, '', '&')));
552
+                                , array('query' => http_build_query($params, '', '&')));
553 553
     }
554 554
 
555 555
     protected function authUrl_v2($immediate)
@@ -574,14 +574,14 @@  discard block
 block discarded – undo
574 574
 
575 575
         if ($this->identifier_select) {
576 576
             $params['openid.identity'] = $params['openid.claimed_id']
577
-                 = 'http://specs.openid.net/auth/2.0/identifier_select';
577
+                    = 'http://specs.openid.net/auth/2.0/identifier_select';
578 578
         } else {
579 579
             $params['openid.identity'] = $this->identity;
580 580
             $params['openid.claimed_id'] = $this->claimed_id;
581 581
         }
582 582
 
583 583
         return $this->build_url(parse_url($this->server)
584
-                               , array('query' => http_build_query($params, '', '&')));
584
+                                , array('query' => http_build_query($params, '', '&')));
585 585
     }
586 586
 
587 587
     /**
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
             # If it's an OpenID 1 provider, and we've got claimed_id,
639 639
             # we have to append it to the returnUrl, like authUrl_v1 does.
640 640
             $this->returnUrl .= (strpos($this->returnUrl, '?') ? '&' : '?')
641
-                             .  'openid.claimed_id=' . $this->claimed_id;
641
+                                .  'openid.claimed_id=' . $this->claimed_id;
642 642
         }
643 643
 
644 644
         if ($this->data['openid_return_to'] != $this->returnUrl) {
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
                 continue;
708 708
             }
709 709
             $key = substr($this->data['openid_' . $alias . '_type_' . $key],
710
-                          strlen('http://axschema.org/'));
710
+                            strlen('http://axschema.org/'));
711 711
             $attributes[$key] = $value;
712 712
         }
713 713
         return $attributes;
Please login to merge, or discard this patch.
html/ops/db_action.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@
 block discarded – undo
220 220
         }
221 221
     }
222 222
     if ($detail == "low" || $table == "profile") {
223
-         end_table();
223
+            end_table();
224 224
     }
225 225
     _mysql_free_result($result);
226 226
 } else {
Please login to merge, or discard this patch.