diff options
author | friendica <info@friendica.com> | 2013-12-19 02:16:14 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-12-19 02:16:14 -0800 |
commit | 125543adedfe00b3d5cea8548d1a66096a173a6b (patch) | |
tree | 7e5081af1cd7b3ae09849e7e31151bc4aba5c72b /include | |
parent | 2089a1379a57ba5c27e220e664cb76ffb0acc1dd (diff) | |
download | volse-hubzilla-125543adedfe00b3d5cea8548d1a66096a173a6b.tar.gz volse-hubzilla-125543adedfe00b3d5cea8548d1a66096a173a6b.tar.bz2 volse-hubzilla-125543adedfe00b3d5cea8548d1a66096a173a6b.zip |
more comanche migration
Diffstat (limited to 'include')
-rwxr-xr-x | include/text.php | 23 | ||||
-rw-r--r-- | include/widgets.php | 16 |
2 files changed, 27 insertions, 12 deletions
diff --git a/include/text.php b/include/text.php index f808fb0a0..b3154d23e 100755 --- a/include/text.php +++ b/include/text.php @@ -1889,18 +1889,17 @@ function json_decode_plus($s) { function design_tools() { -$channel = get_app()->get_channel(); -$who = $channel['channel_address']; - -return replace_macros(get_markup_template('design_tools.tpl'), array( - '$title' => t('Design'), - '$who' => $who, - '$blocks' => t('Blocks'), - '$menus' => t('Menus'), - '$layout' => t('Layouts'), - '$pages' => t('Pages') - )); - + $channel = get_app()->get_channel(); + $who = $channel['channel_address']; + + return replace_macros(get_markup_template('design_tools.tpl'), array( + '$title' => t('Design'), + '$who' => $who, + '$blocks' => t('Blocks'), + '$menus' => t('Menus'), + '$layout' => t('Layouts'), + '$pages' => t('Pages') + )); } /* case insensitive in_array() */ diff --git a/include/widgets.php b/include/widgets.php index 9d6617aa2..ed155be9b 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -494,4 +494,20 @@ function widget_mailmenu($arr) { )); +} + +function widget_design_tools($arr) { + $a = get_app(); + + // mod menu doesn't load a profile. For any modules which load a profile, check it. + // otherwise local_user() is sufficient for permissions. + + if($a->profile['profile_uid']) + if($a->profile['profile_uid'] != local_user()) + return ''; + + if(! local_user()) + return ''; + + return design_tools(); }
\ No newline at end of file |