@@ -40,7 +40,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | foreach ($deltas as $delta) { |
357 | 357 | $u = BoincUser::lookup_id($delta->userid); |
358 | 358 | if ($u->teamid == $teamid) { |
359 | - $new_members[] = $u->id; // they might have later quit |
|
359 | + $new_members[] = $u->id; // they might have later quit |
|
360 | 360 | } |
361 | 361 | } |
362 | 362 | return array_unique($new_members); |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | if (!$user->teamid) return; |
440 | 440 | $user->update("teamid=0"); |
441 | 441 | $team = BoincTeam::lookup_id($user->teamid); |
442 | - if ($team && $team->ping_user==$user->id) { |
|
442 | + if ($team && $team->ping_user == $user->id) { |
|
443 | 443 | $team->update("ping_user=-ping_user"); |
444 | 444 | } |
445 | 445 | BoincTeamAdmin::delete("teamid=$user->teamid and userid=$user->id"); |
@@ -478,34 +478,34 @@ discard block |
||
478 | 478 | start_table(); |
479 | 479 | row2(tra('Team name, text version').' |
480 | 480 | <br><p class=\"text-muted\">'.tra('Don\'t use HTML tags.').'</p>', |
481 | - '<input class="form-control" name="name" type="text" size="50" value="'.($team?$team->name:"").'">' |
|
481 | + '<input class="form-control" name="name" type="text" size="50" value="'.($team ? $team->name : "").'">' |
|
482 | 482 | ); |
483 | 483 | row2(tra('Team name, HTML version').' |
484 | 484 | <br><p class=\"text-muted\"> |
485 | 485 | '.tra('You may use %1 limited HTML tags %2.', '<a href="html.php" target="_new">', '</a>').' |
486 | 486 | '.tra('If you don\'t know HTML, leave this box blank.').'</p>', |
487 | - '<input class="form-control" name="name_html" type="text" size="50" value="'.str_replace('"',"'",($team?$team->name_html:"")).'">' |
|
487 | + '<input class="form-control" name="name_html" type="text" size="50" value="'.str_replace('"', "'", ($team ? $team->name_html : "")).'">' |
|
488 | 488 | ); |
489 | 489 | row2(tra('URL of team web page, if any').':<br><font size=-2>('.tra('without "http://"').') |
490 | 490 | '.tra('This URL will be linked to from the team\'s page on this site.'), |
491 | - '<input class="form-control" type="text" name="url" size="60" value="'.($team?$team->url:"").'">' |
|
491 | + '<input class="form-control" type="text" name="url" size="60" value="'.($team ? $team->url : "").'">' |
|
492 | 492 | ); |
493 | 493 | row2(tra('Description of team').': |
494 | 494 | <br><p class=\"text-muted\"> |
495 | 495 | '.tra('You may use %1 limited HTML tags %2.', '<a href="html.php" target="_new">', '</a>').' |
496 | 496 | </p>', |
497 | - '<textarea class="form-control" name="description" rows=10>'.($team?$team->description:"").'</textarea>' |
|
497 | + '<textarea class="form-control" name="description" rows=10>'.($team ? $team->description : "").'</textarea>' |
|
498 | 498 | ); |
499 | 499 | |
500 | - row2(tra('Type of team').':', team_type_select($team?$team->type:null)); |
|
500 | + row2(tra('Type of team').':', team_type_select($team ? $team->type : null)); |
|
501 | 501 | |
502 | 502 | row2_init(tra('Country'), |
503 | 503 | '<select class="form-control" name="country">' |
504 | 504 | ); |
505 | - echo country_select_options($team?$team->country:null); |
|
505 | + echo country_select_options($team ? $team->country : null); |
|
506 | 506 | |
507 | 507 | echo "</select></td></tr>\n"; |
508 | - $x = (!$team || $team->joinable)?"checked":""; |
|
508 | + $x = (!$team || $team->joinable) ? "checked" : ""; |
|
509 | 509 | row2(tra("Accept new members?"), "<input type=checkbox name=joinable $x>"); |
510 | 510 | // Check if we're using reCaptcha to prevent spam accounts |
511 | 511 | // |
@@ -569,12 +569,12 @@ discard block |
||
569 | 569 | // |
570 | 570 | function new_transfer_request_ok($team, $now) { |
571 | 571 | if ($team->ping_user <= 0) { |
572 | - if ($team->ping_time < $now - 60 * 86400) { |
|
572 | + if ($team->ping_time < $now - 60*86400) { |
|
573 | 573 | return true; |
574 | 574 | } |
575 | 575 | return false; |
576 | 576 | } |
577 | - if ($team->ping_time < $now - 90 * 86400) { |
|
577 | + if ($team->ping_time < $now - 90*86400) { |
|
578 | 578 | return true; |
579 | 579 | } |
580 | 580 | return false; |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | if (!is_valid_country($country)) { |
610 | 610 | $country = tra('None'); |
611 | 611 | } |
612 | - $country = BoincDb::escape_string($country); // for Cote d'Ivoire |
|
612 | + $country = BoincDb::escape_string($country); // for Cote d'Ivoire |
|
613 | 613 | |
614 | 614 | $clause = sprintf( |
615 | 615 | "(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())", |
@@ -632,6 +632,6 @@ discard block |
||
632 | 632 | } |
633 | 633 | } |
634 | 634 | |
635 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
635 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
636 | 636 | |
637 | 637 | ?> |