diff options
Diffstat (limited to 'include/apps.php')
-rw-r--r-- | include/apps.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/apps.php b/include/apps.php index e08e6a6f5..e3120807c 100644 --- a/include/apps.php +++ b/include/apps.php @@ -88,15 +88,15 @@ function parse_app_description($f) { $require = trim(strtolower($require)); switch($require) { case 'nologin': - if(local_user()) + if(local_channel()) unset($ret); break; case 'admin': if(! is_site_admin()) unset($ret); break; - case 'local_user': - if(! local_user()) + case 'local_channel': + if(! local_channel()) unset($ret); break; case 'public_profile': @@ -108,7 +108,7 @@ function parse_app_description($f) { unset($ret); break; default: - if(! (local_user() && feature_enabled(local_user(),$require))) + if(! (local_channel() && feature_enabled(local_channel(),$require))) unset($ret); break; @@ -196,15 +196,15 @@ function app_render($papp,$mode = 'view') { $require = trim(strtolower($require)); switch($require) { case 'nologin': - if(local_user()) + if(local_channel()) return ''; break; case 'admin': if(! is_site_admin()) return ''; break; - case 'local_user': - if(! local_user()) + case 'local_channel': + if(! local_channel()) return ''; break; case 'public_profile': @@ -217,7 +217,7 @@ function app_render($papp,$mode = 'view') { return ''; break; default: - if(! (local_user() && feature_enabled(local_user(),$require))) + if(! (local_channel() && feature_enabled(local_channel(),$require))) return ''; break; @@ -229,8 +229,8 @@ function app_render($papp,$mode = 'view') { $hosturl = ''; - if(local_user()) { - $installed = app_installed(local_user(),$papp); + if(local_channel()) { + $installed = app_installed(local_channel(),$papp); $hosturl = z_root() . '/'; } elseif(remote_user()) { @@ -251,8 +251,8 @@ function app_render($papp,$mode = 'view') { '$hosturl' => $hosturl, '$purchase' => (($papp['page'] && (! $installed)) ? t('Purchase') : ''), '$install' => (($hosturl && $mode == 'view') ? $install_action : ''), - '$edit' => ((local_user() && $installed && $mode == 'edit') ? t('Edit') : ''), - '$delete' => ((local_user() && $installed && $mode == 'edit') ? t('Delete') : '') + '$edit' => ((local_channel() && $installed && $mode == 'edit') ? t('Edit') : ''), + '$delete' => ((local_channel() && $installed && $mode == 'edit') ? t('Delete') : '') )); } |