aboutsummaryrefslogtreecommitdiffstats
path: root/mod/admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/admin.php')
-rw-r--r--mod/admin.php29
1 files changed, 11 insertions, 18 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 74abc0b34..794bac69b 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']);
@@ -299,11 +299,9 @@ function admin_page_site_post(&$a){
$poll_interval = ((x($_POST,'poll_interval')) ? intval(trim($_POST['poll_interval'])) : 0);
$maxloadavg = ((x($_POST,'maxloadavg')) ? intval(trim($_POST['maxloadavg'])) : 50);
$feed_contacts = ((x($_POST,'feed_contacts')) ? intval($_POST['feed_contacts']) : 0);
- $diaspora_enabled = ((x($_POST,'diaspora_enabled')) ? intval($_POST['diaspora_enabled']) : 0);
$verify_email = ((x($_POST,'verify_email')) ? 1 : 0);
set_config('system', 'feed_contacts', $feed_contacts);
- set_config('system', 'diaspora_enabled', $diaspora_enabled);
set_config('system', 'delivery_interval', $delivery_interval);
set_config('system', 'poll_interval', $poll_interval);
set_config('system', 'maxloadavg', $maxloadavg);
@@ -465,7 +463,6 @@ function admin_page_site(&$a) {
'$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices),
'$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile_theme'), t("Theme for mobile devices"), $theme_choices_mobile),
// '$site_channel' => array('site_channel', t("Channel to use for this website's static pages"), get_config('system','site_channel'), t("Site Channel")),
- '$diaspora_enabled' => array('diaspora_enabled',t('Enable Diaspora Protocol'), get_config('system','diaspora_enabled'), t('Communicate with Diaspora and Friendica - experimental')),
'$feed_contacts' => array('feed_contacts', t('Allow Feeds as Connections'),get_config('system','feed_contacts'),t('(Heavy system resource usage)')),
'$maximagesize' => array('maximagesize', t("Maximum image size"), intval(get_config('system','maximagesize')), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")),
'$register_policy' => array('register_policy', t("Does this site allow new member registration?"), get_config('system','register_policy'), "", $register_choices),
@@ -786,11 +783,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 +944,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 +952,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 +1470,4 @@ function admin_page_profs(&$a) {
'$submit' => t('Save')
));
}
-} \ No newline at end of file
+}