Passed
Pull Request — master (#4685)
by
unknown
09:55
created
html/inc/account.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             tra("Must be at least %1 characters", $min_passwd_length),
101 101
             tra("Password")
102 102
         ),
103
-        "passwd", "", "password",'id="passwd"',passwd_visible_checkbox("passwd")
103
+        "passwd", "", "password", 'id="passwd"', passwd_visible_checkbox("passwd")
104 104
     );
105 105
     if (USER_COUNTRY) {
106 106
         form_select(
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
     } else {
146 146
         $x = tra("Email address:");
147 147
     }
148
-    form_input_text($x, "email_addr", '', 'text', $attrs='autofocus tabindex="1"');
148
+    form_input_text($x, "email_addr", '', 'text', $attrs = 'autofocus tabindex="1"');
149 149
     form_input_text(
150
-        tra("Password:").'<br><small><a href="get_passwd.php">' . tra("forgot password?") . "</a></small>",
150
+        tra("Password:").'<br><small><a href="get_passwd.php">'.tra("forgot password?")."</a></small>",
151 151
         "passwd",
152 152
         "",
153 153
         "password",
Please login to merge, or discard this patch.
html/inc/util_basic.inc 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
     ";
47 47
 }
48 48
 
49
-function xml_error($num, $msg=null, $file=null, $line=null) {
49
+function xml_error($num, $msg = null, $file = null, $line = null) {
50 50
     global $xml_outer_tag;
51 51
     if (!$msg) {
52
-        switch($num) {
52
+        switch ($num) {
53 53
         case -112: $msg = "Invalid XML"; break;
54 54
         case -136: $msg = "Not found"; break;
55 55
         case -137: $msg = "Name or email address is not unique"; break;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 // If it's a single-tag element, and it's present, just return the tag
96 96
 //
97 97
 function parse_element($xml, $tag) {
98
-    $closetag = "</" . substr($tag,1);
98
+    $closetag = "</".substr($tag, 1);
99 99
     $x = strstr($xml, $tag);
100 100
     if ($x) {
101 101
         if (strstr($tag, "/>")) return $tag;
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 
112 112
 function parse_next_element($xml, $tag, &$cursor) {
113 113
     $element = null;
114
-    $closetag = "</" . substr($tag,1);
115
-    $pos = substr($xml,$cursor);
114
+    $closetag = "</".substr($tag, 1);
115
+    $pos = substr($xml, $cursor);
116 116
     $x = strstr($pos, $tag);
117 117
     if ($x) {
118 118
         if (strstr($tag, "/>")) return $tag;
Please login to merge, or discard this patch.
html/user/get_project_config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 //
31 31
 function show_platforms() {
32 32
     $xmlFragment = unserialize(get_cached_data(3600, "project_config_platform_xml"));
33
-    if ($xmlFragment==false){
33
+    if ($xmlFragment == false) {
34 34
         $platforms = BoincDB::get()->enum_fields("platform, DBNAME.app_version, DBNAME.app", "BoincPlatform", "platform.name, platform.user_friendly_name, plan_class", "app_version.platformid = platform.id and app_version.appid = app.id and app_version.deprecated=0 and app.deprecated=0 group by platform.name, plan_class", "");
35 35
         $xmlFragment = "    <platforms>";
36
-        foreach ($platforms as $platform){
36
+        foreach ($platforms as $platform) {
37 37
             $xmlFragment .= "
38 38
             <platform>
39 39
                 <platform_name>$platform->name</platform_name>
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 if (defined('TERMSOFUSE_FILE')) {
116 116
   $tou_file = TERMSOFUSE_FILE;
117 117
 } else {
118
-  $tou_file =  "../../terms_of_use.txt";
118
+  $tou_file = "../../terms_of_use.txt";
119 119
 }
120 120
 if (file_exists($tou_file)) {
121 121
     $terms_of_use = trim(file_get_contents($tou_file));
Please login to merge, or discard this patch.
html/ops/mass_email_script.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 $globals->batch = 1000;
56 56
 $globals->lapsed_interval = 60*86400;
57 57
 
58
-for ($i=1; $i<$argc; $i++) {
58
+for ($i = 1; $i < $argc; $i++) {
59 59
     if ($argv[$i] == "--batch") {
60 60
         $i++;
61 61
         $globals->batch = $argv[$i];
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         gmdate('d F Y', $user->create_time),
170 170
         number_format($user->total_credit, 0),
171 171
         opt_out_url($user),
172
-        floor((time() - $user->last_rpc_time) / 86400),
172
+        floor((time() - $user->last_rpc_time)/86400),
173 173
     );
174 174
     return preg_replace($pat, $rep, $template);
175 175
 }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     while ($user = _mysql_fetch_object($result)) {
239 239
         handle_user($user);
240 240
         $startid = $user->id;
241
-        fputs($log, $user->id . "\n");
241
+        fputs($log, $user->id."\n");
242 242
         fflush($log);
243 243
     }
244 244
     _mysql_free_result($result);
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
     $user = _mysql_fetch_object($result);
253 253
     if ($user) {
254 254
         handle_user($user);
255
-        fputs($log, $user->id . "\n");
255
+        fputs($log, $user->id."\n");
256 256
         fflush($log);
257 257
     }
258 258
     _mysql_free_result($result);
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     } else {
290 290
         $fid = fopen($id_file, 'r');
291 291
         if (!$fid) {
292
-            echo  $id_file . ' not found - create ID list and run again\n';
292
+            echo  $id_file.' not found - create ID list and run again\n';
293 293
             exit();
294 294
         }
295 295
         $thisid = 0;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         }
301 301
         fclose($fid);
302 302
     }
303
-    echo 'All done!' . "\n";
303
+    echo 'All done!'."\n";
304 304
 }
305 305
 
306 306
 if (!function_exists('make_php_mailer')) {
Please login to merge, or discard this patch.
html/inc/translation.inc 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
     $dh = opendir($langdir.$transdir);
65 65
     if (!$dh) die("can't open translation dir");
66 66
     while (($file = readdir($dh)) !== false) {
67
-        if ($file==".." || $file==".") {
67
+        if ($file == ".." || $file == ".") {
68 68
             continue;
69 69
         }
70 70
         // only do files ending in .po
71
-        if (substr($file,-3) != ".po"){
71
+        if (substr($file, -3) != ".po") {
72 72
             //debug("File $file with unknown extension found in $info_dir");
73 73
             continue;
74 74
         }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             "-------------Compiling $transdir$file------------", 0
77 77
         );
78 78
         $language = parse_po_file($langdir.$transdir.$file);
79
-        if (!$language){
79
+        if (!$language) {
80 80
             language_log(
81 81
                 "WARNING: Could not parse language ".$file
82 82
             );
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
             );
96 96
             exit;
97 97
         }
98
-        foreach ($language as $key => $value){
98
+        foreach ($language as $key => $value) {
99 99
             if ($value !== "") {
100 100
                 // Skip if the msgstr is empty
101
-                fwrite($fh, "\$language_lookup_array[\"".str_replace("\"", "\\\"", substr($file,0,-3))."\"][\"".$key."\"] = \"".$value."\";\n");
101
+                fwrite($fh, "\$language_lookup_array[\"".str_replace("\"", "\\\"", substr($file, 0, -3))."\"][\"".$key."\"] = \"".$value."\";\n");
102 102
             }
103 103
         }
104 104
         // don't write \?\> - may append
@@ -115,27 +115,27 @@  discard block
 block discarded – undo
115 115
 function parse_po_file($file) {
116 116
     $translation_file = file($file);
117 117
     $first_entry = true;
118
-    $current_token_text="";
119
-    $current_token ="";
118
+    $current_token_text = "";
119
+    $current_token = "";
120 120
     $parsing_token = false;
121 121
     $parsing_text = false;
122 122
     $size = sizeof($translation_file);
123 123
     $output = array();
124
-    for ($i=0; $i<$size; $i++){
124
+    for ($i = 0; $i < $size; $i++) {
125 125
         $entry = trim($translation_file[$i]);
126 126
         //echo "line $i: $entry\n";
127
-        if (substr($entry, 0, 1)=="#") {
127
+        if (substr($entry, 0, 1) == "#") {
128 128
             continue;
129 129
         } elseif (strpos($entry, "msgid") !== false) {
130
-            if (!$first_entry){
130
+            if (!$first_entry) {
131 131
                 //If this is not the first, save the previous entry
132
-                $output[$current_token]=$current_token_text;
132
+                $output[$current_token] = $current_token_text;
133 133
             }
134 134
             $current_token = get_po_line($entry, $file);
135
-            $current_token_text="";
135
+            $current_token_text = "";
136 136
             $parsing_token = true;
137 137
             $parsing_text = false;
138
-            $first_entry=false;
138
+            $first_entry = false;
139 139
         } elseif (strpos($entry, "msgstr") !== false) {
140 140
             $current_token_text = get_po_line($entry, $file);
141 141
             $parsing_token = false;
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     
150 150
     // Get the last token
151 151
     //
152
-    if ($current_token && $current_token_text){
152
+    if ($current_token && $current_token_text) {
153 153
         $output[$current_token] = $current_token_text;
154 154
     }
155 155
     return $output;
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
 // Returns the contents of a line (ie removes "" from start and end)
160 160
 //
161 161
 function get_po_line($line, $file) {
162
-    $start = strpos($line, '"')+1;
162
+    $start = strpos($line, '"') + 1;
163 163
     $stop = strrpos($line, '"');
164
-    $x = substr($line, $start, $stop-$start);
164
+    $x = substr($line, $start, $stop - $start);
165 165
     $n = preg_match("/[^\\\\]\"/", $x);
166 166
     if ($n) {
167 167
         echo "ERROR - MISMATCHED QUOTES IN $file: $line\n";
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
     
181 181
     // Find the string in the user's language
182 182
     //
183
-    foreach ($languages_in_use as $language){
183
+    foreach ($languages_in_use as $language) {
184 184
         if (isset($language_lookup_array[$language][$text])) {
185 185
             $text = $language_lookup_array[$language][$text];
186 186
             break;
187
-        } else if ($language=="en"){ 
187
+        } else if ($language == "en") { 
188 188
             // This language is defined in the code and is always available
189 189
             break;
190 190
         }
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     // Replace relevant substrings with given arguments.
194 194
     // Use strtr to avoid problems if an argument contains %n.
195 195
     $replacements = array();
196
-    for ($i=1; $i<func_num_args(); $i++){
196
+    for ($i = 1; $i < func_num_args(); $i++) {
197 197
         $replacements["%".$i] = func_get_arg($i);
198 198
     }
199 199
 
@@ -210,14 +210,14 @@  discard block
 block discarded – undo
210 210
     return $text;
211 211
 }
212 212
 
213
-function language_log($message, $loglevel=0) {
213
+function language_log($message, $loglevel = 0) {
214 214
     global $lang_log_level;
215 215
     $msg = "";
216
-    if ($loglevel==0) $msg = "[ Debug    ]";
217
-    if ($loglevel==1) $msg = "[ Warning  ]";
218
-    if ($loglevel==2) $msg = "[ CRITICAL ]";
216
+    if ($loglevel == 0) $msg = "[ Debug    ]";
217
+    if ($loglevel == 1) $msg = "[ Warning  ]";
218
+    if ($loglevel == 2) $msg = "[ CRITICAL ]";
219 219
 
220
-    if ($loglevel >= $lang_log_level){
220
+    if ($loglevel >= $lang_log_level) {
221 221
         echo gmdate("Y-m-d H:i:s", time())." ".$msg." ".$message."\n";
222 222
     }
223 223
 }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 // (by looking at cookies and browser settings)
227 227
 // cookies have highest priority.
228 228
 
229
-if (isset($_COOKIE['lang'])){
229
+if (isset($_COOKIE['lang'])) {
230 230
     $language_string = $_COOKIE['lang'].",";
231 231
 } else {
232 232
     $language_string = '';
@@ -257,10 +257,10 @@  discard block
 block discarded – undo
257 257
 // Loop over languages that the client requests
258 258
 //
259 259
 $size = sizeof($client_languages);
260
-for ($i=0; $i<$size; $i++) {
261
-    if ((strlen($client_languages[$i])>2)
260
+for ($i = 0; $i < $size; $i++) {
261
+    if ((strlen($client_languages[$i]) > 2)
262 262
         && (substr($client_languages[$i], 2, 1) == "_" || substr($client_languages[$i], 2, 1) == "-")
263
-    ){
263
+    ) {
264 264
         // If this is defined as primary-secondary, represent it as xx_YY
265 265
         //
266 266
         $language = substr(
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 
280 280
     // if main language is english, look no further
281 281
     //
282
-    if ((count($languages_in_use)==0) && ($language == 'en' || $language2 == 'en')) {
282
+    if ((count($languages_in_use) == 0) && ($language == 'en' || $language2 == 'en')) {
283 283
         break;
284 284
     }
285 285
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
     //
288 288
     $file_name = $lang_language_dir.$lang_compiled_dir.$language.".po.inc";
289 289
     if (file_exists($file_name)) {
290
-        if (!in_array($language, $languages_in_use)){
290
+        if (!in_array($language, $languages_in_use)) {
291 291
             require_once($file_name);
292 292
             $languages_in_use[] = $language;
293 293
         }
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
     if ($language2) {
296 296
         $file_name = $lang_language_dir.$lang_compiled_dir.$language2.".po.inc";
297 297
         if (file_exists($file_name)) {
298
-            if (!in_array($language2, $languages_in_use)){
298
+            if (!in_array($language2, $languages_in_use)) {
299 299
                 require_once($file_name);
300 300
                 $languages_in_use[] = $language2;
301 301
             }
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
     }
304 304
 }
305 305
 
306
-$GLOBALS['languages_in_use'] = $languages_in_use;   // for Drupal
306
+$GLOBALS['languages_in_use'] = $languages_in_use; // for Drupal
307 307
 
308
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
308
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
309 309
 ?>
Please login to merge, or discard this patch.
html/user/cert_all.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
 
30 30
 $border = get_str("border", true);
31 31
 
32
-if ($border=="no") {
32
+if ($border == "no") {
33 33
     $border = 0;
34 34
 } else {
35
-    $border=8;
35
+    $border = 8;
36 36
 }
37 37
 
38 38
 $font = "\"Optima,Lucida Bright,Times New Roman\"";
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     <tr><th align=left>Project</th><th align=left>Cobblestones</th><th align=left>Joined</th></tr>
76 76
 ";
77 77
 foreach ($user->projects as $p) {
78
-    if ($p->total_credit<100) continue;
78
+    if ($p->total_credit < 100) continue;
79 79
     show_proj($p);
80 80
 }
81 81
 echo "
Please login to merge, or discard this patch.
drupal/sites/default/settings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
  */
115 115
 require_once('dbconfig.php');
116 116
 if (!isset($dbserver) || empty($dbserver))
117
-  $dbserver='localhost';
117
+  $dbserver = 'localhost';
118 118
 $db_url = array(
119 119
   'default' => "{$dbtype}://{$dbuser}:".urlencode($dbpass)."@{$dbserver}/{$dbname}",
120 120
   'boinc_rw' => "{$boinc_rw_dbtype}://{$boinc_rw_dbuser}:".urlencode($boinc_rw_dbpass)."@{$boinc_rw_dbserver}/{$boinc_rw_dbname}"
@@ -162,14 +162,14 @@  discard block
 block discarded – undo
162 162
  * settings are used there. Settings defined here should not be
163 163
  * duplicated there so as to avoid conflict issues.
164 164
  */
165
-ini_set('session.cache_expire',     200000);
166
-ini_set('session.cache_limiter',    'none');
167
-ini_set('session.cookie_lifetime',  2000000);
168
-ini_set('session.gc_maxlifetime',   200000);
169
-ini_set('session.save_handler',     'user');
165
+ini_set('session.cache_expire', 200000);
166
+ini_set('session.cache_limiter', 'none');
167
+ini_set('session.cookie_lifetime', 2000000);
168
+ini_set('session.gc_maxlifetime', 200000);
169
+ini_set('session.save_handler', 'user');
170 170
 ini_set('session.use_only_cookies', 1);
171
-ini_set('session.use_trans_sid',    0);
172
-ini_set('url_rewriter.tags',        '');
171
+ini_set('session.use_trans_sid', 0);
172
+ini_set('url_rewriter.tags', '');
173 173
 ini_set('memory_limit', '128M');
174 174
 ini_set('post_max_size', '8MB');
175 175
 ini_set('upload_max_filesize', '8MB');
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
@@ -724,12 +724,12 @@  discard block
 block discarded – undo
724 724
   $boincteam = boincteam_load($boincteam_id);
725 725
   $now = time();
726 726
   if ($boincteam->ping_user <= 0) {
727
-    if ($boincteam->ping_time < $now - 60 * (24*60*60)) {
727
+    if ($boincteam->ping_time < $now - 60*(24*60*60)) {
728 728
       return TRUE;
729 729
     }
730 730
     return FALSE;
731 731
   }
732
-  if ($boincteam->ping_time < $now - 90 * (24*60*60)) {
732
+  if ($boincteam->ping_time < $now - 90*(24*60*60)) {
733 733
     return TRUE;
734 734
   }
735 735
   return FALSE;
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
  * responded to the request
741 741
  */
742 742
 function boincteam_foundership_transfer_ok_time($boincteam) {
743
-    return $boincteam->ping_time + 60 * (24*60*60);
743
+    return $boincteam->ping_time + 60*(24*60*60);
744 744
 }
745 745
 
746 746
 /**
@@ -778,26 +778,26 @@  discard block
 block discarded – undo
778 778
  */                                         
779 779
 function boincteam_about_admins_panel() {
780 780
   $output = '';
781
-  $output .= '<h2 class="pane-title">' . bts('About team admins', array(), NULL, 'boinc:team-admins-panel') . '</h2>';
781
+  $output .= '<h2 class="pane-title">'.bts('About team admins', array(), NULL, 'boinc:team-admins-panel').'</h2>';
782 782
   $output .= '<div>';
783
-  $output .= '<p>' . bts('Team admins can:', array(), NULL, 'boinc:team-admins-panel') . '</p>';
783
+  $output .= '<p>'.bts('Team admins can:', array(), NULL, 'boinc:team-admins-panel').'</p>';
784 784
   $output .= '<ul>';
785
-  $output .= '  <li>' . bts('Edit team information', array(), NULL, 'boinc:team-admins-panel') . '</li>';
786
-  $output .= '  <li>' . bts("View the team's join / quit history", array(), NULL, 'boinc:team-admins-panel') . '</li>';
787
-  $output .= '  <li>' . bts('Moderate the team forum', array(), NULL, 'boinc:team-admins-panel') . '</li>';
788
-  $output .= '  <li>' . bts('Remove members from the team', array(), NULL, 'boinc:team-admins-panel') . '</li>';
789
-  $output .= '  <li>' . bts('Disband a team if it has no members', array(), NULL, 'boinc:team-admins-panel') . '</li>';
785
+  $output .= '  <li>'.bts('Edit team information', array(), NULL, 'boinc:team-admins-panel').'</li>';
786
+  $output .= '  <li>'.bts("View the team's join / quit history", array(), NULL, 'boinc:team-admins-panel').'</li>';
787
+  $output .= '  <li>'.bts('Moderate the team forum', array(), NULL, 'boinc:team-admins-panel').'</li>';
788
+  $output .= '  <li>'.bts('Remove members from the team', array(), NULL, 'boinc:team-admins-panel').'</li>';
789
+  $output .= '  <li>'.bts('Disband a team if it has no members', array(), NULL, 'boinc:team-admins-panel').'</li>';
790 790
   $output .= '</ul>';
791 791
   $output .= '</div>';
792 792
   $output .= '<div>';
793
-  $output .= '<p>' . bts('Team admins cannot:', array(), NULL, 'boinc:team-admins-panel') . '</p>';
793
+  $output .= '<p>'.bts('Team admins cannot:', array(), NULL, 'boinc:team-admins-panel').'</p>';
794 794
   $output .= '<ul>';
795
-  $output .= '  <li>' . bts('Change the team founder', array(), NULL, 'boinc:team-admins-panel') . '</li>';
796
-  $output .= '  <li>' . bts('Remove members', array(), NULL, 'boinc:team-admins-panel') . '</li>';
797
-  $output .= '  <li>' . bts('Add / Remove team admins', array(), NULL, 'boinc:team-admins-panel') . '</li>';
795
+  $output .= '  <li>'.bts('Change the team founder', array(), NULL, 'boinc:team-admins-panel').'</li>';
796
+  $output .= '  <li>'.bts('Remove members', array(), NULL, 'boinc:team-admins-panel').'</li>';
797
+  $output .= '  <li>'.bts('Add / Remove team admins', array(), NULL, 'boinc:team-admins-panel').'</li>';
798 798
   $output .= '</ul>';
799 799
   $output .= '</div>';
800
-  $output .= '<p>' . bts('If a team admin quits the team, they cease to be a'
800
+  $output .= '<p>'.bts('If a team admin quits the team, they cease to be a'
801 801
     . ' team admin. We recommend only selecting people you know and trust', array(), NULL, 'boinc:team-admins-panel')
802 802
     . '</p>';
803 803
   return $output;
@@ -808,26 +808,26 @@  discard block
 block discarded – undo
808 808
  */                                         
809 809
 function boincteam_about_founder_panel() {
810 810
   $output = '';
811
-  $output .= '<h2 class="pane-title">' . bts('Changing the team founder', array(), NULL, 'boinc:team-founder-panel')
811
+  $output .= '<h2 class="pane-title">'.bts('Changing the team founder', array(), NULL, 'boinc:team-founder-panel')
812 812
     . '</h2>';
813 813
   $output .= '<div>';
814
-  $output .= '<p>' . bts('Notes about changes in foundership:', array(), NULL, 'boinc:team-founder-panel') . '</p>';
814
+  $output .= '<p>'.bts('Notes about changes in foundership:', array(), NULL, 'boinc:team-founder-panel').'</p>';
815 815
   $output .= '<ul>';
816
-  $output .= '  <li>' . bts('Any member of the team is eligible', array(), NULL, 'boinc:team-founder-panel') . '</li>';
817
-  $output .= '  <li>' . bts('Current founder becomes a normal user', array(), NULL, 'boinc:team-founder-panel') . '</li>';
816
+  $output .= '  <li>'.bts('Any member of the team is eligible', array(), NULL, 'boinc:team-founder-panel').'</li>';
817
+  $output .= '  <li>'.bts('Current founder becomes a normal user', array(), NULL, 'boinc:team-founder-panel').'</li>';
818 818
   $output .= '</ul>';
819 819
   $output .= '</div>';
820 820
   $output .= '<div>';
821
-  $output .= '<p>' . bts('Foundership can be requested by team members:', array(), NULL, 'boinc:team-founder-panel')
821
+  $output .= '<p>'.bts('Foundership can be requested by team members:', array(), NULL, 'boinc:team-founder-panel')
822 822
     . '</p>';
823 823
   $output .= '<ul>';
824
-  $output .= '  <li>' . bts('One request is allowed at a time', array(), NULL, 'boinc:team-founder-panel') . '</li>';
825
-  $output .= '  <li>' . bts('It must be 60 days since any previous request', array(), NULL, 'boinc:team-founder-panel')
824
+  $output .= '  <li>'.bts('One request is allowed at a time', array(), NULL, 'boinc:team-founder-panel').'</li>';
825
+  $output .= '  <li>'.bts('It must be 60 days since any previous request', array(), NULL, 'boinc:team-founder-panel')
826 826
     . '</li>';
827
-  $output .= '  <li>' . bts('Any active request must be older than 90 days', array(), NULL, 'boinc:team-founder-panel')
827
+  $output .= '  <li>'.bts('Any active request must be older than 90 days', array(), NULL, 'boinc:team-founder-panel')
828 828
     . '</li>';
829
-  $output .= '  <li>' . bts('Current founder has 60 days to respond to a'
830
-    . ' request', array(), NULL, 'boinc:team-founder-panel') . '</li>';
829
+  $output .= '  <li>'.bts('Current founder has 60 days to respond to a'
830
+    . ' request', array(), NULL, 'boinc:team-founder-panel').'</li>';
831 831
   $output .= '</ul>';
832 832
   $output .= '</div>';
833 833
   return $output;
@@ -841,9 +841,9 @@  discard block
 block discarded – undo
841 841
   $account = user_load($user->uid);
842 842
   $unrestricted_role = array_search('verified contributor', user_roles(true));
843 843
   $output = '';
844
-  $output .= '<h2 class="pane-title">' . bts('Create a new team', array(), NULL, 'boinc:create-team-panel') . '</h2>';
845
-  $output .= '<p>' . bts('If you cannot find a team that is right for you, you'
846
-    . ' can create a team.', array(), NULL, 'boinc:create-team-panel') . '</p>';
844
+  $output .= '<h2 class="pane-title">'.bts('Create a new team', array(), NULL, 'boinc:create-team-panel').'</h2>';
845
+  $output .= '<p>'.bts('If you cannot find a team that is right for you, you'
846
+    . ' can create a team.', array(), NULL, 'boinc:create-team-panel').'</p>';
847 847
   $output .= '<ul class="tab-list">';
848 848
   $output .= '  <li class="first last tab">';
849 849
   if (isset($account->roles[$unrestricted_role])) {
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
  */
880 880
 function boincteam_create_team_panel() {
881 881
   $output = '';
882
-  $output .= '<h2 class="pane-title">' . bts('Create a team', array(), NULL, 'boinc:create-team-panel') . '</h2>';
882
+  $output .= '<h2 class="pane-title">'.bts('Create a team', array(), NULL, 'boinc:create-team-panel').'</h2>';
883 883
   $output .= drupal_get_form('boincteam_create_form');
884 884
   
885 885
   return $output;
@@ -897,26 +897,26 @@  discard block
 block discarded – undo
897 897
   $account = user_load($uid);
898 898
   if ($account->team) {
899 899
     $team = boincteam_load(boincteam_lookup_id($account->team));
900
-    $output .= '<h2 class="pane-title">' . bts('Team', array(), NULL, 'boinc:team-dashboard') . '</h2>';
900
+    $output .= '<h2 class="pane-title">'.bts('Team', array(), NULL, 'boinc:team-dashboard').'</h2>';
901 901
     $output .= '<div class="stats">';
902
-    $output .= '  <label>' . bts('Name', array(), NULL, 'boinc:user-or-team-name') . ': </label>';
903
-    $output .= '  <span>' . l($team->name, "community/teams/{$account->team}") . '</span>';
904
-    $output .= '</div>' . "\n";
902
+    $output .= '  <label>'.bts('Name', array(), NULL, 'boinc:user-or-team-name').': </label>';
903
+    $output .= '  <span>'.l($team->name, "community/teams/{$account->team}").'</span>';
904
+    $output .= '</div>'."\n";
905 905
     $output .= '<div class="stats">';
906
-    $output .= '  <label>' . bts('Member since', array(), NULL, 'boinc:user-info') . ': </label>';
907
-    $output .= '  <span>' . date('j F Y', boincteam_get_member_join_date($team->id, $account->boincuser_id)) . '</span>';
908
-    $output .= '</div>' . "\n";
906
+    $output .= '  <label>'.bts('Member since', array(), NULL, 'boinc:user-info').': </label>';
907
+    $output .= '  <span>'.date('j F Y', boincteam_get_member_join_date($team->id, $account->boincuser_id)).'</span>';
908
+    $output .= '</div>'."\n";
909 909
     $output .= '<div class="stats">';
910
-    $output .= '  <label>' . bts('Country', array(), NULL, 'boinc:country-of-origin') . ': </label>';
911
-    $output .= '  <span>' . $team->country . '</span>';
912
-    $output .= '</div>' . "\n";
910
+    $output .= '  <label>'.bts('Country', array(), NULL, 'boinc:country-of-origin').': </label>';
911
+    $output .= '  <span>'.$team->country.'</span>';
912
+    $output .= '</div>'."\n";
913 913
     $output .= '<div class="stats">';
914
-    $output .= '  <label>' . bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits') . ': </label>';
915
-    $output .= '  <span>' . number_format($team->total_credit, 0) . '</span>';
916
-    $output .= '</div>' . "\n";
914
+    $output .= '  <label>'.bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits').': </label>';
915
+    $output .= '  <span>'.number_format($team->total_credit, 0).'</span>';
916
+    $output .= '</div>'."\n";
917 917
   }
918 918
   else if ($user->uid == $account->uid) {
919
-    $output .= '<h2 class="pane-title">' . bts('Team (None)', array(), NULL, 'boinc:team-dashboard') . '</h2>';
919
+    $output .= '<h2 class="pane-title">'.bts('Team (None)', array(), NULL, 'boinc:team-dashboard').'</h2>';
920 920
     $output .= '<ul class="tab-list action-list">';
921 921
     $output .= '<li class="tab primary">';
922 922
     $output .= l(bts('Join a Team', array(), NULL, 'boinc:team-dashboard'), 'community/teams');
@@ -932,7 +932,7 @@  discard block
 block discarded – undo
932 932
 function boincteam_edit_team_panel($team_id) {
933 933
   $team = node_load($team_id);
934 934
   $output = '';
935
-  $output .= '<h2 class="pane-title">' . $team->title . '</h2>';
935
+  $output .= '<h2 class="pane-title">'.$team->title.'</h2>';
936 936
   $output .= drupal_get_form('boincteam_edit_form', $team_id);
937 937
   
938 938
   return $output;
@@ -944,12 +944,12 @@  discard block
 block discarded – undo
944 944
 function boincteam_join_team_panel($team_id) {
945 945
   $team = node_load($team_id);
946 946
   $output = '';
947
-  $output .= '<h2 class="pane-title">' . bts('Join team', array(), NULL, 'boinc:join-team-panel') . '</h2>';
948
-  $output .= '<p>' . bts('Click here to become a member of @this_team',
949
-    array('@this_team' =>$team->title), NULL, 'boinc:join-team-panel') . '</p>';
947
+  $output .= '<h2 class="pane-title">'.bts('Join team', array(), NULL, 'boinc:join-team-panel').'</h2>';
948
+  $output .= '<p>'.bts('Click here to become a member of @this_team',
949
+    array('@this_team' =>$team->title), NULL, 'boinc:join-team-panel').'</p>';
950 950
   $output .= '<ul class="tab-list">';
951
-  $output .= '  <li class="first last tab">' . 
952
-    l(bts('Join this team', array(), NULL, 'boinc:join-team-panel'), "community/teams/{$team_id}/join") . '</li>';
951
+  $output .= '  <li class="first last tab">'. 
952
+    l(bts('Join this team', array(), NULL, 'boinc:join-team-panel'), "community/teams/{$team_id}/join").'</li>';
953 953
   $output .= '</ul>';
954 954
   return $output;
955 955
 }
@@ -960,12 +960,12 @@  discard block
 block discarded – undo
960 960
 function boincteam_leave_team_panel($team_id) {
961 961
   $team = node_load($team_id);
962 962
   $output = '';
963
-  $output .= '<h2 class="pane-title">' . bts('Leave team', array(), NULL, 'boinc:leave-team-panel') . '</h2>';
964
-  $output .= '<p>' . bts('Click here to revoke your membership with'
965
-    . ' @this_team', array('@this_team' =>$team->title), NULL, 'boinc:leave-team-panel') . '</p>';
963
+  $output .= '<h2 class="pane-title">'.bts('Leave team', array(), NULL, 'boinc:leave-team-panel').'</h2>';
964
+  $output .= '<p>'.bts('Click here to revoke your membership with'
965
+    . ' @this_team', array('@this_team' =>$team->title), NULL, 'boinc:leave-team-panel').'</p>';
966 966
   $output .= '<ul class="tab-list">';
967
-  $output .= '  <li class="first last tab">' . 
968
-    l(bts('Leave this team', array(), NULL, 'boinc:leave-team-panel'), "community/teams/{$team_id}/leave") . '</li>';
967
+  $output .= '  <li class="first last tab">'. 
968
+    l(bts('Leave this team', array(), NULL, 'boinc:leave-team-panel'), "community/teams/{$team_id}/leave").'</li>';
969 969
   $output .= '</ul>';
970 970
   return $output;
971 971
 }
@@ -975,10 +975,10 @@  discard block
 block discarded – undo
975 975
  */                                         
976 976
 function boincteam_manage_admins_panel_header($team_id) {
977 977
   $output = '';
978
-  $output .= '<h4>' . bts('Add team admin', array(), NULL, 'boinc:team-manage-admins') . '</h4>';
978
+  $output .= '<h4>'.bts('Add team admin', array(), NULL, 'boinc:team-manage-admins').'</h4>';
979 979
   $output .= drupal_get_form('boincteam_add_admin_form', $team_id);
980 980
   $output .= '<div class="clearfix"></div>';
981
-  $output .= '<h4>' . bts('Current team admins', array(), NULL, 'boinc:team-manage-admins') . '</h4>';
981
+  $output .= '<h4>'.bts('Current team admins', array(), NULL, 'boinc:team-manage-admins').'</h4>';
982 982
   
983 983
   return $output;
984 984
 }
@@ -991,17 +991,17 @@  discard block
 block discarded – undo
991 991
   $team = node_load($team_id);
992 992
 
993 993
   $output = '';
994
-  $output .= '<h2 class="pane-title">' . bts('Manage team', array(), NULL, 'boinc:team-manage') . '</h2>';
994
+  $output .= '<h2 class="pane-title">'.bts('Manage team', array(), NULL, 'boinc:team-manage').'</h2>';
995 995
   
996 996
   // PM all members
997 997
   if (module_exists('privatemsg')) {
998 998
     $output .= '<div class="form-item">';
999 999
     $output .= '  <ul class="tab-list action-list">';
1000
-    $output .= '    <li class="first tab primary">' .
1001
-      l('Send message to team', "community/teams/{$team_id}/message-all-members") . '</li>';
1000
+    $output .= '    <li class="first tab primary">'.
1001
+      l('Send message to team', "community/teams/{$team_id}/message-all-members").'</li>';
1002 1002
     $output .= '  </ul>';
1003 1003
     $output .= '  <div class="description">';
1004
-    $output .=   bts('Contact all team members using e-mail.', array(), NULL, 'boinc:team-manage');
1004
+    $output .= bts('Contact all team members using e-mail.', array(), NULL, 'boinc:team-manage');
1005 1005
     $output .= '  </div>';
1006 1006
     $output .= '</div>';
1007 1007
   }
@@ -1019,13 +1019,13 @@  discard block
 block discarded – undo
1019 1019
       }
1020 1020
       $output .= '<div class="form-item">';
1021 1021
       $output .= '  <ul class="tab-list action-list">';
1022
-      $output .= '    <li class="first tab primary">' .   
1022
+      $output .= '    <li class="first tab primary">'.   
1023 1023
         l(bts('Manage team message board', array(), NULL, 'boinc:team-manage'),
1024 1024
           "community/teams/{$team_id}/forum/{$team_forum_link_path}"
1025 1025
         );
1026 1026
       $output .= '    </li>';
1027 1027
       $output .= '  <div class="description">';
1028
-      $output .=   bts('Create or manage message board', array(), NULL, 'boinc:team-manage');
1028
+      $output .= bts('Create or manage message board', array(), NULL, 'boinc:team-manage');
1029 1029
       $output .= '  </div>';
1030 1030
       $output .= '</div>';
1031 1031
     }
@@ -1033,15 +1033,15 @@  discard block
 block discarded – undo
1033 1033
   
1034 1034
   // Team history
1035 1035
   $output .= '<div class="form-item">';
1036
-  $output .= '  <label>' . bts('View change history', array(), NULL, 'boinc:team-manage') . '</label>';
1036
+  $output .= '  <label>'.bts('View change history', array(), NULL, 'boinc:team-manage').'</label>';
1037 1037
   $output .= '  <ul class="tab-list">';
1038
-  $output .= '    <li class="first tab primary">' . 
1039
-    l('HTML', "community/teams/{$team_id}/history") . '</li>';
1040
-  $output .= '    <li class="last tab primary">' .
1041
-    l('XML', "community/teams/{$team_id}/history/xml") . '</li>';
1038
+  $output .= '    <li class="first tab primary">'. 
1039
+    l('HTML', "community/teams/{$team_id}/history").'</li>';
1040
+  $output .= '    <li class="last tab primary">'.
1041
+    l('XML', "community/teams/{$team_id}/history/xml").'</li>';
1042 1042
   $output .= '  </ul>';
1043 1043
   $output .= '  <div class="description">';
1044
-  $output .=   bts('See member activity', array(), NULL, 'boinc:team-manage');
1044
+  $output .= bts('See member activity', array(), NULL, 'boinc:team-manage');
1045 1045
   $output .= '  </div>';
1046 1046
   $output .= '</div>';
1047 1047
   
@@ -1049,30 +1049,30 @@  discard block
 block discarded – undo
1049 1049
   $output .= '  <ul class="tab-list action-list">';
1050 1050
   
1051 1051
   // Edit team information
1052
-  $output .= '    <li class="first tab primary">' . 
1053
-    l(bts('Edit team info', array(), NULL, 'boinc:team-manage'), "community/teams/{$team_id}/edit/info") . '</li>';
1052
+  $output .= '    <li class="first tab primary">'. 
1053
+    l(bts('Edit team info', array(), NULL, 'boinc:team-manage'), "community/teams/{$team_id}/edit/info").'</li>';
1054 1054
     
1055 1055
   // Member list
1056
-  $output .= '    <li class="tab primary">' . 
1057
-    l(bts('View member list', array(), NULL, 'boinc:team-manage'), "community/teams/{$team_id}/members") . '</li>';
1056
+  $output .= '    <li class="tab primary">'. 
1057
+    l(bts('View member list', array(), NULL, 'boinc:team-manage'), "community/teams/{$team_id}/members").'</li>';
1058 1058
 
1059 1059
   // Remove members
1060
-  $output .= '    <li class="tab primary">' . 
1061
-    l(bts('Remove members', array(), NULL, 'boinc:team-admins-panel'), "community/teams/{$team_id}/edit/members") . '</li>';
1060
+  $output .= '    <li class="tab primary">'. 
1061
+    l(bts('Remove members', array(), NULL, 'boinc:team-admins-panel'), "community/teams/{$team_id}/edit/members").'</li>';
1062 1062
   
1063 1063
   if ($is_founder) {
1064 1064
     
1065 1065
     // Change founder
1066
-    $output .= '    <li class="tab primary">' . 
1067
-      l(bts('Change founder', array(), NULL, 'boinc:team-manage'), "community/teams/{$team_id}/edit/founder") . '</li>';
1066
+    $output .= '    <li class="tab primary">'. 
1067
+      l(bts('Change founder', array(), NULL, 'boinc:team-manage'), "community/teams/{$team_id}/edit/founder").'</li>';
1068 1068
       
1069 1069
       // Manage admins
1070
-    $output .= '    <li class="tab primary">' . 
1071
-      l(bts('Manage team admins', array(), NULL, 'boinc:team-manage'), "community/teams/{$team_id}/edit/admins") . '</li>';
1070
+    $output .= '    <li class="tab primary">'. 
1071
+      l(bts('Manage team admins', array(), NULL, 'boinc:team-manage'), "community/teams/{$team_id}/edit/admins").'</li>';
1072 1072
     
1073 1073
     // Delete the team
1074
-    $output .= '    <li class="last tab primary">' . 
1075
-      l(bts('Remove team', array(), NULL, 'boinc:team-manage'), "community/teams/{$team_id}/delete") . '</li>';
1074
+    $output .= '    <li class="last tab primary">'. 
1075
+      l(bts('Remove team', array(), NULL, 'boinc:team-manage'), "community/teams/{$team_id}/delete").'</li>';
1076 1076
   }
1077 1077
   
1078 1078
   $output .= '  </ul>';
@@ -1089,12 +1089,12 @@  discard block
 block discarded – undo
1089 1089
   $account = user_load($user->uid);
1090 1090
   $team = node_load($account->team);
1091 1091
   $output = '';
1092
-  $output .= '<h2 class="pane-title">' . bts('My team', array(), NULL, 'boinc:account-team-panel') . '</h2>';
1093
-  $output .= '<p>' . bts('You are a member of @team.', 
1094
-    array('@team' => $team->title), NULL, 'boinc:account-team-panel') . '</p>';
1092
+  $output .= '<h2 class="pane-title">'.bts('My team', array(), NULL, 'boinc:account-team-panel').'</h2>';
1093
+  $output .= '<p>'.bts('You are a member of @team.', 
1094
+    array('@team' => $team->title), NULL, 'boinc:account-team-panel').'</p>';
1095 1095
   $output .= '<ul class="tab-list">';
1096
-  $output .= '  <li class="first last tab">' . 
1097
-    l(bts('View my team', array(), NULL, 'boinc:account-team-panel'), "community/teams/{$account->team}") . '</li>';
1096
+  $output .= '  <li class="first last tab">'. 
1097
+    l(bts('View my team', array(), NULL, 'boinc:account-team-panel'), "community/teams/{$account->team}").'</li>';
1098 1098
   $output .= '</ul>';
1099 1099
   return $output;
1100 1100
 }
@@ -1110,11 +1110,11 @@  discard block
 block discarded – undo
1110 1110
   $boincteam = boincteam_load($boincteam_id);
1111 1111
   $boincuser_id = $account->boincuser_id;
1112 1112
   $output = '';
1113
-  $output .= '<h2 class="pane-title">' . bts('Request foundership', array(), NULL, 'boinc:team-request-foundership') . '</h2>';
1113
+  $output .= '<h2 class="pane-title">'.bts('Request foundership', array(), NULL, 'boinc:team-request-foundership').'</h2>';
1114 1114
   
1115 1115
   if (boincteam_user_requested_foundership($team_id)) {
1116 1116
     $deadline = boincteam_foundership_transfer_ok_time($boincteam);
1117
-    $days_to_deadline = ceil(($deadline - time()) / (24*60*60));
1117
+    $days_to_deadline = ceil(($deadline - time())/(24*60*60));
1118 1118
     $request_age = 60 - $days_to_deadline;
1119 1119
     $days_to_respond = 30 + $days_to_deadline;
1120 1120
     if (time() > $deadline) {
@@ -1142,8 +1142,8 @@  discard block
 block discarded – undo
1142 1142
       }
1143 1143
       $output .= '</p>';
1144 1144
       $output .= '<ul class="tab-list">';
1145
-      $output .= '  <li class="first last tab">' . 
1146
-        l(bts('Assume foundership', array(), NULL, 'boinc:team-request-foundership'), "community/teams/{$team_id}/assume-foundership") . '</li>';
1145
+      $output .= '  <li class="first last tab">'. 
1146
+        l(bts('Assume foundership', array(), NULL, 'boinc:team-request-foundership'), "community/teams/{$team_id}/assume-foundership").'</li>';
1147 1147
       $output .= '</ul>';
1148 1148
     }
1149 1149
     else {
@@ -1167,29 +1167,29 @@  discard block
 block discarded – undo
1167 1167
     // who made the request has 30 additional days to assume foundership if 
1168 1168
     // there is no response to the request)
1169 1169
     $deadline = boincteam_foundership_transfer_ok_time($boincteam);
1170
-    $days_to_deadline = ceil(($deadline - time()) / (24*60*60)) + 30;
1170
+    $days_to_deadline = ceil(($deadline - time())/(24*60*60)) + 30;
1171 1171
     $output .= '<p>';
1172 1172
     $output .= bts('A team foundership change was already requested recently.'
1173 1173
       . ' Only one request is allowed within a period of 90 days.',
1174 1174
       NULL, 'boinc:team-request-foundership');
1175 1175
     if ($days_to_deadline == 1) {
1176
-      $output .= ' (' . bts('1 day remaining', array(), NULL, 'boinc:team-request-foundership') . ')';
1176
+      $output .= ' ('.bts('1 day remaining', array(), NULL, 'boinc:team-request-foundership').')';
1177 1177
     }
1178 1178
     else {
1179
-      $output .= ' (' . bts('@count days remaining',
1179
+      $output .= ' ('.bts('@count days remaining',
1180 1180
         array('@count' => $days_to_deadline),
1181
-        NULL, 'boinc:team-request-foundership') . ')';
1181
+        NULL, 'boinc:team-request-foundership').')';
1182 1182
     }
1183 1183
     $output .= '</p>';
1184 1184
   }
1185 1185
   else {
1186
-    $output .= '<p>' . bts('If the team founder is not active and you want to'
1186
+    $output .= '<p>'.bts('If the team founder is not active and you want to'
1187 1187
       . ' assume the role of founder, click below to request foundership of'
1188 1188
       . ' @this_team.',
1189
-      array('@this_team' =>$team->title), NULL, 'boinc:team-request-foundership') . '</p>';
1189
+      array('@this_team' =>$team->title), NULL, 'boinc:team-request-foundership').'</p>';
1190 1190
     $output .= '<ul class="tab-list">';
1191
-    $output .= '  <li class="first last tab">' . 
1192
-      l(bts('Initiate request', array(), NULL, 'boinc:team-request-foundership'), "community/teams/{$team_id}/request-foundership") . '</li>';
1191
+    $output .= '  <li class="first last tab">'. 
1192
+      l(bts('Initiate request', array(), NULL, 'boinc:team-request-foundership'), "community/teams/{$team_id}/request-foundership").'</li>';
1193 1193
     $output .= '</ul>';
1194 1194
   }
1195 1195
   return $output;
@@ -1210,15 +1210,15 @@  discard block
 block discarded – undo
1210 1210
   if ($boincteam->ping_user) {
1211 1211
     if ($boincteam->ping_user < 0) {
1212 1212
       $member = user_load(boincuser_lookup_uid(-$boincteam->ping_user));
1213
-      $output .= '<h2 class="pane-title">' . bts('Obsolete transfer request', array(), NULL, 'boinc:team-request-foundership-response')
1213
+      $output .= '<h2 class="pane-title">'.bts('Obsolete transfer request', array(), NULL, 'boinc:team-request-foundership-response')
1214 1214
         . '</h2>';
1215
-      $output .= '<p>' . bts('Team member @name requested team foundership on'
1215
+      $output .= '<p>'.bts('Team member @name requested team foundership on'
1216 1216
         . ' @date, but then left the team. This request is now canceled.',
1217 1217
         array(
1218 1218
           '@name' => $member->boincuser_name,
1219 1219
           '@date' => date('j M Y', $boincteam->ping_time),
1220 1220
         ),
1221
-        NULL, 'boinc:team-request-foundership-response') . '</p>';
1221
+        NULL, 'boinc:team-request-foundership-response').'</p>';
1222 1222
       // Automatically cancel the request
1223 1223
       db_set_active('boinc_rw');
1224 1224
       db_query("
@@ -1231,15 +1231,15 @@  discard block
 block discarded – undo
1231 1231
     }
1232 1232
     else {
1233 1233
       $member = user_load(boincuser_lookup_uid($boincteam->ping_user));
1234
-      $output .= '<h2 class="pane-title">' . bts('Respond to transfer request', array(), NULL, 'boinc:team-request-foundership-response')
1234
+      $output .= '<h2 class="pane-title">'.bts('Respond to transfer request', array(), NULL, 'boinc:team-request-foundership-response')
1235 1235
         . '</h2>';
1236
-      $output .= '<p>' . bts('Team member @name has requested team foundership.'
1236
+      $output .= '<p>'.bts('Team member @name has requested team foundership.'
1237 1237
         . ' This may be because you left the team or have not had contact with'
1238 1238
         . ' the team for a long time.', array(
1239 1239
           '@name' => $member->boincuser_name,
1240 1240
         )
1241
-      , array(), NULL, 'boinc:team-request-foundership-response') . '</p>';
1242
-      $output .= '<p>' . bts("If you don't decline the request by @date, @name"
1241
+      , array(), NULL, 'boinc:team-request-foundership-response').'</p>';
1242
+      $output .= '<p>'.bts("If you don't decline the request by @date, @name"
1243 1243
         . ' will have the option of assuming team foundership. (note: To'
1244 1244
         . ' accept the request, assign foundership to @name using the form'
1245 1245
         . ' below)',
@@ -1247,10 +1247,10 @@  discard block
 block discarded – undo
1247 1247
           '@name' => $member->boincuser_name,
1248 1248
           '@date' => date('j M Y', boincteam_foundership_transfer_ok_time($boincteam)),
1249 1249
         ),
1250
-        NULL, 'boinc:team-request-foundership-response') . '</p>';
1250
+        NULL, 'boinc:team-request-foundership-response').'</p>';
1251 1251
       $output .= '<ul class="tab-list">';
1252
-      $output .= '  <li class="first last tab">' . 
1253
-        l(bts('Deny request', array(), NULL, 'boinc:team-request-foundership-response'), "community/teams/{$team_id}/deny-foundership-request") . '</li>';
1252
+      $output .= '  <li class="first last tab">'. 
1253
+        l(bts('Deny request', array(), NULL, 'boinc:team-request-foundership-response'), "community/teams/{$team_id}/deny-foundership-request").'</li>';
1254 1254
       $output .= '</ul>';
1255 1255
     }
1256 1256
   }
@@ -1260,9 +1260,9 @@  discard block
 block discarded – undo
1260 1260
 function boincteam_search_panel() {
1261 1261
   $output = '';
1262 1262
   if (module_exists('global_search_teams_solr')) {
1263
-    $output .= '<h2 class="pane-title">' . bts('Search teams', array(), NULL, 'boinc:search-team') . '</h2>';
1263
+    $output .= '<h2 class="pane-title">'.bts('Search teams', array(), NULL, 'boinc:search-team').'</h2>';
1264 1264
     //$output .= '<p>' . bts('Render a search form here.', array(), NULL, 'boinc:search-team') . '</p>';
1265
-    $output .= '<p>' . boincteam_search_view() . '</p>';
1265
+    $output .= '<p>'.boincteam_search_view().'</p>';
1266 1266
   }
1267 1267
   return $output;
1268 1268
 }
@@ -1278,20 +1278,20 @@  discard block
 block discarded – undo
1278 1278
  * General info about the concept of teams
1279 1279
  */                                         
1280 1280
 function boincteam_topic_overview_panel() {
1281
-  $site_name =  variable_get('site_name', 'Drupal-BOINC');
1281
+  $site_name = variable_get('site_name', 'Drupal-BOINC');
1282 1282
   $output = '';
1283
-  $output .= '<h2 class="pane-title">' . bts('Teams', array(), NULL, 'boinc:team-general-info') . '</h2>';
1283
+  $output .= '<h2 class="pane-title">'.bts('Teams', array(), NULL, 'boinc:team-general-info').'</h2>';
1284 1284
   $output .= '<div class="">';
1285
-  $output .= '<p>' . bts('@project participants may form teams. You may belong'
1285
+  $output .= '<p>'.bts('@project participants may form teams. You may belong'
1286 1286
     . ' to only one team. You can join or quit a team at any time. To join a'
1287 1287
     . ' team, visit its team page and click "Join this team". Each team has a'
1288
-    . ' founder who may:', array('@project' => $site_name), NULL, 'boinc:team-general-info') . '</p>';
1288
+    . ' founder who may:', array('@project' => $site_name), NULL, 'boinc:team-general-info').'</p>';
1289 1289
   $output .= '<ul>';
1290
-  $output .= '  <li>' . bts('Private Message all team members', array(), NULL, 'boinc:team-general-info') . '</li>';
1291
-  $output .= '  <li>' . bts("edit the team's name and description", array(), NULL, 'boinc:team-general-info') . '</li>';
1292
-  $output .= '  <li>' . bts('add or remove team admins', array(), NULL, 'boinc:team-general-info') . '</li>';
1293
-  $output .= '  <li>' . bts('remove members from the team', array(), NULL, 'boinc:team-general-info') . '</li>';
1294
-  $output .= '  <li>' . bts('disband a team if it has no members', array(), NULL, 'boinc:team-general-info') . '</li>';
1290
+  $output .= '  <li>'.bts('Private Message all team members', array(), NULL, 'boinc:team-general-info').'</li>';
1291
+  $output .= '  <li>'.bts("edit the team's name and description", array(), NULL, 'boinc:team-general-info').'</li>';
1292
+  $output .= '  <li>'.bts('add or remove team admins', array(), NULL, 'boinc:team-general-info').'</li>';
1293
+  $output .= '  <li>'.bts('remove members from the team', array(), NULL, 'boinc:team-general-info').'</li>';
1294
+  $output .= '  <li>'.bts('disband a team if it has no members', array(), NULL, 'boinc:team-general-info').'</li>';
1295 1295
   $output .= '</ul>';
1296 1296
   $output .= '</div>';
1297 1297
   return $output;
@@ -1336,34 +1336,34 @@  discard block
 block discarded – undo
1336 1336
     }
1337 1337
   }
1338 1338
   $output = '';
1339
-  $output .= '<h2 class="pane-title">' . $boincteam->name . '</h2>';
1339
+  $output .= '<h2 class="pane-title">'.$boincteam->name.'</h2>';
1340 1340
   $output .= '<div>';
1341 1341
   $output .= '<div class="left-column">';
1342 1342
   $output .= '<ul class="stats">';
1343
-  $output .= '  <li>' . bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits') . ': ' . number_format($boincteam->total_credit, 0) . '</li>';
1344
-  $output .= '  <li>' . bts('Recent average credit', array(), NULL, 'boinc:user-or-team-RAC') . ': ' . number_format($boincteam->expavg_credit, 2) . '</li>';
1345
-  $output .= '  <li>' . bts('Country', array(), NULL, 'boinc:country-of-origin') . ': ' . $boincteam->country . '</li>';
1346
-  $output .= '  <li>' . bts('Type', array(), NULL, 'boinc:view-team-info') . ': ' . boincteam_get_type($team_id) . '</li>';
1343
+  $output .= '  <li>'.bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits').': '.number_format($boincteam->total_credit, 0).'</li>';
1344
+  $output .= '  <li>'.bts('Recent average credit', array(), NULL, 'boinc:user-or-team-RAC').': '.number_format($boincteam->expavg_credit, 2).'</li>';
1345
+  $output .= '  <li>'.bts('Country', array(), NULL, 'boinc:country-of-origin').': '.$boincteam->country.'</li>';
1346
+  $output .= '  <li>'.bts('Type', array(), NULL, 'boinc:view-team-info').': '.boincteam_get_type($team_id).'</li>';
1347 1347
   $output .= '</ul>';
1348 1348
   $output .= '</div>';
1349 1349
   $output .= '<div class="right-column">';
1350 1350
   $output .= '<ul class="stats">';
1351
-  $output .= '  <li>' . bts('Founder', array(), NULL, 'boinc:view-team-info') . ': ' . l($founder->boincuser_name, "account/{$founder->uid}") . '</li>';
1352
-  $output .= '  <li>' . bts('New members in last day', array(), NULL, 'boinc:view-team-info') . ': ' . implode('&middot;', $new_members) . '</li>';
1353
-  $output .= '  <li>' . bts('Total members', array(), NULL, 'boinc:view-team-info') . ': ' . l($boincteam->nusers, "community/teams/{$team_id}/members") . '</li>';
1354
-  $output .= '  <li>' . bts('Active members', array(), NULL, 'boinc:view-team-info') . ': ' . $boincteam->nusers_active . '</li>';
1355
-  $output .= '  <li>' . bts('Members with credit', array(), NULL, 'boinc:view-team-info') . ': ' . $boincteam->nusers_worked . '</li>';
1351
+  $output .= '  <li>'.bts('Founder', array(), NULL, 'boinc:view-team-info').': '.l($founder->boincuser_name, "account/{$founder->uid}").'</li>';
1352
+  $output .= '  <li>'.bts('New members in last day', array(), NULL, 'boinc:view-team-info').': '.implode('&middot;', $new_members).'</li>';
1353
+  $output .= '  <li>'.bts('Total members', array(), NULL, 'boinc:view-team-info').': '.l($boincteam->nusers, "community/teams/{$team_id}/members").'</li>';
1354
+  $output .= '  <li>'.bts('Active members', array(), NULL, 'boinc:view-team-info').': '.$boincteam->nusers_active.'</li>';
1355
+  $output .= '  <li>'.bts('Members with credit', array(), NULL, 'boinc:view-team-info').': '.$boincteam->nusers_worked.'</li>';
1356 1356
   $output .= '</ul>';
1357 1357
   $output .= '</div>';
1358 1358
   $output .= '</div>';
1359 1359
   $output .= '<div class="clearfix"></div>';
1360 1360
   if ($boincteam->url) {
1361 1361
     $output .= '<div class="stats">';
1362
-    $output .= bts('Website', array(), NULL, 'boinc:website-of-user-or-team') . ': ' . l("http://{$boincteam->url}", "http://{$boincteam->url}");
1362
+    $output .= bts('Website', array(), NULL, 'boinc:website-of-user-or-team').': '.l("http://{$boincteam->url}", "http://{$boincteam->url}");
1363 1363
     $output .= '</div>';
1364 1364
   }
1365 1365
   if ($team->body) {
1366
-    $output .= '<h3>' . bts('Description', array(), NULL, 'boinc:team-description') . '</h3>';
1366
+    $output .= '<h3>'.bts('Description', array(), NULL, 'boinc:team-description').'</h3>';
1367 1367
     $output .= check_markup($team->body, $team->format);
1368 1368
     $output .= '</div>';
1369 1369
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincteam/includes/boincteam.helpers.inc 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
       'teaser' => $teaser,
88 88
       'uid' => boincuser_lookup_uid($boincteam->userid),
89 89
       'path' => null,
90
-      'status' => 1,  // published or not - always publish
90
+      'status' => 1, // published or not - always publish
91 91
       'promote' => 0,
92 92
       'created' => $boincteam->create_time,
93
-      'comment' => 0,  // comments disabled
93
+      'comment' => 0, // comments disabled
94 94
       'moderate' => 0,
95 95
       'sticky' => 0,
96 96
       'format' => $input_format
97 97
     );
98
-    $node = (object) $node; // node_save requires an object form
98
+    $node = (object)$node; // node_save requires an object form
99 99
   }
100 100
   
101 101
   $node->taxonomy[] = taxonomy_get_term($team_type_tid);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
  *   flag send_email=1, meaning their notification privacy will be
126 126
  *   respected. This is useful the list of users are to be contacted.
127 127
  */
128
-function _boincteam_userids($boincteamid, $boincid=TRUE, $respectprivacy=TRUE) {
128
+function _boincteam_userids($boincteamid, $boincid = TRUE, $respectprivacy = TRUE) {
129 129
   $sql = 'SELECT user.id as id FROM {user} user WHERE user.teamid=%s';
130 130
   if ($respectprivacy) {
131 131
     $sql .= ' AND user.send_email=1';
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
  *   flag send_email=1, meaning their notification privacy will be
158 158
  *   respected. This is useful the list of users are to be contacted.
159 159
  */
160
-function _boincteam_emails($boincteamid, $respectprivacy=TRUE) {
160
+function _boincteam_emails($boincteamid, $respectprivacy = TRUE) {
161 161
   $sql = 'SELECT user.email_addr as email_addr FROM {user} user WHERE user.teamid=%s';
162 162
   if ($respectprivacy) {
163 163
     $sql .= ' AND user.send_email=1';
Please login to merge, or discard this patch.