From 21b04c45822546a61b93d37f78b5d0cab21b0341 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 2 Feb 2013 03:36:25 +0000 Subject: Fix admin summary. --- mod/admin.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 13ecf7eef..93f003bf0 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -166,18 +166,22 @@ function admin_page_summary(&$a) { // list total user accounts, expirations etc. + $r = q("SELECT COUNT(account_id) as total FROM `account`"); + $users = $r[0]['total']; + $r = q("SELECT COUNT(id) as `count` FROM `register`"); $pending = $r[0]['count']; - - $r = q("select count(*) as total from deliverq where 1"); - $deliverq = (($r) ? $r[0]['total'] : 0); - $r = q("select count(*) as total from queue where 1"); +// We don't seem to do anything like this anymore. Comment out just in case. +// $r = q("select count(*) as total from deliverq where 1"); +// $deliverq = (($r) ? $r[0]['total'] : 0); + + $r = q("select count(*) as total from outq"); $queue = (($r) ? $r[0]['total'] : 0); // We can do better, but this is a quick queue status - - $queues = array( 'label' => t('Message queues'), 'deliverq' => $deliverq, 'queue' => $queue ); + + $queues = array( 'label' => t('Message queues'), 'queue' => $queue ); $t = get_markup_template("admin_summary.tpl"); -- cgit v1.2.3 From 1633f95db8a004055e51d1580fa4394527ca8a91 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 2 Feb 2013 14:54:40 +0000 Subject: Clean up no longer used admin functions, plus fix summary template. --- mod/admin.php | 17 ----------------- view/tpl/admin_summary.tpl | 2 +- view/tpl/smarty3/admin_summary.tpl | 2 +- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 93f003bf0..e411002e5 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -227,11 +227,6 @@ function admin_page_site_post(&$a){ $block_public = ((x($_POST,'block_public')) ? True : False); $force_publish = ((x($_POST,'publish_all')) ? True : False); $global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : ''); - $thread_allow = ((x($_POST,'thread_allow')) ? True : False); - $no_multi_reg = ((x($_POST,'no_multi_reg')) ? True : False); - $no_openid = !((x($_POST,'no_openid')) ? True : False); - $no_regfullname = !((x($_POST,'no_regfullname')) ? True : False); - $no_utf = !((x($_POST,'no_utf')) ? True : False); $no_community_page = !((x($_POST,'no_community_page')) ? True : False); $verifyssl = ((x($_POST,'verifyssl')) ? True : False); @@ -240,10 +235,6 @@ function admin_page_site_post(&$a){ $timeout = ((x($_POST,'timeout')) ? intval(trim($_POST['timeout'])) : 60); $delivery_interval = ((x($_POST,'delivery_interval'))? intval(trim($_POST['delivery_interval'])) : 0); $poll_interval = ((x($_POST,'poll_interval'))? intval(trim($_POST['poll_interval'])) : 0); - $maxloadavg = ((x($_POST,'maxloadavg')) ? intval(trim($_POST['maxloadavg'])) : 50); - $dfrn_only = ((x($_POST,'dfrn_only')) ? True : False); - $ostatus_disabled = !((x($_POST,'ostatus_disabled')) ? True : False); - $diaspora_enabled = ((x($_POST,'diaspora_enabled')) ? True : False); $ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0); /* if($ssl_policy != intval(get_config('system','ssl_policy'))) { @@ -318,20 +309,12 @@ function admin_page_site_post(&$a){ set_config('system','directory_submit_url', $global_directory); } - set_config('system','thread_allow', $thread_allow); - - set_config('system','block_extended_register', $no_multi_reg); - set_config('system','no_openid', $no_openid); - set_config('system','no_regfullname', $no_regfullname); set_config('system','no_community_page', $no_community_page); set_config('system','no_utf', $no_utf); set_config('system','verifyssl', $verifyssl); set_config('system','proxyuser', $proxyuser); set_config('system','proxy', $proxy); set_config('system','curl_timeout', $timeout); - set_config('system','dfrn_only', $dfrn_only); - set_config('system','ostatus_disabled', $ostatus_disabled); - set_config('system','diaspora_enabled', $diaspora_enabled); info( t('Site settings updated.') . EOL); goaway($a->get_baseurl(true) . '/admin/site' ); diff --git a/view/tpl/admin_summary.tpl b/view/tpl/admin_summary.tpl index 4efe1960c..99221c13e 100644 --- a/view/tpl/admin_summary.tpl +++ b/view/tpl/admin_summary.tpl @@ -3,7 +3,7 @@
$queues.label
-
$queues.deliverq - $queues.queue
+
$queues.queue
$pending.0
diff --git a/view/tpl/smarty3/admin_summary.tpl b/view/tpl/smarty3/admin_summary.tpl index b3b42a139..76ac23d29 100644 --- a/view/tpl/smarty3/admin_summary.tpl +++ b/view/tpl/smarty3/admin_summary.tpl @@ -8,7 +8,7 @@
{{$queues.label}}
-
{{$queues.deliverq}} - {{$queues.queue}}
+
{{$queues.queue}}
{{$pending.0}}
-- cgit v1.2.3 From 70dc7993be7a89c7809c74dc8606d071abf962d1 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 2 Feb 2013 15:00:13 +0000 Subject: We DO only have one queue for now. --- mod/admin.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index e411002e5..9a8a58cfc 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -172,10 +172,6 @@ function admin_page_summary(&$a) { $r = q("SELECT COUNT(id) as `count` FROM `register`"); $pending = $r[0]['count']; -// We don't seem to do anything like this anymore. Comment out just in case. -// $r = q("select count(*) as total from deliverq where 1"); -// $deliverq = (($r) ? $r[0]['total'] : 0); - $r = q("select count(*) as total from outq"); $queue = (($r) ? $r[0]['total'] : 0); -- cgit v1.2.3 From c4ca0f796ad84cbca037ca3cfe52f7dcb0aa413f Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 2 Feb 2013 16:28:10 +0000 Subject: Fix broken menu for multiple profiles. --- include/nav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nav.php b/include/nav.php index bbf803390..5490d6cd4 100644 --- a/include/nav.php +++ b/include/nav.php @@ -74,7 +74,7 @@ EOT; $nav['usermenu'][] = Array('channel/' . $channel['channel_address'], t('Status'), "", t('Your posts and conversations')); $nav['usermenu'][] = Array('profile/' . $channel['channel_address'], t('View Profile'), "", t('Your profile page')); if(feature_enabled(local_user(),'multi_profiles')) - $nav['usermenu'] = Array('profiles', t('Edit Profiles'),"", t('Manage/Edit Profiles')); + $nav['usermenu'][] = Array('profiles', t('Edit Profiles'),"", t('Manage/Edit Profiles')); $nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos')); // $nav['usermenu'][] = Array('events/', t('Events'), "", t('Your events')); -- cgit v1.2.3