Fix yet more PHP Notices
This commit is contained in:
parent
783c15c207
commit
280d55f183
2 changed files with 29 additions and 27 deletions
|
@ -28,10 +28,12 @@ function servers_content(&$a) {
|
|||
$r = q("SELECT * FROM `site-health` WHERE `reg_policy`='REGISTER_OPEN' AND `ssl_state` = 1");
|
||||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
if (isset($sites[$rr['base_url']])) {
|
||||
$sites_with_health[$rr['base_url']] = (($sites[$rr['base_url']] / 100) + 10) * intval($rr['health_score']);
|
||||
$site_healths[$rr['base_url']] = $rr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
arsort($sites_with_health);
|
||||
$total = 0;
|
||||
|
@ -105,7 +107,7 @@ function servers_content(&$a) {
|
|||
}
|
||||
|
||||
//In case we asked for a surprise, pick a random one from the top 10! :D
|
||||
if($a->argv[1] == 'surprise'){
|
||||
if($a->argc > 1 && $a->argv[1] == 'surprise'){
|
||||
$max = min(count($public_sites), 10);
|
||||
$i = mt_rand(0, $max-1);
|
||||
$surpriseSite = $public_sites[$i];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<form action="/search" method="get" class="search-form">
|
||||
<div class="search-wrapper">
|
||||
<input class="search-field" type="text" name="query" placeholder="Search your friends" tabindex="1" value="<?php echo $query; ?>" />
|
||||
<input class="search-field" type="text" name="query" placeholder="Search your friends" tabindex="1" value="<?php echo isset($query)? $query : ''; ?>" />
|
||||
<input class="reset" type="reset" value="" tabindex="3" />
|
||||
<input class="search" type="submit" value="Search" tabindex="2" />
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue