Passed
Push — dpa_submit21 ( e4087a...141260 )
by David
08:42
created
sites/default/boinc/modules/comment_form_block/comment_form_block.module 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $node = node_load($nid);
20 20
         if ($node->comment !== 0 AND user_access('post comments', $user)) {
21 21
           $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
-          $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
22
+          $block['content'] = '<h2>'.bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment').'</h2>';
23 23
           $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid));
24 24
         }
25 25
       }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boinccore/boinccore.module 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
         // RFC2616 mandates that the decimal part is no more than three digits,
312 312
         // so we multiply the qvalue by 1000 to avoid floating point comparisons.
313 313
         $langcode = strtolower($match[1]);
314
-        $qvalue = isset($match[2]) ? (float) $match[2] : 1;
315
-        $browser_langcodes[$langcode] = (int) ($qvalue * 1000);
314
+        $qvalue = isset($match[2]) ? (float)$match[2] : 1;
315
+        $browser_langcodes[$langcode] = (int)($qvalue*1000);
316 316
       }
317 317
     }
318 318
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     global $base_url;
378 378
     global $base_path;
379 379
     $site_name = variable_get('site_name', 'Drupal-BOINC');
380
-    $site_url = $base_url . $base_path;
380
+    $site_url = $base_url.$base_path;
381 381
     $settings = array(
382 382
       'from' => '',
383 383
       'subject' => "Content at {$site_name} is awaiting moderation",
@@ -437,11 +437,11 @@  discard block
 block discarded – undo
437 437
         $user_info .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
438 438
       }
439 439
       elseif (is_string($user_image)) {
440
-        $user_info .= '<img src="' . $user_image . '"/>';
440
+        $user_info .= '<img src="'.$user_image.'"/>';
441 441
       }
442 442
       $user_info .= '  </div>';
443 443
     }
444
-    $user_info .= '  <div class="name">' . theme('username', $account) . '</div>';
444
+    $user_info .= '  <div class="name">'.theme('username', $account).'</div>';
445 445
     if ($account->uid) {
446 446
       //$user_info .= '  <div class="join-date">Joined: ' . date('j M y', $account->created) . '</div>';
447 447
       //$user_info .= '  <div class="post-count">Posts: ' . $account->post_count . '</div>';
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
     $form['buttons']['preview']['#suffix'] = '</li>';
506 506
     $form['buttons']['preview']['#weight'] = 1003;
507 507
     $form['buttons']['cancel'] = array(
508
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_url) . '</li>',
508
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_url).'</li>',
509 509
       '#weight' => 1004,
510 510
     );
511 511
     $form['buttons']['form control tabs suffix'] = array(
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
     $node = node_load($form['nid']['#value']);
526 526
     $community_role = array_search('community member', user_roles(true));
527 527
     $unrestricted_role = array_search('verified contributor', user_roles(true));
528
-    if ( (isset($account->roles[$community_role])) and (!isset($account->roles[$unrestricted_role])) ) {
528
+    if ((isset($account->roles[$community_role])) and (!isset($account->roles[$unrestricted_role]))) {
529 529
       if ($node->type == 'forum') {
530 530
         if (module_exists('captcha')) {
531 531
           $form['comment_captcha'] = array(
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
571 571
     $form['buttons']['preview_changes']['#weight'] = 1004;
572 572
     $form['buttons']['cancel'] = array(
573
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "community/forum/{$forum_id}") . '</li>',
573
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "community/forum/{$forum_id}").'</li>',
574 574
       '#weight' => 1005,
575 575
     );
576 576
     $form['buttons']['form control tabs suffix'] = array(
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
     // Add captcha for role='community member'
582 582
     $community_role = array_search('community member', user_roles(true));
583 583
     $unrestricted_role = array_search('verified contributor', user_roles(true));
584
-    if ( (isset($account->roles[$community_role])) and (!isset($account->roles[$unrestricted_role])) ) {
584
+    if ((isset($account->roles[$community_role])) and (!isset($account->roles[$unrestricted_role]))) {
585 585
       if (module_exists('captcha')) {
586 586
         $form['comment_captcha'] = array(
587 587
           '#type' => 'captcha',
@@ -673,8 +673,8 @@  discard block
 block discarded – undo
673 673
 function boinccore_link($type, $object, $teaser = FALSE) {
674 674
   // Add custom links with this hook
675 675
 
676
-  if ($type=='node') {
677
-    if ( ($object->type=='forum') OR ($object->type=='team_forum') ) {
676
+  if ($type == 'node') {
677
+    if (($object->type == 'forum') OR ($object->type == 'team_forum')) {
678 678
       // Add topic moderator controls
679 679
       if (user_access('edit any forum topic')) {
680 680
         $node_control = "node_control/{$object->nid}";
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
       }// if user_access('edit any forum topic')
736 736
     }
737 737
   }
738
-  else if ($type=='comment') {
738
+  else if ($type == 'comment') {
739 739
     $node = node_load($object->nid);
740 740
     $nid = $object->nid;
741 741
     $cid = $object->cid;
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
     if (user_access('administer comments')) {
758 758
       $comment_control = "comment_control/{$cid}";
759 759
       // Add link to convert comment into a new topic
760
-      $reply_count = db_result(db_query(' SELECT COUNT(*) FROM comments WHERE pid = %d', $cid ));
760
+      $reply_count = db_result(db_query(' SELECT COUNT(*) FROM comments WHERE pid = %d', $cid));
761 761
       if ($reply_count == 0) {
762 762
         $links['convert'] = array(
763 763
             'title' => bts('Convert', array(), NULL, 'boinc:forum-convert-comment-to-topic'),
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
   */
803 803
   $message['headers']['Content-Transfer-Encoding'] = 'Quoted-Printable';
804 804
   if (is_array($message['body'])) {
805
-    $message['body'] = array_map( "quoted_printable_encode", $message['body'] );
805
+    $message['body'] = array_map("quoted_printable_encode", $message['body']);
806 806
   } else {
807 807
     $message['body'] = quoted_printable_encode($message['body']);
808 808
   }
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
   // If hiding a forum topic (node) and not an administrator, go to
854 854
   // the forum page. Otherwise the user will reach an access-denied
855 855
   // page.
856
-  if (($action=="hide") and (!user_access('administer forums'))) {
856
+  if (($action == "hide") and (!user_access('administer forums'))) {
857 857
     drupal_goto("community/forum/{$node->tid}");
858 858
   }
859 859
   drupal_goto("node/{$nid}");
@@ -895,8 +895,8 @@  discard block
 block discarded – undo
895 895
     $node->created = $comment->timestamp;
896 896
     $node->changed = $node->created;
897 897
     $node->promote = 0; // Display on front page?
898
-    $node->sticky = 0;  // Display top of page?
899
-    $node->status = 1;   // Published?
898
+    $node->sticky = 0; // Display top of page?
899
+    $node->status = 1; // Published?
900 900
     $node->comment = 2;
901 901
     //$node->language = 'en';
902 902
     $node->uid = $comment->uid;
@@ -981,16 +981,16 @@  discard block
 block discarded – undo
981 981
     $xml->loadXML($global_prefs, LIBXML_NOBLANKS);
982 982
     if ($errors = libxml_get_errors($xml)) {
983 983
       $lines = explode("\r", $global_prefs);
984
-      watchdog('am_set_info', "XML validation error in global_prefs: {$errors[0]->message} at line {$errors[0]->line}" .
985
-        ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
984
+      watchdog('am_set_info', "XML validation error in global_prefs: {$errors[0]->message} at line {$errors[0]->line}".
985
+        ': <br/>'.htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
986 986
     }
987 987
   }
988 988
   elseif ($project_prefs) {
989 989
     $xml->loadXML($project_prefs, LIBXML_NOBLANKS);
990 990
     if ($errors = libxml_get_errors($xml)) {
991 991
       $lines = explode("\r", $project_prefs);
992
-      watchdog('am_set_info', "XML validation error in project_prefs: {$errors[0]->message} at line {$errors[0]->line}" .
993
-        ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
992
+      watchdog('am_set_info', "XML validation error in project_prefs: {$errors[0]->message} at line {$errors[0]->line}".
993
+        ': <br/>'.htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
994 994
     }
995 995
   }
996 996
   if (!$errors) {
@@ -1033,8 +1033,8 @@  discard block
 block discarded – undo
1033 1033
     $xml = array(
1034 1034
       'error' => array(
1035 1035
         'error_num' => -112,
1036
-        'error_msg' => "{$errors[0]->message} at line {$errors[0]->line}" .
1037
-        ': <br/>' . htmlentities($lines[$errors[0]->line - 1])
1036
+        'error_msg' => "{$errors[0]->message} at line {$errors[0]->line}".
1037
+        ': <br/>'.htmlentities($lines[$errors[0]->line - 1])
1038 1038
       ),
1039 1039
     );
1040 1040
   }
@@ -1142,10 +1142,10 @@  discard block
 block discarded – undo
1142 1142
           'teaser' => $teaser,
1143 1143
           'uid' => $team_owner_uid,
1144 1144
           'path' => null,
1145
-          'status' => 1,  // published or not - always publish
1145
+          'status' => 1, // published or not - always publish
1146 1146
           'promote' => 0,
1147 1147
           'created' => $created_time,
1148
-          'comment' => 0,  // comments disabled
1148
+          'comment' => 0, // comments disabled
1149 1149
           'moderate' => 0,
1150 1150
           'sticky' => 0,
1151 1151
           'format' => $input_format
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
           module_load_include('inc', 'pathauto', 'pathauto');
1157 1157
           $node['path'] = pathauto_cleanstring($values['name']);
1158 1158
 
1159
-          $node = (object) $node; // node_save requires an object form
1159
+          $node = (object)$node; // node_save requires an object form
1160 1160
           $team_categories = taxonomy_get_term_by_name($values['type']);
1161 1161
           $node->taxonomy[] = $team_categories[0];
1162 1162
 
@@ -1315,7 +1315,7 @@  discard block
 block discarded – undo
1315 1315
       while ($member = db_fetch_object($result)) {
1316 1316
         $team_members[$member->boinc_id]['country'] = $member->field_country_value;
1317 1317
         $team_members[$member->boinc_id]['url'] = $member->field_url_value;
1318
-        $team_members[$member->boinc_id]['has_profile'] = isset($member->nid) ? 1:  0;
1318
+        $team_members[$member->boinc_id]['has_profile'] = isset($member->nid) ? 1 : 0;
1319 1319
         $xml['users']['user'][] = $team_members[$member->boinc_id];
1320 1320
       }
1321 1321
     } // end if credit_only
@@ -1365,7 +1365,7 @@  discard block
 block discarded – undo
1365 1365
             if ($profile_nid = content_profile_profile_exists($profile, $account->uid)) {
1366 1366
               $profile_node = node_load($profile_nid);
1367 1367
               if ($profile_node) {
1368
-                $avatar_image = get_cck_image_object(file_directory_path() . '/' . $image_path, 'field_image', 'profile', TRUE);
1368
+                $avatar_image = get_cck_image_object(file_directory_path().'/'.$image_path, 'field_image', 'profile', TRUE);
1369 1369
                 if ($avatar_image) {
1370 1370
                   $profile_node->field_image[0] = $avatar_image;
1371 1371
                   node_save($profile_node);
@@ -1479,7 +1479,7 @@  discard block
 block discarded – undo
1479 1479
         WHERE (n.status = 1) AND (c.uid = '%d')
1480 1480
         ORDER BY timestamp DESC
1481 1481
         LIMIT %d",
1482
-        $uid, (int) $count
1482
+        $uid, (int)$count
1483 1483
       );
1484 1484
       $xml = array(
1485 1485
         'rpc_response' => array(
@@ -1522,7 +1522,7 @@  discard block
 block discarded – undo
1522 1522
         WHERE (n.status = 1) AND (n.uid = '%d')
1523 1523
         ORDER BY changed DESC
1524 1524
         LIMIT %d",
1525
-        $uid, (int) $count
1525
+        $uid, (int)$count
1526 1526
       );
1527 1527
       $xml = array(
1528 1528
         'rpc_response' => array(
@@ -1691,7 +1691,7 @@  discard block
 block discarded – undo
1691 1691
           );
1692 1692
         }
1693 1693
         // Determine which page to display in order to show the given comment
1694
-        $page = floor($comment_offset / $comments_per_page);
1694
+        $page = floor($comment_offset/$comments_per_page);
1695 1695
         if ($page) {
1696 1696
           $params = array('page' => $page);
1697 1697
         }
@@ -2083,7 +2083,7 @@  discard block
 block discarded – undo
2083 2083
  * Overview of moderation queues
2084 2084
  */
2085 2085
 function boinccore_moderation_overview_panel() {
2086
-  $output = '<h2 class="pane-title">' . bts('Moderation', array(), NULL, 'boinc:moderate-profiles') . '</h2>';
2086
+  $output = '<h2 class="pane-title">'.bts('Moderation', array(), NULL, 'boinc:moderate-profiles').'</h2>';
2087 2087
   $output .= '<ul class="tab-list action-list">';
2088 2088
   if (module_exists('user_profiles')) {
2089 2089
     $profile_count = db_result(db_query("
@@ -2094,7 +2094,7 @@  discard block
 block discarded – undo
2094 2094
     $output .= '<li class="tab primary">';
2095 2095
     $output .= l(bts('Unvetted profiles', array(), NULL, 'boinc:moderate-profiles'), 'moderate/profiles');
2096 2096
     $output .= '<div class="item-count-wrapper">';
2097
-    $output .= '<span class="item-count">' . $profile_count . '</span>';
2097
+    $output .= '<span class="item-count">'.$profile_count.'</span>';
2098 2098
     $output .= '</div>';
2099 2099
     $output .= '</li>';
2100 2100
   }
@@ -2112,7 +2112,7 @@  discard block
 block discarded – undo
2112 2112
   require_boinc('boinc_db');
2113 2113
 
2114 2114
   $num_deleted = BoincToken::delete_expired();
2115
-  if ($num_deleted>0) {
2115
+  if ($num_deleted > 0) {
2116 2116
     watchdog('boinccore', "Deleted ${num_deleted} tokens from table token", WATCHDOG_NOTICE);
2117 2117
   }
2118 2118
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/themes/boinc/template.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
  */
83 83
 function boinc_links__system_main_menu($links, $menu, $element) {
84 84
   $html = '';
85
-  $html .= '<ul id="' . $menu['id'] . '" class="' . $menu['class'] . '">' . "\n";
85
+  $html .= '<ul id="'.$menu['id'].'" class="'.$menu['class'].'">'."\n";
86 86
   $item_count = count($links);
87 87
   $i = 1;
88 88
   foreach ($links as $key => $link) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     if (strpos($key, 'active-trail')) $classes[] = 'active';
91 91
     if ($i == 1) $classes[] = 'first';
92 92
     if ($i == $item_count) $classes[] = 'last';
93
-    $html .= '<li class="' . implode(' ', $classes) .'">';
93
+    $html .= '<li class="'.implode(' ', $classes).'">';
94 94
     if ($link['title'] == 'Home') {
95 95
       $link['title'] = bts('Home', array(), NULL, 'boinc:menu-link');
96 96
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
       if ($link['href'] == 'dashboard') {
100 100
         $item_count = privatemsg_unread_count();
101 101
         if ($item_count) {
102
-          $link['title'] .= '</a> <a href="' . url('messages') . '" class="compound secondary"><div class="item-count-wrapper"><span class="item-count">' . $item_count . '</span></div>';
102
+          $link['title'] .= '</a> <a href="'.url('messages').'" class="compound secondary"><div class="item-count-wrapper"><span class="item-count">'.$item_count.'</span></div>';
103 103
           $link['html'] = TRUE;
104 104
           $link['attributes']['class'] = 'compound';
105 105
         }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     if ($link['href'] == 'moderate') {
110 110
       $item_count = boincuser_moderation_queue_count();
111 111
       if ($item_count) {
112
-        $link['title'] .= ' <div class="item-count-wrapper"><span class="item-count">' . $item_count . '</span></div>';
112
+        $link['title'] .= ' <div class="item-count-wrapper"><span class="item-count">'.$item_count.'</span></div>';
113 113
         $link['html'] = TRUE;
114 114
       }
115 115
     }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     $html .= '</li>';
118 118
     $i++;
119 119
   }
120
-  $html .= '</ul>' . "\n";
120
+  $html .= '</ul>'."\n";
121 121
   return $html;
122 122
 }
123 123
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     return '';
133 133
   }
134 134
   else {
135
-    return '<li '. ($active ? 'class="active" ' : '') .'>'. $link ."</li>\n";
135
+    return '<li '.($active ? 'class="active" ' : '').'>'.$link."</li>\n";
136 136
   }
137 137
 }
138 138
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
   if (empty($locality)) {
198 198
     $locality = "en";
199 199
   }
200
-  $vars['flag_path'] = base_path() . path_to_theme() . "/images/flags/{$locality}.png";
200
+  $vars['flag_path'] = base_path().path_to_theme()."/images/flags/{$locality}.png";
201 201
 
202 202
   $server_status_url = variable_get('boinc_server_status_url', '');
203 203
   if (!$server_status_url) {
@@ -219,16 +219,16 @@  discard block
 block discarded – undo
219 219
   if (arg(0) == 'search') {
220 220
     unset($vars['title']);
221 221
   }
222
-  else if ( (arg(0)=='account') AND (is_numeric(arg(1))) AND (empty(arg(2))) ) {
222
+  else if ((arg(0) == 'account') AND (is_numeric(arg(1))) AND (empty(arg(2)))) {
223 223
     unset($vars['title']);
224 224
   }
225
-  else if ( (arg(0)=='account') AND (arg(1)=='profile') ) {
225
+  else if ((arg(0) == 'account') AND (arg(1) == 'profile')) {
226 226
     unset($vars['title']);
227 227
   }
228
-  else if ( (arg(0)=='dashboard') ) {
228
+  else if ((arg(0) == 'dashboard')) {
229 229
     unset($vars['title']);
230 230
   }
231
-  else if ( (arg(0)=='community') AND ( (arg(1)=='teams') OR (arg(1)=='stats') ) ) {
231
+  else if ((arg(0) == 'community') AND ((arg(1) == 'teams') OR (arg(1) == 'stats'))) {
232 232
     unset($vars['title']);
233 233
   }
234 234
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
               $tab = str_replace('li class="', 'li class="first ', $tab);
245 245
           }
246 246
           if ($key == $last_key) {
247
-              $tab = str_replace('li class="', 'li class="last ', $tab) . '</ul>';
247
+              $tab = str_replace('li class="', 'li class="last ', $tab).'</ul>';
248 248
           }
249 249
       }
250 250
       elseif (strpos($tab, 'li ')) {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
               $tab = str_replace('li ', 'li class="first" ', $tab);
253 253
           }
254 254
           if ($key == $last_key) {
255
-              $tab = str_replace('li ', 'li class="last" ', $tab) . '</ul>';
255
+              $tab = str_replace('li ', 'li class="last" ', $tab).'</ul>';
256 256
           }
257 257
       }
258 258
   }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
   // Optionally, run node-type-specific preprocess functions, like
291 291
   // boinc_preprocess_node_page() or boinc_preprocess_node_story().
292
-  $function = __FUNCTION__ . '_' . $vars['node']->type;
292
+  $function = __FUNCTION__.'_'.$vars['node']->type;
293 293
   if (function_exists($function)) {
294 294
     $function($vars, $hook);
295 295
   }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
   $vars['node']->comment = 0;
341 341
 
342 342
   $vars['first_page'] = (!isset($_GET['page']) OR ($_GET['page'] < 1));
343
-  $page_count = max(ceil($vars['comment_count'] / $comments_per_page), 1);
343
+  $page_count = max(ceil($vars['comment_count']/$comments_per_page), 1);
344 344
   $vars['last_page'] = ($page_count == 1 OR ($page_count > 1 AND $_GET['page'] == $page_count - 1));
345 345
 
346 346
   $links = $vars['links'];
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
   case 'boinc_host':
453 453
       $view = views_get_current_view();
454 454
       if (!($view->result)) {
455
-        $vars['footer'] = '<h3>' . bts ('Host not found in database.', array(), NULL, 'boinc:host-details') . '</h3>';
455
+        $vars['footer'] = '<h3>'.bts('Host not found in database.', array(), NULL, 'boinc:host-details').'</h3>';
456 456
       }
457 457
     break;
458 458
   case 'boinc_host_list':
@@ -471,10 +471,10 @@  discard block
 block discarded – undo
471 471
 
472 472
     if ($result) {
473 473
       // Display the stderr output in the footer
474
-      $vars['footer'] = '<h3>' . bts('Stderr output', array(), NULL, 'boinc:task-details-errorlog') .'</h3>';
475
-      $vars['footer'] .= '<pre>' . htmlspecialchars($result->result_stderr_out) . '</pre>';
474
+      $vars['footer'] = '<h3>'.bts('Stderr output', array(), NULL, 'boinc:task-details-errorlog').'</h3>';
475
+      $vars['footer'] .= '<pre>'.htmlspecialchars($result->result_stderr_out).'</pre>';
476 476
     } else {
477
-      $vars['footer'] = '<h3>' . bts ('Task not found in database.', array(), NULL, 'boinc:task-details') . '</h3>';
477
+      $vars['footer'] = '<h3>'.bts('Task not found in database.', array(), NULL, 'boinc:task-details').'</h3>';
478 478
     }
479 479
     break;
480 480
   case 'boinc_teams':
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
     ob_start();
488 488
     // Get the workunit ID from the URL
489 489
     $result_id = arg(1);
490
-    require_boinc(array('util','boinc_db'));
490
+    require_boinc(array('util', 'boinc_db'));
491 491
     $wu = BoincWorkunit::lookup_id($result_id);
492 492
     if ($wu) {
493 493
       // Output from admin defined BOINC project-specific function
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
       // Output of project_workunit() gets caught in the buffer
496 496
       $vars['footer'] = ob_get_clean();
497 497
     } else {
498
-      $vars['footer'] = '<h3>' . bts ('Workunit not found in database.', array(), NULL, 'boinc:workunit-details') . '</h3>';
498
+      $vars['footer'] = '<h3>'.bts('Workunit not found in database.', array(), NULL, 'boinc:workunit-details').'</h3>';
499 499
     }
500 500
   default:
501 501
   }
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
       $author_picture .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
518 518
     }
519 519
     elseif (is_string($user_image)) {
520
-      $author_picture .= '<img src="' . $user_image . '"/>';
520
+      $author_picture .= '<img src="'.$user_image.'"/>';
521 521
     }
522 522
   }
523 523
   $author_picture .= '</div>';
@@ -556,14 +556,14 @@  discard block
 block discarded – undo
556 556
   case 'profile':
557 557
   case 'user':
558 558
     $node = $variables['result']['node'];
559
-    $variables['url'] = url('account/' . $node->is_uid);
559
+    $variables['url'] = url('account/'.$node->is_uid);
560 560
     $variables['title'] = $node->tos_name;
561 561
     $variables['user_image'] = boincuser_get_user_profile_image($node->is_uid);
562 562
     $variables['account'] = user_load($node->is_uid);
563 563
     break;
564 564
   case 'team':
565 565
     $node = $variables['result']['node'];
566
-    $variables['url'] = url('/community/teams/' . $node->entity_id);;
566
+    $variables['url'] = url('/community/teams/'.$node->entity_id); ;
567 567
     break;
568 568
   case 'forum':
569 569
     $node = $variables['result']['node'];
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
     // Parent forum topic title
582 582
     $variables['parent_title'] = $drupalnode->title;
583 583
     // Link to the parent forum topic
584
-    $variables['parent_topic'] = l($drupalnode->title, drupal_get_path_alias('node/' . $nid) );
584
+    $variables['parent_topic'] = l($drupalnode->title, drupal_get_path_alias('node/'.$nid));
585 585
     // Get the taxonomy for the node, creates a link to the parent forum
586 586
     $taxonomy = reset($drupalnode->taxonomy);
587 587
     if ($vocab = taxonomy_vocabulary_load($taxonomy->vid)) {
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
   if (!arg(2)) {
600 600
     $message = '';
601 601
   }
602
-  return '<p>' . $message . '</p>';
602
+  return '<p>'.$message.'</p>';
603 603
 }
604 604
 
605 605
 /**
@@ -615,11 +615,11 @@  discard block
 block discarded – undo
615 615
 
616 616
     // Shorten the name when it is too long or it will break many tables.
617 617
     if (drupal_strlen($name) > 20) {
618
-      $name = drupal_substr($name, 0, 15) . '...';
618
+      $name = drupal_substr($name, 0, 15).'...';
619 619
     }
620 620
 
621 621
     if (user_access('access user profiles')) {
622
-      $output = l($name, 'account/' . $object->uid, array('attributes' => array('title' => bts('View user profile.', array(), NULL, 'boinc:users-table'))));
622
+      $output = l($name, 'account/'.$object->uid, array('attributes' => array('title' => bts('View user profile.', array(), NULL, 'boinc:users-table'))));
623 623
     }
624 624
     else {
625 625
       $output = check_plain($name);
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
       $output = check_plain($object->name);
638 638
     }
639 639
 
640
-    $output .= ' (' . bts('not verified', array(), NULL, 'boinc:user-not-found') . ')';
640
+    $output .= ' ('.bts('not verified', array(), NULL, 'boinc:user-not-found').')';
641 641
   }
642 642
   else {
643 643
     $output = check_plain(variable_get('anonymous', bts('Anonymous', array(), NULL, 'boinc:anonymous-user')));
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
  * Remove the link under text areas that reads:
651 651
  * "More information about formatting options"
652 652
  */
653
-function boinc_filter_tips_more_info () {
653
+function boinc_filter_tips_more_info() {
654 654
   return '';
655 655
 }
656 656
 
@@ -692,8 +692,8 @@  discard block
 block discarded – undo
692 692
 The !site team', array(
693 693
         '!name' => isset($sender->boincuser_name) ? $sender->boincuser_name : $sender->name,
694 694
         '!site' => variable_get('site_name', 'Drupal-BOINC'),
695
-        '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message') . ': ' . $flag->friend_message : '',
696
-        '!link' => url('account/'. $sender->uid, array('absolute' => TRUE)),
695
+        '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message').': '.$flag->friend_message : '',
696
+        '!link' => url('account/'.$sender->uid, array('absolute' => TRUE)),
697 697
         ), array(), NULL, 'boinc:friend-request-email');
698 698
       break;
699 699
 
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
 The !site team', array(
712 712
         '!name' => isset($sender->boincuser_name) ? $sender->boincuser_name : $sender->name,
713 713
         '!site' => variable_get('site_name', 'Drupal-BOINC'),
714
-        '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message') . ': ' . $flag->friend_message : '',
714
+        '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message').': '.$flag->friend_message : '',
715 715
         '!link' => url('goto/friend-requests', array('absolute' => TRUE)),
716 716
         ),
717 717
       array(), NULL, 'boinc:friend-request-email');
@@ -724,13 +724,13 @@  discard block
 block discarded – undo
724 724
  * Edit action links
725 725
  */
726 726
 function phptemplate_links($links, $attributes = array('class' => 'links')) {
727
-  if ($links){
727
+  if ($links) {
728 728
     // Remove flag-subscriptions link. It will be placed elsewhere.
729 729
     if (isset($links['flag-subscriptions'])) {
730 730
       unset($links['flag-subscriptions']);
731 731
     }
732 732
     // Reorder the links however you need them.
733
-    $links = reorder_links($links, array('comment_edit','quote','comment_add','comment_reply','flag-abuse_comment','flag-abuse_node'), array('comment_delete'));
733
+    $links = reorder_links($links, array('comment_edit', 'quote', 'comment_add', 'comment_reply', 'flag-abuse_comment', 'flag-abuse_node'), array('comment_delete'));
734 734
     // Use the built-in theme_links() function to format the $links array.
735 735
     return theme_links($links, $attributes);
736 736
   }
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
   // are the class attribute for the <li> tags.
814 814
   $dom = new DOMDocument;
815 815
   $dom->loadHTML(mb_convert_encoding($links, 'HTML-ENTITIES', 'UTF-8'));
816
-  foreach($dom->getElementsByTagName('li') as $node) {
816
+  foreach ($dom->getElementsByTagName('li') as $node) {
817 817
     $key = $node->getAttribute("class");
818 818
     $alllinks[$key] = $dom->saveHTML($node);
819 819
   }
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
     "hide", "unhide",
827 827
     "comment_delete",
828 828
   );
829
-  foreach(array_keys($alllinks) as $key1) {
829
+  foreach (array_keys($alllinks) as $key1) {
830 830
     // Select string up to first space, if present.
831 831
     $class1 = strtok($key1, ' ');
832 832
     if (in_array($class1, $selected_classes)) {
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
     $dom->loadHTML(mb_convert_encoding($alink, 'HTML-ENTITIES', 'UTF-8'));
856 856
 
857 857
     $myli = $dom->getElementsByTagName('li');
858
-    if ($myli->length>0) {
858
+    if ($myli->length > 0) {
859 859
       $newclasses = trim(($myli[0]->getAttribute("class"))." first");
860 860
       $myli[0]->setAttribute("class", $newclasses);
861 861
       $alink = $dom->saveHTML($myli[0]);
@@ -872,13 +872,13 @@  discard block
 block discarded – undo
872 872
 
873 873
   $output = '<ul class="menu"><li class="first">';
874 874
   if ($user->uid) {
875
-    $output .= '<a href="' . url('logout') . '">' . bts('Logout', array(), NULL, 'boinc:menu-link') . '</a>';
875
+    $output .= '<a href="'.url('logout').'">'.bts('Logout', array(), NULL, 'boinc:menu-link').'</a>';
876 876
   } else {
877
-    $output .= '<a href="' . url('user/login', array('query' => drupal_get_destination()) ) . '">' . bts('Login', array(), NULL, 'boinc:menu-link') . '</a>';
877
+    $output .= '<a href="'.url('user/login', array('query' => drupal_get_destination())).'">'.bts('Login', array(), NULL, 'boinc:menu-link').'</a>';
878 878
   }
879 879
   $output .= '</li>';
880 880
   if (module_exists('global_search') OR module_exists('global_search_solr')) {
881
-    $output .= '<li class="last"> <a class="search" href="' . url('search/site') . '">' . bts('search', array(), NULL, 'boinc:menu-link') .'</a> </l1>';
881
+    $output .= '<li class="last"> <a class="search" href="'.url('search/site').'">'.bts('search', array(), NULL, 'boinc:menu-link').'</a> </l1>';
882 882
   }
883 883
   $output .= '</ul>';
884 884
   return $output;
@@ -905,8 +905,8 @@  discard block
 block discarded – undo
905 905
     if ($ignored[$object->uid] == 0) {
906 906
       $links['ignore_user'] = array(
907 907
         'title' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
908
-        'href' => 'account/prefs/privacy/ignore_user/add/'. $object->uid,
909
-        'query' => 'destination='. $_GET['q'],
908
+        'href' => 'account/prefs/privacy/ignore_user/add/'.$object->uid,
909
+        'query' => 'destination='.$_GET['q'],
910 910
         'attributes' => array(
911 911
           'class' => 'ignore-user',
912 912
           'title' => bts('Add user to your ignore list', array(), NULL, 'boinc:ignore-user-add'),
@@ -921,8 +921,8 @@  discard block
 block discarded – undo
921 921
     if ($ignored[$object->uid] == 0) {
922 922
       $links['ignore_user'] = array(
923 923
         'title' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
924
-        'href' => 'account/prefs/privacy/ignore_user/add/'. $object->uid,
925
-        'query' => 'destination='. $_GET['q'],
924
+        'href' => 'account/prefs/privacy/ignore_user/add/'.$object->uid,
925
+        'query' => 'destination='.$_GET['q'],
926 926
         'attributes' => array(
927 927
           'class' => 'ignore-user',
928 928
           'title' => bts('Add user to your ignore list', array(), NULL, 'boinc:ignore-user-add'),
Please login to merge, or discard this patch.
html/ops/bbcode_convert_response1.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@
 block discarded – undo
42 42
     $start_id = 0; //Set this to something else if you like
43 43
     $profiles = _mysql_query("select * from profile where userid>$start_id order by userid");
44 44
     echo _mysql_error();
45
-    $i=0;
46
-    while ($profile = _mysql_fetch_object($profiles)){
45
+    $i = 0;
46
+    while ($profile = _mysql_fetch_object($profiles)) {
47 47
         $i++;
48 48
         if ($i%100 == 0) {                      //For every 100 profiles
49
-            echo $profile->userid.". "; flush();   // print out where we are
49
+            echo $profile->userid.". "; flush(); // print out where we are
50 50
             //usleep(200000);
51 51
         }
52 52
 
53
-        if ($profile->userid > $start_id){
53
+        if ($profile->userid > $start_id) {
54 54
             fix_profile($profile);
55 55
         }
56 56
     }
Please login to merge, or discard this patch.
html/ops/check_account_ownership_keys.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@
 block discarded – undo
23 23
 admin_page_head("Account Ownership Keys");
24 24
 
25 25
 if (!file_exists($account_ownership_private_key_file_path)) {
26
-  echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
26
+  echo "<p>The account ownership private key '".$account_ownership_private_key_file_name."' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
27 27
 } else {
28
-  echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' exists.</p>";
28
+  echo "<p>The account ownership private key '".$account_ownership_private_key_file_name."' exists.</p>";
29 29
 }
30 30
 
31 31
 if (!file_exists($account_ownership_public_key_file_path)) {
32
-  echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
32
+  echo "<p>The account ownership public key '".$account_ownership_public_key_file_name."' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
33 33
 } else {
34
-  echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' exists.</p>";
34
+  echo "<p>The account ownership public key '".$account_ownership_public_key_file_name."' exists.</p>";
35 35
 }
36 36
 
37 37
 echo "<p>For more info see the related wiki page: <a href=\"https://github.com/BOINC/boinc/wiki/ProofOfOwnership\">ProofOfOwnership</a></p>";
Please login to merge, or discard this patch.
html/inc/dir_hier.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 }
38 38
 
39 39
 function upload_path($filename) {
40
-    static $upload_dir=null;
40
+    static $upload_dir = null;
41 41
     if (!$upload_dir) {
42 42
         $config = get_config();
43 43
         $upload_dir = parse_config($config, '<upload_dir>');
Please login to merge, or discard this patch.
html/inc/cert.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
     credit_to_ops($credit, $ops, $unit);
44 44
 
45 45
     if ($bolden) {
46
-        $lbold="[[";
47
-        $rbold="]]";
46
+        $lbold = "[[";
47
+        $rbold = "]]";
48 48
     } else {
49
-        $lbold="";        $rbold="";
49
+        $lbold = ""; $rbold = "";
50 50
     }
51 51
     return " $lbold$cobbs Cobblestones$rbold of computation ($ops $unit floating-point operations)";
52 52
 }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 //
87 87
 function show_share_buttons() {
88 88
     echo '<p>';
89
-    $current_url = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
89
+    $current_url = (empty($_SERVER['HTTPS']) ? 'http' : 'https')."://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
90 90
     $cert_url = urlencode($current_url);
91 91
 
92 92
     // Share on Facebook
Please login to merge, or discard this patch.
html/user/cert_team.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 if (DISABLE_TEAMS) error_page("Teams are disabled");
28 28
 
29 29
 $border = get_str("border", true);
30
-if ($border=="no") {
31
-    $border=0;
30
+if ($border == "no") {
31
+    $border = 0;
32 32
 } else {
33
-    $border=8;
33
+    $border = 8;
34 34
 }
35 35
 
36 36
 // Make sure user_id is in the URL so that share functions work
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 if (!$user_id) {
40 40
     $user = get_logged_in_user();
41 41
     Header(sprintf('Location: %s/cert_team.php?user_id=%d%s',
42
-        url_base(), $user->id, $border==0?'&border=no':''
42
+        url_base(), $user->id, $border == 0 ? '&border=no' : ''
43 43
     ));
44 44
     exit;
45 45
 }
Please login to merge, or discard this patch.
html/user/cert1.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 require_once("../inc/cert.inc");
25 25
 
26 26
 $border = get_str("border", true);
27
-if ($border=="no") {
28
-    $border=0;
27
+if ($border == "no") {
28
+    $border = 0;
29 29
 } else {
30
-    $border=8;
30
+    $border = 8;
31 31
 }
32 32
 
33 33
 // Make sure user_id is in the URL so that share functions work
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 if (!$user_id) {
37 37
     $user = get_logged_in_user();
38 38
     Header(sprintf('Location: %s/cert1.php?user_id=%d%s',
39
-        url_base(), $user->id, $border==0?'&border=no':''
39
+        url_base(), $user->id, $border == 0 ? '&border=no' : ''
40 40
     ));
41 41
     exit;
42 42
 }
Please login to merge, or discard this patch.