@@ -27,74 +27,74 @@ |
||
27 | 27 | define('BATCH_STATE_RETIRED', 4); |
28 | 28 | |
29 | 29 | define('ANON_PLATFORM_UNKNOWN', -1); |
30 | -define('ANON_PLATFORM_CPU', -2); |
|
31 | -define('ANON_PLATFORM_NVIDIA', -3); |
|
32 | -define('ANON_PLATFORM_ATI', -4); |
|
33 | -define('ANON_PLATFORM_INTEL_GPU', -5); |
|
34 | -define('ANON_PLATFORM_APPLE_GPU', -6); |
|
30 | +define('ANON_PLATFORM_CPU', -2); |
|
31 | +define('ANON_PLATFORM_NVIDIA', -3); |
|
32 | +define('ANON_PLATFORM_ATI', -4); |
|
33 | +define('ANON_PLATFORM_INTEL_GPU', -5); |
|
34 | +define('ANON_PLATFORM_APPLE_GPU', -6); |
|
35 | 35 | |
36 | -define('RESULT_SERVER_STATE_INACTIVE', 1); |
|
37 | -define('RESULT_SERVER_STATE_UNSENT', 2); |
|
38 | -define('RESULT_SERVER_STATE_IN_PROGRESS', 4); |
|
39 | -define('RESULT_SERVER_STATE_OVER', 5); |
|
36 | +define('RESULT_SERVER_STATE_INACTIVE', 1); |
|
37 | +define('RESULT_SERVER_STATE_UNSENT', 2); |
|
38 | +define('RESULT_SERVER_STATE_IN_PROGRESS', 4); |
|
39 | +define('RESULT_SERVER_STATE_OVER', 5); |
|
40 | 40 | |
41 | -define('RESULT_OUTCOME_INIT', 0); |
|
42 | -define('RESULT_OUTCOME_SUCCESS', 1); |
|
43 | -define('RESULT_OUTCOME_COULDNT_SEND', 2); |
|
44 | -define('RESULT_OUTCOME_CLIENT_ERROR', 3); |
|
45 | -define('RESULT_OUTCOME_NO_REPLY', 4); |
|
46 | -define('RESULT_OUTCOME_DIDNT_NEED', 5); |
|
47 | -define('RESULT_OUTCOME_VALIDATE_ERROR', 6); |
|
48 | -define('RESULT_OUTCOME_CLIENT_DETACHED', 7); |
|
41 | +define('RESULT_OUTCOME_INIT', 0); |
|
42 | +define('RESULT_OUTCOME_SUCCESS', 1); |
|
43 | +define('RESULT_OUTCOME_COULDNT_SEND', 2); |
|
44 | +define('RESULT_OUTCOME_CLIENT_ERROR', 3); |
|
45 | +define('RESULT_OUTCOME_NO_REPLY', 4); |
|
46 | +define('RESULT_OUTCOME_DIDNT_NEED', 5); |
|
47 | +define('RESULT_OUTCOME_VALIDATE_ERROR', 6); |
|
48 | +define('RESULT_OUTCOME_CLIENT_DETACHED', 7); |
|
49 | 49 | |
50 | -define('VALIDATE_STATE_INIT', 0); |
|
51 | -define('VALIDATE_STATE_VALID', 1); |
|
52 | -define('VALIDATE_STATE_INVALID', 2); |
|
53 | -define('VALIDATE_STATE_NO_CHECK', 3); |
|
54 | -define('VALIDATE_STATE_INCONCLUSIVE',4); |
|
55 | -define('VALIDATE_STATE_TOO_LATE', 5); |
|
50 | +define('VALIDATE_STATE_INIT', 0); |
|
51 | +define('VALIDATE_STATE_VALID', 1); |
|
52 | +define('VALIDATE_STATE_INVALID', 2); |
|
53 | +define('VALIDATE_STATE_NO_CHECK', 3); |
|
54 | +define('VALIDATE_STATE_INCONCLUSIVE', 4); |
|
55 | +define('VALIDATE_STATE_TOO_LATE', 5); |
|
56 | 56 | |
57 | -define('WU_ERROR_COULDNT_SEND_RESULT', 1); |
|
58 | -define('WU_ERROR_TOO_MANY_ERROR_RESULTS', 2); |
|
59 | -define('WU_ERROR_TOO_MANY_SUCCESS_RESULTS', 4); |
|
60 | -define('WU_ERROR_TOO_MANY_TOTAL_RESULTS', 8); |
|
61 | -define('WU_ERROR_CANCELLED', 16); |
|
62 | -define('WU_ERROR_NO_CANONICAL_RESULT', 32); |
|
57 | +define('WU_ERROR_COULDNT_SEND_RESULT', 1); |
|
58 | +define('WU_ERROR_TOO_MANY_ERROR_RESULTS', 2); |
|
59 | +define('WU_ERROR_TOO_MANY_SUCCESS_RESULTS', 4); |
|
60 | +define('WU_ERROR_TOO_MANY_TOTAL_RESULTS', 8); |
|
61 | +define('WU_ERROR_CANCELLED', 16); |
|
62 | +define('WU_ERROR_NO_CANONICAL_RESULT', 32); |
|
63 | 63 | |
64 | -define('FILE_DELETE_INIT', 0); |
|
65 | -define('FILE_DELETE_READY', 1); |
|
66 | -define('FILE_DELETE_DONE', 2); |
|
67 | -define('FILE_DELETE_ERROR', 3); |
|
64 | +define('FILE_DELETE_INIT', 0); |
|
65 | +define('FILE_DELETE_READY', 1); |
|
66 | +define('FILE_DELETE_DONE', 2); |
|
67 | +define('FILE_DELETE_ERROR', 3); |
|
68 | 68 | |
69 | -define('ASSIMILATE_INIT', 0); |
|
70 | -define('ASSIMILATE_READY', 1); |
|
71 | -define('ASSIMILATE_DONE', 2); |
|
69 | +define('ASSIMILATE_INIT', 0); |
|
70 | +define('ASSIMILATE_READY', 1); |
|
71 | +define('ASSIMILATE_DONE', 2); |
|
72 | 72 | |
73 | 73 | // from lib/common_defs.h |
74 | 74 | // |
75 | -define('RESULT_NEW', 0); |
|
76 | -define('RESULT_FILES_DOWNLOADING', 1); |
|
77 | -define('RESULT_FILES_DOWNLOADED', 2); |
|
78 | -define('RESULT_COMPUTE_ERROR', 3); |
|
79 | -define('RESULT_FILES_UPLOADING', 4); |
|
80 | -define('RESULT_FILES_UPLOADED', 5); |
|
81 | -define('RESULT_ABORTED', 6); |
|
82 | -define('RESULT_UPLOAD_FAILED', 7); |
|
75 | +define('RESULT_NEW', 0); |
|
76 | +define('RESULT_FILES_DOWNLOADING', 1); |
|
77 | +define('RESULT_FILES_DOWNLOADED', 2); |
|
78 | +define('RESULT_COMPUTE_ERROR', 3); |
|
79 | +define('RESULT_FILES_UPLOADING', 4); |
|
80 | +define('RESULT_FILES_UPLOADED', 5); |
|
81 | +define('RESULT_ABORTED', 6); |
|
82 | +define('RESULT_UPLOAD_FAILED', 7); |
|
83 | 83 | |
84 | 84 | // from lib/error_numbers.h |
85 | 85 | // returned by some web RPCs |
86 | 86 | // |
87 | -define('ERR_XML_PARSE', -112); |
|
88 | -define('ERR_DB_NOT_FOUND', -136); |
|
89 | -define('ERR_DB_NOT_UNIQUE', -137); |
|
90 | -define('ERR_DB_CANT_CONNECT', -138); |
|
91 | -define('ERR_PROJECT_DOWN', -183); |
|
92 | -define('ERR_BAD_USER_NAME', -188); |
|
93 | -define('ERR_NO_OPTION', -191); |
|
94 | -define('ERR_BAD_EMAIL_ADDR', -205); |
|
95 | -define('ERR_BAD_PASSWD', -206); |
|
96 | -define('ERR_ACCT_CREATION_DISABLED', -208); |
|
97 | -define('ERR_ATTACH_FAIL_INIT', -209); |
|
98 | -define('ERR_ATTACH_FAIL_DOWNLOAD', -210); |
|
99 | -define('ERR_ACCT_REQUIRE_CONSENT', -242); |
|
87 | +define('ERR_XML_PARSE', -112); |
|
88 | +define('ERR_DB_NOT_FOUND', -136); |
|
89 | +define('ERR_DB_NOT_UNIQUE', -137); |
|
90 | +define('ERR_DB_CANT_CONNECT', -138); |
|
91 | +define('ERR_PROJECT_DOWN', -183); |
|
92 | +define('ERR_BAD_USER_NAME', -188); |
|
93 | +define('ERR_NO_OPTION', -191); |
|
94 | +define('ERR_BAD_EMAIL_ADDR', -205); |
|
95 | +define('ERR_BAD_PASSWD', -206); |
|
96 | +define('ERR_ACCT_CREATION_DISABLED', -208); |
|
97 | +define('ERR_ATTACH_FAIL_INIT', -209); |
|
98 | +define('ERR_ATTACH_FAIL_DOWNLOAD', -210); |
|
99 | +define('ERR_ACCT_REQUIRE_CONSENT', -242); |
|
100 | 100 | ?> |
@@ -34,26 +34,26 @@ |
||
34 | 34 | $intel_gpu_credit_sum = 0; |
35 | 35 | $apple_gpu_scale_sum = 0; |
36 | 36 | $apple_gpu_credit_sum = 0; |
37 | -$total_credit_sum= 0; |
|
37 | +$total_credit_sum = 0; |
|
38 | 38 | |
39 | 39 | $apps = BoincApp::enum("deprecated=0"); |
40 | 40 | foreach ($apps as $app) { |
41 | 41 | $avs = BoincAppVersion::enum("appid=$app->id and deprecated=0"); |
42 | 42 | foreach ($avs as $av) { |
43 | 43 | if (strstr($av->plan_class, "ati")) { |
44 | - $ati_scale_sum += $av->pfc_scale * $av->expavg_credit; |
|
44 | + $ati_scale_sum += $av->pfc_scale*$av->expavg_credit; |
|
45 | 45 | $ati_credit_sum += $av->expavg_credit; |
46 | 46 | } else if (strstr($av->plan_class, "nvidia") || strstr($av->plan_class, "cuda")) { |
47 | - $nvidia_scale_sum += $av->pfc_scale * $av->expavg_credit; |
|
47 | + $nvidia_scale_sum += $av->pfc_scale*$av->expavg_credit; |
|
48 | 48 | $nvidia_credit_sum += $av->expavg_credit; |
49 | 49 | } else if (strstr($av->plan_class, "intel_gpu")) { |
50 | - $intel_gpu_scale_sum += $av->pfc_scale * $av->expavg_credit; |
|
50 | + $intel_gpu_scale_sum += $av->pfc_scale*$av->expavg_credit; |
|
51 | 51 | $intel_gpu_credit_sum += $av->expavg_credit; |
52 | 52 | } else if (strstr($av->plan_class, "apple_gpu")) { |
53 | - $apple_gpu_scale_sum += $av->pfc_scale * $av->expavg_credit; |
|
53 | + $apple_gpu_scale_sum += $av->pfc_scale*$av->expavg_credit; |
|
54 | 54 | $apple_gpu_credit_sum += $av->expavg_credit; |
55 | 55 | } else { |
56 | - $cpu_scale_sum += $av->pfc_scale * $av->expavg_credit; |
|
56 | + $cpu_scale_sum += $av->pfc_scale*$av->expavg_credit; |
|
57 | 57 | $cpu_credit_sum += $av->expavg_credit; |
58 | 58 | } |
59 | 59 | $total_credit_sum += $av->expavg_credit; |
@@ -141,12 +141,12 @@ discard block |
||
141 | 141 | // prefix for links; needed for pages not in top dir |
142 | 142 | $user, |
143 | 143 | // logged-in user, if any |
144 | - $fixed=false, |
|
144 | + $fixed = false, |
|
145 | 145 | // if true, navbar is fixed at top of page. |
146 | 146 | // NOTE: if you do this, you must set a global var $fixed_navbar |
147 | 147 | // to true at compile time |
148 | 148 | // (it needs to be set when page_head() is called). |
149 | - $inverse=false |
|
149 | + $inverse = false |
|
150 | 150 | // white on black? |
151 | 151 | ) { |
152 | 152 | global $master_url; |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | // output a panel. |
215 | 215 | // $content_func is a function that generates the panel contents |
216 | 216 | // |
217 | -function panel($title, $content_func, $class="panel-primary", $body_class="") { |
|
217 | +function panel($title, $content_func, $class = "panel-primary", $body_class = "") { |
|
218 | 218 | echo sprintf('<div class="panel %s"> |
219 | 219 | ', $class |
220 | 220 | ); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | // $left_width is the width of left column in 1/12 units. |
242 | 242 | // $arg is passed to the functions. |
243 | 243 | // |
244 | -function grid($top_func, $left_func, $right_func, $left_width=6, $arg=null) { |
|
244 | +function grid($top_func, $left_func, $right_func, $left_width = 6, $arg = null) { |
|
245 | 245 | echo ' |
246 | 246 | <div class="container-fluid"> |
247 | 247 | '; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | </div> |
257 | 257 | '; |
258 | 258 | } |
259 | - $right_width = 12-$left_width; |
|
259 | + $right_width = 12 - $left_width; |
|
260 | 260 | echo ' |
261 | 261 | <div class="row"> |
262 | 262 | <div class="col-sm-'.$left_width.'"> |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | // use extra = "name=x" |
281 | 281 | // call forum_focus(x, foo) after defining the field |
282 | 282 | // |
283 | -function form_start($action, $method='get', $extra='') { |
|
283 | +function form_start($action, $method = 'get', $extra = '') { |
|
284 | 284 | echo sprintf( |
285 | 285 | '<div class="container-fluid"> |
286 | 286 | <form class="form-horizontal" method="%s" action="%s" %s>' |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | // just the input field |
313 | 313 | // |
314 | 314 | function form_input_text_field( |
315 | - $name, $value='', $type='text', $attrs='', $extra='' |
|
315 | + $name, $value = '', $type = 'text', $attrs = '', $extra = '' |
|
316 | 316 | ) { |
317 | 317 | return sprintf( |
318 | 318 | '<input %s type="%s" class="form-control" name="%s" value="%s">%s', |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | // the whole row |
324 | 324 | // |
325 | 325 | function form_input_text( |
326 | - $label, $name, $value='', $type='text', $attrs='', $extra='' |
|
326 | + $label, $name, $value = '', $type = 'text', $attrs = '', $extra = '' |
|
327 | 327 | ) { |
328 | 328 | echo sprintf(' |
329 | 329 | <div class="form-group"> |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | ); |
352 | 352 | } |
353 | 353 | |
354 | -function form_input_textarea($label, $name, $value='', $nrows=4) { |
|
354 | +function form_input_textarea($label, $name, $value = '', $nrows = 4) { |
|
355 | 355 | echo sprintf(' |
356 | 356 | <div class="form-group"> |
357 | 357 | <label align=right class="%s" for="%s">%s</label> |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | |
368 | 368 | // $items is either a string of <option> elements, or an array |
369 | 369 | // |
370 | -function form_select($label, $name, $items, $selected=null) { |
|
370 | +function form_select($label, $name, $items, $selected = null) { |
|
371 | 371 | echo sprintf(' |
372 | 372 | <div class="form-group"> |
373 | 373 | <label align=right class="%s" for="%s">%s</label> |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | foreach ($items as $i) { |
381 | 381 | echo sprintf( |
382 | 382 | '<option %s value=%s>%s</option>', |
383 | - ($i[0]==$selected)?'selected':'', |
|
383 | + ($i[0] == $selected) ? 'selected' : '', |
|
384 | 384 | $i[0], $i[1] |
385 | 385 | ); |
386 | 386 | } |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | // same, for multiple select. |
394 | 394 | // $selected, if non-null, is a list of selected values |
395 | 395 | // |
396 | -function form_select_multiple($label, $name, $items, $selected=null) { |
|
396 | +function form_select_multiple($label, $name, $items, $selected = null) { |
|
397 | 397 | echo sprintf(' |
398 | 398 | <div class="form-group"> |
399 | 399 | <label align=right class="%s" for="%s">%s</label> |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | foreach ($items as $i) { |
406 | 406 | echo sprintf( |
407 | 407 | '<option %s value=%s>%s</option>', |
408 | - ($selected && in_array($i[0], $selected))?'selected':'', |
|
408 | + ($selected && in_array($i[0], $selected)) ? 'selected' : '', |
|
409 | 409 | $i[0], $i[1] |
410 | 410 | ); |
411 | 411 | } |
@@ -414,12 +414,12 @@ discard block |
||
414 | 414 | |
415 | 415 | // return a list of string for checkbox items |
416 | 416 | // |
417 | -function checkbox_item_strings($items, $attrs='') { |
|
417 | +function checkbox_item_strings($items, $attrs = '') { |
|
418 | 418 | $x = []; |
419 | 419 | foreach ($items as $i) { |
420 | 420 | $x[] = sprintf('<input %s type="checkbox" name="%s" %s> %s |
421 | 421 | ', |
422 | - $attrs, $i[0], $i[2]?"checked":"", $i[1] |
|
422 | + $attrs, $i[0], $i[2] ? "checked" : "", $i[1] |
|
423 | 423 | ); |
424 | 424 | } |
425 | 425 | return $x; |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | |
428 | 428 | // $items is list of (name, label, checked) |
429 | 429 | // |
430 | -function form_checkboxes($label, $items, $attrs='') { |
|
430 | +function form_checkboxes($label, $items, $attrs = '') { |
|
431 | 431 | echo sprintf(' |
432 | 432 | <div class="form-group"> |
433 | 433 | <label align=right class="%s">%s</label> |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | FORM_LEFT_CLASS, $label, FORM_RIGHT_CLASS |
454 | 454 | ); |
455 | 455 | foreach ($items as $i) { |
456 | - $checked = ($selected == $i[0])?"checked":""; |
|
456 | + $checked = ($selected == $i[0]) ? "checked" : ""; |
|
457 | 457 | echo sprintf('<input type="radio" name="%s" value="%s" %s> %s <br> |
458 | 458 | ', |
459 | 459 | $name, $i[0], $checked, $i[1] |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | '; |
487 | 487 | } |
488 | 488 | |
489 | -function form_submit($text, $attrs='') { |
|
489 | +function form_submit($text, $attrs = '') { |
|
490 | 490 | form_general( |
491 | 491 | "", |
492 | 492 | sprintf('<button %s type="submit" class="btn btn-success">%s</button>', |
@@ -495,11 +495,11 @@ discard block |
||
495 | 495 | ); |
496 | 496 | } |
497 | 497 | |
498 | -function form_checkbox($label, $name, $checked=false) { |
|
498 | +function form_checkbox($label, $name, $checked = false) { |
|
499 | 499 | echo sprintf(' |
500 | 500 | <div class="form-group"> |
501 | 501 | <input type="checkbox" name="%s" %s> <span class="lead">%s</span> |
502 | 502 | </div> |
503 | - ', $name, $checked?"checked":"", $label |
|
503 | + ', $name, $checked ? "checked" : "", $label |
|
504 | 504 | ); |
505 | 505 | } |
@@ -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,33 +478,33 @@ 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 | echo '<select class="form-control" name="country">'; |
504 | - echo country_select_options($team?$team->country:null); |
|
504 | + echo country_select_options($team ? $team->country : null); |
|
505 | 505 | echo "</select></td></tr>\n"; |
506 | 506 | |
507 | - $x = (!$team || $team->joinable)?"checked":""; |
|
507 | + $x = (!$team || $team->joinable) ? "checked" : ""; |
|
508 | 508 | row2(tra("Accept new members?"), "<input type=checkbox name=joinable $x>"); |
509 | 509 | // Check if we're using reCaptcha to prevent spam accounts |
510 | 510 | // |
@@ -568,12 +568,12 @@ discard block |
||
568 | 568 | // |
569 | 569 | function new_transfer_request_ok($team, $now) { |
570 | 570 | if ($team->ping_user <= 0) { |
571 | - if ($team->ping_time < $now - 60 * 86400) { |
|
571 | + if ($team->ping_time < $now - 60*86400) { |
|
572 | 572 | return true; |
573 | 573 | } |
574 | 574 | return false; |
575 | 575 | } |
576 | - if ($team->ping_time < $now - 90 * 86400) { |
|
576 | + if ($team->ping_time < $now - 90*86400) { |
|
577 | 577 | return true; |
578 | 578 | } |
579 | 579 | return false; |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | if (!is_valid_country($country)) { |
609 | 609 | $country = tra('None'); |
610 | 610 | } |
611 | - $country = BoincDb::escape_string($country); // for Cote d'Ivoire |
|
611 | + $country = BoincDb::escape_string($country); // for Cote d'Ivoire |
|
612 | 612 | |
613 | 613 | $clause = sprintf( |
614 | 614 | "(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())", |
@@ -631,6 +631,6 @@ discard block |
||
631 | 631 | } |
632 | 632 | } |
633 | 633 | |
634 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
634 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
635 | 635 | |
636 | 636 | ?> |