Passed
Pull Request — master (#4574)
by David
07:14
created
html/inc/team.inc 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     row2('<b>'.tra('Search criteria (use one or more)').'</b>', '');
41 41
     row2(
42 42
         tra('Key words').'<br><small>'.tra('Find teams with these words in their names or descriptions').'</small>',
43
-        '<input class="form-control" type="text" name="keywords" value="' . htmlspecialchars($params->keywords) . '">');
43
+        '<input class="form-control" type="text" name="keywords" value="'.htmlspecialchars($params->keywords).'">');
44 44
     row2_init(tra('Country'), '');
45 45
     echo '<select class="form-control" name="country"><option value="" selected>---</option>';
46 46
     $country = $params->country;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     echo country_select_options($country);
49 49
     echo "</select></td></tr>\n";
50 50
     row2(tra('Type of team'), team_type_select($params->type, true));
51
-    $checked = $params->active?"checked":"";
51
+    $checked = $params->active ? "checked" : "";
52 52
     row2(tra('Show only active teams'), "<input type=checkbox name=active $checked>");
53 53
     row2("", "<input class=\"btn btn-primary\" type=submit name=submit value=\"".tra('Search')."\">");
54 54
     end_table();
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     row2("Created", date_str($team->create_time));
97 97
     if (defined("SHOW_NONVALIDATED_TEAMS")) {
98 98
         $founder = $team->founder;
99
-        row2("Founder email validated", $founder->email_validated?"Yes":"No (team will not be exported)");
99
+        row2("Founder email validated", $founder->email_validated ? "Yes" : "No (team will not be exported)");
100 100
     }
101 101
     if (strlen($team->url)) {;
102 102
         if (strstr($team->url, "http://")) {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     }
170 170
     row1(tra('Members'));
171 171
     row2(tra('Founder'),
172
-        $team->founder?user_links($team->founder, BADGE_HEIGHT_MEDIUM):"---"
172
+        $team->founder ?user_links($team->founder, BADGE_HEIGHT_MEDIUM) : "---"
173 173
     );
174 174
     if (count($team->admins)) {
175 175
         $first = true;
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     foreach ($deltas as $delta) {
355 355
         $u = BoincUser::lookup_id($delta->userid);
356 356
         if ($u->teamid == $teamid) {
357
-            $new_members[] = $u;  // they might have later quit
357
+            $new_members[] = $u; // they might have later quit
358 358
         }
359 359
     }
360 360
     return array_unique($new_members);
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     if (!$user->teamid) return;
437 437
     $user->update("teamid=0");
438 438
     $team = BoincTeam::lookup_id($user->teamid);
439
-    if ($team && $team->ping_user==$user->id) {
439
+    if ($team && $team->ping_user == $user->id) {
440 440
         $team->update("ping_user=-ping_user");
441 441
     }
442 442
     BoincTeamAdmin::delete("teamid=$user->teamid and userid=$user->id");
@@ -475,34 +475,34 @@  discard block
 block discarded – undo
475 475
     start_table();
476 476
     row2(tra('Team name, text version').'
477 477
         <br><p class=\"text-muted\">'.tra('Don\'t use HTML tags.').'</p>',
478
-        '<input class="form-control" name="name" type="text" size="50" value="'.($team?$team->name:"").'">'
478
+        '<input class="form-control" name="name" type="text" size="50" value="'.($team ? $team->name : "").'">'
479 479
     );
480 480
     row2(tra('Team name, HTML version').'
481 481
         <br><p class=\"text-muted\">
482 482
         '.tra('You may use %1 limited HTML tags %2.', '<a href="html.php" target="_new">', '</a>').'
483 483
         '.tra('If you don\'t know HTML, leave this box blank.').'</p>',
484
-        '<input class="form-control" name="name_html" type="text" size="50" value="'.str_replace('"',"'",($team?$team->name_html:"")).'">'
484
+        '<input class="form-control" name="name_html" type="text" size="50" value="'.str_replace('"', "'", ($team ? $team->name_html : "")).'">'
485 485
     );
486 486
     row2(tra('URL of team web page, if any').':<br><font size=-2>('.tra('without "http://"').')
487 487
         '.tra('This URL will be linked to from the team\'s page on this site.'),
488
-        '<input class="form-control" type="text" name="url" size="60" value="'.($team?$team->url:"").'">'
488
+        '<input class="form-control" type="text" name="url" size="60" value="'.($team ? $team->url : "").'">'
489 489
     );
490 490
     row2(tra('Description of team').':
491 491
         <br><p class=\"text-muted\">
492 492
         '.tra('You may use %1 limited HTML tags %2.', '<a href="html.php" target="_new">', '</a>').'
493 493
         </p>',
494
-        '<textarea class="form-control" name="description" rows=10>'.($team?$team->description:"").'</textarea>'
494
+        '<textarea class="form-control" name="description" rows=10>'.($team ? $team->description : "").'</textarea>'
495 495
     );
496 496
 
497
-    row2(tra('Type of team').':', team_type_select($team?$team->type:null));
497
+    row2(tra('Type of team').':', team_type_select($team ? $team->type : null));
498 498
 
499 499
     row2_init(tra('Country'),
500 500
         '<select class="form-control" name="country">'
501 501
     );
502
-    echo country_select_options($team?$team->country:null);
502
+    echo country_select_options($team ? $team->country : null);
503 503
 
504 504
     echo "</select></td></tr>\n";
505
-    $x = (!$team || $team->joinable)?"checked":"";
505
+    $x = (!$team || $team->joinable) ? "checked" : "";
506 506
     row2(tra("Accept new members?"), "<input type=checkbox name=joinable $x>");
507 507
     // Check if we're using reCaptcha to prevent spam accounts
508 508
     //
@@ -566,12 +566,12 @@  discard block
 block discarded – undo
566 566
 //
567 567
 function new_transfer_request_ok($team, $now) {
568 568
     if ($team->ping_user <= 0) {
569
-        if ($team->ping_time < $now - 60 * 86400) {
569
+        if ($team->ping_time < $now - 60*86400) {
570 570
             return true;
571 571
         }
572 572
         return false;
573 573
     }
574
-    if ($team->ping_time < $now - 90 * 86400) {
574
+    if ($team->ping_time < $now - 90*86400) {
575 575
         return true;
576 576
     }
577 577
     return false;
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
     if (!is_valid_country($country)) {
607 607
         $country = tra('None');
608 608
     }
609
-    $country = BoincDb::escape_string($country);  // for Cote d'Ivoire
609
+    $country = BoincDb::escape_string($country); // for Cote d'Ivoire
610 610
 
611 611
     $clause = sprintf(
612 612
         "(userid, create_time, name, name_lc, url, type, name_html, description, country, nusers, expavg_time) values(%d, %d, '%s', '%s', '%s', %d, '%s', '%s', '%s', %d, unix_timestamp())",
@@ -629,6 +629,6 @@  discard block
 block discarded – undo
629 629
     }
630 630
 }
631 631
 
632
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
632
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
633 633
 
634 634
 ?>
Please login to merge, or discard this patch.