Passed
Push — master ( ce04c3...f35e7d )
by Vitalii
10:02
created
html/ops/problem_host.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -116,14 +116,14 @@
 block discarded – undo
116 116
 } else {
117 117
     $host = BoincHost::lookup_id($hostid);
118 118
     if (!$host) {
119
-    	echo "<h2>No host with that ID</h2>
119
+        echo "<h2>No host with that ID</h2>
120 120
 	 	<center>Please <a href=\"problem_host.php\">try again</a></center>";
121 121
     } else {
122 122
         $user = BoincUser::lookup_id($host->userid);
123
-    	echo "<a href=\"problem_host.php\">Do another?</a><br><br>";
124
-    	send_problem_email($user, $host);
125
-    	echo "Email to ".$user->email_addr." has been sent.<br>";
126
-	}
123
+        echo "<a href=\"problem_host.php\">Do another?</a><br><br>";
124
+        send_problem_email($user, $host);
125
+        echo "Email to ".$user->email_addr." has been sent.<br>";
126
+    }
127 127
 }
128 128
 
129 129
 admin_page_tail();
Please login to merge, or discard this patch.
html/ops/clean_cache.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,17 +24,17 @@
 block discarded – undo
24 24
 set_time_limit(0);
25 25
 
26 26
 function cache_check_diskspace2(){
27
-   $too_old = 86400;
28
-   while (1) {
29
-       $f = disk_free_space("../cache");
30
-       $u = disk_usage("../cache");
31
-       echo "free: $f used: $u\n";
32
-       if ($f > MIN_FREE_SPACE && $u < MAX_CACHE_USAGE) {
33
-           break;
34
-       }
35
-       clean_cache($too_old, "../cache");
36
-       $too_old/=2;
37
-   }
27
+    $too_old = 86400;
28
+    while (1) {
29
+        $f = disk_free_space("../cache");
30
+        $u = disk_usage("../cache");
31
+        echo "free: $f used: $u\n";
32
+        if ($f > MIN_FREE_SPACE && $u < MAX_CACHE_USAGE) {
33
+            break;
34
+        }
35
+        clean_cache($too_old, "../cache");
36
+        $too_old/=2;
37
+    }
38 38
 }
39 39
 
40 40
 cache_check_diskspace2();
Please login to merge, or discard this patch.
html/ops/update_profile_pages.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@
 block discarded – undo
200 200
         for ($row = 0; $row < $height; $row++) {
201 201
             echo "<tr>";
202 202
             for ($col = 0; $col < $width; $col++) {
203
-	            if ($count < $numIds) {
203
+                if ($count < $numIds) {
204 204
                     echo "<td class=\"bordered\" align=\"center\">
205 205
                         <a href=\"".secure_url_base()."view_profile.php?userid=".$userIds[$count]."\"><img src=\"".secure_url_base().IMAGE_URL.$userIds[$count]."_sm.jpg\"></a>
206 206
                     </td>";
Please login to merge, or discard this patch.
html/ops/make_emails_lowercase.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
 
38 38
 // activate/deactivate script
39 39
 if (1) {
40
-  echo "
40
+    echo "
41 41
 This script needs to be activated before it can be run.
42 42
 Once you understand what the script does you can change the
43 43
 if (1) to if (0) at the top of the file to activate it.
44 44
 Be sure to deactivate the script after using it to make sure
45 45
 it is not accidentally run.
46 46
 ";
47
-  exit;
47
+    exit;
48 48
 }
49 49
 
50 50
 db_init();
@@ -63,33 +63,33 @@  discard block
 block discarded – undo
63 63
 // loop over all users
64 64
 while ($user = _mysql_fetch_object($result)) {
65 65
 
66
-  $id=$user->id;
67
-  $email_addr=$user->email_addr;
68
-  $cpid=$user->cross_project_id;
66
+    $id=$user->id;
67
+    $email_addr=$user->email_addr;
68
+    $cpid=$user->cross_project_id;
69 69
 
70
-  $new_email=strtolower(trim($email_addr));
70
+    $new_email=strtolower(trim($email_addr));
71 71
   
72
-  if (strcmp($email_addr, $new_email))
72
+    if (strcmp($email_addr, $new_email))
73 73
     echo "Problematic email address [$id] $email_addr becomes $new_email<br/>";
74 74
   
75
-  if (!(strcmp($cpid,"0"))) {
75
+    if (!(strcmp($cpid,"0"))) {
76 76
     $newcpid=random_string();
77 77
     echo "Problematic CPID=0 for [$id] $email_addr gets CPID=$newcpid<br/>";
78
-  }
79
-  else
78
+    }
79
+    else
80 80
     $newcpid=$cpid;
81 81
   
82
-  if (strcmp($email_addr, $new_email) || strcmp($newcpid,$cpid)) {
82
+    if (strcmp($email_addr, $new_email) || strcmp($newcpid,$cpid)) {
83 83
     $update="update user set email_addr='$new_email', cross_project_id='$newcpid' where id='$id'";
84 84
     if ($confirm != "yes") {
85
-      echo "QUERY WOULD BE [$id] $query <br/>[click the link at the bottom to enable]<br/>";
86
-      $update_needed = TRUE;
85
+        echo "QUERY WOULD BE [$id] $query <br/>[click the link at the bottom to enable]<br/>";
86
+        $update_needed = TRUE;
87 87
     }
88 88
     else {
89
-      _mysql_query($update);
90
-      echo "Doing $update<br/>\n";
89
+        _mysql_query($update);
90
+        echo "Doing $update<br/>\n";
91
+    }
91 92
     }
92
-  }
93 93
 }
94 94
 if ($confirm != "yes" && $update_needed) {
95 95
     echo "You can enable the changes by <a href=\"make_emails_lowercase.php?confirm=yes\">click</a>";
Please login to merge, or discard this patch.
html/ops/db_schemaversion.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 $updates = array();
29 29
 foreach ($db_updates as $db_update) {
30 30
     if ($db_update[0] > $db_revision) {
31
-		$db_revision = $db_update[0];
31
+        $db_revision = $db_update[0];
32 32
     }
33 33
 }
34 34
 
Please login to merge, or discard this patch.
html/ops/eah_server_status.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
 }
42 42
 
43 43
 function find_oldest() {
44
-   $result=_mysql_query("select name,create_time from result where server_state=2 order by create_time limit 1");
45
-   $x = _mysql_fetch_object($result);
46
-   return $x->create_time;
44
+    $result=_mysql_query("select name,create_time from result where server_state=2 order by create_time limit 1");
45
+    $x = _mysql_fetch_object($result);
46
+    return $x->create_time;
47 47
 }
48 48
 
49 49
 function daemon_status($host, $pidname) {
Please login to merge, or discard this patch.
html/ops/opsw.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     db_init();
44 44
 
45
-   wap_begin();
45
+    wap_begin();
46 46
 
47 47
     // keep a 'running tab' in wapstr in case exceeds 1K WAP limit
48 48
 
@@ -56,15 +56,15 @@  discard block
 block discarded – undo
56 56
     //$wapstr .= "#Activ: " . getSingleQuery("select count(distinct hostid) from cpdnexpt.trickle "
57 57
     //   . "where trickledate>=" . sprintf("%d", mktime() - (3600*24*7))) . "<br/>";
58 58
 
59
-   // finally get last 5 trickles for everyone
60
-   //$wapstr .= show_trickles("a", 0, 5, 1);
59
+    // finally get last 5 trickles for everyone
60
+    //$wapstr .= show_trickles("a", 0, 5, 1);
61 61
 
62
-   // limit wap output to 1KB
63
-   if (strlen($wapstr)>1024)
64
-       echo substr($wapstr,0,1024);
65
-   else
66
-       echo $wapstr;
62
+    // limit wap output to 1KB
63
+    if (strlen($wapstr)>1024)
64
+        echo substr($wapstr,0,1024);
65
+    else
66
+        echo $wapstr;
67 67
 
68
-   wap_end();
68
+    wap_end();
69 69
 
70 70
 ?>
Please login to merge, or discard this patch.
html/ops/mass_email.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 
85 85
     $result = _mysql_query($query);
86 86
     while ($user = _mysql_fetch_object($result)) {
87
-    	// TODO: might want to also replace TOTAL_CREDIT, RAC, and similar.
87
+        // TODO: might want to also replace TOTAL_CREDIT, RAC, and similar.
88 88
         $body_to_send = str_replace("USERNAME", $user->name, $body);
89 89
         $body_to_send .= "\n\nTo opt out of future emails from ".PROJECT.", please edit your project preferences at ".secure_url_base()."prefs.php?subset=project\n";
90 90
         $retval = send_email($user, $subject, $body_to_send);
Please login to merge, or discard this patch.
html/ops/manage_special_users.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
     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.