Fix upcoming killme() in index.php change
- Add killme() in controllers instead of relying on index.php - Fix formatting
This commit is contained in:
parent
4601c4bd8a
commit
687eef90f7
|
@ -79,4 +79,6 @@ function directory_content(App $a)
|
|||
'results' => $r,
|
||||
'filter' => $forums ? 'forums' : '',
|
||||
));
|
||||
|
||||
killme();
|
||||
}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Directory\Rendering\View;
|
||||
|
||||
if (!function_exists('help_content')) {
|
||||
function help_content(&$a) {
|
||||
function help_content(&$a)
|
||||
{
|
||||
$view = new View('help');
|
||||
$view->output();
|
||||
}
|
||||
}
|
||||
|
||||
killme();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,4 +14,5 @@ function home_content(&$a) {
|
|||
'profiles' => $profiles
|
||||
));
|
||||
|
||||
killme();
|
||||
}}
|
||||
|
|
|
@ -94,4 +94,6 @@ function search_content(App $a)
|
|||
'filter' => $filter,
|
||||
'query' => x($_GET, 'query') ? $_GET['query'] : ''
|
||||
));
|
||||
|
||||
killme();
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ use Friendica\Directory\Rendering\View;
|
|||
|
||||
require_once 'include/site-health.php';
|
||||
|
||||
function servers_content(&$a) {
|
||||
|
||||
function servers_content(&$a)
|
||||
{
|
||||
$sites = array();
|
||||
|
||||
//Find the user count per site.
|
||||
|
@ -38,17 +38,20 @@ function servers_content(&$a) {
|
|||
arsort($sites_with_health);
|
||||
$total = 0;
|
||||
$public_sites = array();
|
||||
foreach($sites_with_health as $k => $v)
|
||||
{
|
||||
|
||||
foreach ($sites_with_health as $k => $v) {
|
||||
//Stop at unhealthy sites.
|
||||
$site = $site_healths[$k];
|
||||
|
||||
if($site['health_score'] <= 20) break;
|
||||
if ($site['health_score'] <= 20) {
|
||||
break;
|
||||
}
|
||||
|
||||
//Skip small sites.
|
||||
$users = $sites[$k];
|
||||
if($users < 5) continue;
|
||||
if ($users < 5) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//Add health score name and user count.
|
||||
$site['health_score_name'] = health_score_to_name($site['health_score']);
|
||||
|
@ -103,7 +106,6 @@ function servers_content(&$a) {
|
|||
|
||||
//Count the result.
|
||||
$total ++;
|
||||
|
||||
}
|
||||
|
||||
//In case we asked for a surprise, pick a random one from the top 10! :D
|
||||
|
@ -115,7 +117,6 @@ function servers_content(&$a) {
|
|||
exit;
|
||||
}
|
||||
|
||||
|
||||
//Show results.
|
||||
$view = new View('servers');
|
||||
|
||||
|
@ -124,4 +125,5 @@ function servers_content(&$a) {
|
|||
'sites' => $public_sites
|
||||
));
|
||||
|
||||
killme();
|
||||
}
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Directory\Rendering\View;
|
||||
|
||||
if (!function_exists('stats_content')) {
|
||||
function stats_content(&$a) {
|
||||
function stats_content(&$a)
|
||||
{
|
||||
$view = new View('stats');
|
||||
$view->output();
|
||||
|
||||
killme();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue