From d0605e8d5f7c666fffc01352de4d9ed4738f41ab Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 4 Oct 2018 11:50:38 +0200 Subject: uexport app --- Zotlabs/Module/Uexport.php | 21 ++++++++++++++++++--- Zotlabs/Widget/Settings_menu.php | 7 ------- app/uexport.apd | 6 ++++++ view/pdl/mod_uexport.pdl | 1 - 4 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 app/uexport.apd diff --git a/Zotlabs/Module/Uexport.php b/Zotlabs/Module/Uexport.php index 9af1887dc..3d1587b87 100644 --- a/Zotlabs/Module/Uexport.php +++ b/Zotlabs/Module/Uexport.php @@ -1,18 +1,24 @@ 1) { $sections = (($_REQUEST['sections']) ? explode(',',$_REQUEST['sections']) : ''); - $channel = \App::get_channel(); + $channel = App::get_channel(); if(argc() > 1 && intval(argv(1)) > 1900) { $year = intval(argv(1)); @@ -47,6 +53,15 @@ class Uexport extends \Zotlabs\Web\Controller { } function get() { + + if(! Apps::system_app_installed(local_channel(), 'Channel Export')) { + //Do not display any associated widgets at this point + App::$pdl = ''; + + $o = '' . t('Channel Export App') . ' (' . t('Not Installed') . '):
'; + $o .= t('Export your channel'); + return $o; + } $y = datetime_convert('UTC',date_default_timezone_get(),'now','Y'); diff --git a/Zotlabs/Widget/Settings_menu.php b/Zotlabs/Widget/Settings_menu.php index 238b8071e..194c4b05b 100644 --- a/Zotlabs/Widget/Settings_menu.php +++ b/Zotlabs/Widget/Settings_menu.php @@ -9,7 +9,6 @@ class Settings_menu { if(! local_channel()) return; - $channel = \App::get_channel(); $abook_self_id = 0; @@ -66,12 +65,6 @@ class Settings_menu { ); } - $tabs[] = array( - 'label' => t('Export channel'), - 'url' => z_root() . '/uexport', - 'selected' => '' - ); - if($role === false || $role === 'custom') { $tabs[] = array( 'label' => t('Connection Default Permissions'), diff --git a/app/uexport.apd b/app/uexport.apd new file mode 100644 index 000000000..c7723fa26 --- /dev/null +++ b/app/uexport.apd @@ -0,0 +1,6 @@ +version: 1 +url: $baseurl/uexport +requires: local_channel +name: Channel Export +photo: icon:download +categories: Personal, System diff --git a/view/pdl/mod_uexport.pdl b/view/pdl/mod_uexport.pdl index 37c85c765..ed1f77c5a 100644 --- a/view/pdl/mod_uexport.pdl +++ b/view/pdl/mod_uexport.pdl @@ -1,5 +1,4 @@ [region=aside] -[widget=settings_menu][/widget] [/region] [region=right_aside] [widget=notifications][/widget] -- cgit v1.2.3