diff options
Diffstat (limited to 'mod/admin.php')
-rw-r--r-- | mod/admin.php | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/mod/admin.php b/mod/admin.php index 74abc0b34..3b8cd2a95 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1,7 +1,7 @@ <?php /** * @file mod/admin.php - * @brief RedMatrix's admin controller. + * @brief Hubzilla's admin controller. * * Controller for the /admin/ area. */ @@ -89,6 +89,7 @@ function admin_content(&$a) { */ // array( url, name, extra css classes ) + $aside = array( 'site' => array($a->get_baseurl(true)."/admin/site/", t("Site") , "site"), 'users' => array($a->get_baseurl(true)."/admin/users/", t("Accounts") , "users"), @@ -99,6 +100,7 @@ function admin_content(&$a) { // 'hubloc' => array($a->get_baseurl(true)."/admin/hubloc/", t("Server") , "server"), 'profs' => array(z_root() . '/admin/profs', t('Profile Config'), 'profs'), 'dbsync' => array($a->get_baseurl(true)."/admin/dbsync/", t('DB updates'), "dbsync") + ); /* get plugins admin page */ @@ -148,9 +150,9 @@ function admin_content(&$a) { case 'themes': $o = admin_page_themes($a); break; - case 'hubloc': - $o = admin_page_hubloc($a); - break; +// case 'hubloc': +// $o = admin_page_hubloc($a); +// break; case 'logs': $o = admin_page_logs($a); break; @@ -209,9 +211,7 @@ function admin_page_summary(&$a) { // available channels, primary and clones $channels = array(); - $r = q("SELECT COUNT(*) AS total, COUNT(CASE WHEN channel_primary = 1 THEN 1 ELSE NULL END) AS main, COUNT(CASE WHEN channel_primary = 0 THEN 1 ELSE NULL END) AS clones FROM channel WHERE NOT (channel_pageflags & %d)>0", - intval(PAGE_REMOVED) - ); + $r = q("SELECT COUNT(*) AS total, COUNT(CASE WHEN channel_primary = 1 THEN 1 ELSE NULL END) AS main, COUNT(CASE WHEN channel_primary = 0 THEN 1 ELSE NULL END) AS clones FROM channel WHERE channel_removed = 0"); if ($r) { $channels['total'] = array('label' => t('# Channels'), 'val' => $r[0]['total']); $channels['main'] = array('label' => t('# primary'), 'val' => $r[0]['main']); @@ -786,11 +786,10 @@ function admin_page_users(&$a){ $users = q("SELECT `account_id` , `account_email`, `account_lastlog`, `account_created`, `account_expires`, " . "`account_service_class`, ( account_flags & %d )>0 as `blocked`, " . "(SELECT %s FROM channel as ch " . - "WHERE ch.channel_account_id = ac.account_id and not (ch.channel_pageflags & %d )>0) as `channels` " . + "WHERE ch.channel_account_id = ac.account_id and ch.channel_removed = 0 ) as `channels` " . "FROM account as ac where true $serviceclass $order limit %d offset %d ", intval(ACCOUNT_BLOCKED), db_concat('ch.channel_address', ' '), - intval(PAGE_REMOVED), intval($a->pager['itemspage']), intval($a->pager['start']) ); @@ -948,9 +947,7 @@ function admin_page_channels(&$a){ /* get channels */ - $total = q("SELECT count(*) as total FROM channel where not (channel_pageflags & %d)>0", - intval(PAGE_REMOVED|PAGE_SYSTEM) - ); + $total = q("SELECT count(*) as total FROM channel where channel_removed = 0 and channel_system = 0"); if($total) { $a->set_pager_total($total[0]['total']); $a->set_pager_itemspage(100); @@ -958,8 +955,7 @@ function admin_page_channels(&$a){ $order = " order by channel_name asc "; - $channels = q("SELECT * from channel where not ( channel_pageflags & %d )>0 $order limit %d offset %d ", - intval(PAGE_REMOVED|PAGE_SYSTEM), + $channels = q("SELECT * from channel where channel_removed = 0 and channel_system = 0 $order limit %d offset %d ", intval($a->pager['itemspage']), intval($a->pager['start']) ); @@ -1477,4 +1473,4 @@ function admin_page_profs(&$a) { '$submit' => t('Save') )); } -}
\ No newline at end of file +} |