@@ -135,8 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | if (!$name) { |
137 | 137 | form_set_error('name', bts('Team name is required.', array(), NULL, 'boinc:team-create/edit')); |
138 | - } |
|
139 | - else { |
|
138 | + } else { |
|
140 | 139 | require_boinc('boinc_db'); |
141 | 140 | if (BoincTeam::lookup_name($name)) { |
142 | 141 | form_set_error('name', bts('A team named "@name" already exists.', |
@@ -177,8 +176,7 @@ discard block |
||
177 | 176 | if ($boinc_team) { |
178 | 177 | $boinc_user = BoincUser::lookup_id($account->boincuser_id); |
179 | 178 | user_join_team($boinc_team, $boinc_user); |
180 | - } |
|
181 | - else { |
|
179 | + } else { |
|
182 | 180 | drupal_set_message(t('Teams cannot be created at this time. The @project administrators have been notified.', array('@project' => PROJECT))); |
183 | 181 | rules_invoke_event('boincteam_create_team_error', $values['name'], variable_get('boinc_admin_mailing_list_subject_tag', '')); |
184 | 182 | watchdog('BOINC team', 'BOINC teams cannot be created for an unknown |
@@ -212,8 +210,7 @@ discard block |
||
212 | 210 | if (module_exists('pathauto')) { |
213 | 211 | module_load_include('inc', 'pathauto', 'pathauto'); |
214 | 212 | $node['path'] = pathauto_cleanstring($values['name']); |
215 | - } |
|
216 | - else { |
|
213 | + } else { |
|
217 | 214 | drupal_set_message(t('Teams cannot be created at this time. The @project administrators have been notified.', array('@project' => PROJECT))); |
218 | 215 | rules_invoke_event('boincteam_create_team_nopathauto_error', $values['name'], variable_get('boinc_admin_mailing_list_subject_tag', '')); |
219 | 216 | watchdog('BOINC team', 'BOINC teams require the Pathauto module. Teams |
@@ -381,8 +378,7 @@ discard block |
||
381 | 378 | $form['form control tabs'] = array( |
382 | 379 | '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)) . '</li>' |
383 | 380 | ); |
384 | - } |
|
385 | - else { |
|
381 | + } else { |
|
386 | 382 | $form['description'] = array( |
387 | 383 | '#prefix' => '<div class="form-item"><label>' . bts('Description', array(), NULL, 'boinc:team-description') . ':</label></div><div class="form-item">', |
388 | 384 | '#value' => $default['description'], |
@@ -412,12 +408,10 @@ discard block |
||
412 | 408 | |
413 | 409 | if ($form_state['storage']['is_boinc_wide']) { |
414 | 410 | form_set_error('none', bts('This team is managed by the BOINC-wide teams system and cannot be updated here.', array(), NULL, 'boinc:team-create/edit')); |
415 | - } |
|
416 | - else { |
|
411 | + } else { |
|
417 | 412 | if (!$name) { |
418 | 413 | form_set_error('name', bts('Team name is required.', array(), NULL, 'boinc:team-create/edit')); |
419 | - } |
|
420 | - else { |
|
414 | + } else { |
|
421 | 415 | $team = node_load($form_state['storage']['team_id']); |
422 | 416 | if ($name != $team->title) { |
423 | 417 | // If changing the name ("title" in Drupal terms), check that the new name is available |
@@ -559,8 +553,7 @@ discard block |
||
559 | 553 | |
560 | 554 | if (!$values['username']) { |
561 | 555 | form_set_error('username', bts('BOINC username is required.', array(), NULL, 'boinc:team-add-admin')); |
562 | - } |
|
563 | - else { |
|
556 | + } else { |
|
564 | 557 | // Load user account associated with username |
565 | 558 | $account = boincuser_privatemsg_name_lookup($values['username']); |
566 | 559 | // Validate the account |
@@ -570,24 +563,21 @@ discard block |
||
570 | 563 | '@username' => $account->boincuser_name |
571 | 564 | ), |
572 | 565 | NULL, 'boinc:team-add-admin')); |
573 | - } |
|
574 | - elseif (boincteam_is_founder($team_id, $account->uid)) { |
|
566 | + } elseif (boincteam_is_founder($team_id, $account->uid)) { |
|
575 | 567 | form_set_error('username', bts('@user is the founder of @team! Team founder already have all admin privileges.', |
576 | 568 | array( |
577 | 569 | '@user' => $account->boincuser_name, |
578 | 570 | '@team' => $team->title, |
579 | 571 | ), |
580 | 572 | NULL, 'boinc:team-add-admin')); |
581 | - } |
|
582 | - elseif (boincteam_is_admin($team_id, $account->uid)) { |
|
573 | + } elseif (boincteam_is_admin($team_id, $account->uid)) { |
|
583 | 574 | form_set_error('username', bts('@user is already an admin of @team.', |
584 | 575 | array( |
585 | 576 | '@user' => $account->boincuser_name, |
586 | 577 | '@team' => $team->title, |
587 | 578 | ), |
588 | 579 | NULL, 'boinc:team-add-admin')); |
589 | - } |
|
590 | - else { |
|
580 | + } else { |
|
591 | 581 | $form_state['storage']['boincuser_id'] = $account->boincuser_id; |
592 | 582 | $form_state['storage']['boincuser_name'] = $account->boincuser_name; |
593 | 583 | } |
@@ -645,8 +635,7 @@ discard block |
||
645 | 635 | if (isset($form_state['values'])) { |
646 | 636 | $subject = $form_state['values']['subject']; |
647 | 637 | $body = $form_state['values']['body']; |
648 | - } |
|
649 | - else { |
|
638 | + } else { |
|
650 | 639 | $subject = ''; |
651 | 640 | $body = ''; |
652 | 641 | } |
@@ -120,7 +120,8 @@ |
||
120 | 120 | // GET request - the user has navigated to the page. |
121 | 121 | page_head(tra("Generate proof of account ownership"), null, null, null, boinc_recaptcha_get_head_extra()); |
122 | 122 | |
123 | - if ($user) { // Verify the user is logged in |
|
123 | + if ($user) { |
|
124 | +// Verify the user is logged in |
|
124 | 125 | require_once("../inc/account_ownership.inc"); |
125 | 126 | |
126 | 127 | if (!file_exists($account_ownership_private_key_file_path)) { |
@@ -66,8 +66,7 @@ discard block |
||
66 | 66 | $vars['action'] = 'none'; |
67 | 67 | $vars['link_text'] = t('Reset Completely'); |
68 | 68 | $vars['link_title'] = t('Reset everying, allows users to re-flag content.'); |
69 | - } |
|
70 | - else { |
|
69 | + } else { |
|
71 | 70 | $vars['action'] = 'none'; |
72 | 71 | $vars['link_text'] = t('Locked'); |
73 | 72 | $vars['link_title'] = t('Reporting locked by moderator.'); |
@@ -75,8 +74,7 @@ discard block |
||
75 | 74 | $vars['link_href'] = ''; |
76 | 75 | $vars['flag_classes'] = 'flag style-like-link'; |
77 | 76 | } |
78 | - } |
|
79 | - else { |
|
77 | + } else { |
|
80 | 78 | // If there are flags on this content, clear the flags and |
81 | 79 | // lock the content. |
82 | 80 | if (user_access('reset abuse flags', $myuser)) { |
@@ -121,8 +119,7 @@ discard block |
||
121 | 119 | drupal_set_message(bts('INFO: Reset everything. Users may reflag this content.', array(), NULL, 'boinc:flag-abuse-reset'), 'info'); |
122 | 120 | // unlock flag; effectively resets flags for this content |
123 | 121 | variable_del($flag->name.'-'.$content_id); |
124 | - } |
|
125 | - else { |
|
122 | + } else { |
|
126 | 123 | // Clear and Lock all flags on this content. |
127 | 124 | $dbresult = db_query("SELECT DISTINCT fid FROM {flag_content} WHERE content_id = %d", $content_id); |
128 | 125 | $rows = 0; |
@@ -7,14 +7,11 @@ |
||
7 | 7 | list($module, $api) = func_get_args(); |
8 | 8 | if ($module == "input_formats" && $api == "input_formats") { |
9 | 9 | return array("version" => 1); |
10 | - } |
|
11 | - elseif ($module == "page_manager" && $api == "pages_default") { |
|
10 | + } elseif ($module == "page_manager" && $api == "pages_default") { |
|
12 | 11 | return array("version" => 1); |
13 | - } |
|
14 | - elseif ($module == "panels_mini" && $api == "panels_default") { |
|
12 | + } elseif ($module == "panels_mini" && $api == "panels_default") { |
|
15 | 13 | return array("version" => 1); |
16 | - } |
|
17 | - elseif ($module == "strongarm" && $api == "strongarm") { |
|
14 | + } elseif ($module == "strongarm" && $api == "strongarm") { |
|
18 | 15 | return array("version" => 1); |
19 | 16 | } |
20 | 17 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | continue; |
69 | 69 | } |
70 | 70 | // only do files ending in .po |
71 | - if (substr($file,-3) != ".po"){ |
|
71 | + if (substr($file,-3) != ".po") { |
|
72 | 72 | //debug("File $file with unknown extension found in $info_dir"); |
73 | 73 | continue; |
74 | 74 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | "-------------Compiling $transdir$file------------", 0 |
77 | 77 | ); |
78 | 78 | $language = parse_po_file($langdir.$transdir.$file); |
79 | - if (!$language){ |
|
79 | + if (!$language) { |
|
80 | 80 | language_log( |
81 | 81 | "WARNING: Could not parse language ".$file |
82 | 82 | ); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | ); |
96 | 96 | exit; |
97 | 97 | } |
98 | - foreach ($language as $key => $value){ |
|
98 | + foreach ($language as $key => $value) { |
|
99 | 99 | if ($value !== "") { |
100 | 100 | // Skip if the msgstr is empty |
101 | 101 | fwrite($fh, "\$language_lookup_array[\"".str_replace("\"", "\\\"", substr($file,0,-3))."\"][\"".$key."\"] = \"".$value."\";\n"); |
@@ -121,13 +121,13 @@ discard block |
||
121 | 121 | $parsing_text = false; |
122 | 122 | $size = sizeof($translation_file); |
123 | 123 | $output = array(); |
124 | - for ($i=0; $i<$size; $i++){ |
|
124 | + for ($i=0; $i<$size; $i++) { |
|
125 | 125 | $entry = trim($translation_file[$i]); |
126 | 126 | //echo "line $i: $entry\n"; |
127 | 127 | if (substr($entry, 0, 1)=="#") { |
128 | 128 | continue; |
129 | 129 | } elseif (strpos($entry, "msgid") !== false) { |
130 | - if (!$first_entry){ |
|
130 | + if (!$first_entry) { |
|
131 | 131 | //If this is not the first, save the previous entry |
132 | 132 | $output[$current_token]=$current_token_text; |
133 | 133 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | // Get the last token |
151 | 151 | // |
152 | - if ($current_token && $current_token_text){ |
|
152 | + if ($current_token && $current_token_text) { |
|
153 | 153 | $output[$current_token] = $current_token_text; |
154 | 154 | } |
155 | 155 | return $output; |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | |
181 | 181 | // Find the string in the user's language |
182 | 182 | // |
183 | - foreach ($languages_in_use as $language){ |
|
183 | + foreach ($languages_in_use as $language) { |
|
184 | 184 | if (isset($language_lookup_array[$language][$text])) { |
185 | 185 | $text = $language_lookup_array[$language][$text]; |
186 | 186 | break; |
187 | - } else if ($language=="en"){ |
|
187 | + } else if ($language=="en") { |
|
188 | 188 | // This language is defined in the code and is always available |
189 | 189 | break; |
190 | 190 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | // Replace relevant substrings with given arguments. |
194 | 194 | // Use strtr to avoid problems if an argument contains %n. |
195 | 195 | $replacements = array(); |
196 | - for ($i=1; $i<func_num_args(); $i++){ |
|
196 | + for ($i=1; $i<func_num_args(); $i++) { |
|
197 | 197 | $replacements["%".$i] = func_get_arg($i); |
198 | 198 | } |
199 | 199 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | if ($loglevel==1) $msg = "[ Warning ]"; |
218 | 218 | if ($loglevel==2) $msg = "[ CRITICAL ]"; |
219 | 219 | |
220 | - if ($loglevel >= $lang_log_level){ |
|
220 | + if ($loglevel >= $lang_log_level) { |
|
221 | 221 | echo gmdate("Y-m-d H:i:s", time())." ".$msg." ".$message."\n"; |
222 | 222 | } |
223 | 223 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | // (by looking at cookies and browser settings) |
227 | 227 | // cookies have highest priority. |
228 | 228 | |
229 | -if (isset($_COOKIE['lang'])){ |
|
229 | +if (isset($_COOKIE['lang'])) { |
|
230 | 230 | $language_string = $_COOKIE['lang'].","; |
231 | 231 | } else { |
232 | 232 | $language_string = ''; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | for ($i=0; $i<$size; $i++) { |
261 | 261 | if ((strlen($client_languages[$i])>2) |
262 | 262 | && (substr($client_languages[$i], 2, 1) == "_" || substr($client_languages[$i], 2, 1) == "-") |
263 | - ){ |
|
263 | + ) { |
|
264 | 264 | // If this is defined as primary-secondary, represent it as xx_YY |
265 | 265 | // |
266 | 266 | $language = substr( |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | // |
288 | 288 | $file_name = $lang_language_dir.$lang_compiled_dir.$language.".po.inc"; |
289 | 289 | if (file_exists($file_name)) { |
290 | - if (!in_array($language, $languages_in_use)){ |
|
290 | + if (!in_array($language, $languages_in_use)) { |
|
291 | 291 | require_once($file_name); |
292 | 292 | $languages_in_use[] = $language; |
293 | 293 | } |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | if ($language2) { |
296 | 296 | $file_name = $lang_language_dir.$lang_compiled_dir.$language2.".po.inc"; |
297 | 297 | if (file_exists($file_name)) { |
298 | - if (!in_array($language2, $languages_in_use)){ |
|
298 | + if (!in_array($language2, $languages_in_use)) { |
|
299 | 299 | require_once($file_name); |
300 | 300 | $languages_in_use[] = $language2; |
301 | 301 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | // return a string for navigating pages |
240 | 240 | // |
241 | -function page_links($url, $nitems, $items_per_page, $start){ |
|
241 | +function page_links($url, $nitems, $items_per_page, $start) { |
|
242 | 242 | // How many pages to potentially show before and after this one: |
243 | 243 | $preshow = 3; |
244 | 244 | $postshow = 3; |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | |
252 | 252 | // If this is not the first page, display "previous" |
253 | 253 | // |
254 | - if ($curpage > 0){ |
|
254 | + if ($curpage > 0) { |
|
255 | 255 | $x .= page_link( |
256 | 256 | $url, $curpage-1, $items_per_page, |
257 | 257 | tra("Previous")." · " |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | } |
269 | 269 | // Display a list of pages surrounding this one |
270 | 270 | // |
271 | - for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++){ |
|
271 | + for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++) { |
|
272 | 272 | $page_str = (string)($i+1); |
273 | 273 | if ($i < 0) continue; |
274 | 274 | if ($i >= $npages) break; |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | } |
290 | 290 | // If there is a next page |
291 | 291 | // |
292 | - if ($curpage < $npages-1){ |
|
292 | + if ($curpage < $npages-1) { |
|
293 | 293 | $x .= page_link( |
294 | 294 | $url, $curpage+1, $items_per_page, |
295 | 295 | " · ".tra("Next") |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | |
519 | 519 | // If the user no longer exists, skip the post |
520 | 520 | // |
521 | - if (!$user){ |
|
521 | + if (!$user) { |
|
522 | 522 | return; |
523 | 523 | } |
524 | 524 | |
@@ -539,9 +539,9 @@ discard block |
||
539 | 539 | // check whether the poster is on the list of people to ignore |
540 | 540 | // |
541 | 541 | $ignore_poster = false; |
542 | - if ($logged_in_user){ |
|
542 | + if ($logged_in_user) { |
|
543 | 543 | $tokens = url_tokens($logged_in_user->authenticator); |
544 | - if (is_ignoring($logged_in_user, $user)){ |
|
544 | + if (is_ignoring($logged_in_user, $user)) { |
|
545 | 545 | $ignore_poster = true; |
546 | 546 | } |
547 | 547 | } |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | |
579 | 579 | // Highlight special users if set in prefs; |
580 | 580 | // |
581 | - if ($logged_in_user && $logged_in_user->prefs){ |
|
581 | + if ($logged_in_user && $logged_in_user->prefs) { |
|
582 | 582 | $highlight = $logged_in_user->prefs->highlight_special && $is_posted_by_special; |
583 | 583 | } else { |
584 | 584 | $highlight = $is_posted_by_special; |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | echo "<span class=\"small\">"; |
600 | 600 | if ($fstatus) echo "$fstatus"; |
601 | 601 | |
602 | - if (!$filter || !$ignore_poster){ |
|
602 | + if (!$filter || !$ignore_poster) { |
|
603 | 603 | if ($user->prefs && $user->prefs->avatar!="" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars==false))) { |
604 | 604 | echo "<img width=\"".AVATAR_WIDTH."\" height=\"".AVATAR_HEIGHT."\" src=\"".avatar_url($user->prefs->avatar)."\" alt=\"Avatar\"><br>"; |
605 | 605 | } |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | $user->nposts = BoincPost::count("user=$user->id"); |
616 | 616 | } |
617 | 617 | |
618 | - if (function_exists('project_forum_user_info')){ |
|
618 | + if (function_exists('project_forum_user_info')) { |
|
619 | 619 | project_forum_user_info($user); |
620 | 620 | } else { |
621 | 621 | echo tra("Posts: %1", $user->nposts)."<br>"; |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | echo "<form action=\"forum_rate.php?post=", $post->id, "\" method=\"post\">"; |
655 | 655 | } |
656 | 656 | |
657 | - if ($logged_in_user && $post->timestamp > $latest_viewed){ |
|
657 | + if ($logged_in_user && $post->timestamp > $latest_viewed) { |
|
658 | 658 | show_image(NEW_IMAGE, tra("You haven't read this message yet"), tra("Unread"), NEW_IMAGE_HEIGHT); |
659 | 659 | } |
660 | 660 | |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | if ($post->modified) { |
675 | 675 | echo "<br>".tra("Last modified: %1", pretty_time_Str($post->modified)); |
676 | 676 | } |
677 | - if ($ignore_poster && $filter){ |
|
677 | + if ($ignore_poster && $filter) { |
|
678 | 678 | echo "<br>" .tra( |
679 | 679 | "This post is hidden because the sender is on your 'ignore' list. Click %1 here %2 to view hidden posts", |
680 | 680 | "<a href=\"?id=".$thread->id."&filter=false&start=$start#".$post->id."\">", |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | <p> |
689 | 689 | "; |
690 | 690 | |
691 | - if (!$filter || !$ignore_poster){ |
|
691 | + if (!$filter || !$ignore_poster) { |
|
692 | 692 | $posttext = $post->content; |
693 | 693 | |
694 | 694 | // If the creator of this post has a signature and |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | // user has signatures enabled: show it |
697 | 697 | // |
698 | 698 | $posttext = output_transform($posttext, $options); |
699 | - if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)){ |
|
699 | + if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)) { |
|
700 | 700 | $sig = output_transform($user->prefs->signature, $options); |
701 | 701 | $posttext .= "<hr>$sig\n"; |
702 | 702 | } |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | $content = output_transform($post->content, $options); |
756 | 756 | $when = time_diff_str($post->timestamp, time()); |
757 | 757 | $user = BoincUser::lookup_id($post->user); |
758 | - if (!$user){ |
|
758 | + if (!$user) { |
|
759 | 759 | return; |
760 | 760 | } |
761 | 761 | |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | |
1090 | 1090 | $sql = 'forum = ' . $forumID ; |
1091 | 1091 | $stickysql = ""; |
1092 | - if ($sticky){ |
|
1092 | + if ($sticky) { |
|
1093 | 1093 | $stickysql = "sticky DESC, "; |
1094 | 1094 | } |
1095 | 1095 | if (!$show_hidden) { |
@@ -1170,7 +1170,7 @@ discard block |
||
1170 | 1170 | // |
1171 | 1171 | function show_post_moderation_links( |
1172 | 1172 | $config, $logged_in_user, $post, $forum, $tokens |
1173 | -){ |
|
1173 | +) { |
|
1174 | 1174 | $moderators_allowed_to_ban = parse_bool($config, "moderators_allowed_to_ban"); |
1175 | 1175 | $moderators_vote_to_ban = parse_bool($config, "moderators_vote_to_ban"); |
1176 | 1176 |
@@ -259,10 +259,10 @@ |
||
259 | 259 | // "[vbox|5.0.0|1|1]", where now two additional flags give information about |
260 | 260 | // hardware virtualization support. Older clients may have the old-style |
261 | 261 | // serialnum in the DB despite the server being upgraded. |
262 | -function vbox_desc($x){ |
|
263 | - if (preg_match("/\[vbox\|(.*?)(\|([01])\|([01]))?\]/",$x,$matches)){ |
|
262 | +function vbox_desc($x) { |
|
263 | + if (preg_match("/\[vbox\|(.*?)(\|([01])\|([01]))?\]/",$x,$matches)) { |
|
264 | 264 | $desc = "Virtualbox (".$matches[1].") ".tra("installed"); |
265 | - if (sizeof($matches)>2){ |
|
265 | + if (sizeof($matches)>2) { |
|
266 | 266 | if ($matches[3]=="1" and $matches[4]=="1") { |
267 | 267 | return $desc.tra(", CPU has hardware virtualization support and it is enabled"); |
268 | 268 | } elseif ($matches[3]=="1" and $matches[4]=="0") { |
@@ -98,7 +98,9 @@ discard block |
||
98 | 98 | if (!isset($types)) { |
99 | 99 | $types = array(); |
100 | 100 | $constants = get_defined_constants(true); |
101 | - foreach ($constants['mysqli'] as $c => $n) if (preg_match('/^MYSQLI_TYPE_(.*)/', $c, $m)) $types[$n] = $m[1]; |
|
101 | + foreach ($constants['mysqli'] as $c => $n) { |
|
102 | + if (preg_match('/^MYSQLI_TYPE_(.*)/', $c, $m)) $types[$n] = $m[1]; |
|
103 | + } |
|
102 | 104 | } |
103 | 105 | return array_key_exists($type_id, $types)? strtolower($types[$type_id]) : "unknown"; |
104 | 106 | } |
@@ -381,13 +383,13 @@ discard block |
||
381 | 383 | |
382 | 384 | |
383 | 385 | function link_results($n, $mq, $query, $clauses) { |
384 | - if ($n == '0') { // intentional compare by string |
|
386 | + if ($n == '0') { |
|
387 | +// intentional compare by string |
|
385 | 388 | return "0"; |
386 | 389 | } else { |
387 | 390 | if(strlen($clauses)) { |
388 | 391 | return "<a href=\"db_action.php?table=result&query=$mq&$query&clauses=".urlencode($clauses)."&sort_by=mod_time&detail=low\">$n</a>"; |
389 | - } |
|
390 | - else { |
|
392 | + } else { |
|
391 | 393 | return "<a href=\"db_action.php?table=result&query=$mq&$query&sort_by=mod_time&detail=low\">$n</a>"; |
392 | 394 | } |
393 | 395 | |
@@ -397,7 +399,7 @@ discard block |
||
397 | 399 | // Determines if in stderr_out is an error reported and prints as human readable String |
398 | 400 | // @return String A human readable string if error otherwise FALSE |
399 | 401 | // @param String $stderr_out the stderr_out value to parse |
400 | -function stderr_error_string($stderr_out){ |
|
402 | +function stderr_error_string($stderr_out) { |
|
401 | 403 | $y = parse_element($stderr_out, "<error_code>"); |
402 | 404 | $x = 0; |
403 | 405 | if ($y) { |
@@ -1176,7 +1178,7 @@ discard block |
||
1176 | 1178 | // result has not been received yet, so show report deadline either |
1177 | 1179 | // in green if in the future or in red if in the past. |
1178 | 1180 | $timenow=time(); |
1179 | - if ($result->report_deadline==0) { |
|
1181 | + if ($result->report_deadline==0) { |
|
1180 | 1182 | // not sent -- show create time in purple |
1181 | 1183 | $received = "<font color=\"9900cc\">". time_str($result->create_time) . "</font>"; |
1182 | 1184 | } else if ($result->report_deadline>=$timenow) { |
@@ -35,14 +35,14 @@ |
||
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 { |