Completed
Pull Request — master (#1795)
by Christian
16:22 queued 04:43
created
drupal/sites/default/boinc/modules/boincteam/boincteam_forum.module 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
   // In Drupal 7, these operation cases will all exist as their own hooks,
60 60
   // so let's approximate that here so that this function can simply be removed
61 61
   // upon migration to 7
62
-  switch($op) {
62
+  switch ($op) {
63 63
   case 'insert':
64 64
     boincteam_forum_node_insert($node);
65 65
     break;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
  * is inserted (forward compatible to Drupal 7)
85 85
  */
86 86
 function boincteam_forum_node_insert($node) {
87
-  switch($node->type) {
87
+  switch ($node->type) {
88 88
   case 'team_forum':
89 89
     $account = user_load($node->uid);
90 90
     $team_id = boincteam_forum_lookup_nid($node->tfid);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
  * is loaded (forward compatible to Drupal 7)
108 108
  */
109 109
 function boincteam_forum_node_load($node) {
110
-  switch($node->type) {
110
+  switch ($node->type) {
111 111
   case 'team_forum':
112 112
     $node->tfid = db_result(db_query("
113 113
       SELECT tfid FROM {boincteam_forum_node}
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
  * is updated (forward compatible to Drupal 7)
126 126
  */
127 127
 function boincteam_forum_node_update($node) {
128
-  switch($node->type) {
128
+  switch ($node->type) {
129 129
   case 'team_forum':
130 130
     
131 131
     break;
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
  * is validated (forward compatible to Drupal 7)
141 141
  */
142 142
 function boincteam_forum_node_validate($node) {
143
-  switch($node->type) {
143
+  switch ($node->type) {
144 144
   case 'team_forum':
145 145
     $account = user_load($node->uid);
146 146
     // Get tfid from node, but if empty/null, get it from the database
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
  * is viewed (forward compatible to Drupal 7)
168 168
  */
169 169
 function boincteam_forum_node_view($node) {
170
-  switch($node->type) {
170
+  switch ($node->type) {
171 171
   case 'team_forum':
172 172
     $team_id = boincteam_forum_lookup_nid($node->tfid);
173 173
     $public_forum = boincteam_forum_is_public($node->tfid);
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     while ($team_forum = db_fetch_object($result)) {
257 257
       
258 258
       $team_forum->link = url("community/teams/{$team_id}/forum/{$team_forum->tfid}");
259
-      $team_forum->zebra = $row % 2 ? 'even' : 'odd';
259
+      $team_forum->zebra = $row%2 ? 'even' : 'odd';
260 260
       $team_forum->new_topics = 0; // TODO: Track user views of team topics
261 261
       $team_forum->new_text = '';
262 262
       $team_forum->new_url = '';
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
  */
325 325
 function boincteam_forum_create_form_panel() {
326 326
   $output = '';
327
-  $output .= '<h2 class="pane-title">' . bts('Create team message board')
327
+  $output .= '<h2 class="pane-title">'.bts('Create team message board')
328 328
     . '</h2>';
329 329
   $output .= drupal_get_form('boincteam_forum_create_form');
330 330
   
@@ -337,8 +337,8 @@  discard block
 block discarded – undo
337 337
 function boincteam_forum_edit_form_panel($tfid) {
338 338
   $team_forum = boincteam_forum_load($tfid);
339 339
   $output = '';
340
-  $output .= '<h2 class="pane-title">' . bts('Edit message board') . ': ' . 
341
-    $team_forum->title . '</h2>';
340
+  $output .= '<h2 class="pane-title">'.bts('Edit message board').': '. 
341
+    $team_forum->title.'</h2>';
342 342
   $output .= drupal_get_form('boincteam_forum_edit_form', $tfid);
343 343
   
344 344
   return $output;
@@ -354,19 +354,19 @@  discard block
 block discarded – undo
354 354
   );
355 355
   $forums = boincteam_forum_list($team_id);
356 356
   $output = '';
357
-  $output .= '<h2 class="pane-title">' . bts('Team forum') . '</h2>';
357
+  $output .= '<h2 class="pane-title">'.bts('Team forum').'</h2>';
358 358
   $output .= '<p>'
359 359
     . bts('A discussion forum has been set up for team members.')
360 360
     . '</p>';
361 361
   $output .= '<ul class="tab-list action-list">';
362 362
   foreach ($forums as $forum) {
363 363
     if (!$show_public_only OR $forum->public) {
364
-      $output .= '  <li class="tab primary">' . 
364
+      $output .= '  <li class="tab primary">'. 
365 365
         l(
366 366
           //$forum->title,
367 367
           bts('Enter forum'),
368 368
           "community/teams/{$team_id}/forum/{$forum->tfid}"
369
-        ) . '</li>';
369
+        ).'</li>';
370 370
       // Since we're only supporting one team forum for now, we've labeled the
371 371
       // link in a generic way above and will now just break out of the loop
372 372
       break;
@@ -381,20 +381,20 @@  discard block
 block discarded – undo
381 381
  */                                         
382 382
 function boincteam_forum_topic_overview_panel($nid = NULL) {
383 383
   $output = '';
384
-  $output .= '<h2 class="pane-title">' . bts('About message boards') . '</h2>';
384
+  $output .= '<h2 class="pane-title">'.bts('About message boards').'</h2>';
385 385
   $output .= '<div>';
386 386
   if ($nid) {
387 387
     $team = node_load($nid);
388
-    $output .= '<p>' . bts('You may create a message board for use by @team',
389
-      array('@team' => $team->title)) . ':</p>';
388
+    $output .= '<p>'.bts('You may create a message board for use by @team',
389
+      array('@team' => $team->title)).':</p>';
390 390
   }
391 391
   else {
392
-    $output .= '<p>' . bts('This is a team-only message board') . ':</p>';
392
+    $output .= '<p>'.bts('This is a team-only message board').':</p>';
393 393
   }
394 394
   $output .= '<ul>';
395
-  $output .= '  <li>' . bts('Only members may post') . '</li>';
396
-  $output .= '  <li>' . bts('Only members may read (optional)') . '</li>';
397
-  $output .= '  <li>' . bts('Founder & Team Admins have moderator privileges') .
395
+  $output .= '  <li>'.bts('Only members may post').'</li>';
396
+  $output .= '  <li>'.bts('Only members may read (optional)').'</li>';
397
+  $output .= '  <li>'.bts('Founder & Team Admins have moderator privileges').
398 398
     '</li>';
399 399
   $output .= '</ul>';
400 400
   $output .= '</div>';
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincteam/boincteam.module 1 patch
Spacing   +133 added lines, -133 removed lines patch added patch discarded remove patch
@@ -62,21 +62,21 @@  discard block
 block discarded – undo
62 62
   );
63 63
   $items['community/teams/%/edit/admins/remove/%'] = array(
64 64
     'page callback' => 'boincteam_remove_admin',
65
-    'page arguments' => array(2,6),
65
+    'page arguments' => array(2, 6),
66 66
     'access callback' => 'boincteam_is_founder',
67 67
     'access arguments' => array(2),
68 68
     'type' => MENU_CALLBACK
69 69
   );
70 70
   $items['community/teams/%/edit/founder/set/%'] = array(
71 71
     'page callback' => 'boincteam_set_founder',
72
-    'page arguments' => array(2,6),
72
+    'page arguments' => array(2, 6),
73 73
     'access callback' => 'boincteam_is_founder',
74 74
     'access arguments' => array(2),
75 75
     'type' => MENU_CALLBACK
76 76
   );
77 77
   $items['community/teams/%/edit/members/remove/%'] = array(
78 78
     'page callback' => 'boincteam_remove_member',
79
-    'page arguments' => array(2,6),
79
+    'page arguments' => array(2, 6),
80 80
     'access callback' => 'boincteam_is_founder',
81 81
     'access arguments' => array(2),
82 82
     'type' => MENU_CALLBACK
@@ -672,12 +672,12 @@  discard block
 block discarded – undo
672 672
   $boincteam = boincteam_load($boincteam_id);
673 673
   $now = time();
674 674
   if ($boincteam->ping_user <= 0) {
675
-    if ($boincteam->ping_time < $now - 60 * (24*60*60)) {
675
+    if ($boincteam->ping_time < $now - 60*(24*60*60)) {
676 676
       return TRUE;
677 677
     }
678 678
     return FALSE;
679 679
   }
680
-  if ($boincteam->ping_time < $now - 90 * (24*60*60)) {
680
+  if ($boincteam->ping_time < $now - 90*(24*60*60)) {
681 681
     return TRUE;
682 682
   }
683 683
   return FALSE;
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
  * responded to the request
689 689
  */
690 690
 function boincteam_foundership_transfer_ok_time($boincteam) {
691
-    return $boincteam->ping_time + 60 * (24*60*60);
691
+    return $boincteam->ping_time + 60*(24*60*60);
692 692
 }
693 693
 
694 694
 /**
@@ -726,26 +726,26 @@  discard block
 block discarded – undo
726 726
  */                                         
727 727
 function boincteam_about_admins_panel() {
728 728
   $output = '';
729
-  $output .= '<h2 class="pane-title">' . bts('About team admins') . '</h2>';
729
+  $output .= '<h2 class="pane-title">'.bts('About team admins').'</h2>';
730 730
   $output .= '<div>';
731
-  $output .= '<p>' . bts('Team admins can:') . '</p>';
731
+  $output .= '<p>'.bts('Team admins can:').'</p>';
732 732
   $output .= '<ul>';
733
-  $output .= '  <li>' . bts('Edit team information') . '</li>';
734
-  $output .= '  <li>' . bts("View the team's join / quit history") . '</li>';
735
-  $output .= '  <li>' . bts('Moderate the team forum') . '</li>';
736
-  $output .= '  <li>' . bts('Remove members from the team') . '</li>';
737
-  $output .= '  <li>' . bts('Disband a team if it has no members') . '</li>';
733
+  $output .= '  <li>'.bts('Edit team information').'</li>';
734
+  $output .= '  <li>'.bts("View the team's join / quit history").'</li>';
735
+  $output .= '  <li>'.bts('Moderate the team forum').'</li>';
736
+  $output .= '  <li>'.bts('Remove members from the team').'</li>';
737
+  $output .= '  <li>'.bts('Disband a team if it has no members').'</li>';
738 738
   $output .= '</ul>';
739 739
   $output .= '</div>';
740 740
   $output .= '<div>';
741
-  $output .= '<p>' . bts('Team admins cannot:') . '</p>';
741
+  $output .= '<p>'.bts('Team admins cannot:').'</p>';
742 742
   $output .= '<ul>';
743
-  $output .= '  <li>' . bts('Change the team founder') . '</li>';
744
-  $output .= '  <li>' . bts('Remove members') . '</li>';
745
-  $output .= '  <li>' . bts('Add / Remove team admins') . '</li>';
743
+  $output .= '  <li>'.bts('Change the team founder').'</li>';
744
+  $output .= '  <li>'.bts('Remove members').'</li>';
745
+  $output .= '  <li>'.bts('Add / Remove team admins').'</li>';
746 746
   $output .= '</ul>';
747 747
   $output .= '</div>';
748
-  $output .= '<p>' . bts('If a team admin quits the team, they cease to be a'
748
+  $output .= '<p>'.bts('If a team admin quits the team, they cease to be a'
749 749
     . ' team admin. We recommend only selecting people you know and trust')
750 750
     . '</p>';
751 751
   return $output;
@@ -756,26 +756,26 @@  discard block
 block discarded – undo
756 756
  */                                         
757 757
 function boincteam_about_founder_panel() {
758 758
   $output = '';
759
-  $output .= '<h2 class="pane-title">' . bts('Changing the team founder')
759
+  $output .= '<h2 class="pane-title">'.bts('Changing the team founder')
760 760
     . '</h2>';
761 761
   $output .= '<div>';
762
-  $output .= '<p>' . bts('Notes about changes in foundership:') . '</p>';
762
+  $output .= '<p>'.bts('Notes about changes in foundership:').'</p>';
763 763
   $output .= '<ul>';
764
-  $output .= '  <li>' . bts('Any member of the team is eligible') . '</li>';
765
-  $output .= '  <li>' . bts('Current founder becomes a normal user') . '</li>';
764
+  $output .= '  <li>'.bts('Any member of the team is eligible').'</li>';
765
+  $output .= '  <li>'.bts('Current founder becomes a normal user').'</li>';
766 766
   $output .= '</ul>';
767 767
   $output .= '</div>';
768 768
   $output .= '<div>';
769
-  $output .= '<p>' . bts('Foundership can be requested by team members:')
769
+  $output .= '<p>'.bts('Foundership can be requested by team members:')
770 770
     . '</p>';
771 771
   $output .= '<ul>';
772
-  $output .= '  <li>' . bts('One request is allowed at a time') . '</li>';
773
-  $output .= '  <li>' . bts('It must be 60 days since any previous request')
772
+  $output .= '  <li>'.bts('One request is allowed at a time').'</li>';
773
+  $output .= '  <li>'.bts('It must be 60 days since any previous request')
774 774
     . '</li>';
775
-  $output .= '  <li>' . bts('Any active request must be older than 90 days')
775
+  $output .= '  <li>'.bts('Any active request must be older than 90 days')
776 776
     . '</li>';
777
-  $output .= '  <li>' . bts('Current founder has 60 days to respond to a'
778
-    . ' request') . '</li>';
777
+  $output .= '  <li>'.bts('Current founder has 60 days to respond to a'
778
+    . ' request').'</li>';
779 779
   $output .= '</ul>';
780 780
   $output .= '</div>';
781 781
   return $output;
@@ -789,9 +789,9 @@  discard block
 block discarded – undo
789 789
   $account = user_load($user->uid);
790 790
   $unrestricted_role = array_search('verified contributor', user_roles(true));
791 791
   $output = '';
792
-  $output .= '<h2 class="pane-title">' . bts('Create a new team') . '</h2>';
793
-  $output .= '<p>' . bts('If you cannot find a team that is right for you, you'
794
-    . ' can create a team.') . '</p>';
792
+  $output .= '<h2 class="pane-title">'.bts('Create a new team').'</h2>';
793
+  $output .= '<p>'.bts('If you cannot find a team that is right for you, you'
794
+    . ' can create a team.').'</p>';
795 795
   $output .= '<ul class="tab-list">';
796 796
   $output .= '  <li class="first last tab">';
797 797
   if (isset($account->roles[$unrestricted_role])) {
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
  */
827 827
 function boincteam_create_team_panel() {
828 828
   $output = '';
829
-  $output .= '<h2 class="pane-title">' . bts('Create a team') . '</h2>';
829
+  $output .= '<h2 class="pane-title">'.bts('Create a team').'</h2>';
830 830
   $output .= drupal_get_form('boincteam_create_form');
831 831
   
832 832
   return $output;
@@ -844,23 +844,23 @@  discard block
 block discarded – undo
844 844
   $account = user_load($uid);
845 845
   if ($account->team) {
846 846
     $team = boincteam_load(boincteam_lookup_id($account->team));
847
-    $output .= '<h2 class="pane-title">' . bts('Team') . '</h2>';
847
+    $output .= '<h2 class="pane-title">'.bts('Team').'</h2>';
848 848
     $output .= '<div class="stats">';
849
-    $output .= '  <label>' . bts('Name') . ': </label>';
850
-    $output .= '  <span>' . l($team->name, "community/teams/{$account->team}") . '</span>';
851
-    $output .= '</div>' . "\n";
849
+    $output .= '  <label>'.bts('Name').': </label>';
850
+    $output .= '  <span>'.l($team->name, "community/teams/{$account->team}").'</span>';
851
+    $output .= '</div>'."\n";
852 852
     $output .= '<div class="stats">';
853
-    $output .= '  <label>' . bts('Member since') . ': </label>';
854
-    $output .= '  <span>' . date('j F Y', boincteam_get_member_join_date($team->id, $account->boincuser_id)) . '</span>';
855
-    $output .= '</div>' . "\n";
853
+    $output .= '  <label>'.bts('Member since').': </label>';
854
+    $output .= '  <span>'.date('j F Y', boincteam_get_member_join_date($team->id, $account->boincuser_id)).'</span>';
855
+    $output .= '</div>'."\n";
856 856
     $output .= '<div class="stats">';
857
-    $output .= '  <label>' . bts('Country') . ': </label>';
858
-    $output .= '  <span>' . $team->country . '</span>';
859
-    $output .= '</div>' . "\n";
857
+    $output .= '  <label>'.bts('Country').': </label>';
858
+    $output .= '  <span>'.$team->country.'</span>';
859
+    $output .= '</div>'."\n";
860 860
     $output .= '<div class="stats">';
861
-    $output .= '  <label>' . bts('Total credit') . ': </label>';
862
-    $output .= '  <span>' . number_format($team->total_credit, 2) . '</span>';
863
-    $output .= '</div>' . "\n";
861
+    $output .= '  <label>'.bts('Total credit').': </label>';
862
+    $output .= '  <span>'.number_format($team->total_credit, 2).'</span>';
863
+    $output .= '</div>'."\n";
864 864
   }
865 865
   return $output;
866 866
 }
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
 function boincteam_edit_team_panel($team_id) {
872 872
   $team = node_load($team_id);
873 873
   $output = '';
874
-  $output .= '<h2 class="pane-title">' . $team->title . '</h2>';
874
+  $output .= '<h2 class="pane-title">'.$team->title.'</h2>';
875 875
   $output .= drupal_get_form('boincteam_edit_form', $team_id);
876 876
   
877 877
   return $output;
@@ -883,12 +883,12 @@  discard block
 block discarded – undo
883 883
 function boincteam_join_team_panel($team_id) {
884 884
   $team = node_load($team_id);
885 885
   $output = '';
886
-  $output .= '<h2 class="pane-title">' . bts('Join team') . '</h2>';
887
-  $output .= '<p>' . bts('Click here to become a member of @this_team',
888
-    array('@this_team' =>$team->title)) . '</p>';
886
+  $output .= '<h2 class="pane-title">'.bts('Join team').'</h2>';
887
+  $output .= '<p>'.bts('Click here to become a member of @this_team',
888
+    array('@this_team' =>$team->title)).'</p>';
889 889
   $output .= '<ul class="tab-list">';
890
-  $output .= '  <li class="first last tab">' . 
891
-    l(bts('Join this team'), "community/teams/{$team_id}/join") . '</li>';
890
+  $output .= '  <li class="first last tab">'. 
891
+    l(bts('Join this team'), "community/teams/{$team_id}/join").'</li>';
892 892
   $output .= '</ul>';
893 893
   return $output;
894 894
 }
@@ -899,12 +899,12 @@  discard block
 block discarded – undo
899 899
 function boincteam_leave_team_panel($team_id) {
900 900
   $team = node_load($team_id);
901 901
   $output = '';
902
-  $output .= '<h2 class="pane-title">' . bts('Leave team') . '</h2>';
903
-  $output .= '<p>' . bts('Click here to revoke your membership with'
904
-    . ' @this_team', array('@this_team' =>$team->title)) . '</p>';
902
+  $output .= '<h2 class="pane-title">'.bts('Leave team').'</h2>';
903
+  $output .= '<p>'.bts('Click here to revoke your membership with'
904
+    . ' @this_team', array('@this_team' =>$team->title)).'</p>';
905 905
   $output .= '<ul class="tab-list">';
906
-  $output .= '  <li class="first last tab">' . 
907
-    l(bts('Leave this team'), "community/teams/{$team_id}/leave") . '</li>';
906
+  $output .= '  <li class="first last tab">'. 
907
+    l(bts('Leave this team'), "community/teams/{$team_id}/leave").'</li>';
908 908
   $output .= '</ul>';
909 909
   return $output;
910 910
 }
@@ -914,10 +914,10 @@  discard block
 block discarded – undo
914 914
  */                                         
915 915
 function boincteam_manage_admins_panel_header($team_id) {
916 916
   $output = '';
917
-  $output .= '<h4>' . bts('Add team admin') . '</h4>';
917
+  $output .= '<h4>'.bts('Add team admin').'</h4>';
918 918
   $output .= drupal_get_form('boincteam_add_admin_form', $team_id);
919 919
   $output .= '<div class="clearfix"></div>';
920
-  $output .= '<h4>' . bts('Current team admins') . '</h4>';
920
+  $output .= '<h4>'.bts('Current team admins').'</h4>';
921 921
   
922 922
   return $output;
923 923
 }
@@ -929,33 +929,33 @@  discard block
 block discarded – undo
929 929
   $is_founder = boincteam_is_founder($team_id);
930 930
   $team = node_load($team_id);
931 931
   $output = '';
932
-  $output .= '<h2 class="pane-title">' . bts('Manage team') . '</h2>';
932
+  $output .= '<h2 class="pane-title">'.bts('Manage team').'</h2>';
933 933
   
934 934
   // Member list
935 935
   $output .= '<div class="form-item">';
936
-  $output .= '  <label>' . bts('View member list') . '</label>';
936
+  $output .= '  <label>'.bts('View member list').'</label>';
937 937
   $output .= '  <ul class="tab-list">';
938
-  $output .= '    <li class="first tab primary">' . 
939
-    l('HTML', "community/teams/{$team_id}/members") . '</li>';
940
-  $output .= '    <li class="last tab primary">' .
941
-    l('text', "community/teams/{$team_id}/members/email") . '</li>';
938
+  $output .= '    <li class="first tab primary">'. 
939
+    l('HTML', "community/teams/{$team_id}/members").'</li>';
940
+  $output .= '    <li class="last tab primary">'.
941
+    l('text', "community/teams/{$team_id}/members/email").'</li>';
942 942
   $output .= '  </ul>';
943 943
   $output .= '  <div class="description">';
944
-  $output .=   bts('Member names and emails');
944
+  $output .= bts('Member names and emails');
945 945
   $output .= '  </div>';
946 946
   $output .= '</div>'; 
947 947
   
948 948
   // Team history
949 949
   $output .= '<div class="form-item">';
950
-  $output .= '  <label>' . bts('View change history') . '</label>';
950
+  $output .= '  <label>'.bts('View change history').'</label>';
951 951
   $output .= '  <ul class="tab-list">';
952
-  $output .= '    <li class="first tab primary">' . 
953
-    l('HTML', "community/teams/{$team_id}/history") . '</li>';
954
-  $output .= '    <li class="last tab primary">' .
955
-    l('XML', "community/teams/{$team_id}/history/xml") . '</li>';
952
+  $output .= '    <li class="first tab primary">'. 
953
+    l('HTML', "community/teams/{$team_id}/history").'</li>';
954
+  $output .= '    <li class="last tab primary">'.
955
+    l('XML', "community/teams/{$team_id}/history/xml").'</li>';
956 956
   $output .= '  </ul>';
957 957
   $output .= '  <div class="description">';
958
-  $output .=   bts('See member activity');
958
+  $output .= bts('See member activity');
959 959
   $output .= '  </div>';
960 960
   $output .= '</div>';
961 961
   
@@ -972,13 +972,13 @@  discard block
 block discarded – undo
972 972
       }
973 973
       $output .= '<div class="form-item">';
974 974
       $output .= '  <ul class="tab-list action-list">';
975
-      $output .= '    <li class="first tab primary">' .   
975
+      $output .= '    <li class="first tab primary">'.   
976 976
         l(bts('Manage team message board'),
977 977
           "community/teams/{$team_id}/forum/{$team_forum_link_path}"
978 978
         );
979 979
       $output .= '    </li>';
980 980
       $output .= '  <div class="description">';
981
-      $output .=   bts('Create or manage message board');
981
+      $output .= bts('Create or manage message board');
982 982
       $output .= '  </div>';
983 983
       $output .= '</div>';
984 984
     }
@@ -987,29 +987,29 @@  discard block
 block discarded – undo
987 987
   // Remove members
988 988
   $output .= '<div class="form-item">';
989 989
   $output .= '  <ul class="tab-list action-list">';
990
-  $output .= '    <li class="first tab primary">' . 
991
-    l(bts('Remove members'), "community/teams/{$team_id}/edit/members") . '</li>';
990
+  $output .= '    <li class="first tab primary">'. 
991
+    l(bts('Remove members'), "community/teams/{$team_id}/edit/members").'</li>';
992 992
   
993 993
   if ($is_founder) {
994 994
     
995 995
     // Change founder
996
-    $output .= '    <li class="tab primary">' . 
997
-      l(bts('Change founder'), "community/teams/{$team_id}/edit/founder") . '</li>';
996
+    $output .= '    <li class="tab primary">'. 
997
+      l(bts('Change founder'), "community/teams/{$team_id}/edit/founder").'</li>';
998 998
       
999 999
       // Manage admins
1000
-    $output .= '    <li class="tab primary">' . 
1001
-      l(bts('Manage team admins'), "community/teams/{$team_id}/edit/admins") . '</li>';
1000
+    $output .= '    <li class="tab primary">'. 
1001
+      l(bts('Manage team admins'), "community/teams/{$team_id}/edit/admins").'</li>';
1002 1002
   }
1003 1003
   
1004 1004
   // Edit team information
1005
-  $output .= '    <li class="tab primary">' . 
1006
-    l(bts('Edit team info'), "community/teams/{$team_id}/edit/info") . '</li>';
1005
+  $output .= '    <li class="tab primary">'. 
1006
+    l(bts('Edit team info'), "community/teams/{$team_id}/edit/info").'</li>';
1007 1007
     
1008 1008
   if ($is_founder) {
1009 1009
     
1010 1010
     // Delete the team
1011
-    $output .= '    <li class="last tab primary">' . 
1012
-      l(bts('Remove team'), "community/teams/{$team_id}/delete") . '</li>';
1011
+    $output .= '    <li class="last tab primary">'. 
1012
+      l(bts('Remove team'), "community/teams/{$team_id}/delete").'</li>';
1013 1013
   }
1014 1014
   
1015 1015
   $output .= '  </ul>';
@@ -1026,12 +1026,12 @@  discard block
 block discarded – undo
1026 1026
   $account = user_load($user->uid);
1027 1027
   $team = node_load($account->team);
1028 1028
   $output = '';
1029
-  $output .= '<h2 class="pane-title">' . bts('My team') . '</h2>';
1030
-  $output .= '<p>' . bts('You are a member of @team.', 
1031
-    array('@team' => $team->title)) . '</p>';
1029
+  $output .= '<h2 class="pane-title">'.bts('My team').'</h2>';
1030
+  $output .= '<p>'.bts('You are a member of @team.', 
1031
+    array('@team' => $team->title)).'</p>';
1032 1032
   $output .= '<ul class="tab-list">';
1033
-  $output .= '  <li class="first last tab">' . 
1034
-    l(bts('View my team'), "community/teams/{$account->team}") . '</li>';
1033
+  $output .= '  <li class="first last tab">'. 
1034
+    l(bts('View my team'), "community/teams/{$account->team}").'</li>';
1035 1035
   $output .= '</ul>';
1036 1036
   return $output;
1037 1037
 }
@@ -1047,11 +1047,11 @@  discard block
 block discarded – undo
1047 1047
   $boincteam = boincteam_load($boincteam_id);
1048 1048
   $boincuser_id = $account->boincuser_id;
1049 1049
   $output = '';
1050
-  $output .= '<h2 class="pane-title">' . bts('Request foundership') . '</h2>';
1050
+  $output .= '<h2 class="pane-title">'.bts('Request foundership').'</h2>';
1051 1051
   
1052 1052
   if (boincteam_user_requested_foundership($team_id)) {
1053 1053
     $deadline = boincteam_foundership_transfer_ok_time($boincteam);
1054
-    $days_to_deadline = ceil(($deadline - time()) / (24*60*60));
1054
+    $days_to_deadline = ceil(($deadline - time())/(24*60*60));
1055 1055
     $request_age = 60 - $days_to_deadline;
1056 1056
     $days_to_respond = 30 + $days_to_deadline;
1057 1057
     if (time() > $deadline) {
@@ -1079,8 +1079,8 @@  discard block
 block discarded – undo
1079 1079
       }
1080 1080
       $output .= '</p>';
1081 1081
       $output .= '<ul class="tab-list">';
1082
-      $output .= '  <li class="first last tab">' . 
1083
-        l(bts('Assume foundership'), "community/teams/{$team_id}/assume-foundership") . '</li>';
1082
+      $output .= '  <li class="first last tab">'. 
1083
+        l(bts('Assume foundership'), "community/teams/{$team_id}/assume-foundership").'</li>';
1084 1084
       $output .= '</ul>';
1085 1085
     }
1086 1086
     else {
@@ -1104,29 +1104,29 @@  discard block
 block discarded – undo
1104 1104
     // who made the request has 30 additional days to assume foundership if 
1105 1105
     // there is no response to the request)
1106 1106
     $deadline = boincteam_foundership_transfer_ok_time($boincteam);
1107
-    $days_to_deadline = ceil(($deadline - time()) / (24*60*60)) + 30;
1107
+    $days_to_deadline = ceil(($deadline - time())/(24*60*60)) + 30;
1108 1108
     $output .= '<p>';
1109 1109
     $output .= bts('A team foundership change was already requested recently.'
1110 1110
       . ' Only one request is allowed within a period of 90 days.'
1111 1111
     );
1112 1112
     if ($days_to_deadline == 1) {
1113
-      $output .= ' (' . bts('1 day remaining') . ')';
1113
+      $output .= ' ('.bts('1 day remaining').')';
1114 1114
     }
1115 1115
     else {
1116
-      $output .= ' (' . bts('@count days remaining',
1116
+      $output .= ' ('.bts('@count days remaining',
1117 1117
         array('@count' => $days_to_deadline)
1118
-      ) . ')';
1118
+      ).')';
1119 1119
     }
1120 1120
     $output .= '</p>';
1121 1121
   }
1122 1122
   else {
1123
-    $output .= '<p>' . bts('If the team founder is not active and you want to'
1123
+    $output .= '<p>'.bts('If the team founder is not active and you want to'
1124 1124
       . ' assume the role of founder, click below to request foundership of'
1125 1125
       . ' @this_team.',
1126
-      array('@this_team' =>$team->title)) . '</p>';
1126
+      array('@this_team' =>$team->title)).'</p>';
1127 1127
     $output .= '<ul class="tab-list">';
1128
-    $output .= '  <li class="first last tab">' . 
1129
-      l(bts('Initiate request'), "community/teams/{$team_id}/request-foundership") . '</li>';
1128
+    $output .= '  <li class="first last tab">'. 
1129
+      l(bts('Initiate request'), "community/teams/{$team_id}/request-foundership").'</li>';
1130 1130
     $output .= '</ul>';
1131 1131
   }
1132 1132
   return $output;
@@ -1147,15 +1147,15 @@  discard block
 block discarded – undo
1147 1147
   if ($boincteam->ping_user) {
1148 1148
     if ($boincteam->ping_user < 0) {
1149 1149
       $member = user_load(boincuser_lookup_uid(-$boincteam->ping_user));
1150
-      $output .= '<h2 class="pane-title">' . bts('Obsolete transfer request')
1150
+      $output .= '<h2 class="pane-title">'.bts('Obsolete transfer request')
1151 1151
         . '</h2>';
1152
-      $output .= '<p>' . bts('Team member @name requested team foundership on'
1152
+      $output .= '<p>'.bts('Team member @name requested team foundership on'
1153 1153
         . ' @date, but then left the team. This request is now canceled.',
1154 1154
         array(
1155 1155
           '@name' => $member->boincuser_name,
1156 1156
           '@date' => date('j M Y', $boincteam->ping_time),
1157 1157
         )
1158
-      ) . '</p>';
1158
+      ).'</p>';
1159 1159
       // Automatically cancel the request
1160 1160
       db_set_active('boinc');
1161 1161
       db_query("
@@ -1168,15 +1168,15 @@  discard block
 block discarded – undo
1168 1168
     }
1169 1169
     else {
1170 1170
       $member = user_load(boincuser_lookup_uid($boincteam->ping_user));
1171
-      $output .= '<h2 class="pane-title">' . bts('Respond to transfer request')
1171
+      $output .= '<h2 class="pane-title">'.bts('Respond to transfer request')
1172 1172
         . '</h2>';
1173
-      $output .= '<p>' . bts('Team member @name has requested team foundership.'
1173
+      $output .= '<p>'.bts('Team member @name has requested team foundership.'
1174 1174
         . ' This may be because you left the team or have not had contact with'
1175 1175
         . ' the team for a long time.', array(
1176 1176
           '@name' => $member->boincuser_name,
1177 1177
         )
1178
-      ) . '</p>';
1179
-      $output .= '<p>' . bts("If you don't decline the request by @date, @name"
1178
+      ).'</p>';
1179
+      $output .= '<p>'.bts("If you don't decline the request by @date, @name"
1180 1180
         . ' will have the option of assuming team foundership. (note: To'
1181 1181
         . ' accept the request, assign foundership to @name using the form'
1182 1182
         . ' below)',
@@ -1184,10 +1184,10 @@  discard block
 block discarded – undo
1184 1184
           '@name' => $member->boincuser_name,
1185 1185
           '@date' => date('j M Y', boincteam_foundership_transfer_ok_time($boincteam)),
1186 1186
         )
1187
-      ) . '</p>';
1187
+      ).'</p>';
1188 1188
       $output .= '<ul class="tab-list">';
1189
-      $output .= '  <li class="first last tab">' . 
1190
-        l(bts('Deny request'), "community/teams/{$team_id}/deny-foundership-request") . '</li>';
1189
+      $output .= '  <li class="first last tab">'. 
1190
+        l(bts('Deny request'), "community/teams/{$team_id}/deny-foundership-request").'</li>';
1191 1191
       $output .= '</ul>';
1192 1192
     }
1193 1193
   }
@@ -1197,9 +1197,9 @@  discard block
 block discarded – undo
1197 1197
 function boincteam_search_panel() {
1198 1198
   $output = '';
1199 1199
   if (module_exists('global_search_teams_solr')) {
1200
-    $output .= '<h2 class="pane-title">' . bts('Search teams') . '</h2>';
1200
+    $output .= '<h2 class="pane-title">'.bts('Search teams').'</h2>';
1201 1201
     //$output .= '<p>' . bts('Render a search form here.') . '</p>';
1202
-    $output .= '<p>' . boincteam_search_view() . '</p>';
1202
+    $output .= '<p>'.boincteam_search_view().'</p>';
1203 1203
   }
1204 1204
   return $output;
1205 1205
 }
@@ -1215,20 +1215,20 @@  discard block
 block discarded – undo
1215 1215
  * General info about the concept of teams
1216 1216
  */                                         
1217 1217
 function boincteam_topic_overview_panel() {
1218
-  $site_name =  variable_get('site_name', bts('Project'));
1218
+  $site_name = variable_get('site_name', bts('Project'));
1219 1219
   $output = '';
1220
-  $output .= '<h2 class="pane-title">' . bts('Teams') . '</h2>';
1220
+  $output .= '<h2 class="pane-title">'.bts('Teams').'</h2>';
1221 1221
   $output .= '<div class="">';
1222
-  $output .= '<p>' . bts('@project participants may form teams. You may belong'
1222
+  $output .= '<p>'.bts('@project participants may form teams. You may belong'
1223 1223
     . ' to only one team. You can join or quit a team at any time. To join a'
1224 1224
     . ' team, visit its team page and click "Join this team". Each team has a'
1225
-    . ' founder who may:', array('@project' => $site_name)) . '</p>';
1225
+    . ' founder who may:', array('@project' => $site_name)).'</p>';
1226 1226
   $output .= '<ul>';
1227
-  $output .= '  <li>' . bts("access team members' email addresses") . '</li>';
1228
-  $output .= '  <li>' . bts("edit the team's name and description") . '</li>';
1229
-  $output .= '  <li>' . bts('add or remove team admins') . '</li>';
1230
-  $output .= '  <li>' . bts('remove members from the team') . '</li>';
1231
-  $output .= '  <li>' . bts('disband a team if it has no members') . '</li>';
1227
+  $output .= '  <li>'.bts("access team members' email addresses").'</li>';
1228
+  $output .= '  <li>'.bts("edit the team's name and description").'</li>';
1229
+  $output .= '  <li>'.bts('add or remove team admins').'</li>';
1230
+  $output .= '  <li>'.bts('remove members from the team').'</li>';
1231
+  $output .= '  <li>'.bts('disband a team if it has no members').'</li>';
1232 1232
   $output .= '</ul>';
1233 1233
   $output .= '</div>';
1234 1234
   return $output;
@@ -1273,34 +1273,34 @@  discard block
 block discarded – undo
1273 1273
     }
1274 1274
   }
1275 1275
   $output = '';
1276
-  $output .= '<h2 class="pane-title">' . $boincteam->name . '</h2>';
1276
+  $output .= '<h2 class="pane-title">'.$boincteam->name.'</h2>';
1277 1277
   $output .= '<div>';
1278 1278
   $output .= '<div class="left-column">';
1279 1279
   $output .= '<ul class="stats">';
1280
-  $output .= '  <li>' . bts('Total credits') . ': ' . number_format($boincteam->total_credit, 2) . '</li>';
1281
-  $output .= '  <li>' . bts('Recent avg credits') . ': ' . number_format($boincteam->expavg_credit, 2) . '</li>';
1282
-  $output .= '  <li>' . bts('Country') . ': ' . $boincteam->country . '</li>';
1283
-  $output .= '  <li>' . bts('Type') . ': ' . boincteam_get_type($team_id) . '</li>';
1280
+  $output .= '  <li>'.bts('Total credits').': '.number_format($boincteam->total_credit, 2).'</li>';
1281
+  $output .= '  <li>'.bts('Recent avg credits').': '.number_format($boincteam->expavg_credit, 2).'</li>';
1282
+  $output .= '  <li>'.bts('Country').': '.$boincteam->country.'</li>';
1283
+  $output .= '  <li>'.bts('Type').': '.boincteam_get_type($team_id).'</li>';
1284 1284
   $output .= '</ul>';
1285 1285
   $output .= '</div>';
1286 1286
   $output .= '<div class="right-column">';
1287 1287
   $output .= '<ul class="stats">';
1288
-  $output .= '  <li>' . bts('Founder') . ': ' . l($founder->boincuser_name, "account/{$founder->uid}") . '</li>';
1289
-  $output .= '  <li>' . bts('New members in last day') . ': ' . implode('&middot;', $new_members) . '</li>';
1290
-  $output .= '  <li>' . bts('Total members') . ': ' . l($boincteam->nusers, "community/teams/{$team_id}/members") . '</li>';
1291
-  $output .= '  <li>' . bts('Active members') . ': ' . $boincteam->nusers_active . '</li>';
1292
-  $output .= '  <li>' . bts('Members with credit') . ': ' . $boincteam->nusers_worked . '</li>';
1288
+  $output .= '  <li>'.bts('Founder').': '.l($founder->boincuser_name, "account/{$founder->uid}").'</li>';
1289
+  $output .= '  <li>'.bts('New members in last day').': '.implode('&middot;', $new_members).'</li>';
1290
+  $output .= '  <li>'.bts('Total members').': '.l($boincteam->nusers, "community/teams/{$team_id}/members").'</li>';
1291
+  $output .= '  <li>'.bts('Active members').': '.$boincteam->nusers_active.'</li>';
1292
+  $output .= '  <li>'.bts('Members with credit').': '.$boincteam->nusers_worked.'</li>';
1293 1293
   $output .= '</ul>';
1294 1294
   $output .= '</div>';
1295 1295
   $output .= '</div>';
1296 1296
   $output .= '<div class="clearfix"></div>';
1297 1297
   if ($boincteam->url) {
1298 1298
     $output .= '<div class="stats">';
1299
-    $output .= bts('Web site') . ': ' . l("http://{$boincteam->url}", "http://{$boincteam->url}");
1299
+    $output .= bts('Web site').': '.l("http://{$boincteam->url}", "http://{$boincteam->url}");
1300 1300
     $output .= '</div>';
1301 1301
   }
1302 1302
   if ($team->body) {
1303
-    $output .= '<h3>' . bts('Description') . '</h3>';
1303
+    $output .= '<h3>'.bts('Description').'</h3>';
1304 1304
     $output .= check_markup($team->body, $team->format);
1305 1305
     $output .= '</div>';
1306 1306
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincteam/boincteam.views.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -444,7 +444,7 @@
 block discarded – undo
444 444
 function boincteam_views_handlers() {
445 445
   return array(
446 446
     'info' => array(
447
-      'path' => drupal_get_path('module', 'boincteam') . '/views',
447
+      'path' => drupal_get_path('module', 'boincteam').'/views',
448 448
     ),
449 449
     'handlers' => array(
450 450
       'views_handler_argument_boincteam_id' => array(
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/includes/boincwork.forms.inc 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
       }// switch
72 72
   } else {
73 73
       $form_state['storage']['wip'] = TRUE;
74
-      if ( !in_array($prefs_preset, array('standard','maximum','green','minimum','custom')) ) {
74
+      if (!in_array($prefs_preset, array('standard', 'maximum', 'green', 'minimum', 'custom'))) {
75 75
           if ($established) {
76 76
               $prefs_preset = 'custom';
77 77
           } else {
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
   );
142 142
   $form['hour_options'] = array(
143 143
     '#type' => 'value',
144
-    '#value' => array('0:00','1:00','2:00','3:00','4:00', 
145
-     '5:00','6:00','7:00','8:00','9:00','10:00','11:00', 
146
-     '12:00','13:00','14:00','15:00','16:00','17:00',
147
-     '18:00','19:00','20:00','21:00','22:00','23:00')
144
+    '#value' => array('0:00', '1:00', '2:00', '3:00', '4:00', 
145
+     '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', 
146
+     '12:00', '13:00', '14:00', '15:00', '16:00', '17:00',
147
+     '18:00', '19:00', '20:00', '21:00', '22:00', '23:00')
148 148
   );
149 149
   
150 150
   // Identify preference sets that are established to distinguish what has been
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     '#description' => bts('Suspend computing when your computer is busy running other programs.'),
282 282
   );
283 283
   $form['prefs']['advanced']['processor']['hour_label'] = array(
284
-    '#value' => '<div class="form-item"><label>' . bts('Compute only between:') . '</label></div>'
284
+    '#value' => '<div class="form-item"><label>'.bts('Compute only between:').'</label></div>'
285 285
   );
286 286
   $form['prefs']['advanced']['processor']['start_hour'] = array(
287 287
     '#type' => 'select',
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     '#default_value' => $default['start_hour']
290 290
   );
291 291
   $form['prefs']['advanced']['processor']['hour_delimiter'] = array(
292
-    '#value' => '<span>' . bts('and') . '</span>'
292
+    '#value' => '<span>'.bts('and').'</span>'
293 293
   );
294 294
   $form['prefs']['advanced']['processor']['end_hour'] = array(
295 295
     '#type' => 'select',
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     '#default_value' => $default['end_hour']
298 298
   );
299 299
   $form['prefs']['advanced']['processor']['hour_description'] = array(
300
-    '#value' => '<div class="form-item slim"><div class="description">' . bts('Compute only during a particular period each day.') . '</div></div>'
300
+    '#value' => '<div class="form-item slim"><div class="description">'.bts('Compute only during a particular period each day.').'</div></div>'
301 301
   );
302 302
   $form['prefs']['advanced']['processor']['leave_apps_in_memory'] = array(
303 303
     '#title' => bts('Leave non-GPU tasks in memory while suspended?'),
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
     '#description' => bts('Limit the upload rate of file transfers.')
455 455
   );
456 456
   $form['prefs']['advanced']['network']['hour_label'] = array(
457
-    '#value' => '<div class="form-item"><label>' . bts('Transfer files only between') . '</label></div>'
457
+    '#value' => '<div class="form-item"><label>'.bts('Transfer files only between').'</label></div>'
458 458
   );
459 459
   $form['prefs']['advanced']['network']['net_start_hour'] = array(
460 460
     '#type' => 'select',
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
     '#default_value' => $default['net_start_hour']
463 463
   );
464 464
   $form['prefs']['advanced']['network']['hour_delimiter'] = array(
465
-    '#value' => '<span>' . bts('and') . '</span>'
465
+    '#value' => '<span>'.bts('and').'</span>'
466 466
   );
467 467
   $form['prefs']['advanced']['network']['net_end_hour'] = array(
468 468
     '#type' => 'select',
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
     '#default_value' => $default['net_end_hour']
471 471
   );
472 472
   $form['prefs']['advanced']['network']['hour_description'] = array(
473
-    '#value' => '<div class="form-item slim"><div class="description">' . bts('Transfer files only during a particular period each day.') . '</div></div>'
473
+    '#value' => '<div class="form-item slim"><div class="description">'.bts('Transfer files only during a particular period each day.').'</div></div>'
474 474
   ); 
475 475
   $form['prefs']['advanced']['network']['daily_xfer_limit_mb'] = array(
476 476
     '#title' => bts('Limit usage to'),
@@ -530,23 +530,23 @@  discard block
 block discarded – undo
530 530
     '#suffix' => '</li>'
531 531
   );
532 532
   $form['prefs']['form control tabs'] = array(
533
-    '#value' => '<li class="tab">' . l(bts('Cancel'), drupal_get_path_alias("account/prefs/computing/edit")) . '</li>'
533
+    '#value' => '<li class="tab">'.l(bts('Cancel'), drupal_get_path_alias("account/prefs/computing/edit")).'</li>'
534 534
   );
535 535
   if ($venue AND $venue != 'generic') {
536 536
     global $base_path;
537
-    $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' . 
537
+    $form['prefs']['form control tabs']['#value'] .= '<li class="tab">'. 
538 538
       l(bts('Clear'), "account/prefs/computing/clear/{$venue}",
539 539
         array(
540
-          'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/computing/combined')),
540
+          'query' => 'destination='.urlencode(drupal_get_path_alias('account/prefs/computing/combined')),
541 541
           'attributes' => array(
542
-            'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
543
-              array('@name' => $venue)) . '\')'
542
+            'onclick' => 'return confirm(\''.bts('This will remove all of your settings from the @name preference set. Are you sure?',
543
+              array('@name' => $venue)).'\')'
544 544
           )
545 545
         )
546
-      ) . '</li>';
546
+      ).'</li>';
547 547
   }
548 548
   $form['prefs']['view control'] = array(
549
-    '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view') . ')', 'account/prefs/computing/combined') . '</li>'
549
+    '#value' => '<li class="first alt tab">'.l('('.bts('Show comparison view').')', 'account/prefs/computing/combined').'</li>'
550 550
   );
551 551
   $form['prefs']['form control tabs suffix'] = array(
552 552
     '#value' => '</ul>'
@@ -852,9 +852,9 @@  discard block
 block discarded – undo
852 852
   }
853 853
   
854 854
   $form['overview'] = array(
855
-    '#value' => '<p>' . bts('Sometimes BOINC assigns separate identities to'
855
+    '#value' => '<p>'.bts('Sometimes BOINC assigns separate identities to'
856 856
       . ' the same computer by mistake. You can correct this by merging old'
857
-      . ' identities with the newest one.') . '</p>'
857
+      . ' identities with the newest one.').'</p>'
858 858
       . '<p>'
859 859
       . bts('Check the computers that are the same as @name'
860 860
       . ' (created on @date at @time with computer ID @id)',
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
           '@time' => date('H:i:s T', $current_host->create_time),
865 865
           '@id' => $current_host->id,
866 866
         )
867
-      ) . '</p>',
867
+      ).'</p>',
868 868
   );
869 869
   
870 870
   $options = array();
@@ -898,7 +898,7 @@  discard block
 block discarded – undo
898 898
     '#suffix' => '</li>'
899 899
   );
900 900
   $form['prefs']['form control tabs'] = array(
901
-    '#value' => '<li class="tab">' . l(bts('Cancel'), "host/{$host_id}") . '</li>'
901
+    '#value' => '<li class="tab">'.l(bts('Cancel'), "host/{$host_id}").'</li>'
902 902
   );
903 903
   
904 904
   return $form;
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
       if (count($merged) == 2) {
944 944
         $oxford_comma = '';
945 945
       }
946
-      $list = implode(', ', $list) . $oxford_comma . ' ' . $conjunction . ' ' . $last;
946
+      $list = implode(', ', $list).$oxford_comma.' '.$conjunction.' '.$last;
947 947
     }
948 948
     else {
949 949
       $list = $last;
@@ -1182,23 +1182,23 @@  discard block
 block discarded – undo
1182 1182
     '#suffix' => '</li>'
1183 1183
   );
1184 1184
   $form['prefs']['form control tabs'] = array(
1185
-    '#value' => '<li class="tab">' . l(bts('Cancel'), $_GET['q']) . '</li>'
1185
+    '#value' => '<li class="tab">'.l(bts('Cancel'), $_GET['q']).'</li>'
1186 1186
   );
1187 1187
   if ($venue AND $venue != 'generic') {
1188 1188
     global $base_path;
1189
-    $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' . 
1189
+    $form['prefs']['form control tabs']['#value'] .= '<li class="tab">'. 
1190 1190
       l(bts('Clear'), "account/prefs/project/clear/{$venue}",
1191 1191
         array(
1192
-          'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/project/combined')),
1192
+          'query' => 'destination='.urlencode(drupal_get_path_alias('account/prefs/project/combined')),
1193 1193
           'attributes' => array(
1194
-            'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
1195
-              array('@name' => $venue)) . '\')'
1194
+            'onclick' => 'return confirm(\''.bts('This will remove all of your settings from the @name preference set. Are you sure?',
1195
+              array('@name' => $venue)).'\')'
1196 1196
           )
1197 1197
         )
1198
-      ) . '</li>';
1198
+      ).'</li>';
1199 1199
   }
1200 1200
   $form['prefs']['view control'] = array(
1201
-    '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view') . ')', 'account/prefs/project/combined') . '</li>'
1201
+    '#value' => '<li class="first alt tab">'.l('('.bts('Show comparison view').')', 'account/prefs/project/combined').'</li>'
1202 1202
   );
1203 1203
   $form['prefs']['form control tabs suffix'] = array(
1204 1204
     '#value' => '</ul>'
@@ -1241,7 +1241,7 @@  discard block
 block discarded – undo
1241 1241
     
1242 1242
   foreach ($xml['project_specific_preferences'] as $wrapped_element) {
1243 1243
     $type = key($wrapped_element);
1244
-    $element= reset($wrapped_element);
1244
+    $element = reset($wrapped_element);
1245 1245
     boincwork_generate_prefs_element($form, $type, $element, $prefs['project_specific']);
1246 1246
   }
1247 1247
 }
@@ -1467,7 +1467,7 @@  discard block
 block discarded – undo
1467 1467
     $names = array();
1468 1468
     foreach ($languages as $langcode => $item) {
1469 1469
       $name = t($item->name);
1470
-      $names[check_plain($langcode)] = check_plain($name . ($item->native != $name ? ' ('. $item->native .')' : ''));
1470
+      $names[check_plain($langcode)] = check_plain($name.($item->native != $name ? ' ('.$item->native.')' : ''));
1471 1471
     }
1472 1472
     $form['locale'] = array(
1473 1473
       '#type' => 'fieldset',
@@ -1492,20 +1492,20 @@  discard block
 block discarded – undo
1492 1492
   // Avatar options
1493 1493
   $form['gravatar'] = array(
1494 1494
     '#type' => 'item',
1495
-    '#value' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, it will be used for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail)),
1495
+    '#value' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, it will be used for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/'.$account->mail)),
1496 1496
     '#description' => bts('Your Gravatar will not be shown if you upload a user picture.'),
1497 1497
   );
1498 1498
   if (user_access('disable own gravatar', $account)) {
1499 1499
     $form['gravatar'] = array(
1500 1500
       '#type' => 'checkbox',
1501
-      '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail)),
1501
+      '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/'.$account->mail)),
1502 1502
       '#description' => bts('Gravatar will not be shown if an avatar is uploaded.'),
1503 1503
       '#default_value' => isset($account->gravatar) ? $account->gravatar : 0,
1504 1504
       '#disabled' => !empty($account->picture),
1505 1505
     );
1506 1506
   }
1507 1507
   $form['gravatar']['#weight'] = 15;
1508
-  $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">' . bts('Avatar settings') . '</a></legend>';
1508
+  $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">'.bts('Avatar settings').'</a></legend>';
1509 1509
   // Upload an avatar (pulled from profile_node_form):
1510 1510
   if (!empty($profile_form['field_image'])) {
1511 1511
     $form['field_image'] = $profile_form['field_image'];
@@ -1540,7 +1540,7 @@  discard block
 block discarded – undo
1540 1540
   );
1541 1541
   // Can't have a typical Drupal form suffix on a select box?
1542 1542
   $form['forums']['comments_per_page_suffix'] = array(
1543
-    '#value' => '<span>' . bts('comments per page') . '</span>'
1543
+    '#value' => '<span>'.bts('comments per page').'</span>'
1544 1544
   );
1545 1545
   $form['forums']['comments_order'] = array(
1546 1546
     '#type' => 'select',
@@ -1610,7 +1610,7 @@  discard block
 block discarded – undo
1610 1610
     '#weight' => 1002,
1611 1611
   );
1612 1612
   $form['form control tabs'] = array(
1613
-    '#value' => '<li class="tab">' . l(bts('Cancel'), $_GET['q']) . '</li>',
1613
+    '#value' => '<li class="tab">'.l(bts('Cancel'), $_GET['q']).'</li>',
1614 1614
     '#weight' => 1003,
1615 1615
   );
1616 1616
   $form['form control tabs suffix'] = array(
@@ -1666,10 +1666,10 @@  discard block
 block discarded – undo
1666 1666
     if ($user->language != $edit['language']) {
1667 1667
       global $base_url;
1668 1668
       if ($edit['language'] != language_default('language')) {
1669
-        $form_state['redirect'] = $base_url . '/' . $edit['language'] . '/' . $_GET['q'];
1669
+        $form_state['redirect'] = $base_url.'/'.$edit['language'].'/'.$_GET['q'];
1670 1670
       }
1671 1671
       else {
1672
-        $form_state['redirect'] = $base_url . '/' . $_GET['q'];
1672
+        $form_state['redirect'] = $base_url.'/'.$_GET['q'];
1673 1673
       }
1674 1674
     }
1675 1675
   }
@@ -1747,7 +1747,7 @@  discard block
 block discarded – undo
1747 1747
     '#suffix' => '</li>'
1748 1748
   );
1749 1749
   $form['prefs']['form control tabs'] = array(
1750
-    '#value' => '<li class="tab">' . l(bts('Cancel'), $_GET['q']) . '</li>'
1750
+    '#value' => '<li class="tab">'.l(bts('Cancel'), $_GET['q']).'</li>'
1751 1751
   );
1752 1752
   $form['prefs']['form control tabs suffix'] = array(
1753 1753
     '#value' => '</ul>'
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/includes/boincwork.helpers.inc 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
   
168 168
   if ($preset) {
169 169
     // Load preset from configuration
170
-    $preset_prefs = (array) $preset_prefs['general_preferences'];
170
+    $preset_prefs = (array)$preset_prefs['general_preferences'];
171 171
     if (isset($preset_prefs['preset'])) {
172 172
       if (!is_numeric(key($preset_prefs['preset']))) {
173 173
         $preset_prefs['preset'] = array($preset_prefs['preset']);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 function boincwork_get_project_specific_config() {
189 189
   $raw_config_data = variable_get('boinc_project_specific_prefs_config', '');
190 190
   
191
-  $xsd = './' . drupal_get_path('module', 'boincwork') . '/includes/projectprefs.xsd';
191
+  $xsd = './'.drupal_get_path('module', 'boincwork').'/includes/projectprefs.xsd';
192 192
   libxml_use_internal_errors(true);
193 193
   
194 194
   $xml = new DomDocument();
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
   if (!$xml->schemaValidate($xsd)) {
197 197
     $errors = libxml_get_errors();
198 198
     $lines = explode("\r", $raw_config_data);
199
-    drupal_set_message("{$errors[0]->message} at line {$errors[0]->line}" .
200
-      ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), 'error');
199
+    drupal_set_message("{$errors[0]->message} at line {$errors[0]->line}".
200
+      ': <br/>'.htmlentities($lines[$errors[0]->line - 1]), 'error');
201 201
     return NULL;
202 202
   }
203 203
   
@@ -392,13 +392,13 @@  discard block
 block discarded – undo
392 392
       
393 393
       // Use appropriate datatype
394 394
       if (isset($element['@attributes']['datatype'])) {
395
-        switch($element['@attributes']['datatype']) {
395
+        switch ($element['@attributes']['datatype']) {
396 396
         case 'integer':
397
-          $value = (int) $value;
397
+          $value = (int)$value;
398 398
           break;
399 399
           
400 400
         case 'float':
401
-          $value = number_format((float) $value, 2);
401
+          $value = number_format((float)$value, 2);
402 402
           break;
403 403
         
404 404
         default:
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
         '#type' => 'textfield',
421 421
         '#default_value' => $value,
422 422
         '#size' => 5,
423
-        '#description' => $description . bts(' Default value: @default', array('@default' => $default))
423
+        '#description' => $description.bts(' Default value: @default', array('@default' => $default))
424 424
       );
425 425
     }
426 426
     break;
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
       $name = $element['@attributes']['name'];
485 485
       $default = null;
486 486
       $options = array();
487
-      foreach($element['items']['item'] as $item) {
487
+      foreach ($element['items']['item'] as $item) {
488 488
         if (is_array($item)) {
489 489
           $value = $item['@value'];
490 490
           if ($default === NULL AND
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
         '#options' => $options,
527 527
         '#attributes' => array('class' => 'fancy'),
528 528
         '#default_value' => $value,
529
-        '#description' => $description . bts(' Default value: @default', array('@default' =>$default))
529
+        '#description' => $description.bts(' Default value: @default', array('@default' =>$default))
530 530
       );
531 531
     }
532 532
     break;
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
     }
592 592
     foreach ($elements as $key => $element) {
593 593
       $title = is_array($element['title']) ? $element['title']['@value'] : $element['title'];
594
-      $name = str_replace(' ','_',strtolower($title));
594
+      $name = str_replace(' ', '_', strtolower($title));
595 595
       $name = "group_{$name}";
596 596
       
597 597
       // Translate elements as appropriate
@@ -743,13 +743,13 @@  discard block
 block discarded – undo
743 743
   if ($type == 'project') {
744 744
     if ($boincuser->project_prefs) {
745 745
       $main_prefs = load_configuration($boincuser->project_prefs);
746
-      $main_prefs = (array) $main_prefs['project_preferences'];
746
+      $main_prefs = (array)$main_prefs['project_preferences'];
747 747
     }
748 748
   }
749 749
   else {
750 750
     if ($boincuser->global_prefs) {
751 751
       $main_prefs = load_configuration($boincuser->global_prefs);
752
-      $main_prefs = (array) $main_prefs['global_preferences'];
752
+      $main_prefs = (array)$main_prefs['global_preferences'];
753 753
     }
754 754
   }
755 755
   
@@ -801,13 +801,13 @@  discard block
 block discarded – undo
801 801
   if ($type == 'project') {
802 802
     if ($boincuser->project_prefs) {
803 803
       $main_prefs = load_configuration($boincuser->project_prefs);
804
-      $main_prefs = (array) $main_prefs['project_preferences'];
804
+      $main_prefs = (array)$main_prefs['project_preferences'];
805 805
     }
806 806
   }
807 807
   else {
808 808
     if ($boincuser->global_prefs) {
809 809
       $main_prefs = load_configuration($boincuser->global_prefs);
810
-      $main_prefs = (array) $main_prefs['global_preferences'];
810
+      $main_prefs = (array)$main_prefs['global_preferences'];
811 811
     }
812 812
   }
813 813
   
@@ -996,11 +996,11 @@  discard block
 block discarded – undo
996 996
   $magnitude = 0;
997 997
   $precision = 0;
998 998
   if ($digits > $max_digits) {
999
-    $magnitude = floor(($digits - ($max_digits - 3)) / 3);
1000
-    $precision = $max_digits - ($digits - ($magnitude * 3) + 1);
1001
-    $number = round($number / pow(1000, $magnitude), $precision);
999
+    $magnitude = floor(($digits - ($max_digits - 3))/3);
1000
+    $precision = $max_digits - ($digits - ($magnitude*3) + 1);
1001
+    $number = round($number/pow(1000, $magnitude), $precision);
1002 1002
   }
1003
-  $number = number_format($number, $precision) . (($magnitude) ? "{$suffix[$magnitude]}" : '');
1003
+  $number = number_format($number, $precision).(($magnitude) ? "{$suffix[$magnitude]}" : '');
1004 1004
   
1005 1005
   return $number;
1006 1006
 }
@@ -1178,7 +1178,7 @@  discard block
 block discarded – undo
1178 1178
   
1179 1179
   function text_to_xml($text) {
1180 1180
     $xml = new DomDocument();
1181
-    if ( !($xml->loadXML($text)) ) return false;
1181
+    if (!($xml->loadXML($text))) return false;
1182 1182
     return $xml;
1183 1183
   }
1184 1184
   
@@ -1195,7 +1195,7 @@  discard block
 block discarded – undo
1195 1195
       while (!is_null($node)) {
1196 1196
           switch ($node->nodeType) {
1197 1197
           case XML_TEXT_NODE:
1198
-              if (trim($node->nodeValue)  != '') $result = $node->nodeValue;
1198
+              if (trim($node->nodeValue) != '') $result = $node->nodeValue;
1199 1199
               break;
1200 1200
           case XML_ELEMENT_NODE:
1201 1201
               $node_name = $node->nodeName;
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
               if ($sibling) {
1213 1213
                   $result[$node_name][$index] = '';
1214 1214
                   if ($node->childNodes) {
1215
-                      $result[$node_name][$index] = xml_to_array($node) ;
1215
+                      $result[$node_name][$index] = xml_to_array($node);
1216 1216
                   }
1217 1217
                   if ($node->hasAttributes()) {
1218 1218
                       $attributes = $node->attributes;
@@ -1235,14 +1235,14 @@  discard block
 block discarded – undo
1235 1235
               } else {
1236 1236
                   $result[$node_name] = '';
1237 1237
                   if ($node->childNodes) {
1238
-                      $result[$node_name] = xml_to_array($node) ;
1238
+                      $result[$node_name] = xml_to_array($node);
1239 1239
                   }
1240 1240
                   if ($node->hasAttributes()) {
1241 1241
                       $attributes = $node->attributes;
1242 1242
                       if ($result[$node_name] !== '' AND !is_array($result[$node_name])) {
1243 1243
                           $result[$node_name] = array('@value' => $result[$node_name]);
1244 1244
                       }
1245
-                      foreach($attributes as $key => $attribute) {
1245
+                      foreach ($attributes as $key => $attribute) {
1246 1246
                           $result[$node_name]['@attributes'][$attribute->name] = $attribute->value;
1247 1247
                       }
1248 1248
                   }
@@ -1282,30 +1282,30 @@  discard block
 block discarded – undo
1282 1282
   // Determine if hosts are associated at all or just hidden
1283 1283
   $output = '';
1284 1284
   if ($boincuser->show_hosts) {
1285
-    switch($context) {
1285
+    switch ($context) {
1286 1286
     case 'active':
1287
-      $output .=  '<h2>' . bts('No active computers') . '</h2>';
1288
-      $output .=  '<p>' . bts('This user has no computers that have been'
1289
-      . ' active in the last 30 days.') . '</p>';
1287
+      $output .= '<h2>'.bts('No active computers').'</h2>';
1288
+      $output .= '<p>'.bts('This user has no computers that have been'
1289
+      . ' active in the last 30 days.').'</p>';
1290 1290
       break;
1291 1291
       
1292 1292
     case 'preferences':
1293
-      $output .=  '<h2>' . bts('No computers') . '</h2>';
1294
-      $output .=  '<p>' . bts('There are no computers assigned to this'
1295
-      . ' preference set.') . '</p>';
1293
+      $output .= '<h2>'.bts('No computers').'</h2>';
1294
+      $output .= '<p>'.bts('There are no computers assigned to this'
1295
+      . ' preference set.').'</p>';
1296 1296
       break;
1297 1297
     
1298 1298
     default:
1299
-      $output .=  '<h2>' . bts('Computers pending') . '</h2>';
1300
-      $output .=  '<p>' . bts('This user does not yet have any associated'
1299
+      $output .= '<h2>'.bts('Computers pending').'</h2>';
1300
+      $output .= '<p>'.bts('This user does not yet have any associated'
1301 1301
       . ' computers. Computers will be displayed when they have earned their'
1302
-      . ' first credits.') . '</p>';
1302
+      . ' first credits.').'</p>';
1303 1303
     }
1304 1304
   }
1305 1305
   else {
1306
-    $output .=  '<h2>' . bts('Computers hidden') . '</h2>';
1307
-    $output .=  '<p>' . bts('This user has chosen not to show information'
1308
-    . ' about their computers.') . '</p>';
1306
+    $output .= '<h2>'.bts('Computers hidden').'</h2>';
1307
+    $output .= '<p>'.bts('This user has chosen not to show information'
1308
+    . ' about their computers.').'</p>';
1309 1309
   }
1310 1310
   return $output;
1311 1311
 }
@@ -1317,11 +1317,11 @@  discard block
 block discarded – undo
1317 1317
   
1318 1318
   // 
1319 1319
   $output = '';
1320
-  switch($context) {
1320
+  switch ($context) {
1321 1321
   default:
1322
-    $output .=  '<h2>' . bts('No @type tasks', array('@type' => $context))
1322
+    $output .= '<h2>'.bts('No @type tasks', array('@type' => $context))
1323 1323
     . '</h2>';
1324
-    $output .=  '<p>' . bts('There are no tasks of this type on record')
1324
+    $output .= '<p>'.bts('There are no tasks of this type on record')
1325 1325
     . '</p>';
1326 1326
   }
1327 1327
   return $output;
@@ -1343,10 +1343,10 @@  discard block
 block discarded – undo
1343 1343
       $output .= l(bts('Delete'), "host/{$host_id}/delete",
1344 1344
         array(
1345 1345
           'attributes' => array(
1346
-            'onclick' => 'return confirm(\'' . bts('This will delete host @id'
1346
+            'onclick' => 'return confirm(\''.bts('This will delete host @id'
1347 1347
               . ' from your account forever. Are you sure this is OK?',
1348 1348
               array('@id' => $host_id)
1349
-            ) . '\')'
1349
+            ).'\')'
1350 1350
           )
1351 1351
         )
1352 1352
       );
@@ -1410,7 +1410,7 @@  discard block
 block discarded – undo
1410 1410
   $root_log_dir = variable_get('boinc_host_sched_logs_dir', '');
1411 1411
   $log = '';
1412 1412
   if ($timestamp) {
1413
-    $output = gmdate('j M Y | G:i:s', $timestamp) . ' UTC';
1413
+    $output = gmdate('j M Y | G:i:s', $timestamp).' UTC';
1414 1414
   }
1415 1415
   if ($root_log_dir AND $host_id) {
1416 1416
     $subdir = substr($host_id, 0, -3) OR $subdir = 0;
@@ -1436,8 +1436,8 @@  discard block
 block discarded – undo
1436 1436
       "{$path}/school" => bts('School')
1437 1437
     );
1438 1438
     variable_set('jump_use_js_venues-Array', 1);
1439
-    drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
1440
-    drupal_add_js(drupal_get_path('theme', 'boinc') . '/js/prefs.js', 'theme');
1439
+    drupal_add_js(drupal_get_path('module', 'jump').'/jump.js');
1440
+    drupal_add_js(drupal_get_path('theme', 'boinc').'/js/prefs.js', 'theme');
1441 1441
     // Get current venue
1442 1442
     db_set_active('boinc');
1443 1443
     $venue = db_result(db_query(
@@ -1457,14 +1457,14 @@  discard block
 block discarded – undo
1457 1457
   $output = '---';
1458 1458
   if ($received_time OR $deadline) {
1459 1459
     $timestamp = ($received_time) ? $received_time : $deadline;
1460
-    $output = gmdate('j M Y, G:i:s', $timestamp) . ' UTC';
1460
+    $output = gmdate('j M Y, G:i:s', $timestamp).' UTC';
1461 1461
     // Add a wrapper to deadline text
1462 1462
     if (!$received_time) {
1463 1463
       if (time() < $deadline) {
1464
-        $output = '<span class="on-time">' . $output . '</span>';
1464
+        $output = '<span class="on-time">'.$output.'</span>';
1465 1465
       }
1466 1466
       else {
1467
-        $output = '<span class="past-due">' . $output . '</span>';
1467
+        $output = '<span class="past-due">'.$output.'</span>';
1468 1468
       }
1469 1469
     }
1470 1470
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/boincwork.admin.inc 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
65 65
   */
66 66
 function boincwork_admin_prefs_upload_form_validate($form, &$form_state) {
67 67
   
68
-  $xsd = './' . drupal_get_path('module', 'boincwork') . '/includes/projectprefs.xsd';
68
+  $xsd = './'.drupal_get_path('module', 'boincwork').'/includes/projectprefs.xsd';
69 69
   libxml_use_internal_errors(true);
70 70
   $xml = new DomDocument();
71 71
   $xml->loadXML($form_state['values']['prefs_xml'], LIBXML_NOBLANKS);
72 72
   if (!$xml->schemaValidate($xsd)) {
73 73
     $errors = libxml_get_errors();
74 74
     $lines = explode("\r", $form_state['values']['prefs_xml']);
75
-    drupal_set_message("{$errors[0]->message} at line {$errors[0]->line}" .
76
-      ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), 'error');
75
+    drupal_set_message("{$errors[0]->message} at line {$errors[0]->line}".
76
+      ': <br/>'.htmlentities($lines[$errors[0]->line - 1]), 'error');
77 77
     form_set_error('upload', t('XML file failed validation'));
78 78
   }
79 79
 }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
       "{$path}/minimum" => t('Minimum')
102 102
     );
103 103
     variable_set('jump_use_js_presets-Array', 1);
104
-    drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
104
+    drupal_add_js(drupal_get_path('module', 'jump').'/jump.js');
105 105
     $output .= '<div class="simple-form-controls"><div class="form-item venue">';
106 106
     $output .= '<label>Preset:</label>';
107 107
     $output .= jump_quickly($preset_options, 'presets');
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     '#type' => 'submit',
151 151
     '#value' => t('Save configuration')
152 152
   );
153
-  $form['saveuseconfigxml'] = array (
153
+  $form['saveuseconfigxml'] = array(
154 154
       '#type' => 'submit',
155 155
       '#value' => t('Save configuration with disk usage settings from config.xml'),
156 156
       '#validate' => array('boincwork_admin_prefs_preset_saveuseconfigxml'),
@@ -175,33 +175,33 @@  discard block
 block discarded – undo
175 175
   // Verify all non-boolean user input values and notify form API of failures
176 176
   
177 177
   // Processing preferences
178
-  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', t('Invalid setting for') . " \"{$form['processor']['idle_time_to_run']['#title']} [x] {$form['processor']['idle_time_to_run']['#field_suffix']}\"");
179
-  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', t('Invalid setting for') . " \"{$form['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['processor']['suspend_if_no_recent_input']['#field_suffix']}\"");
180
-  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', t('Invalid setting for') . " \"{$form['processor']['suspend_cpu_usage']['#title']} [x] {$form['processor']['suspend_cpu_usage']['#field_suffix']}\"");
181
-  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', t('Invalid setting for') . " \"{$form['processor']['start_hour']['#title']} [x] {$form['processor']['start_hour']['#field_suffix']}\"");
182
-  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', t('Invalid setting for') . " \"{$form['processor']['end_hour']['#title']} [x] {$form['processor']['end_hour']['#field_suffix']}\"");
183
-  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', t('Invalid setting for') . " \"{$form['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['processor']['cpu_scheduling_period_minutes']['#field_suffix']}\"");
184
-  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', t('Invalid setting for') . " \"{$form['processor']['max_ncpus_pct']['#title']} [x] {$form['processor']['max_ncpus_pct']['#field_suffix']}\"");
185
-  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', t('Invalid setting for') . " \"{$form['processor']['cpu_usage_limit']['#title']} [x] {$form['processor']['cpu_usage_limit']['#field_suffix']}\"");
178
+  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', t('Invalid setting for')." \"{$form['processor']['idle_time_to_run']['#title']} [x] {$form['processor']['idle_time_to_run']['#field_suffix']}\"");
179
+  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', t('Invalid setting for')." \"{$form['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['processor']['suspend_if_no_recent_input']['#field_suffix']}\"");
180
+  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', t('Invalid setting for')." \"{$form['processor']['suspend_cpu_usage']['#title']} [x] {$form['processor']['suspend_cpu_usage']['#field_suffix']}\"");
181
+  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', t('Invalid setting for')." \"{$form['processor']['start_hour']['#title']} [x] {$form['processor']['start_hour']['#field_suffix']}\"");
182
+  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', t('Invalid setting for')." \"{$form['processor']['end_hour']['#title']} [x] {$form['processor']['end_hour']['#field_suffix']}\"");
183
+  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', t('Invalid setting for')." \"{$form['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['processor']['cpu_scheduling_period_minutes']['#field_suffix']}\"");
184
+  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', t('Invalid setting for')." \"{$form['processor']['max_ncpus_pct']['#title']} [x] {$form['processor']['max_ncpus_pct']['#field_suffix']}\"");
185
+  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', t('Invalid setting for')." \"{$form['processor']['cpu_usage_limit']['#title']} [x] {$form['processor']['cpu_usage_limit']['#field_suffix']}\"");
186 186
 
187 187
   // Storage preferences
188
-  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', t('Invalid setting for') . " \"{$form['storage']['disk_max_used_gb']['#title']} [x] {$form['storage']['disk_max_used_gb']['#field_suffix']}\"");
189
-  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', t('Invalid setting for') . " \"{$form['storage']['disk_min_free_gb']['#title']} [x] {$form['storage']['disk_min_free_gb']['#field_suffix']}\"");
190
-  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', t('Invalid setting for') . " \"{$form['storage']['disk_max_used_pct']['#title']} [x] {$form['storage']['disk_max_used_pct']['#field_suffix']}\"");
191
-  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', t('Invalid setting for') . " \"{$form['storage']['disk_interval']['#title']} [x] {$form['storage']['disk_interval']['#field_suffix']}\"");
192
-  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', t('Invalid setting for') . " \"{$form['storage']['vm_max_used_pct']['#title']} [x] {$form['storage']['vm_max_used_pct']['#field_suffix']}\"");
193
-  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', t('Invalid setting for') . " \"{$form['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['storage']['ram_max_used_busy_pct']['#field_suffix']}\"");
194
-  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', t('Invalid setting for') . " \"{$form['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['storage']['ram_max_used_idle_pct']['#field_suffix']}\"");
188
+  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', t('Invalid setting for')." \"{$form['storage']['disk_max_used_gb']['#title']} [x] {$form['storage']['disk_max_used_gb']['#field_suffix']}\"");
189
+  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', t('Invalid setting for')." \"{$form['storage']['disk_min_free_gb']['#title']} [x] {$form['storage']['disk_min_free_gb']['#field_suffix']}\"");
190
+  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', t('Invalid setting for')." \"{$form['storage']['disk_max_used_pct']['#title']} [x] {$form['storage']['disk_max_used_pct']['#field_suffix']}\"");
191
+  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', t('Invalid setting for')." \"{$form['storage']['disk_interval']['#title']} [x] {$form['storage']['disk_interval']['#field_suffix']}\"");
192
+  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', t('Invalid setting for')." \"{$form['storage']['vm_max_used_pct']['#title']} [x] {$form['storage']['vm_max_used_pct']['#field_suffix']}\"");
193
+  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', t('Invalid setting for')." \"{$form['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['storage']['ram_max_used_busy_pct']['#field_suffix']}\"");
194
+  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', t('Invalid setting for')." \"{$form['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['storage']['ram_max_used_idle_pct']['#field_suffix']}\"");
195 195
 
196 196
   // Network preferences
197
-  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', t('Invalid setting for') . " \"{$form['network']['work_buf_min_days']['#title']} [x] {$form['network']['work_buf_min_days']['#field_suffix']}\"");
198
-  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', t('Invalid setting for') . " \"{$form['network']['work_buf_additional_days']['#title']} [x] {$form['network']['work_buf_additional_days']['#field_suffix']}\"");
199
-  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', t('Invalid setting for') . " \"{$form['network']['max_bytes_sec_down']['#title']} [x] {$form['network']['max_bytes_sec_down']['#field_suffix']}\"");
200
-  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', t('Invalid setting for') . " \"{$form['network']['max_bytes_sec_up']['#title']} [x] {$form['network']['max_bytes_sec_up']['#field_suffix']}\"");
201
-  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', t('Invalid setting for') . " \"{$form['network']['net_start_hour']['#title']} [x] {$form['network']['net_start_hour']['#field_suffix']}\"");
202
-  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', t('Invalid setting for') . " \"{$form['network']['net_end_hour']['#title']} [x] {$form['network']['net_end_hour']['#field_suffix']}\"");
203
-  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', t('Invalid setting for') . " \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
204
-  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', t('Invalid setting for') . " \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
197
+  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', t('Invalid setting for')." \"{$form['network']['work_buf_min_days']['#title']} [x] {$form['network']['work_buf_min_days']['#field_suffix']}\"");
198
+  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', t('Invalid setting for')." \"{$form['network']['work_buf_additional_days']['#title']} [x] {$form['network']['work_buf_additional_days']['#field_suffix']}\"");
199
+  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', t('Invalid setting for')." \"{$form['network']['max_bytes_sec_down']['#title']} [x] {$form['network']['max_bytes_sec_down']['#field_suffix']}\"");
200
+  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', t('Invalid setting for')." \"{$form['network']['max_bytes_sec_up']['#title']} [x] {$form['network']['max_bytes_sec_up']['#field_suffix']}\"");
201
+  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', t('Invalid setting for')." \"{$form['network']['net_start_hour']['#title']} [x] {$form['network']['net_start_hour']['#field_suffix']}\"");
202
+  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', t('Invalid setting for')." \"{$form['network']['net_end_hour']['#title']} [x] {$form['network']['net_end_hour']['#field_suffix']}\"");
203
+  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', t('Invalid setting for')." \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
204
+  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', t('Invalid setting for')." \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
205 205
 }
206 206
 
207 207
 /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
   // Processing preferences
218 218
   $prefs['run_on_batteries'] = ($values['processor']['run_on_batteries']) ? 0 : 1;
219 219
   $prefs['run_if_user_active'] = ($values['processor']['run_if_user_active']) ? 0 : 1;
220
-  $prefs['run_gpu_if_user_active'] = ($values['processor']['run_gpu_if_user_active']) ? 0: 1;
220
+  $prefs['run_gpu_if_user_active'] = ($values['processor']['run_gpu_if_user_active']) ? 0 : 1;
221 221
   $prefs['idle_time_to_run'] = $values['processor']['idle_time_to_run'];
222 222
   $prefs['suspend_if_no_recent_input'] = $values['processor']['suspend_if_no_recent_input'];
223 223
   $prefs['suspend_cpu_usage'] = $values['processor']['suspend_cpu_usage'];
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
   
268 268
   // Get the full configuration
269 269
   $all_presets = boincwork_get_preset_prefs();
270
-  $all_presets = (array) $all_presets['general_preferences'];
270
+  $all_presets = (array)$all_presets['general_preferences'];
271 271
   
272 272
   // Check for sane config
273 273
   if (isset($all_presets['preset'])) {
Please login to merge, or discard this patch.
modules/boincwork/views/views_handler_field_boincwork_host_app_et_avg.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
   function render($values) {
14 14
     $gflops = 0;
15 15
     if ($values->host_app_version_et_avg) {
16
-      $gflops = 1e-9 / $values->host_app_version_et_avg;
16
+      $gflops = 1e-9/$values->host_app_version_et_avg;
17 17
     }
18
-    return round($gflops, 2) . ' GFLOPS';
18
+    return round($gflops, 2).' GFLOPS';
19 19
   }
20 20
 }
Please login to merge, or discard this patch.
boincwork/views/views_handler_field_boincwork_host_app_turnaround_avg.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
   }
12 12
 
13 13
   function render($values) {
14
-    $time_in_days = $values->host_app_version_turnaround_avg / (24*60*60);
15
-    return round($time_in_days, 2) . ' ' . t('days');
14
+    $time_in_days = $values->host_app_version_turnaround_avg/(24*60*60);
15
+    return round($time_in_days, 2).' '.t('days');
16 16
   }
17 17
 }
Please login to merge, or discard this patch.
boincwork/views/views_handler_field_boincwork_app_version_number.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,6 +11,6 @@
 block discarded – undo
11 11
   }
12 12
 
13 13
   function render($values) {
14
-    return sprintf("%01.2f", $values->app_version_host_app_version_version_num / 100);
14
+    return sprintf("%01.2f", $values->app_version_host_app_version_version_num/100);
15 15
   }
16 16
 }
Please login to merge, or discard this patch.