aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Apps.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-08-22 17:55:38 +0000
committerMario <mario@mariovavti.com>2021-08-22 17:55:38 +0000
commitab0da7db137bc40114aa34bef155b9920326004d (patch)
tree9beeb8bdfb0e1c32971674b9ad74ec63e79c7358 /Zotlabs/Lib/Apps.php
parent052633d57084e718323235503653106165c6f930 (diff)
downloadvolse-hubzilla-ab0da7db137bc40114aa34bef155b9920326004d.tar.gz
volse-hubzilla-ab0da7db137bc40114aa34bef155b9920326004d.tar.bz2
volse-hubzilla-ab0da7db137bc40114aa34bef155b9920326004d.zip
use the slightly altered app_render() function instead of a separate function
Diffstat (limited to 'Zotlabs/Lib/Apps.php')
-rw-r--r--Zotlabs/Lib/Apps.php30
1 files changed, 7 insertions, 23 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 1c3daf158..201ea122e 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -537,6 +537,13 @@ class Apps {
$install_action = (($installed) ? t('Update') : t('Install'));
$icon = ((strpos($papp['photo'],'icon:') === 0) ? substr($papp['photo'],5) : '');
+ if (!$installed && $mode === 'module') {
+ return replace_macros(get_markup_template('app_install.tpl'), [
+ '$papp' => $papp,
+ '$install' => $install_action
+ ]);
+ }
+
if($mode === 'navbar') {
return replace_macros(get_markup_template('app_nav.tpl'),array(
'$app' => $papp,
@@ -576,29 +583,6 @@ class Apps {
}
- /**
- * @brief Render a simple app install button with app name and description without checking requirements.
- *
- * @param string $app app name
- * @return string
- */
- static public function app_render_install($app) {
-
- $papp = self::get_papp($app);
-
- if (!$papp) {
- return EMPTY_STR;
- }
-
- $papp_encoded = self::papp_encode($papp);
-
- return replace_macros(get_markup_template('app_install.tpl'), [
- '$papp' => $papp,
- '$papp_encoded' => $papp_encoded,
- '$install' => t('Install')
- ]);
- }
-
static public function app_install($uid,$app) {
if(! is_array($app)) {