aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Admin/Queue.php
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-09-05 21:00:00 -0700
committerredmatrix <mike@macgirvin.com>2016-09-05 21:00:00 -0700
commitdbb4ccbcc02325c79c1b660d4d636f8638e35e06 (patch)
tree05b84d7c9fcbe0b575c6a560e1ed165aca42aee8 /Zotlabs/Module/Admin/Queue.php
parented213c4d6da06e39fa4177030044395ae22783ac (diff)
downloadvolse-hubzilla-dbb4ccbcc02325c79c1b660d4d636f8638e35e06.tar.gz
volse-hubzilla-dbb4ccbcc02325c79c1b660d4d636f8638e35e06.tar.bz2
volse-hubzilla-dbb4ccbcc02325c79c1b660d4d636f8638e35e06.zip
move the rest of mod_admin to sub modules
Diffstat (limited to 'Zotlabs/Module/Admin/Queue.php')
-rw-r--r--Zotlabs/Module/Admin/Queue.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/Zotlabs/Module/Admin/Queue.php b/Zotlabs/Module/Admin/Queue.php
new file mode 100644
index 000000000..4986de925
--- /dev/null
+++ b/Zotlabs/Module/Admin/Queue.php
@@ -0,0 +1,54 @@
+<?php
+
+namespace Zotlabs\Module\Admin;
+
+
+
+class Queue {
+
+
+
+ function get() {
+
+ $o = '';
+
+ $expert = ((array_key_exists('expert',$_REQUEST)) ? intval($_REQUEST['expert']) : 0);
+
+ if($_REQUEST['drophub']) {
+ require_once('hubloc.php');
+ hubloc_mark_as_down($_REQUEST['drophub']);
+ remove_queue_by_posturl($_REQUEST['drophub']);
+ }
+
+ if($_REQUEST['emptyhub']) {
+ remove_queue_by_posturl($_REQUEST['emptyhub']);
+ }
+
+ $r = q("select count(outq_posturl) as total, max(outq_priority) as priority, outq_posturl from outq
+ where outq_delivered = 0 group by outq_posturl order by total desc");
+
+ for($x = 0; $x < count($r); $x ++) {
+ $r[$x]['eurl'] = urlencode($r[$x]['outq_posturl']);
+ $r[$x]['connected'] = datetime_convert('UTC',date_default_timezone_get(),$r[$x]['connected'],'Y-m-d');
+ }
+
+ $o = replace_macros(get_markup_template('admin_queue.tpl'), array(
+ '$banner' => t('Queue Statistics'),
+ '$numentries' => t('Total Entries'),
+ '$priority' => t('Priority'),
+ '$desturl' => t('Destination URL'),
+ '$nukehub' => t('Mark hub permanently offline'),
+ '$empty' => t('Empty queue for this hub'),
+ '$lastconn' => t('Last known contact'),
+ '$hasentries' => ((count($r)) ? true : false),
+ '$entries' => $r,
+ '$expert' => $expert
+ ));
+
+ return $o;
+ }
+
+
+
+
+} \ No newline at end of file