aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-03-19 16:17:19 -0700
committerredmatrix <git@macgirvin.com>2016-03-19 16:17:19 -0700
commit77094f8d2bffa70c9e95518b9883f8752304102c (patch)
treeb05a4693bae8bc99ef503ba438274b24ee0eca6f /include
parent51cd4e8519ef97f348013320e612811f9da1ad0e (diff)
downloadvolse-hubzilla-77094f8d2bffa70c9e95518b9883f8752304102c.tar.gz
volse-hubzilla-77094f8d2bffa70c9e95518b9883f8752304102c.tar.bz2
volse-hubzilla-77094f8d2bffa70c9e95518b9883f8752304102c.zip
make the admin side menu extensible and provide a hook for a channel "move" operation that federation plugins might use to re-establish connections after a channel move.
Diffstat (limited to 'include')
-rw-r--r--include/widgets.php15
-rw-r--r--include/zot.php6
2 files changed, 16 insertions, 5 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 65c745a05..deb514915 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -1314,7 +1314,7 @@ function widget_admin($arr) {
$aside = array(
'site' => array(z_root() . '/admin/site/', t('Site'), 'site'),
- 'users' => array(z_root() . '/admin/users/', t('Accounts'), 'users'),
+ 'users' => array(z_root() . '/admin/users/', t('Accounts'), 'users', 'pending-update', t('Member registrations waiting for confirmation')),
'channels' => array(z_root() . '/admin/channels/', t('Channels'), 'channels'),
'security' => array(z_root() . '/admin/security/', t('Security'), 'security'),
'features' => array(z_root() . '/admin/features/', t('Features'), 'features'),
@@ -1330,24 +1330,29 @@ function widget_admin($arr) {
$r = q("SELECT * FROM addon WHERE plugin_admin = 1");
- $aside['plugins_admin'] = array();
+ $plugins = array();
if($r) {
foreach ($r as $h){
$plugin = $h['name'];
- $aside['plugins_admin'][] = array(z_root() . '/admin/plugins/' . $plugin, $plugin, 'plugin');
+ $plugins[] = array(z_root() . '/admin/plugins/' . $plugin, $plugin, 'plugin');
// temp plugins with admin
$a->plugins_admin[] = $plugin;
}
}
- $aside['logs'] = array(z_root() . '/admin/logs/', t('Logs'), 'logs');
+ $logs = array(z_root() . '/admin/logs/', t('Logs'), 'logs');
+
+ $arr = array('links' => $aside,'plugins' => $plugins,'logs' => $logs);
+ call_hooks('admin_aside',$arr);
$o .= replace_macros(get_markup_template('admin_aside.tpl'), array(
'$admin' => $aside,
'$admtxt' => t('Admin'),
'$plugadmtxt' => t('Plugin Features'),
+ '$plugins' => $plugins,
'$logtxt' => t('Logs'),
- '$h_pending' => t('User registrations waiting for confirmation'),
+ '$logs' => $logs,
+ '$h_pending' => t('Member registrations waiting for confirmation'),
'$admurl'=> z_root() . '/admin/'
));
diff --git a/include/zot.php b/include/zot.php
index cff9e1810..d8cae3954 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2278,6 +2278,12 @@ function check_location_move($sender_hash,$locations) {
dbesc($sender_hash)
);
+ // federation plugins may wish to notify connections
+ // of the move on singleton networks
+
+ $arr = array('channel' => $r[0],'locations' => $locations);
+ call_hooks('location_move',$arr);
+
}
}