Completed
Pull Request — master (#1795)
by Christian
16:22 queued 04:43
created
drupal/sites/default/boinc/modules/boincuser/boincuser.module 1 patch
Spacing   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 function boincuser_user($op, &$edit, &$account, $category = NULL) {
217 217
   // Handle BOINC integration for users with UID > 1 (skip anonymous and admin)
218 218
   if ($account->uid > 1) {
219
-    switch($op) {
219
+    switch ($op) {
220 220
     case 'load':
221 221
       // User loading; insert BOINC data into the user object
222 222
       $drupal_user = db_fetch_object(db_query("
@@ -244,11 +244,11 @@  discard block
 block discarded – undo
244 244
       ));
245 245
       $account->boincuser_name = $boinc_user->name;
246 246
       $account->boincuser_account_key = $boinc_user->authenticator;
247
-      $account->boincuser_weak_auth = md5($boinc_user->authenticator . $boinc_user->passwd_hash);
247
+      $account->boincuser_weak_auth = md5($boinc_user->authenticator.$boinc_user->passwd_hash);
248 248
       $account->boincuser_total_credit = round($boinc_user->total_credit);
249 249
       $account->boincuser_expavg_credit = round($boinc_user->expavg_credit);
250 250
       $account->boincuser_expavg_time = round($boinc_user->expavg_time);
251
-      $account->boincuser_cpid = md5($boinc_user->cross_project_id . $account->mail);
251
+      $account->boincuser_cpid = md5($boinc_user->cross_project_id.$account->mail);
252 252
       $account->boincuser_default_pref_set = $boinc_user->venue;
253 253
       $account->boincteam_id = $boinc_user->teamid;
254 254
       db_set_active('default');
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
   // In Drupal 7, these operation cases will all exist as their own hooks,
446 446
   // so let's approximate that here so that this function can simply be removed
447 447
   // upon migration to 7
448
-  switch($op) {
448
+  switch ($op) {
449 449
   case 'update':
450 450
     boincuser_node_update($node);
451 451
   }
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
  * is updated (forward compatible to Drupal 7)
457 457
  */
458 458
 function boincuser_node_update($node) {
459
-  switch($node->type) {
459
+  switch ($node->type) {
460 460
   case 'profile':
461 461
     // Update the BOINC database directly
462 462
     $account = user_load($node->uid);
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
     }
577 577
     
578 578
     $form['cancel'] = array(
579
-      '#value' => '<li class="tab">' . l(bts('Cancel'), $cancel_dest) . '</li>',
579
+      '#value' => '<li class="tab">'.l(bts('Cancel'), $cancel_dest).'</li>',
580 580
       '#weight' => 1004,
581 581
     );
582 582
     $form['form control tabs suffix'] = array(
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
610 610
     $form['buttons']['preview_changes']['#weight'] = 1004;
611 611
     $form['buttons']['cancel'] = array(
612
-      '#value' => '<li class="tab">' . l(bts('Cancel'), "node/{$form['nid']['#value']}") . '</li>',
612
+      '#value' => '<li class="tab">'.l(bts('Cancel'), "node/{$form['nid']['#value']}").'</li>',
613 613
       '#weight' => 1005,
614 614
     );
615 615
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
     $form['actions']['submit']['#suffix'] = '</li>';
642 642
     $form['actions']['submit']['#weight'] = 1002;
643 643
     $form['actions']['cancel'] = array(
644
-      '#value' => '<li class="tab">' . l(bts('Cancel'), "node/{$form['nid']['#value']}") . '</li>',
644
+      '#value' => '<li class="tab">'.l(bts('Cancel'), "node/{$form['nid']['#value']}").'</li>',
645 645
       '#weight' => 1005,
646 646
     );
647 647
     $form['actions']['form control tabs suffix'] = array(
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
     $form['privatemsg']['preview']['#suffix'] = '</li>';
669 669
     $form['privatemsg']['preview']['#weight'] = 1003;
670 670
     $form['privatemsg']['cancel'] = array(
671
-      '#value' => '<li class="tab">' . l(bts('Cancel'), $_GET['q']) . '</li>',
671
+      '#value' => '<li class="tab">'.l(bts('Cancel'), $_GET['q']).'</li>',
672 672
       '#weight' => 1004,
673 673
     );
674 674
     $form['privatemsg']['form control tabs suffix'] = array(
@@ -776,36 +776,36 @@  discard block
 block discarded – undo
776 776
     $form['account']['boincuser_id'] = array(
777 777
       '#value' => '
778 778
         <div class="form-item">
779
-          <label>' . bts('BOINC user ID') . '</label>
780
-          <span>' . $account->boincuser_id . '</span>
779
+          <label>' . bts('BOINC user ID').'</label>
780
+          <span>' . $account->boincuser_id.'</span>
781 781
         </div>',
782 782
     );
783 783
     $form['account']['user_id'] = array(
784 784
       '#value' => '
785 785
         <div class="form-item">
786
-          <label>' . bts('Drupal user ID') . '</label>
787
-          <span>' . $account->uid . '</span>
786
+          <label>' . bts('Drupal user ID').'</label>
787
+          <span>' . $account->uid.'</span>
788 788
         </div>',
789 789
     );
790 790
     $form['account']['account_key'] = array(
791 791
       '#value' => '
792 792
         <div class="form-item">
793
-          <label>' . bts('Account key') . '</label>
794
-          <span>' . $account->boincuser_account_key . '</span>
793
+          <label>' . bts('Account key').'</label>
794
+          <span>' . $account->boincuser_account_key.'</span>
795 795
         </div>',
796 796
     );
797 797
     $form['account']['weak_account_key'] = array(
798 798
       '#value' => '
799 799
         <div class="form-item">
800
-          <label>' . bts('Weak account key') . '</label>
801
-          <span>' . "{$account->boincuser_id}_{$account->boincuser_weak_auth}" . '</span>
800
+          <label>' . bts('Weak account key').'</label>
801
+          <span>' . "{$account->boincuser_id}_{$account->boincuser_weak_auth}".'</span>
802 802
         </div>',
803 803
     );
804 804
     $form['account']['cpid'] = array(
805 805
       '#value' => '
806 806
         <div class="form-item">
807
-          <label>' . bts('Cross-project ID') . '</label>
808
-          <span>' . $account->boincuser_cpid . '</span>
807
+          <label>' . bts('Cross-project ID').'</label>
808
+          <span>' . $account->boincuser_cpid.'</span>
809 809
         </div>',
810 810
     );
811 811
     
@@ -828,7 +828,7 @@  discard block
 block discarded – undo
828 828
       $form['delete']['#weight'] = 1003;
829 829
     }
830 830
     $form['cancel'] = array(
831
-      '#value' => '<li class="tab">' . l(bts('Cancel'), $_GET['q']) . '</li>',
831
+      '#value' => '<li class="tab">'.l(bts('Cancel'), $_GET['q']).'</li>',
832 832
       '#weight' => 1004,
833 833
     );
834 834
     $form['form control tabs suffix'] = array(
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
912 912
     $form['buttons']['preview_changes']['#weight'] = 1004;
913 913
     $form['buttons']['cancel'] = array(
914
-      '#value' => '<li class="tab">' . l(bts('Cancel'), $_GET['q']) . '</li>',
914
+      '#value' => '<li class="tab">'.l(bts('Cancel'), $_GET['q']).'</li>',
915 915
       '#weight' => 1005,
916 916
     );
917 917
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
966 966
     // Set name temporarily to dummy value to beat validation
967 967
     $form['name'] = array(
968 968
       '#type' => 'hidden',
969
-      '#value' => rand() . '.' . time()
969
+      '#value' => rand().'.'.time()
970 970
     );
971 971
     
972 972
     if (module_exists('captcha')) {
@@ -1016,7 +1016,7 @@  discard block
 block discarded – undo
1016 1016
     $form['buttons']['submit']['#suffix'] = '</li>';
1017 1017
     $form['buttons']['submit']['#weight'] = 1002;
1018 1018
     $form['buttons']['cancel'] = array(
1019
-      '#value' => '<li class="tab">' . l(bts('Cancel'), 'user/login') . '</li>',
1019
+      '#value' => '<li class="tab">'.l(bts('Cancel'), 'user/login').'</li>',
1020 1020
       '#weight' => 1005,
1021 1021
     );
1022 1022
     $form['buttons']['form control tabs suffix'] = array(
@@ -1098,7 +1098,7 @@  discard block
 block discarded – undo
1098 1098
  */
1099 1099
 function boincuser_token_list($type = 'all') {
1100 1100
   if ($type == 'user' || $type == 'all') {
1101
-    $tokens['user']['display-name']      = t("The user's name that should be displayed");
1101
+    $tokens['user']['display-name'] = t("The user's name that should be displayed");
1102 1102
     return $tokens;
1103 1103
   }
1104 1104
 }
@@ -1108,9 +1108,9 @@  discard block
 block discarded – undo
1108 1108
  */
1109 1109
 function boincuser_views_pre_execute(&$view) {
1110 1110
   $account_id = $view->args[0];
1111
-  if ($view->name=="user_activity") {
1111
+  if ($view->name == "user_activity") {
1112 1112
     // Run the following custom query for the user_activity view
1113
-    $view->build_info['query']= "
1113
+    $view->build_info['query'] = "
1114 1114
       SELECT node_revisions.vid AS vid,
1115 1115
         node.nid AS node_nid,
1116 1116
         node.uid AS users_node_uid,
@@ -1205,27 +1205,27 @@  discard block
 block discarded – undo
1205 1205
   $output = '<div class="join">';
1206 1206
   switch ($type) {
1207 1207
   case 'boinc':
1208
-    $output .= '<p>' . bts("If you're already running BOINC, select <i>Add
1209
-      Project</i>.") . '</p>';
1208
+    $output .= '<p>'.bts("If you're already running BOINC, select <i>Add
1209
+      Project</i>.").'</p>';
1210 1210
     if ($registration_enabled) {
1211
-      $output .= '<p>' . bts("If you're running a command-line or pre-5.0 version
1211
+      $output .= '<p>'.bts("If you're running a command-line or pre-5.0 version
1212 1212
         of BOINC, !create_an_account first.", array('!create_an_account' => 
1213
-          l(bts('create an account'), 'user/registration'))) . '</p>';
1213
+          l(bts('create an account'), 'user/registration'))).'</p>';
1214 1214
     }
1215 1215
     else {
1216
-      $output .= '<p>' . bts("If you're running a command-line version of BOINC,
1216
+      $output .= '<p>'.bts("If you're running a command-line version of BOINC,
1217 1217
         first use the BOINC Manager software (elsewhere if necessary) to create an
1218 1218
         an account at this project, then use that account to connect with the
1219
-        command-line version.") . '</p>';
1220
-      $output .= '<p>' . bts("If you're running a pre-5.0 version of BOINC, please
1219
+        command-line version.").'</p>';
1220
+      $output .= '<p>'.bts("If you're running a pre-5.0 version of BOINC, please
1221 1221
         upgrade to a more recent version to create an account
1222
-        at this project.") . '</p>';
1222
+        at this project.").'</p>';
1223 1223
     }
1224 1224
     break;
1225 1225
   case 'new':
1226 1226
   default:
1227 1227
     $output .= '<ol>';
1228
-    $output .= '  <li>' . bts('Download the desktop software');
1228
+    $output .= '  <li>'.bts('Download the desktop software');
1229 1229
     $output .= '    <p>';
1230 1230
     $output .= '      <a class="button" href="http://boinc.berkeley.edu/download.php">Download</a>';
1231 1231
     $output .= '    </p>';
@@ -1235,10 +1235,10 @@  discard block
 block discarded – undo
1235 1235
     //$output .= '      <a href="files/boinc_i686-pc-linux-gnu.sh" class="platform linux">Linux</a>';
1236 1236
     //$output .= '    </p>';
1237 1237
     $output .= '  </li>';
1238
-    $output .= '  <li>' . bts('Run the installer') . '</li>';
1239
-    $output .= '  <li>' . bts('When prompted enter @siteurl', array(
1240
-      '@siteurl' => $base_url)) . '</li>';
1241
-    $output .=  '</ol>';
1238
+    $output .= '  <li>'.bts('Run the installer').'</li>';
1239
+    $output .= '  <li>'.bts('When prompted enter @siteurl', array(
1240
+      '@siteurl' => $base_url)).'</li>';
1241
+    $output .= '</ol>';
1242 1242
   }
1243 1243
   $output .= '</div>';
1244 1244
   return $output;
@@ -1251,7 +1251,7 @@  discard block
 block discarded – undo
1251 1251
   global $user;
1252 1252
   $site_name = variable_get('site_name', '');
1253 1253
   // get the front page message from database; this is set in the admin interface under BOINC Other
1254
-  $site_message = variable_get('boinc_other_frontpage','');
1254
+  $site_message = variable_get('boinc_other_frontpage', '');
1255 1255
 
1256 1256
   // Determine the user of the day
1257 1257
   $current_uotd = db_fetch_object(db_query("
@@ -1273,30 +1273,30 @@  discard block
 block discarded – undo
1273 1273
   $output .= ($user->uid) ? bts('Welcome back!') : ($site_name ? bts('What is @this_project?', array('@this_project' => $site_name)) : bts('Welcome!'));
1274 1274
   $output .= '</h2>';
1275 1275
   $output .= '<div class="boinc-overview balance-height-front">';
1276
-  $output .= '  <div>' . bts($site_message, array(), NULL, "project:front page") . ' ' . l(bts('Learn more'), 'about') . '</div>';
1276
+  $output .= '  <div>'.bts($site_message, array(), NULL, "project:front page").' '.l(bts('Learn more'), 'about').'</div>';
1277 1277
   if ($user->uid) {
1278
-    $output .= '  <div>' . l(bts('View account'), 'dashboard', array('attributes' => array('class' => 'join button'))) . '</div>';
1278
+    $output .= '  <div>'.l(bts('View account'), 'dashboard', array('attributes' => array('class' => 'join button'))).'</div>';
1279 1279
   }
1280 1280
   else {
1281
-    $output .= '  <div>' . l(bts('Join now'), 'join', array('attributes' => array('class' => 'join button'))) . '</div>';
1281
+    $output .= '  <div>'.l(bts('Join now'), 'join', array('attributes' => array('class' => 'join button'))).'</div>';
1282 1282
   }
1283 1283
   $output .= '</div>';
1284 1284
   $output .= '<div class="boinc-overview-details">';
1285 1285
   $output .= '  <div class="detail-container">';
1286
-  $output .= '    <a class="user-of-the-day" href="account/' . $uotd->uid . '">';
1286
+  $output .= '    <a class="user-of-the-day" href="account/'.$uotd->uid.'">';
1287 1287
   $output .= '      <div class="picture">';
1288 1288
   $output .= theme('imagefield_image', $uotd_image['image'], $uotd_image['alt'],
1289 1289
     $uotd_image['alt'], array(), FALSE);
1290 1290
   $output .= '      </div>';
1291
-  $output .= '      <div class="text">' . bts('User of the day') . '</div>';
1292
-  $output .= '      <div class="detail">' . $uotd->boincuser_name . '</div>';
1291
+  $output .= '      <div class="text">'.bts('User of the day').'</div>';
1292
+  $output .= '      <div class="detail">'.$uotd->boincuser_name.'</div>';
1293 1293
   $output .= '    </a>';
1294 1294
   $output .= '    <div class="volunteers">';
1295
-  $output .= '      <div class="text">' . bts('Over 500,000 volunteers and counting.') . '</div>';
1295
+  $output .= '      <div class="text">'.bts('Over 500,000 volunteers and counting.').'</div>';
1296 1296
   $output .= '      <div class="platforms">';
1297
-  $output .= '        <div class="detail platform windows">' . bts('Windows') . '</div>';
1298
-  $output .= '        <div class="detail platform mac">' .  bts('Mac') . '</div>';
1299
-  $output .= '        <div class="detail platform linux">' . bts('Linux') . '</div>';
1297
+  $output .= '        <div class="detail platform windows">'.bts('Windows').'</div>';
1298
+  $output .= '        <div class="detail platform mac">'.bts('Mac').'</div>';
1299
+  $output .= '        <div class="detail platform linux">'.bts('Linux').'</div>';
1300 1300
   $output .= '      </div>';
1301 1301
   $output .= '    </div>';
1302 1302
   $output .= '  </div>';
@@ -1488,7 +1488,7 @@  discard block
 block discarded – undo
1488 1488
     global $base_url;
1489 1489
     global $base_path;
1490 1490
     $site_name = variable_get('site_name', bts('project'));
1491
-    $site_url = $base_url . $base_path;
1491
+    $site_url = $base_url.$base_path;
1492 1492
     $moderator = user_load($user->uid);
1493 1493
     $profile->moderate = 0;
1494 1494
     $profile->status = 0;
@@ -1549,7 +1549,7 @@  discard block
 block discarded – undo
1549 1549
       global $base_url;
1550 1550
       global $base_path;
1551 1551
       $site_name = variable_get('site_name', bts('project'));
1552
-      $site_url = $base_url . $base_path;
1552
+      $site_url = $base_url.$base_path;
1553 1553
       $moderator = user_load($user->uid);
1554 1554
       $settings = array(
1555 1555
         'from' => '',
@@ -1652,25 +1652,25 @@  discard block
 block discarded – undo
1652 1652
   if (!$projects) return bts('no projects...');
1653 1653
   
1654 1654
   $output = '';
1655
-  $output .= '<table class="user-projects">' . "\n";
1656
-  $output .= '<thead>' . "\n";
1657
-  $output .= '  <tr>' . "\n";
1658
-  $output .= '    <th>' . bts('Name') . '</th>' . "\n";
1659
-  $output .= '    <th class="numeric">' . bts('Avg credit') . '</th>' . "\n";
1660
-  $output .= '    <th class="numeric">' . bts('Total credit') . '</th>' . "\n";
1661
-  $output .= '  </tr>' . "\n";
1662
-  $output .= '</thead>' . "\n";
1663
-  $output .= '<tbody>' . "\n";
1655
+  $output .= '<table class="user-projects">'."\n";
1656
+  $output .= '<thead>'."\n";
1657
+  $output .= '  <tr>'."\n";
1658
+  $output .= '    <th>'.bts('Name').'</th>'."\n";
1659
+  $output .= '    <th class="numeric">'.bts('Avg credit').'</th>'."\n";
1660
+  $output .= '    <th class="numeric">'.bts('Total credit').'</th>'."\n";
1661
+  $output .= '  </tr>'."\n";
1662
+  $output .= '</thead>'."\n";
1663
+  $output .= '<tbody>'."\n";
1664 1664
   foreach ($projects AS $project) {
1665
-    $url = rtrim($project->url, '/') . '/show_user.php?userid=' . $project->id;
1666
-    $output .= '  <tr>' . "\n";
1667
-    $output .= '    <td>' . l($project->name, $url) . '</td>' . "\n";
1668
-    $output .= '    <td class="numeric">' . boincwork_format_stats((float) $project->expavg_credit) . '</td>' . "\n"; 
1669
-    $output .= '    <td class="numeric">' . boincwork_format_stats((float) $project->total_credit) . '</td>' . "\n";
1670
-    $output .= '  </tr>' . "\n";
1665
+    $url = rtrim($project->url, '/').'/show_user.php?userid='.$project->id;
1666
+    $output .= '  <tr>'."\n";
1667
+    $output .= '    <td>'.l($project->name, $url).'</td>'."\n";
1668
+    $output .= '    <td class="numeric">'.boincwork_format_stats((float)$project->expavg_credit).'</td>'."\n"; 
1669
+    $output .= '    <td class="numeric">'.boincwork_format_stats((float)$project->total_credit).'</td>'."\n";
1670
+    $output .= '  </tr>'."\n";
1671 1671
   }
1672
-  $output .= '</tbody>' . "\n";
1673
-  $output .= '</table>' . "\n";
1672
+  $output .= '</tbody>'."\n";
1673
+  $output .= '</table>'."\n";
1674 1674
   $more_link = ($account) ? "user/{$account->uid}/stats" : 'account/stats';
1675 1675
   //$output .= "<div class=\"more-link\"><a href=\"{$more_link}\">More stats</a></div>" . "\n";
1676 1676
   return $output;
@@ -1690,8 +1690,8 @@  discard block
 block discarded – undo
1690 1690
     'cpid' => $cpid
1691 1691
   );
1692 1692
   $args = array();
1693
-  foreach ($get as $arg => $value) $args[] = "{$arg}=" . rawurlencode($value);
1694
-  $query = '?' . implode('&', $args);
1693
+  foreach ($get as $arg => $value) $args[] = "{$arg}=".rawurlencode($value);
1694
+  $query = '?'.implode('&', $args);
1695 1695
   
1696 1696
   // Load XML from RPC
1697 1697
   $target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
@@ -1763,12 +1763,12 @@  discard block
 block discarded – undo
1763 1763
     $output .= '<ul class="tab-list">';
1764 1764
     $count = 0;
1765 1765
     foreach ($links as $key => $link) {
1766
-      $output .= '<li class="' . (($count == 0) ? 'first primary ' : '') . 'tab">';
1766
+      $output .= '<li class="'.(($count == 0) ? 'first primary ' : '').'tab">';
1767 1767
       $output .= l($link['title'], $link['href'], array('query' => drupal_get_destination()));
1768 1768
       $output .= '</li>';
1769 1769
       $count++;
1770 1770
     }
1771
-    $output .= '<li class="' . (($count) ? '' : 'first ') . 'last tab">' . flag_create_link('abuse_user', $account->uid) . '</li>';
1771
+    $output .= '<li class="'.(($count) ? '' : 'first ').'last tab">'.flag_create_link('abuse_user', $account->uid).'</li>';
1772 1772
     $output .= '</ul>';
1773 1773
   }
1774 1774
   return $output;
@@ -1809,7 +1809,7 @@  discard block
 block discarded – undo
1809 1809
 function boincuser_apachesolr_index_documents_alter(array &$documents, $entity, $entity_type, $env_id) {
1810 1810
 
1811 1811
   foreach ($documents as $document) {
1812
-    if ( $document->entity_type=='node' AND $document->bundle=='profile' ) {
1812
+    if ($document->entity_type == 'node' AND $document->bundle == 'profile') {
1813 1813
       // Node information.
1814 1814
       $nid = $document->entity_id;
1815 1815
       $node = node_load($nid);
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.views.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@
 block discarded – undo
274 274
 function boincuser_views_handlers() {
275 275
   return array(
276 276
     'info' => array(
277
-      'path' => drupal_get_path('module', 'boincuser') . '/views',
277
+      'path' => drupal_get_path('module', 'boincuser').'/views',
278 278
     ),
279 279
     'handlers' => array(
280 280
       'views_handler_argument_boincuser_id' => array(
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/includes/boincuser.forms.inc 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
   // Call our custom authentication function to check for an existing BOINC user
36 36
   if (!boincuser_login_authenticate($form_state['values'])) {
37 37
     // Authentication failed; set an error accordingly
38
-    form_set_error('name', bts('Sorry, unrecognized email address or password.') . ' ' . l(bts('Have you forgotten your password?'), 'user/password'));
38
+    form_set_error('name', bts('Sorry, unrecognized email address or password.').' '.l(bts('Have you forgotten your password?'), 'user/password'));
39 39
   }
40 40
 }
41 41
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
   } else {
80 80
     // Create a Drupal user from the BOINC user
81 81
     if ($user = boincuser_register_make_drupal_user($boinc_user)) {
82
-      watchdog('user', 'New external user: %email using module %module.', array('%email' => $email_addr, '%module' => $module), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $user->uid .'/edit'));
82
+      watchdog('user', 'New external user: %email using module %module.', array('%email' => $email_addr, '%module' => $module), WATCHDOG_NOTICE, l(t('edit'), 'user/'.$user->uid.'/edit'));
83 83
     }
84 84
   }
85 85
 }
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
       unset($_SESSION['reset_pass']);
362 362
     }
363 363
     else {
364
-      $given_hash = md5($edit['current_pass'] . $account->mail);
364
+      $given_hash = md5($edit['current_pass'].$account->mail);
365 365
       if (!$edit['current_pass']) {
366 366
         form_set_error('current_pass', bts('Authentication is required when changing E-mail address or setting new password.'));
367 367
       }
@@ -420,29 +420,29 @@  discard block
 block discarded – undo
420 420
   $project_domain = $headers['Host'];
421 421
   $form['heading'] = array(
422 422
     '#type' => 'markup',
423
-    '#value' => '<h3>' . bts("If you forgot your account's email address, or you can't receive email there:") . '</h3>'
423
+    '#value' => '<h3>'.bts("If you forgot your account's email address, or you can't receive email there:").'</h3>'
424 424
   );
425 425
   $form['instructions'] = array(
426 426
     '#type' => 'markup',
427
-    '#value' => '' .
428
-      '<p>' . bts("If you have run BOINC under the account, you can still access it. Here's how:") .
429
-      '  <ul>' .
430
-      '    <li>' . bts('Go to the BOINC data directory on your computer (see !boinc_wiki for help finding this).', array('!boinc_wiki' => l(bts('BOINC documentation'), 'http://boinc.berkeley.edu/wiki/BOINC_Data_directory'))) . '</li>' .
431
-      '    <li>' . bts('Find your account file for this project; it will have a name like %file (where the project URL is %url).', array('%file' => "account_{$project_domain}.xml", '%url' => "http://{$project_domain}")) . '</li>' .
432
-      '    <li>' . bts("Open the file in a text editor like Notepad. You'll see something like:") .
433
-      '      <pre>' .
434
-      '&lt;account&gt;' . "\n" .
435
-      "  &lt;master_url&gt;http://{$project_domain}/&lt;/master_url&gt;" . "\n" .
436
-      '  &lt;authenticator&gt;8b8496fdd26df7dc0423ecd43c09a56b&lt;/authenticator&gt;' . "\n" .
437
-      "  &lt;project_name&gt;{$project_name}&lt;/project_name&gt;" . "\n" .
438
-      '  ...' . "\n" .
439
-      '&lt;/account&gt;' .
440
-      '      </pre>' .
441
-      '    </li>' .
442
-      '    <li>' . bts('Select and Copy the string between &lt;authenticator&gt; and &lt;/authenticator&gt; (%auth in the above example).', array('%auth' => '8b8496fdd26df7dc0423ecd43c09a56b')) . '</li>' .
443
-      '    <li>' . bts('Paste the string into the field below, and click OK.') . '</li>' .
444
-      '    <li>' . bts('You will now be logged in to your account; update the email and password of your account.') . '</li>' .
445
-      '  </ul>' .
427
+    '#value' => ''.
428
+      '<p>'.bts("If you have run BOINC under the account, you can still access it. Here's how:").
429
+      '  <ul>'.
430
+      '    <li>'.bts('Go to the BOINC data directory on your computer (see !boinc_wiki for help finding this).', array('!boinc_wiki' => l(bts('BOINC documentation'), 'http://boinc.berkeley.edu/wiki/BOINC_Data_directory'))).'</li>'.
431
+      '    <li>'.bts('Find your account file for this project; it will have a name like %file (where the project URL is %url).', array('%file' => "account_{$project_domain}.xml", '%url' => "http://{$project_domain}")).'</li>'.
432
+      '    <li>'.bts("Open the file in a text editor like Notepad. You'll see something like:").
433
+      '      <pre>'.
434
+      '&lt;account&gt;'."\n".
435
+      "  &lt;master_url&gt;http://{$project_domain}/&lt;/master_url&gt;"."\n".
436
+      '  &lt;authenticator&gt;8b8496fdd26df7dc0423ecd43c09a56b&lt;/authenticator&gt;'."\n".
437
+      "  &lt;project_name&gt;{$project_name}&lt;/project_name&gt;"."\n".
438
+      '  ...'."\n".
439
+      '&lt;/account&gt;'.
440
+      '      </pre>'.
441
+      '    </li>'.
442
+      '    <li>'.bts('Select and Copy the string between &lt;authenticator&gt; and &lt;/authenticator&gt; (%auth in the above example).', array('%auth' => '8b8496fdd26df7dc0423ecd43c09a56b')).'</li>'.
443
+      '    <li>'.bts('Paste the string into the field below, and click OK.').'</li>'.
444
+      '    <li>'.bts('You will now be logged in to your account; update the email and password of your account.').'</li>'.
445
+      '  </ul>'.
446 446
       '</p>'
447 447
   );
448 448
   $form['authenticator'] = array(
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
     '#weight' => 1002,
468 468
   );
469 469
   $form['form control tabs'] = array(
470
-    '#value' => '<li class="tab">' . l(bts('Cancel'), 'user/password') . '</li>',
470
+    '#value' => '<li class="tab">'.l(bts('Cancel'), 'user/password').'</li>',
471 471
     '#weight' => 1003,
472 472
   );
473 473
   $form['form control tabs suffix'] = array(
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
     '#weight' => 1002,
531 531
   );
532 532
   $form['form control tabs'] = array(
533
-    '#value' => '<li class="tab">' . l(bts('Cancel'), "account/{$uid}") . '</li>',
533
+    '#value' => '<li class="tab">'.l(bts('Cancel'), "account/{$uid}").'</li>',
534 534
     '#weight' => 1003,
535 535
   );
536 536
   $form['form control tabs suffix'] = array(
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
     '#weight' => 1002,
582 582
   );
583 583
   $form['form control tabs'] = array(
584
-    '#value' => '<li class="tab">' . l(bts('Cancel'), "account/{$uid}") . '</li>',
584
+    '#value' => '<li class="tab">'.l(bts('Cancel'), "account/{$uid}").'</li>',
585 585
     '#weight' => 1003,
586 586
   );
587 587
   $form['form control tabs suffix'] = array(
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
   $uid = $form_state['storage']['ban_user_uid'];
599 599
   $reason = $form_state['values']['reason'];
600 600
   $duration = $form_state['values']['duration'];
601
-  if ($duration) $duration = $duration * 24*60*60;
601
+  if ($duration) $duration = $duration*24*60*60;
602 602
   boincuser_moderate_user_ban($uid, $reason, $duration);
603 603
 }
604 604
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/includes/boincuser.helpers.inc 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
       WHERE n.type = 'profile'
155 155
       AND n.status = 1
156 156
       AND n.moderate = 0
157
-      " . ($never_been_picked ? " AND bu.uotd_time = 0 " : '') . "
158
-      " . ($active_users ? " AND bu.boinc_id IN ({$active_users}) " : '') . "
157
+      " . ($never_been_picked ? " AND bu.uotd_time = 0 " : '')."
158
+      " . ($active_users ? " AND bu.boinc_id IN ({$active_users}) " : '')."
159 159
       ORDER BY RAND()
160 160
       LIMIT 1"
161 161
     ));
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     // Name is limited to 60 characters, but we want to leave space to add a
203 203
     // tally if needed (for users with duplicate names); Limit to 56 chars and
204 204
     // replace the middle of the string with "..." if too long
205
-    $cleaned_name = substr_replace($cleaned_name, '...', 28, ($name_length-56)+3);
205
+    $cleaned_name = substr_replace($cleaned_name, '...', 28, ($name_length - 56) + 3);
206 206
   }
207 207
   $unique_name = $cleaned_name;
208 208
   while (db_result(db_query("SELECT uid FROM {users} WHERE name = '{$unique_name}' LIMIT 1"))) {
@@ -311,15 +311,15 @@  discard block
 block discarded – undo
311 311
   elseif (!in_array($_GET['q'], $page_blacklist)) {
312 312
     watchdog('boincuser', 'The BOINC scheduling server settings are not yet
313 313
         configured. Please !verify for the settings to become effective.',
314
-          array('!verify' => l(t('verify the default values') . ' <strong>' . 
315
-            t('and') . '</strong> ' . t('save the configuration'),
314
+          array('!verify' => l(t('verify the default values').' <strong>'. 
315
+            t('and').'</strong> '.t('save the configuration'),
316 316
             'admin/boinc/scheduler', array('html' => TRUE))
317 317
           ), WATCHDOG_WARNING);
318 318
     if (user_access('administer site configuration')) {
319 319
       drupal_set_message(t('The BOINC scheduling server settings are not yet
320 320
           configured. Please !verify for the settings to become effective',
321
-            array('!verify' => l(t('verify the default values') . ' <strong>' . 
322
-              t('and') . '</strong> ' . t('save the configuration'),
321
+            array('!verify' => l(t('verify the default values').' <strong>'. 
322
+              t('and').'</strong> '.t('save the configuration'),
323 323
               'admin/boinc/scheduler', array('html' => TRUE))
324 324
             )), 'warning', FALSE);
325 325
     }
@@ -399,6 +399,6 @@  discard block
 block discarded – undo
399 399
   $view = views_get_current_view();
400 400
   $account_id = $view->args[0];
401 401
   $friend_count = flag_friend_get_friend_count($account_id);
402
-  return '<h2 class="pane-title">' . bts('Friends (@count)', 
403
-    array('@count' => $friend_count)) . '</h2>';
402
+  return '<h2 class="pane-title">'.bts('Friends (@count)', 
403
+    array('@count' => $friend_count)).'</h2>';
404 404
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.admin.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     '#default_value' => $default['boinc_server_status_url'],
120 120
     '#description' => t('An absolute URL or path relative to the site base to the server status page (e.g. %full_url or just %relative_url).',
121 121
       array(
122
-        '%full_url' => $base_url . '/server_status.php',
122
+        '%full_url' => $base_url.'/server_status.php',
123 123
         '%relative_url' => 'server_status.php',
124 124
       )
125 125
     ),
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     '#default_value' => $default['boinc_app_list_url'],
131 131
     '#description' => t('An absolute URL or path relative to the site base to the applications page (e.g. %full_url or just %relative_url).',
132 132
       array(
133
-        '%full_url' => $base_url . '/apps.php',
133
+        '%full_url' => $base_url.'/apps.php',
134 134
         '%relative_url' => 'apps.php',
135 135
       )
136 136
     ),
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
   );
324 324
   
325 325
   // Define the form
326
-  $form['boinc_other_frontpage'] = array (
326
+  $form['boinc_other_frontpage'] = array(
327 327
     '#type' => 'textarea',
328 328
     '#title' => bts('Message for site\'s Home Page'),
329 329
     '#default_value' => $default['boinc_other_frontpage'],
@@ -345,5 +345,5 @@  discard block
 block discarded – undo
345 345
   * Submit BOINC other form
346 346
   */
347 347
 function boincuser_admin_other_submit($form, &$form_state) {
348
-  drupal_set_message( bts("Status: BOINC other settings have been updated") );
348
+  drupal_set_message(bts("Status: BOINC other settings have been updated"));
349 349
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/themes/boinc/template.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
  * Adjust the rendering of the menu
82 82
  */
83 83
 function boinc_links__system_main_menu($links, $menu, $element) {
84
-  $html .= '<ul id="' . $menu['id'] . '" class="' . $menu['class'] . '">' . "\n";
84
+  $html .= '<ul id="'.$menu['id'].'" class="'.$menu['class'].'">'."\n";
85 85
   $item_count = count($links);
86 86
   $i = 1;
87 87
   foreach ($links as $key => $link) {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     if (strpos($key, 'active-trail')) $classes[] = 'active';
90 90
     if ($i == 1) $classes[] = 'first';
91 91
     if ($i == $item_count) $classes[] = 'last';
92
-    $html .= '<li class="' . implode(' ', $classes) .'">';
92
+    $html .= '<li class="'.implode(' ', $classes).'">';
93 93
     if ($link['title'] == 'Home') {
94 94
       $link['title'] = bts('Home');
95 95
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
       if ($link['href'] == 'dashboard') {
99 99
         $item_count = privatemsg_unread_count();
100 100
         if ($item_count) {
101
-          $link['title'] .= '</a> <a href="/messages" class="compound secondary"><div class="item-count-wrapper"><span class="item-count">' . $item_count . '</span></div>';
101
+          $link['title'] .= '</a> <a href="/messages" class="compound secondary"><div class="item-count-wrapper"><span class="item-count">'.$item_count.'</span></div>';
102 102
           $link['html'] = TRUE;
103 103
           $link['attributes']['class'] = 'compound';
104 104
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     if ($link['href'] == 'moderate') {
109 109
       $item_count = boincuser_moderation_queue_count();
110 110
       if ($item_count) {
111
-        $link['title'] .= ' <div class="item-count-wrapper"><span class="item-count">' . $item_count . '</span></div>';
111
+        $link['title'] .= ' <div class="item-count-wrapper"><span class="item-count">'.$item_count.'</span></div>';
112 112
         $link['html'] = TRUE;
113 113
       }
114 114
     }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     $html .= '</li>';
117 117
     $i++;
118 118
   }
119
-  $html .= '</ul>' . "\n";
119
+  $html .= '</ul>'."\n";
120 120
   return $html;
121 121
 }
122 122
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     return '';
132 132
   }
133 133
   else {
134
-    return '<li '. ($active ? 'class="active" ' : '') .'>'. $link ."</li>\n";
134
+    return '<li '.($active ? 'class="active" ' : '').'>'.$link."</li>\n";
135 135
   }
136 136
 }
137 137
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
       $locality = $lang_code[0];
193 193
     }
194 194
   }
195
-  $vars['flag_path'] = base_path() . path_to_theme() . "/images/flags/{$locality}.png";
195
+  $vars['flag_path'] = base_path().path_to_theme()."/images/flags/{$locality}.png";
196 196
 
197 197
   $server_status_url = variable_get('boinc_server_status_url', '');
198 198
   if (!$server_status_url) {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
               $tab = str_replace('li class="', 'li class="first ', $tab);
224 224
           }
225 225
           if ($key == $last_key) {
226
-              $tab = str_replace('li class="', 'li class="last ', $tab) . '</ul>';
226
+              $tab = str_replace('li class="', 'li class="last ', $tab).'</ul>';
227 227
           }
228 228
       }
229 229
       elseif (strpos($tab, 'li ')) {
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
               $tab = str_replace('li ', 'li class="first" ', $tab);
232 232
           }
233 233
           if ($key == $last_key) {
234
-              $tab = str_replace('li ', 'li class="last" ', $tab) . '</ul>';
234
+              $tab = str_replace('li ', 'li class="last" ', $tab).'</ul>';
235 235
           }
236 236
       }
237 237
   }
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 
269 269
   // Optionally, run node-type-specific preprocess functions, like
270 270
   // boinc_preprocess_node_page() or boinc_preprocess_node_story().
271
-  $function = __FUNCTION__ . '_' . $vars['node']->type;
271
+  $function = __FUNCTION__.'_'.$vars['node']->type;
272 272
   if (function_exists($function)) {
273 273
     $function($vars, $hook);
274 274
   }
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
   $vars['node']->comment = 0;
316 316
   
317 317
   $vars['first_page'] = (!isset($_GET['page']) OR ($_GET['page'] < 1));
318
-  $page_count = max(ceil($vars['comment_count'] / $comments_per_page), 1);
318
+  $page_count = max(ceil($vars['comment_count']/$comments_per_page), 1);
319 319
   $vars['last_page'] = ($page_count == 1 OR ($page_count > 1 AND $_GET['page'] == $page_count - 1));
320 320
 
321 321
   $links = $vars['links'];
@@ -422,8 +422,8 @@  discard block
 block discarded – undo
422 422
     $view->execute();
423 423
     $result = reset($view->result);
424 424
     // Display the stderr output in the footer
425
-    $vars['footer'] = '<h3>' . bts('Stderr output') .'</h3>';
426
-    $vars['footer'] .= '<pre>' . htmlspecialchars($result->result_stderr_out) . '</pre>';
425
+    $vars['footer'] = '<h3>'.bts('Stderr output').'</h3>';
426
+    $vars['footer'] .= '<pre>'.htmlspecialchars($result->result_stderr_out).'</pre>';
427 427
     break;
428 428
   case 'boinc_teams':
429 429
     if ($vars['display_id'] == 'panel_pane_3') {
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
     ob_start();
436 436
     // Get the workunit ID from the URL
437 437
     $result_id = arg(1);
438
-    require_boinc(array('util','boinc_db'));
438
+    require_boinc(array('util', 'boinc_db'));
439 439
     $wu = BoincWorkunit::lookup_id($result_id);
440 440
     project_workunit($wu);
441 441
     // Output of project_workunit() gets caught in the buffer
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
       $author_picture .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
461 461
     }
462 462
     elseif (is_string($user_image)) {
463
-      $author_picture .= '<img src="' . $user_image . '"/>';
463
+      $author_picture .= '<img src="'.$user_image.'"/>';
464 464
     }
465 465
   }
466 466
   $author_picture .= '</div>';
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
   case 'team':
490 490
     global $base_url;
491 491
     $node = $variables['result']['node'];
492
-    $variables['url'] = $base_url .'/community/teams/' . $node->entity_id;
492
+    $variables['url'] = $base_url.'/community/teams/'.$node->entity_id;
493 493
     break;
494 494
   default:
495 495
   }
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
   if (!arg(2)) {
503 503
     $message = '';
504 504
   }
505
-  return '<p>' . $message . '</p>';
505
+  return '<p>'.$message.'</p>';
506 506
 }
507 507
 
508 508
 /**
@@ -518,11 +518,11 @@  discard block
 block discarded – undo
518 518
     
519 519
     // Shorten the name when it is too long or it will break many tables.
520 520
     if (drupal_strlen($name) > 20) {
521
-      $name = drupal_substr($name, 0, 15) . '...';
521
+      $name = drupal_substr($name, 0, 15).'...';
522 522
     }
523 523
 
524 524
     if (user_access('access user profiles')) {
525
-      $output = l($name, 'account/' . $object->uid, array('attributes' => array('title' => bts('View user profile.'))));
525
+      $output = l($name, 'account/'.$object->uid, array('attributes' => array('title' => bts('View user profile.'))));
526 526
     }
527 527
     else {
528 528
       $output = check_plain($name);
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
       $output = check_plain($object->name);
541 541
     }
542 542
 
543
-    $output .= ' (' . bts('not verified') . ')';
543
+    $output .= ' ('.bts('not verified').')';
544 544
   }
545 545
   else {
546 546
     $output = check_plain(variable_get('anonymous', bts('Anonymous')));
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
  * Remove the link under text areas that reads:
554 554
  * "More information about formatting options"
555 555
  */
556
-function boinc_filter_tips_more_info () {
556
+function boinc_filter_tips_more_info() {
557 557
   return '';
558 558
 }
559 559
 
@@ -595,8 +595,8 @@  discard block
 block discarded – undo
595 595
 The !site team', array(
596 596
         '!name' => isset($sender->boincuser_name) ? $sender->boincuser_name : $sender->name,
597 597
         '!site' => variable_get('site_name', ''),
598
-        '!message' => $flag->friend_message ? bts('Message') . ': ' . $flag->friend_message : '',
599
-        '!link' => url('account/'. $sender->uid, array('absolute' => TRUE)),
598
+        '!message' => $flag->friend_message ? bts('Message').': '.$flag->friend_message : '',
599
+        '!link' => url('account/'.$sender->uid, array('absolute' => TRUE)),
600 600
         ));
601 601
       break;
602 602
 
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
 The !site team', array(
615 615
         '!name' => isset($sender->boincuser_name) ? $sender->boincuser_name : $sender->name,
616 616
         '!site' => variable_get('site_name', ''),
617
-        '!message' => $flag->friend_message ? bts('Message') . ': ' . $flag->friend_message : '',
617
+        '!message' => $flag->friend_message ? bts('Message').': '.$flag->friend_message : '',
618 618
         '!link' => url('goto/friend-requests', array('absolute' => TRUE)),
619 619
         ));
620 620
       break;
@@ -626,13 +626,13 @@  discard block
 block discarded – undo
626 626
  * Edit action links
627 627
  */
628 628
 function phptemplate_links($links, $attributes = array('class' => 'links')) {
629
-  if ($links){
629
+  if ($links) {
630 630
     // Remove flag-subscriptions link. It will be placed elsewhere.
631 631
     if (isset($links['flag-subscriptions'])) {
632 632
       unset($links['flag-subscriptions']);
633 633
     }
634 634
     // Reorder the links however you need them.
635
-    $links = reorder_links($links, array('comment_edit','quote','comment_add','comment_reply','flag-abuse_comment','flag-abuse_node'), array('comment_delete'));
635
+    $links = reorder_links($links, array('comment_edit', 'quote', 'comment_add', 'comment_reply', 'flag-abuse_comment', 'flag-abuse_node'), array('comment_delete'));
636 636
     // Use the built-in theme_links() function to format the $links array.
637 637
     return theme_links($links, $attributes);
638 638
   }
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
   // are the class attribute for the <li> tags.
716 716
   $dom = new DOMDocument;
717 717
   $dom->loadHTML($links);
718
-  foreach($dom->getElementsByTagName('li') as $node) {
718
+  foreach ($dom->getElementsByTagName('li') as $node) {
719 719
     $key = $node->getAttribute("class");
720 720
     $alllinks[$key] = $dom->saveHTML($node);
721 721
   }
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
     "hide", "unhide",
729 729
     "comment_delete",
730 730
   );
731
-  foreach(array_keys($alllinks) as $key1) {
731
+  foreach (array_keys($alllinks) as $key1) {
732 732
     // Select string up to first space, if present.
733 733
     $class1 = strtok($key1, ' ');
734 734
     if (in_array($class1, $selected_classes)) {
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
     $dom->loadHTML($alink);
758 758
 
759 759
     $myli = $dom->getElementsByTagName('li');
760
-    if ($myli->length>0) {
760
+    if ($myli->length > 0) {
761 761
       $newclasses = trim(($myli[0]->getAttribute("class"))." first");
762 762
       $myli[0]->setAttribute("class", $newclasses);
763 763
       $alink = $dom->saveHTML($myli[0]);
@@ -774,13 +774,13 @@  discard block
 block discarded – undo
774 774
 
775 775
   $output = '<ul class="menu"><li class="first">';
776 776
   if ($user->uid) {
777
-    $output .= '<a href="' . $base_path . 'logout">' . bts('Logout') . '</a>';
777
+    $output .= '<a href="'.$base_path.'logout">'.bts('Logout').'</a>';
778 778
   } else {
779
-    $output .= '<a href="' . $base_path . 'user/login?' . drupal_get_destination() . '">' . bts('Login') . '</a>';
779
+    $output .= '<a href="'.$base_path.'user/login?'.drupal_get_destination().'">'.bts('Login').'</a>';
780 780
   }
781 781
   $output .= '</li>';
782 782
   if (module_exists('global_search') OR module_exists('global_search_solr')) {
783
-    $output .= '<li class="last"> <a class="search" href="' . $base_path . 'search/site">' . bts('search') . '</a> </li>';
783
+    $output .= '<li class="last"> <a class="search" href="'.$base_path.'search/site">'.bts('search').'</a> </li>';
784 784
   }
785 785
   $output .= '</ul>';
786 786
   return $output;
Please login to merge, or discard this patch.
drupal/sites/default/boinc/themes/boinc/theme-settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 // $Id: theme-settings.php,v 1.7 2008/09/11 09:36:50 johnalbin Exp $
3 3
 
4 4
 // Include the definition of zen_settings() and zen_theme_get_default_settings().
5
-include_once './' . drupal_get_path('theme', 'zen') . '/theme-settings.php';
5
+include_once './'.drupal_get_path('theme', 'zen').'/theme-settings.php';
6 6
 
7 7
 
8 8
 /**
Please login to merge, or discard this patch.
drupal/sites/all/libraries/phpmailer/class.smtp.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             default:
239 239
                 //Normalize line breaks
240 240
                 $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str);
241
-                echo gmdate('Y-m-d H:i:s') . "\t" . str_replace(
241
+                echo gmdate('Y-m-d H:i:s')."\t".str_replace(
242 242
                     "\n",
243 243
                     "\n                   \t                  ",
244 244
                     trim($str)
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             $socket_context = stream_context_create($options);
286 286
             set_error_handler(array($this, 'errorHandler'));
287 287
             $this->smtp_conn = stream_socket_client(
288
-                $host . ":" . $port,
288
+                $host.":".$port,
289 289
                 $errno,
290 290
                 $errstr,
291 291
                 $timeout,
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
                 $errstr
318 318
             );
319 319
             $this->edebug(
320
-                'SMTP ERROR: ' . $this->error['error']
320
+                'SMTP ERROR: '.$this->error['error']
321 321
                 . ": $errstr ($errno)",
322 322
                 self::DEBUG_CLIENT
323 323
             );
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         }
337 337
         // Get any announcement
338 338
         $announce = $this->get_lines();
339
-        $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER);
339
+        $this->edebug('SERVER -> CLIENT: '.$announce, self::DEBUG_SERVER);
340 340
         return true;
341 341
     }
342 342
 
@@ -407,9 +407,9 @@  discard block
 block discarded – undo
407 407
                 return false;
408 408
             }
409 409
 
410
-            self::edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL);
410
+            self::edebug('Auth method requested: '.($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL);
411 411
             self::edebug(
412
-                'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']),
412
+                'Auth methods available on the server: '.implode(',', $this->server_caps['AUTH']),
413 413
                 self::DEBUG_LOWLEVEL
414 414
             );
415 415
 
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
                 // Send encoded username and password
444 444
                 if (!$this->sendCommand(
445 445
                     'User & Password',
446
-                    base64_encode("\0" . $username . "\0" . $password),
446
+                    base64_encode("\0".$username."\0".$password),
447 447
                     235
448 448
                 )
449 449
                 ) {
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
                 $oauth = $OAuth->getOauth64();
472 472
 
473 473
                 // Start authentication
474
-                if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) {
474
+                if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 '.$oauth, 235)) {
475 475
                     return false;
476 476
                 }
477 477
                 break;
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 
503 503
                 if (!$this->sendCommand(
504 504
                     'AUTH NTLM',
505
-                    'AUTH NTLM ' . base64_encode($msg1),
505
+                    'AUTH NTLM '.base64_encode($msg1),
506 506
                     334
507 507
                 )
508 508
                 ) {
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
                 $challenge = base64_decode(substr($this->last_reply, 4));
535 535
 
536 536
                 // Build the response
537
-                $response = $username . ' ' . $this->hmac($challenge, $password);
537
+                $response = $username.' '.$this->hmac($challenge, $password);
538 538
 
539 539
                 // send encoded credentials
540 540
                 return $this->sendCommand('Username', base64_encode($response), 235);
@@ -575,10 +575,10 @@  discard block
 block discarded – undo
575 575
         $key = str_pad($key, $bytelen, chr(0x00));
576 576
         $ipad = str_pad('', $bytelen, chr(0x36));
577 577
         $opad = str_pad('', $bytelen, chr(0x5c));
578
-        $k_ipad = $key ^ $ipad;
579
-        $k_opad = $key ^ $opad;
578
+        $k_ipad = $key^$ipad;
579
+        $k_opad = $key^$opad;
580 580
 
581
-        return md5($k_opad . pack('H*', md5($k_ipad . $data)));
581
+        return md5($k_opad.pack('H*', md5($k_ipad.$data)));
582 582
     }
583 583
 
584 584
     /**
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
                 }
691 691
                 //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1
692 692
                 if ($in_headers) {
693
-                    $line = "\t" . $line;
693
+                    $line = "\t".$line;
694 694
                 }
695 695
             }
696 696
             $lines_out[] = $line;
@@ -699,16 +699,16 @@  discard block
 block discarded – undo
699 699
             foreach ($lines_out as $line_out) {
700 700
                 //RFC2821 section 4.5.2
701 701
                 if (!empty($line_out) and $line_out[0] == '.') {
702
-                    $line_out = '.' . $line_out;
702
+                    $line_out = '.'.$line_out;
703 703
                 }
704
-                $this->client_send($line_out . self::CRLF);
704
+                $this->client_send($line_out.self::CRLF);
705 705
             }
706 706
         }
707 707
 
708 708
         //Message data has been sent, complete the command
709 709
         //Increase timelimit for end of DATA command
710 710
         $savetimelimit = $this->Timelimit;
711
-        $this->Timelimit = $this->Timelimit * 2;
711
+        $this->Timelimit = $this->Timelimit*2;
712 712
         $result = $this->sendCommand('DATA END', '.', 250);
713 713
         //Restore timelimit
714 714
         $this->Timelimit = $savetimelimit;
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
      */
743 743
     protected function sendHello($hello, $host)
744 744
     {
745
-        $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250);
745
+        $noerror = $this->sendCommand($hello, $hello.' '.$host, 250);
746 746
         $this->helo_rply = $this->last_reply;
747 747
         if ($noerror) {
748 748
             $this->parseHelloFields($hello);
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
         $useVerp = ($this->do_verp ? ' XVERP' : '');
811 811
         return $this->sendCommand(
812 812
             'MAIL FROM',
813
-            'MAIL FROM:<' . $from . '>' . $useVerp,
813
+            'MAIL FROM:<'.$from.'>'.$useVerp,
814 814
             250
815 815
         );
816 816
     }
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
     {
848 848
         return $this->sendCommand(
849 849
             'RCPT TO',
850
-            'RCPT TO:<' . $address . '>',
850
+            'RCPT TO:<'.$address.'>',
851 851
             array(250, 251)
852 852
         );
853 853
     }
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
             $this->setError("Command '$command' contained line breaks");
884 884
             return false;
885 885
         }
886
-        $this->client_send($commandstring . self::CRLF);
886
+        $this->client_send($commandstring.self::CRLF);
887 887
 
888 888
         $this->last_reply = $this->get_lines();
889 889
         // Fetch SMTP code and possible error code explanation
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
             $detail = substr($this->last_reply, 4);
905 905
         }
906 906
 
907
-        $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
907
+        $this->edebug('SERVER -> CLIENT: '.$this->last_reply, self::DEBUG_SERVER);
908 908
 
909 909
         if (!in_array($code, (array)$expect)) {
910 910
             $this->setError(
@@ -914,7 +914,7 @@  discard block
 block discarded – undo
914 914
                 $code_ex
915 915
             );
916 916
             $this->edebug(
917
-                'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply,
917
+                'SMTP ERROR: '.$this->error['error'].': '.$this->last_reply,
918 918
                 self::DEBUG_CLIENT
919 919
             );
920 920
             return false;
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
     public function turn()
977 977
     {
978 978
         $this->setError('The SMTP TURN command is not implemented');
979
-        $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT);
979
+        $this->edebug('SMTP NOTICE: '.$this->error['error'], self::DEBUG_CLIENT);
980 980
         return false;
981 981
     }
982 982
 
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
             $info = stream_get_meta_data($this->smtp_conn);
1098 1098
             if ($info['timed_out']) {
1099 1099
                 $this->edebug(
1100
-                    'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)',
1100
+                    'SMTP -> get_lines(): timed-out ('.$this->Timeout.' sec)',
1101 1101
                     self::DEBUG_LOWLEVEL
1102 1102
                 );
1103 1103
                 break;
@@ -1106,7 +1106,7 @@  discard block
 block discarded – undo
1106 1106
             if ($endtime and time() > $endtime) {
1107 1107
                 $this->edebug(
1108 1108
                     'SMTP -> get_lines(): timelimit reached ('.
1109
-                    $this->Timelimit . ' sec)',
1109
+                    $this->Timelimit.' sec)',
1110 1110
                     self::DEBUG_LOWLEVEL
1111 1111
                 );
1112 1112
                 break;
@@ -1218,7 +1218,7 @@  discard block
 block discarded – undo
1218 1218
             $errmsg
1219 1219
         );
1220 1220
         $this->edebug(
1221
-            $notice . ' Error number ' . $errno . '. "Error notice: ' . $errmsg,
1221
+            $notice.' Error number '.$errno.'. "Error notice: '.$errmsg,
1222 1222
             self::DEBUG_CONNECTION
1223 1223
         );
1224 1224
     }
@@ -1238,8 +1238,8 @@  discard block
 block discarded – undo
1238 1238
 			return null;
1239 1239
 		}
1240 1240
 
1241
-		foreach($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
1242
-			if(preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
1241
+		foreach ($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
1242
+			if (preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
1243 1243
 				return $matches[1];
1244 1244
 			}
1245 1245
 		}
Please login to merge, or discard this patch.
drupal/sites/all/libraries/phpmailer/class.phpmaileroauthgoogle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,6 +72,6 @@
 block discarded – undo
72 72
     public function getOauth64()
73 73
     {
74 74
         $token = $this->getToken();
75
-        return base64_encode("user=" . $this->oauthUserEmail . "\001auth=Bearer " . $token . "\001\001");
75
+        return base64_encode("user=".$this->oauthUserEmail."\001auth=Bearer ".$token."\001\001");
76 76
     }
77 77
 }
Please login to merge, or discard this patch.