Adding site-health and noscrape support.
This commit is contained in:
parent
1bac9fb268
commit
a69a9d2278
15 changed files with 1025 additions and 61 deletions
24
mod/versions.php
Normal file
24
mod/versions.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
function versions_content(&$a){
|
||||
|
||||
$sites = array();
|
||||
|
||||
//Grab a version list.
|
||||
$versions = '';
|
||||
$r = q("SELECT count(*) as `count`, `version` FROM `site-health` WHERE `version` IS NOT NULL GROUP BY `version` ORDER BY `version` DESC");
|
||||
if(count($r)){
|
||||
foreach($r as $version){
|
||||
$versions .=
|
||||
($version['count'] >= 10 ? '<b>' : '').
|
||||
$version['version'] . ' ('.$version['count'].')<br>'."\r\n".
|
||||
($version['count'] >= 10 ? '</b>' : '');
|
||||
}
|
||||
}
|
||||
|
||||
$tpl .= file_get_contents('view/versions.tpl');
|
||||
return replace_macros($tpl, array(
|
||||
'$versions' => $versions
|
||||
));
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue