Passed
Push — master ( 8b88f4...c5ef2d )
by Christian
07:24 queued 10s
created
html/user/team.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -26,38 +26,38 @@
 block discarded – undo
26 26
 
27 27
 page_head(tra("Teams"));
28 28
 
29
-echo "<p>".tra("%1 participants may form %2 teams %3.", PROJECT, "<b>", "</b>") ."
29
+echo "<p>".tra("%1 participants may form %2 teams %3.", PROJECT, "<b>", "</b>")."
30 30
     <p>
31
-    ". tra("You may belong to only one team. You can join or quit a team at any time."). "
31
+    ". tra("You may belong to only one team. You can join or quit a team at any time.")."
32 32
     <p>" .
33
-    tra("Each team has a %1 founder %2 who may:", "<b>", "</b>") . "
33
+    tra("Each team has a %1 founder %2 who may:", "<b>", "</b>")."
34 34
     <ul>
35
-    <li> " . tra("edit the team's name and description") . "
36
-    <li> " . tra("add or remove team admins") . "
37
-    <li> " . tra("remove members from the team") . "
38
-    <li> " . tra("disband a team if it has no members") . "
35
+    <li> " . tra("edit the team's name and description")."
36
+    <li> " . tra("add or remove team admins")."
37
+    <li> " . tra("remove members from the team")."
38
+    <li> " . tra("disband a team if it has no members")."
39 39
     </ul>
40 40
     <p>" .
41
-    tra("To join a team, visit its team page and click %1 Join this team %2.", "<b>", "</b>") . "
42
-    <h3>" . tra("Find a team") . "</h3>
41
+    tra("To join a team, visit its team page and click %1 Join this team %2.", "<b>", "</b>")."
42
+    <h3>" . tra("Find a team")."</h3>
43 43
 ";
44 44
 team_search_form(null);
45 45
 echo "
46 46
 
47
-    <h3>" . tra("Top teams") . "</h3>
47
+    <h3>" . tra("Top teams")."</h3>
48 48
     <ul>
49
-    <li> <a href=\"top_teams.php\">" . tra("All teams") . "</a>
49
+    <li> <a href=\"top_teams.php\">" . tra("All teams")."</a>
50 50
 ";
51 51
 
52
-for ($i=1; $i<count($team_types); $i++) {
52
+for ($i = 1; $i < count($team_types); $i++) {
53 53
     echo "<li> <a href=\"top_teams.php?type=".$i."\">".tra("%1 teams", team_type_name($i))."</a>
54 54
     ";
55 55
 }
56 56
 
57 57
 echo "
58 58
     </ul>
59
-    <h3>" . tra("Create a new team") . "</h3>
60
-    " . tra("If you cannot find a team that is right for you, you can %1 create a team %2.", "<a href=\"team_create_form.php\">","</a>");
59
+    <h3>" . tra("Create a new team")."</h3>
60
+    " . tra("If you cannot find a team that is right for you, you can %1 create a team %2.", "<a href=\"team_create_form.php\">", "</a>");
61 61
 page_tail();
62 62
 
63 63
 ?>
Please login to merge, or discard this patch.
html/user/top_teams.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 }
33 33
 define('ITEM_LIMIT', 10000);
34 34
 
35
-function get_top_teams($offset, $sort_by, $type){
35
+function get_top_teams($offset, $sort_by, $type) {
36 36
     global $teams_per_page;
37 37
     $db = BoincDb::get(true);
38 38
     $type_clause = null;
39
-    if ($type){
39
+    if ($type) {
40 40
         $type_clause = "type=$type";
41 41
     }
42 42
     if ($sort_by == "total_credit") {
@@ -60,26 +60,26 @@  discard block
 block discarded – undo
60 60
 if ($type < 0 || $type >= count($team_types)) {
61 61
     $type = 0;
62 62
 }
63
-$type_url="";
64
-$type_name="";
63
+$type_url = "";
64
+$type_name = "";
65 65
 if ($type) {
66 66
     $type_url = "&type=$type";
67 67
     $type_name = team_type_name($type);
68 68
 }
69 69
 
70 70
 $offset = get_int("offset", true);
71
-if (!$offset) $offset=0;
72
-if ($offset % $teams_per_page) $offset = 0;
71
+if (!$offset) $offset = 0;
72
+if ($offset%$teams_per_page) $offset = 0;
73 73
 
74 74
 if ($offset < ITEM_LIMIT) {
75 75
     $cache_args = "sort_by=$sort_by&offset=$offset$type_url";
76
-    $cacheddata = get_cached_data(TOP_PAGES_TTL,$cache_args);
76
+    $cacheddata = get_cached_data(TOP_PAGES_TTL, $cache_args);
77 77
     //If we have got the data in cache
78
-    if ($cacheddata){
78
+    if ($cacheddata) {
79 79
         $data = unserialize($cacheddata); // use the cached data
80 80
     } else {
81 81
         //if not do queries etc to generate new data
82
-        $data = get_top_teams($offset,$sort_by,$type);
82
+        $data = get_top_teams($offset, $sort_by, $type);
83 83
         
84 84
         // Calculate nusers before storing into the cache
85 85
         foreach ($data as $team) {
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         echo "<a href=top_teams.php?sort_by=$sort_by&amp;offset=$new_offset".$type_url.">".tra("Previous %1", $teams_per_page)."</a> &middot; ";
116 116
 
117 117
     }
118
-    if ($n==$teams_per_page){ //If we aren't on the last page
118
+    if ($n == $teams_per_page) { //If we aren't on the last page
119 119
         $new_offset = $offset + $teams_per_page;
120 120
         echo "<a href=top_teams.php?sort_by=$sort_by&amp;offset=$new_offset".$type_url.">".tra("Next %1", $teams_per_page)."</a>";
121 121
     }
Please login to merge, or discard this patch.
html/user/forum_thread.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 $postid = get_int('postid', true);
31 31
 $filter = get_str('filter', true);
32 32
 
33
-if ($filter != "false"){
33
+if ($filter != "false") {
34 34
     $filter = true;
35 35
 } else {
36 36
     $filter = false;
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 if ($temp_sort_style) {
80 80
     $sort_style = $temp_sort_style;
81 81
 } else if ($sort_style) {
82
-    $forum_style = 0;   // this is deprecated
83
-    if ($logged_in_user){
82
+    $forum_style = 0; // this is deprecated
83
+    if ($logged_in_user) {
84 84
         $logged_in_user->prefs->thread_sorting = $sort_style;
85 85
         $logged_in_user->prefs->update("thread_sorting=$sort_style");
86 86
     } else {
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     );
93 93
 } else {
94 94
     // get the sorting style from the user or a cookie
95
-    if ($logged_in_user){
95
+    if ($logged_in_user) {
96 96
         $sort_style = $logged_in_user->prefs->thread_sorting;
97 97
     } else {
98 98
         list($forum_style, $sort_style) = parse_forum_cookie();
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
 
121 121
 if (false) {
122 122
 if ($forum->parent_type == 0) {
123
-    if ($category->is_helpdesk && !$thread->status){
124
-        if ($logged_in_user){
125
-            if ($thread->owner == $logged_in_user->id){
126
-                if ($thread->replies !=0) {
123
+    if ($category->is_helpdesk && !$thread->status) {
124
+        if ($logged_in_user) {
125
+            if ($thread->owner == $logged_in_user->id) {
126
+                if ($thread->replies != 0) {
127 127
                     // Show a "this question has been answered" to the author
128 128
                     echo "<p>";
129 129
                     show_button(
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     // If logged in user is moderator, enable some extra features
190 190
     //
191 191
     if (is_moderator($logged_in_user, $forum)) {
192
-        if ($thread->hidden){
192
+        if ($thread->hidden) {
193 193
             show_button_small(
194 194
                 "forum_moderate_thread_action.php?action=unhide&amp;thread=".$thread->id."$tokens",
195 195
                 tra("Unhide"),
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
                 tra("Hide this thread")
203 203
             );
204 204
         }
205
-        if ($thread->sticky){
205
+        if ($thread->sticky) {
206 206
             show_button_small(
207 207
                 "forum_moderate_thread_action.php?action=desticky&amp;thread=".$thread->id."$tokens",
208 208
                 tra("Make unsticky"),
@@ -308,5 +308,5 @@  discard block
 block discarded – undo
308 308
 $thread->update("views=views+1");
309 309
 
310 310
 page_tail();
311
-$cvs_version_tracker[]="\$Id$";
311
+$cvs_version_tracker[] = "\$Id$";
312 312
 ?>
Please login to merge, or discard this patch.
html/user/forum_reply.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     $parent_post_id = 0;
51 51
 }
52 52
 
53
-if ($filter != "false"){
53
+if ($filter != "false") {
54 54
     $filter = true;
55 55
 } else {
56 56
     $filter = false;
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 }
66 66
 
67 67
 $warning = null;
68
-if ($content && (!$preview)){
69
-    if (post_str('add_signature',true)=="add_it"){
70
-        $add_signature=true;    // set a flag and concatenate later
71
-    }  else {
72
-        $add_signature=false;
68
+if ($content && (!$preview)) {
69
+    if (post_str('add_signature', true) == "add_it") {
70
+        $add_signature = true; // set a flag and concatenate later
71
+    } else {
72
+        $add_signature = false;
73 73
     }
74 74
     check_tokens($logged_in_user->authenticator);
75 75
     if (!akismet_check($logged_in_user, $content)) {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     }
89 89
 }
90 90
 
91
-page_head(tra("Post to thread"),'','','', $bbcode_js);
91
+page_head(tra("Post to thread"), '', '', '', $bbcode_js);
92 92
 
93 93
 show_forum_header($logged_in_user);
94 94
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     $x1 = tra("Message:").bbcode_info().post_warning();
143 143
     $x2 = "";
144 144
     if ($parent_post) {
145
-        $x2 .=" ".tra("reply to %1 Message ID %2:", "<a href=#".$parent_post->id.">", " ".$parent_post->id."</a>");
145
+        $x2 .= " ".tra("reply to %1 Message ID %2:", "<a href=#".$parent_post->id.">", " ".$parent_post->id."</a>");
146 146
     }
147 147
     $x2 .= "<form action=forum_reply.php?thread=".$thread->id;
148 148
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     $x2 .= " method=\"post\" name=\"post\" onsubmit=\"return checkForm(this)\">\n";
154 154
     $x2 .= form_tokens($logged_in_user->authenticator);
155 155
     $x2 .= start_table_str().$bbcode_html.end_table_str()."<textarea class=\"form-control\" name=\"content\" rows=\"18\">";
156
-    $no_quote = get_int("no_quote", true)==1;
156
+    $no_quote = get_int("no_quote", true) == 1;
157 157
     if ($preview) {
158 158
         $x2 .= htmlspecialchars($content);
159 159
     } else if (!$no_quote) {
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
         }
163 163
     }
164 164
     if (!$logged_in_user->prefs->no_signature_by_default) {
165
-        $enable_signature="checked=\"true\"";
165
+        $enable_signature = "checked=\"true\"";
166 166
     } else {
167
-        $enable_signature="";
167
+        $enable_signature = "";
168 168
     }
169 169
     $x2 .= "</textarea><p> </p>
170 170
         <input class=\"btn btn-primary btn-sm \" type=\"submit\" name=\"preview\" value=\"".tra("Preview")."\">
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
 }
180 180
 
181 181
 function quote_text($text) {
182
-    $text = "[quote]" . $text . "[/quote]";
182
+    $text = "[quote]".$text."[/quote]";
183 183
     return $text;
184 184
 }
185 185
 
186
-$cvs_version_tracker[]="\$Id$";
186
+$cvs_version_tracker[] = "\$Id$";
187 187
 ?>
Please login to merge, or discard this patch.
html/user/forum_search.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -56,18 +56,18 @@  discard block
 block discarded – undo
56 56
     </select>");
57 57
 
58 58
 $forumid = null;
59
-if (get_str("forumid",true)){
59
+if (get_str("forumid", true)) {
60 60
     $forumid = get_str("forumid");
61 61
 }
62
-$forumlist="<option value=\"-1\">".tra("All")."</option>";
62
+$forumlist = "<option value=\"-1\">".tra("All")."</option>";
63 63
 $categories = BoincCategory::enum();
64 64
 foreach ($categories as $category) {
65 65
     $forums = BoincForum::enum("parent_type=0 and category=$category->id");
66 66
     foreach ($forums as $forum) {
67
-        if ($forum->id==$forumid){
68
-            $forumlist.="<option selected value=\"".$forum->id."\">".$forum->title."</option>";
67
+        if ($forum->id == $forumid) {
68
+            $forumlist .= "<option selected value=\"".$forum->id."\">".$forum->title."</option>";
69 69
         } else {
70
-            $forumlist.="<option value=\"".$forum->id."\">".$forum->title."</option>";
70
+            $forumlist .= "<option value=\"".$forum->id."\">".$forum->title."</option>";
71 71
         }
72 72
     }
73 73
 }
@@ -76,22 +76,22 @@  discard block
 block discarded – undo
76 76
     '<select class="form-control" name="search_forum">'.$forumlist.'</select');
77 77
 
78 78
 $sortlist = null;
79
-foreach ($thread_sort_styles as $id => $style){
80
-    if ($id == CREATE_TIME_NEW){
81
-        $sortlist.="<option selected value=\"".$id."\">".$style."</option>";
79
+foreach ($thread_sort_styles as $id => $style) {
80
+    if ($id == CREATE_TIME_NEW) {
81
+        $sortlist .= "<option selected value=\"".$id."\">".$style."</option>";
82 82
     } else {
83
-        $sortlist.="<option value=\"".$id."\">".$style."</option>";
83
+        $sortlist .= "<option value=\"".$id."\">".$style."</option>";
84 84
     }
85 85
 }
86 86
 row2(tra("Sort by"), 
87 87
     '<select class="form-control" name="search_sort">'.$sortlist.'</select');
88 88
 
89 89
 row1("&nbsp;");
90
-row2("","<input class=\"btn btn-success\" type=\"submit\" value=\"".tra("Start the search")."\">");
90
+row2("", "<input class=\"btn btn-success\" type=\"submit\" value=\"".tra("Start the search")."\">");
91 91
 echo "</form>";
92 92
 end_table();
93 93
 
94 94
 page_tail();
95 95
 
96
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
96
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
97 97
 ?>
Please login to merge, or discard this patch.
html/inc/prefs_project.inc 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 }
69 69
 
70 70
 if ($app_types->cpu) {
71
-    $project_pref_descs[] = new PREF_BOOL (
71
+    $project_pref_descs[] = new PREF_BOOL(
72 72
         tra("Use CPU"),
73 73
         "Request CPU-only tasks from this project.",
74 74
         "no_cpu",
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     );
78 78
 }
79 79
 if ($app_types->ati) {
80
-    $project_pref_descs[] = new PREF_BOOL (
80
+    $project_pref_descs[] = new PREF_BOOL(
81 81
         tra("Use AMD GPU"),
82 82
         "Request AMD GPU tasks from this project.",
83 83
         "no_ati",
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     );
87 87
 }
88 88
 if ($app_types->cuda) {
89
-    $project_pref_descs[] = new PREF_BOOL (
89
+    $project_pref_descs[] = new PREF_BOOL(
90 90
         tra("Use NVIDIA GPU"),
91 91
         "Request NVIDIA GPU tasks from this project.",
92 92
         "no_cuda",
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     );
96 96
 }
97 97
 if ($app_types->intel_gpu) {
98
-    $project_pref_descs[] = new PREF_BOOL (
98
+    $project_pref_descs[] = new PREF_BOOL(
99 99
         tra("Use Intel GPU"),
100 100
         "Request Intel GPU tasks from this project.",
101 101
         "no_intel_gpu",
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     $x = "";
121 121
 }
122 122
 
123
-$privacy_pref_descs = array (
123
+$privacy_pref_descs = array(
124 124
     new PREF_BOOL(
125 125
         tra("Is it OK for %1 and your team (if any) to email you?", PROJECT).$x,
126 126
         "",
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     global $in_project_specific;
153 153
     global $venue_name;
154 154
 
155
-    switch($name) {
155
+    switch ($name) {
156 156
     case "venue":
157 157
         $venue_name = $attrs["name"];
158 158
         $top_parse_result = $parse_result;
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         break;
165 165
     default:
166 166
         if ($in_project_specific) {
167
-            $text= $text."<$name>";
167
+            $text = $text."<$name>";
168 168
         } else {
169 169
             $text = "";
170 170
         }
@@ -179,12 +179,12 @@  discard block
 block discarded – undo
179 179
     global $venue_name;
180 180
     global $project_pref_descs;
181 181
 
182
-    foreach($project_pref_descs as $p) {
182
+    foreach ($project_pref_descs as $p) {
183 183
         if ($p->xml_parse($parse_result, $name, $text)) {
184 184
             return;
185 185
         }
186 186
     }
187
-    switch($name) {
187
+    switch ($name) {
188 188
     case "venue":
189 189
         $top_parse_result->$venue_name = $parse_result;
190 190
         $parse_result = $top_parse_result;
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     return $parse_result;
229 229
 }
230 230
 
231
-function prefs_show_project($prefs, $columns=false) {
231
+function prefs_show_project($prefs, $columns = false) {
232 232
     global $project_pref_descs;
233 233
     if ($columns) {
234 234
         foreach ($project_pref_descs as $p) {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
     }
255 255
 }
256 256
 
257
-function prefs_show_project_specific($prefs, $columns=false) {
257
+function prefs_show_project_specific($prefs, $columns = false) {
258 258
     if ($columns) {
259 259
         $project_specific_prefs = project_specific_prefs_parse($prefs->project_specific);
260 260
         $project_specific_prefs->home = isset($prefs->home) ? project_specific_prefs_parse($prefs->home->project_specific) : "";
@@ -266,10 +266,10 @@  discard block
 block discarded – undo
266 266
     project_specific_prefs_show($project_specific_prefs, $columns);
267 267
 }
268 268
 
269
-function print_prefs_display_project($user, $columns=false) {
269
+function print_prefs_display_project($user, $columns = false) {
270 270
     $project_prefs = prefs_parse_project($user->project_prefs);
271 271
 
272
-    $switch_link = " <font size=\"-1\"><a href=prefs.php?subset=project&cols=". (int)!$columns .">".tra("(Switch View)")."</a></font>";
272
+    $switch_link = " <font size=\"-1\"><a href=prefs.php?subset=project&cols=".(int)!$columns.">".tra("(Switch View)")."</a></font>";
273 273
     if ($columns) {
274 274
         start_table();
275 275
         row_heading(tra("Combined preferences").$switch_link);
@@ -311,14 +311,14 @@  discard block
 block discarded – undo
311 311
     }
312 312
 }
313 313
 
314
-function prefs_form_project($prefs, $error=false) {
314
+function prefs_form_project($prefs, $error = false) {
315 315
     global $project_pref_descs;
316 316
     foreach ($project_pref_descs as $p) {
317 317
         $p->show_form_row($prefs, $error);
318 318
     }
319 319
 }
320 320
 
321
-function prefs_form_project_specific($prefs_xml, $error=false) {
321
+function prefs_form_project_specific($prefs_xml, $error = false) {
322 322
     $prefs = project_specific_prefs_parse($prefs_xml);
323 323
     project_specific_prefs_edit($prefs, $error);
324 324
 }
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 
358 358
 // given a prefs structure, return the corresponding XML string
359 359
 //
360
-function project_prefs_make_xml($prefs, $primary=true) {
360
+function project_prefs_make_xml($prefs, $primary = true) {
361 361
     global $project_pref_descs;
362 362
     $xml = "";
363 363
     if ($primary) {
@@ -392,8 +392,8 @@  discard block
 block discarded – undo
392 392
 //
393 393
 function project_prefs_update(&$user, $prefs) {
394 394
     $prefs_xml = BoincDb::escape_string(project_prefs_make_xml($prefs));
395
-    $send_email = $user->send_email?1:0;
396
-    $show_hosts = $user->show_hosts?1:0;
395
+    $send_email = $user->send_email ? 1 : 0;
396
+    $show_hosts = $user->show_hosts ? 1 : 0;
397 397
     $retval = $user->update("project_prefs='$prefs_xml', send_email=$send_email, show_hosts=$show_hosts");
398 398
     if (!$retval) {
399 399
         return 1;
Please login to merge, or discard this patch.
html/inc/submit.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     $b->create_time = (double)($batch->create_time);
171 171
     $b->est_completion_time = (double)($batch->est_completion_time);
172 172
     $b->njobs = (int)($batch->njobs);
173
-    $b->fraction_done = (double) $batch->fraction_done;
173
+    $b->fraction_done = (double)$batch->fraction_done;
174 174
     $b->nerror_jobs = (int)($batch->nerror_jobs);
175 175
     $b->state = (int)($batch->state);
176 176
     $b->completion_time = (double)($batch->completion_time);
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
     </result>
399 399
 </output_template>
400 400
 ";
401
-    for ($i=0; $i<2; $i++) {
401
+    for ($i = 0; $i < 2; $i++) {
402 402
         $job = new StdClass;
403 403
         $job->input_files = array();
404 404
         $job->input_files[] = $f;
Please login to merge, or discard this patch.
html/ops/db_action.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 // For display, convert query string characters < and > into 'html form' so
65 65
 // that they will be displayed.
66 66
 //
67
-$html_text=str_replace('<', '&lt;', str_replace('>', '&gt;', $main_query));
67
+$html_text = str_replace('<', '&lt;', str_replace('>', '&gt;', $main_query));
68 68
 
69 69
 echo "<p>Query: <b>$html_text</b><p>\n";
70 70
     
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 if ($result) {
160 160
     if ($detail == "low") {
161 161
         start_table('table-striped');
162
-        switch($table) {
162
+        switch ($table) {
163 163
         case "result":
164 164
             result_short_header();
165 165
             break;
@@ -228,5 +228,5 @@  discard block
 block discarded – undo
228 228
 }
229 229
 
230 230
 admin_page_tail();
231
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
231
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
232 232
 ?>
Please login to merge, or discard this patch.
html/ops/manage_apps.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     $app = BoincApp::lookup_id($id);
26 26
     if (!$app) admin_error_page("no such app");
27 27
 
28
-    $n = post_str("deprecated", true)?1:0;
28
+    $n = post_str("deprecated", true) ? 1 : 0;
29 29
     $app->update("deprecated=$n");
30 30
 
31 31
     $n = post_num("weight");
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
     $n = post_int("target_nresults");
38 38
     $app->update("target_nresults=$n");
39 39
 
40
-    $n = post_str("homogeneous_app_version", true)?1:0;
40
+    $n = post_str("homogeneous_app_version", true) ? 1 : 0;
41 41
     $app->update("homogeneous_app_version=$n");
42 42
 
43
-    $n = post_str("non_cpu_intensive", true)?1:0;
43
+    $n = post_str("non_cpu_intensive", true) ? 1 : 0;
44 44
     $app->update("non_cpu_intensive=$n");
45 45
 
46
-    $n = post_str("beta", true)?1:0;
46
+    $n = post_str("beta", true) ? 1 : 0;
47 47
     $app->update("beta=$n");
48 48
 
49
-    $n = post_str("fraction_done_exact", true)?1:0;
49
+    $n = post_str("fraction_done_exact", true) ? 1 : 0;
50 50
     $app->update("fraction_done_exact=$n");
51 51
 
52 52
     echo "Application $id updated.
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 function add_app() {
59 59
     $name = BoincDb::escape_string(post_str('add_name'));
60 60
     $user_friendly_name = BoincDb::escape_string(post_str('add_user_friendly_name'));
61
-    if (empty($name) || empty($user_friendly_name) ) {
61
+    if (empty($name) || empty($user_friendly_name)) {
62 62
         admin_error_page(
63 63
             "To add a new application please supply both a brief name and a longer 'user-friendly' name.</font></p>"
64 64
         );
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
         <h2>Edit applications</h2>
82 82
     ";
83 83
 
84
-    $app_clause="deprecated=0";
85
-    $action_url="manage_apps.php";
86
-    if($all) {
84
+    $app_clause = "deprecated=0";
85
+    $action_url = "manage_apps.php";
86
+    if ($all) {
87 87
         $app_clause = "";
88
-        $action_url="manage_apps.php?all=1";
88
+        $action_url = "manage_apps.php?all=1";
89 89
         echo "<a href=\"manage_apps.php\">Don't show deprecated applications</a>";
90 90
     } else {
91 91
         echo "<a href=\"manage_apps.php?all=1\">Show deprecated applications</a>";
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
     $apps = BoincApp::enum($app_clause);
118 118
     foreach ($apps as $app) {
119 119
         // grey-out deprecated versions
120
-        $f1=$f2='';
121
-        if ($app->deprecated==1) {
120
+        $f1 = $f2 = '';
121
+        if ($app->deprecated == 1) {
122 122
             $f1 = "<font color='GREY'>";
123 123
             $f2 = "</font>";
124 124
         }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         echo "  <TD align='left'>$f1<a href=app_details.php?appid=$app->id>$app->name</a><br> $app->user_friendly_name $f2</TD>\n";
130 130
 
131
-        echo "  <TD align='center'>$f1 " .date_str($app->create_time)."$f2</TD>\n";
131
+        echo "  <TD align='center'>$f1 ".date_str($app->create_time)."$f2</TD>\n";
132 132
 
133 133
         $v = $app->weight;
134 134
         echo "  <TD align='center'>
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         ";
152 152
 
153 153
         $v = '';
154
-        if ($app->homogeneous_app_version) $v=' CHECKED ';
154
+        if ($app->homogeneous_app_version) $v = ' CHECKED ';
155 155
         echo "  <TD align='center'>
156 156
             <input name='homogeneous_app_version' type='checkbox' $v></TD>
157 157
         ";
Please login to merge, or discard this patch.