Completed
Pull Request — master (#2135)
by Christian
10:38
created
html/user/manage_app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     table_header("platform", "plan class", "version#", "deprecated");
50 50
     foreach ($avs as $av) {
51 51
         $platform = BoincPlatform::lookup_id($av->platformid);
52
-        $c = $av->deprecated?"checked":"";
52
+        $c = $av->deprecated ? "checked" : "";
53 53
         echo "
54 54
             <tr>
55 55
             <td>$platform->name</td>
Please login to merge, or discard this patch.
html/user/profile_search_action.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 $search_string = sanitize_tags($search_string);
33 33
 $search_string = BoincDb::escape_string($search_string);
34 34
 $offset = get_int('offset', true);
35
-if (!$offset) $offset=0;
35
+if (!$offset) $offset = 0;
36 36
 $count = 10;
37 37
 
38 38
 page_head(tra("Profiles containing '%1'", $search_string));
@@ -46,17 +46,17 @@  discard block
 block discarded – undo
46 46
     <th>".tra("Recent credit")."</th></tr>
47 47
 ";
48 48
 $n = 0;
49
-foreach($profiles as $profile) {
50
-    show_profile_link2($profile, $n+$offset+1);
49
+foreach ($profiles as $profile) {
50
+    show_profile_link2($profile, $n + $offset + 1);
51 51
     $n += 1;
52 52
 }
53 53
 end_table();
54 54
 
55
-if ($offset==0 && $n==0) {
55
+if ($offset == 0 && $n == 0) {
56 56
     echo tra("No profiles found containing '%1'", $search_string);
57 57
 }
58 58
 
59
-if ($n==$count) {
59
+if ($n == $count) {
60 60
     $s = urlencode($search_string);
61 61
     $offset += $count;
62 62
     echo "
Please login to merge, or discard this patch.
html/user/team_remove_inactive_action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
 page_head(tra("Removing users from %1", $team->name));
34 34
 $ndel = 0;
35
-for ($i=0; $i<$_POST["ninactive_users"]; $i++) {
35
+for ($i = 0; $i < $_POST["ninactive_users"]; $i++) {
36 36
     $userid = post_int("remove_$i", true);
37 37
     if (!$userid) continue;
38 38
     $user = BoincUser::lookup_id($userid);
Please login to merge, or discard this patch.
html/user/forum_thread_status.php 1 patch
Spacing   +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/submit_test.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
     $job = new StdClass;
28 28
     $job->input_files = array($f);
29 29
 
30
-    for ($i=10; $i<20; $i++) {
30
+    for ($i = 10; $i < 20; $i++) {
31 31
         $job->rsc_fpops_est = $i*1e9;
32 32
         $job->command_line = "--t $i";
33 33
         $req->jobs[] = $job;
Please login to merge, or discard this patch.
html/user/weak_auth.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 //
31 31
 $idx = strpos($master_url, '://');
32 32
 if ($idx) {
33
-    $url = substr($master_url, $idx+strlen('://'));
33
+    $url = substr($master_url, $idx + strlen('://'));
34 34
 } else {
35 35
     $url = $master_url;
36 36
 }
37 37
 
38 38
 // convert invalid characters into underscores
39 39
 //
40
-for ($i=0; $i<strlen($url); $i++) {
40
+for ($i = 0; $i < strlen($url); $i++) {
41 41
     $c = $url[$i];
42 42
     if (!ctype_alnum($c) && $c != '.' && $c != '-' && $c != '_') {
43 43
         $url[$i] = '_';
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 //remove trailing underscore(s)
48 48
 //
49
-$account_file = "account_" . rtrim($url, '_') . ".xml";
49
+$account_file = "account_".rtrim($url, '_').".xml";
50 50
 
51 51
 echo "<table><tr><td>",
52 52
     tra("You can access your account either by using your email address and password,
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
     <p>",
57 57
     tra("This key can be used to:"),
58 58
     "<ul>
59
-    <li><a href=get_passwd.php>",tra("log in to your account on the web"),"</a>;
59
+    <li><a href=get_passwd.php>",tra("log in to your account on the web"), "</a>;
60 60
     <li>",
61 61
         tra("to attach a computer to your account without using the BOINC Manager.
62 62
        To do so, install BOINC,
63 63
        create a file named %1 in the BOINC
64
-       data directory, and set its contents to:","<b>$account_file</b>"),"
64
+       data directory, and set its contents to:","<b>$account_file</b>"), "
65 65
     <pre>",
66 66
     htmlspecialchars(
67 67
 "<account>
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
     as described above, but cannot be used to log in to your account or change it in any way.
76 76
     If you want to attach untrusted or insecure computers to your account,
77 77
     do so using your weak account key.
78
-    Your weak account key is:"),"
78
+    Your weak account key is:"), "
79 79
     <pre>$weak_auth</pre>
80 80
     <p>",
81
-    tra("If you change your password, your weak account key changes, and your previous weak account key becomes invalid."),"
81
+    tra("If you change your password, your weak account key changes, and your previous weak account key becomes invalid."), "
82 82
     </td></tr></table>"
83 83
 ;
84 84
 
Please login to merge, or discard this patch.
html/user/team_email_list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     }
51 51
     echo "<users>\n";
52 52
     $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, expavg_time, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id");
53
-    foreach($users as $user) {
53
+    foreach ($users as $user) {
54 54
         show_team_member($user, $creditonly);
55 55
     }
56 56
     echo "</users>\n";
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 }
82 82
 
83 83
 $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id");
84
-foreach($users as $user) {
84
+foreach ($users as $user) {
85 85
     if ($plain) {
86 86
         echo "$user->name $user->id\n";
87 87
     } else {
@@ -94,5 +94,5 @@  discard block
 block discarded – undo
94 94
     page_tail();
95 95
 }
96 96
 
97
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
97
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
98 98
 ?>
Please login to merge, or discard this patch.
html/user/brand_stats.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     $n = 0;
46 46
     $t = 0;
47 47
     $a = 0;
48
-    foreach($hosts as $h) {
48
+    foreach ($hosts as $h) {
49 49
         $t += $h->total_credit;
50 50
         $a += $h->expavg_credit;
51 51
         if ($h->expavg_credit > .1) $n++;
Please login to merge, or discard this patch.
html/user/host_app_versions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         if (!$show_dep && $app->deprecated) {
41 41
             return null;
42 42
         }
43
-        $rsc_type = $gavid % 1000000;
43
+        $rsc_type = $gavid%1000000;
44 44
         $r = rsc_name($rsc_type);
45 45
         return "$app->user_friendly_name (".tra("anonymous platform").", $r)";
46 46
     } else {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         }
61 61
         $platform = BoincPlatform::lookup_id($av->platformid);
62 62
         if (!$platform) return tra("Missing platform");
63
-        $pc = (strlen($av->plan_class))?"($av->plan_class)":"";
63
+        $pc = (strlen($av->plan_class)) ? "($av->plan_class)" : "";
64 64
         $v = number_format($av->version_num/100, 2);
65 65
         return "$app->user_friendly_name $v $platform->name $pc";
66 66
     }
Please login to merge, or discard this patch.