aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Apps.php9
-rw-r--r--Zotlabs/Module/Appman.php8
-rw-r--r--Zotlabs/Module/Apps.php4
3 files changed, 12 insertions, 9 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 46486bb5a..358ae409b 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -100,15 +100,15 @@ class Apps {
}
$notfound = true;
foreach(self::$installed_system_apps as $iapp) {
- if($app['plugin'] && (! $iapp['app_plugin']))
- return(1);
if($iapp['app_id'] == hash('whirlpool',$app['name'])) {
$notfound = false;
- if($iapp['app_version'] != $app['version']) {
+ if(($iapp['app_version'] != $app['version'])
+ || ($app['plugin'] && (! $iapp['app_plugin']))) {
return intval($iapp['app_id']);
}
}
}
+
return $notfound;
}
@@ -503,7 +503,7 @@ class Apps {
static public function app_store($arr) {
- // logger('app_store: ' . print_r($arr,true));
+ //logger('app_store: ' . print_r($arr,true));
$darray = array();
$ret = array('success' => false);
@@ -583,6 +583,7 @@ class Apps {
static public function app_update($arr) {
+ //logger('app_update: ' . print_r($arr,true));
$darray = array();
$ret = array('success' => false);
diff --git a/Zotlabs/Module/Appman.php b/Zotlabs/Module/Appman.php
index 425b2d539..a7631758b 100644
--- a/Zotlabs/Module/Appman.php
+++ b/Zotlabs/Module/Appman.php
@@ -27,6 +27,7 @@ class Appman extends \Zotlabs\Web\Controller {
'price' => escape_tags($_REQUEST['price']),
'requires' => escape_tags($_REQUEST['requires']),
'system' => intval($_REQUEST['system']),
+ 'plugin' => escape_tags($_REQUEST['plugin']),
'sig' => escape_tags($_REQUEST['sig']),
'categories' => escape_tags($_REQUEST['categories'])
);
@@ -57,13 +58,13 @@ class Appman extends \Zotlabs\Web\Controller {
Zlib\Apps::app_destroy(local_channel(),$papp);
}
-
if($_POST['edit']) {
return;
}
-
+
if($_SESSION['return_url'])
goaway(z_root() . '/' . $_SESSION['return_url']);
+
goaway(z_root() . '/apps');
@@ -76,7 +77,7 @@ class Appman extends \Zotlabs\Web\Controller {
notice( t('Permission denied.') . EOL);
return;
}
-
+
$channel = \App::get_channel();
$app = null;
$embed = null;
@@ -122,6 +123,7 @@ class Appman extends \Zotlabs\Web\Controller {
'$price' => array('price', t('Price of app'),(($app) ? $app['app_price'] : ''), ''),
'$page' => array('page', t('Location (URL) to purchase app'),(($app) ? $app['app_page'] : ''), ''),
'$system' => (($app) ? intval($app['app_system']) : 0),
+ '$plugin' => (($app) ? $app['app_plugin'] : ''),
'$requires' => (($app) ? $app['app_requires'] : ''),
'$embed' => $embed,
'$submit' => t('Submit')
diff --git a/Zotlabs/Module/Apps.php b/Zotlabs/Module/Apps.php
index 5583f1757..9186848df 100644
--- a/Zotlabs/Module/Apps.php
+++ b/Zotlabs/Module/Apps.php
@@ -12,8 +12,8 @@ class Apps extends \Zotlabs\Web\Controller {
$mode = 'edit';
else
$mode = 'list';
-
- $_SESSION['return_url'] = \App::$cmd;
+
+ $_SESSION['return_url'] = \App::$query_string;
$apps = array();