Passed
Branch master (7a17e1)
by Vitalii
08:27
created
html/ops/cancel_wu_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,5 +55,5 @@
 block discarded – undo
55 55
     </form>
56 56
 ";
57 57
 admin_page_tail();
58
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
58
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
59 59
 ?>
Please login to merge, or discard this patch.
html/ops/bolt_admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@
 block discarded – undo
71 71
     ";
72 72
     start_table();
73 73
     row1("User settings");
74
-    $x = ($flags&BOLT_FLAGS_SHOW_ALL)?"checked":"";
74
+    $x = ($flags&BOLT_FLAGS_SHOW_ALL) ? "checked" : "";
75 75
     row2("Show hidden courses?", "<input type=checkbox name=show_all $x>");
76
-    $x = ($flags&BOLT_FLAGS_DEBUG)?"checked":"";
76
+    $x = ($flags&BOLT_FLAGS_DEBUG) ? "checked" : "";
77 77
     row2("Show debugging output?", "<input type=checkbox name=debug $x>");
78 78
     row2("", "<input class=\"btn btn-primary\" type=submit name=submit value=\"Update settings\">");
79 79
     end_table();
Please login to merge, or discard this patch.
html/ops/reset_hrclass.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@
 block discarded – undo
21 21
 // TODO: document - when/why would you want to do this?
22 22
 // TODO: use new DB interface
23 23
 
24
-include_once( "../inc/db.inc" );
25
-include_once( "../inc/util.inc" );
26
-include_once( "../inc/db_ops.inc" );
27
-include_once( "../inc/util_ops.inc" );
28
-include_once( "../inc/prefs.inc" );
24
+include_once("../inc/db.inc");
25
+include_once("../inc/util.inc");
26
+include_once("../inc/db_ops.inc");
27
+include_once("../inc/util_ops.inc");
28
+include_once("../inc/prefs.inc");
29 29
 
30 30
 db_init();
31 31
 
Please login to merge, or discard this patch.
html/ops/submit_init_priority.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         echo "no app for batch $b->id\n";
34 34
         return;
35 35
     }
36
-    if ($b->fraction_done>0 && $b->credit_canonical>0) {
36
+    if ($b->fraction_done > 0 && $b->credit_canonical > 0) {
37 37
         $credit_total = $b->credit_canonical/$b->fraction_done;
38 38
         $fpops_total = $credit_total*(86400e9/200);
39 39
     } else {
Please login to merge, or discard this patch.
html/ops/credit.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
     start_table();
93 93
     table_header("Workunit", "Elapsed", "Proj FLOPS", "Raw credit", "granted");
94 94
     $n = 0;
95
-    $total=0;
96
-    foreach($rs as $r) {
95
+    $total = 0;
96
+    foreach ($rs as $r) {
97 97
         $raw_credit = $r->elapsed_time*$r->flops_estimate*COBB_SCALE;
98 98
         $n++;
99 99
         $total += $raw_credit;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 }
117 117
 
118 118
 function av_string($av_id) {
119
-    if ($av_id> 0) {
119
+    if ($av_id > 0) {
120 120
         $av = BoincAppVersion::lookup($av_id);
121 121
         $plat = BoincPlatform::lookup_id($av->platformid);
122 122
         $x = "<a href=credit.php?av_id=$av_id>$plat->name $av->plan_class</a>";
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
 function show_host_av($host_id, $av_id) {
88 88
     $hav = BoincHostAppVersion::lookup("host_id=$host_id and app_version_id=$av_id");
89
-    page_head("Host $host_id / app_version $av_id credit");
89
+    page_head("host $host_id / app_version $av_id credit");
90 90
     echo "Results";
91 91
     $rs = BoincResult::enum("hostid=$host_id and app_version_id=$av_id and validate_state=1 order by id desc limit 100");
92 92
     start_table();
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
 function show_appl($app_id) {
182 182
     $app = BoincApp::lookup_id($app_id);
183
-    page_head("App $app->user_friendly_name credit");
183
+    page_head("app $app->user_friendly_name credit");
184 184
     $avs = BoincAppVersion::enum("appid=$app_id and deprecated=0");
185 185
     start_table();
186 186
     table_header("platform/class/version", "PFC nsamples", "PFC avg", "PFC scale");
Please login to merge, or discard this patch.
html/ops/bbcode_convert.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,15 +44,15 @@
 block discarded – undo
44 44
     $start_id = 0; //Set this to something else if you like
45 45
     $posts = _mysql_query("select * from post where id>$start_id order by id");
46 46
     echo _mysql_error();
47
-    $i=0;
48
-    while ($post = _mysql_fetch_object($posts)){
47
+    $i = 0;
48
+    while ($post = _mysql_fetch_object($posts)) {
49 49
         $i++; 
50 50
         if ($i%100 == 0) {                      //For every 100 posts
51
-            echo $post->id.". "; flush();   // print out where we are
51
+            echo $post->id.". "; flush(); // print out where we are
52 52
             //usleep(200000);
53 53
         }
54 54
         
55
-        if ($post->id > $start_id){
55
+        if ($post->id > $start_id) {
56 56
             fix_post($post);
57 57
         }
58 58
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,14 +45,15 @@
 block discarded – undo
45 45
     $posts = _mysql_query("select * from post where id>$start_id order by id");
46 46
     echo _mysql_error();
47 47
     $i=0;
48
-    while ($post = _mysql_fetch_object($posts)){
48
+    while ($post = _mysql_fetch_object($posts)) {
49 49
         $i++; 
50
-        if ($i%100 == 0) {                      //For every 100 posts
50
+        if ($i%100 == 0) {
51
+//For every 100 posts
51 52
             echo $post->id.". "; flush();   // print out where we are
52 53
             //usleep(200000);
53 54
         }
54 55
         
55
-        if ($post->id > $start_id){
56
+        if ($post->id > $start_id) {
56 57
             fix_post($post);
57 58
         }
58 59
     }
Please login to merge, or discard this patch.
html/ops/manage_special_users.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id"
39 39
 );
40 40
 for ($i=1; $i<=_mysql_num_rows($result); $i++){
41
-	$foo = _mysql_fetch_object($result);
41
+    $foo = _mysql_fetch_object($result);
42 42
     echo "<form action=\"manage_special_users_action.php\" method=\"POST\">\n";
43 43
     echo "<input type=\"hidden\" name=\"userid\" value=\"$foo->userid\"
44 44
         <tr><td>$foo->name ($foo->id)</td>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
 row1("Current special users", '9');
28 28
 
29 29
 echo "<tr><td>User</td>";
30
-for ($i=0; $i<S_NFLAGS; $i++) {
31
-    echo "<td width=\"15\">" . $special_user_bitfield[$i] . "</td>\n";
30
+for ($i = 0; $i < S_NFLAGS; $i++) {
31
+    echo "<td width=\"15\">".$special_user_bitfield[$i]."</td>\n";
32 32
 }
33 33
 echo "</tr>";
34 34
 
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
     FROM forum_preferences as prefs, user 
38 38
     WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id"
39 39
 );
40
-for ($i=1; $i<=_mysql_num_rows($result); $i++){
40
+for ($i = 1; $i <= _mysql_num_rows($result); $i++) {
41 41
 	$foo = _mysql_fetch_object($result);
42 42
     echo "<form action=\"manage_special_users_action.php\" method=\"POST\">\n";
43 43
     echo "<input type=\"hidden\" name=\"userid\" value=\"$foo->userid\"
44 44
         <tr><td>$foo->name ($foo->id)</td>
45 45
     ";
46
-    for ($j=0; $j<S_NFLAGS; $j++) {
46
+    for ($j = 0; $j < S_NFLAGS; $j++) {
47 47
         $bit = substr($foo->special_user, $j, 1);
48 48
         echo "<td><input type=\"checkbox\" name=\"role".$j."\" value=\"1\"";
49 49
         if ($bit == 1) {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 echo "<tr><form action=\"manage_special_users_action.php\" method=\"POST\">\n";
59 59
 echo "<td>Add UserID:<input type=\"text\" name=\"userid\" size=\"6\"></td>";
60 60
 
61
-for ($j=0; $j<S_NFLAGS; $j++) {
61
+for ($j = 0; $j < S_NFLAGS; $j++) {
62 62
     echo "<td><input type=\"checkbox\" name=\"role".$j."\" value=\"1\"";
63 63
     echo "></td>\n";
64 64
 }
@@ -69,5 +69,5 @@  discard block
 block discarded – undo
69 69
 
70 70
 admin_page_tail();
71 71
 
72
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
72
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
73 73
 ?>
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     FROM forum_preferences as prefs, user 
38 38
     WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id"
39 39
 );
40
-for ($i=1; $i<=_mysql_num_rows($result); $i++){
40
+for ($i=1; $i<=_mysql_num_rows($result); $i++) {
41 41
 	$foo = _mysql_fetch_object($result);
42 42
     echo "<form action=\"manage_special_users_action.php\" method=\"POST\">\n";
43 43
     echo "<input type=\"hidden\" name=\"userid\" value=\"$foo->userid\"
Please login to merge, or discard this patch.
html/ops/profile_screen_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,5 +96,5 @@
 block discarded – undo
96 96
 ";
97 97
 
98 98
 admin_page_tail();
99
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
99
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
100 100
 ?>
Please login to merge, or discard this patch.
html/ops/user_graph.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 
27 27
 
28 28
     // Create the graph. These two calls are always required
29
-    $graph = new Graph(350,250,"auto");    
29
+    $graph = new Graph(350, 250, "auto");    
30 30
     //$graph->SetScale("lin");
31 31
     //$graph->SetScale("textlin");
32 32
     $graph->SetScale("loglin");
33 33
 
34 34
     // Create the linear plot
35
-    $lineplot=new BarPlot($arr, $xarr);
35
+    $lineplot = new BarPlot($arr, $xarr);
36 36
     $lineplot->SetColor("blue");
37 37
 
38 38
     // Add the plot to the graph
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 function show_text($xarr, $yarr) {
46 46
     $n = sizeof($xarr);
47
-    for ($i=0; $i<$n; $i++) {
47
+    for ($i = 0; $i < $n; $i++) {
48 48
         echo "<br>$xarr[$i] $yarr[$i]\n";
49 49
     }
50 50
 }
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
         if ($ind > $maxind) $maxind = $ind;
91 91
     }
92 92
     $xarr = array();
93
-    for ($i=0; $i<=$maxind; $i++) {
93
+    for ($i = 0; $i <= $maxind; $i++) {
94 94
         $xarr[$i] = $i;
95
-        if (is_null($yarr[$i])) $yarr[$i]=0;
95
+        if (is_null($yarr[$i])) $yarr[$i] = 0;
96 96
     }
97 97
     if ($show_text) {
98 98
         show_text($xarr, $yarr);
Please login to merge, or discard this patch.