diff options
author | friendica <info@friendica.com> | 2014-05-29 16:14:10 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-05-29 16:14:10 -0700 |
commit | 9b5eabf1083602382385c62c6ad7d8ae8e167f9e (patch) | |
tree | a73ed07970a517dbad90f14954fea790193813c3 /mod/apps.php | |
parent | a00103b7dfa0b128cbe6ab03e6a43ccedb24f8c2 (diff) | |
parent | 1a58777daa0ab9394f38737a806a7a185ebceeb0 (diff) | |
download | volse-hubzilla-9b5eabf1083602382385c62c6ad7d8ae8e167f9e.tar.gz volse-hubzilla-9b5eabf1083602382385c62c6ad7d8ae8e167f9e.tar.bz2 volse-hubzilla-9b5eabf1083602382385c62c6ad7d8ae8e167f9e.zip |
Merge branch 'master' into newevent
Conflicts:
include/zot.php
Diffstat (limited to 'mod/apps.php')
-rw-r--r-- | mod/apps.php | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/mod/apps.php b/mod/apps.php index 43540a3de..e88c54c66 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -1,16 +1,39 @@ <?php +require_once('include/apps.php'); + function apps_content(&$a) { - $apps = $a->get_apps(); - if(count($apps) == 0) - notice( t('No installed applications.') . EOL); + if(argc() == 1 || (! local_user())) { + + $apps = get_system_apps(); + + // $o .= print_r($apps,true); + + // return $o; + + return replace_macros(get_markup_template('apps.tpl'), array( + '$title' => t('Apps'), + '$apps' => $apps, + )); + } + + if(argc() == 3 && argv(2) == 'edit') + $mode = 'edit'; + else + $mode = 'list'; + $apps = array(); + $list = app_list(local_user()); + if($list) { + foreach($list as $app) { + $apps[] = app_render(app_encode($app),$mode); + } + } - $tpl = get_markup_template("apps.tpl"); - return replace_macros($tpl, array( - '$title' => t('Applications'), + return replace_macros(get_markup_template('myapps.tpl'), array( + '$title' => t('Apps'), '$apps' => $apps, )); |