several minor app nits
This commit is contained in:
parent
7249eebc75
commit
4f1e4ffa70
@ -100,15 +100,15 @@ class Apps {
|
|||||||
}
|
}
|
||||||
$notfound = true;
|
$notfound = true;
|
||||||
foreach(self::$installed_system_apps as $iapp) {
|
foreach(self::$installed_system_apps as $iapp) {
|
||||||
if($app['plugin'] && (! $iapp['app_plugin']))
|
|
||||||
return(1);
|
|
||||||
if($iapp['app_id'] == hash('whirlpool',$app['name'])) {
|
if($iapp['app_id'] == hash('whirlpool',$app['name'])) {
|
||||||
$notfound = false;
|
$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 intval($iapp['app_id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $notfound;
|
return $notfound;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -503,7 +503,7 @@ class Apps {
|
|||||||
|
|
||||||
static public function app_store($arr) {
|
static public function app_store($arr) {
|
||||||
|
|
||||||
// logger('app_store: ' . print_r($arr,true));
|
//logger('app_store: ' . print_r($arr,true));
|
||||||
|
|
||||||
$darray = array();
|
$darray = array();
|
||||||
$ret = array('success' => false);
|
$ret = array('success' => false);
|
||||||
@ -583,6 +583,7 @@ class Apps {
|
|||||||
|
|
||||||
static public function app_update($arr) {
|
static public function app_update($arr) {
|
||||||
|
|
||||||
|
//logger('app_update: ' . print_r($arr,true));
|
||||||
$darray = array();
|
$darray = array();
|
||||||
$ret = array('success' => false);
|
$ret = array('success' => false);
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ class Appman extends \Zotlabs\Web\Controller {
|
|||||||
'price' => escape_tags($_REQUEST['price']),
|
'price' => escape_tags($_REQUEST['price']),
|
||||||
'requires' => escape_tags($_REQUEST['requires']),
|
'requires' => escape_tags($_REQUEST['requires']),
|
||||||
'system' => intval($_REQUEST['system']),
|
'system' => intval($_REQUEST['system']),
|
||||||
|
'plugin' => escape_tags($_REQUEST['plugin']),
|
||||||
'sig' => escape_tags($_REQUEST['sig']),
|
'sig' => escape_tags($_REQUEST['sig']),
|
||||||
'categories' => escape_tags($_REQUEST['categories'])
|
'categories' => escape_tags($_REQUEST['categories'])
|
||||||
);
|
);
|
||||||
@ -57,13 +58,13 @@ class Appman extends \Zotlabs\Web\Controller {
|
|||||||
Zlib\Apps::app_destroy(local_channel(),$papp);
|
Zlib\Apps::app_destroy(local_channel(),$papp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($_POST['edit']) {
|
if($_POST['edit']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_SESSION['return_url'])
|
if($_SESSION['return_url'])
|
||||||
goaway(z_root() . '/' . $_SESSION['return_url']);
|
goaway(z_root() . '/' . $_SESSION['return_url']);
|
||||||
|
|
||||||
goaway(z_root() . '/apps');
|
goaway(z_root() . '/apps');
|
||||||
|
|
||||||
|
|
||||||
@ -122,6 +123,7 @@ class Appman extends \Zotlabs\Web\Controller {
|
|||||||
'$price' => array('price', t('Price of app'),(($app) ? $app['app_price'] : ''), ''),
|
'$price' => array('price', t('Price of app'),(($app) ? $app['app_price'] : ''), ''),
|
||||||
'$page' => array('page', t('Location (URL) to purchase app'),(($app) ? $app['app_page'] : ''), ''),
|
'$page' => array('page', t('Location (URL) to purchase app'),(($app) ? $app['app_page'] : ''), ''),
|
||||||
'$system' => (($app) ? intval($app['app_system']) : 0),
|
'$system' => (($app) ? intval($app['app_system']) : 0),
|
||||||
|
'$plugin' => (($app) ? $app['app_plugin'] : ''),
|
||||||
'$requires' => (($app) ? $app['app_requires'] : ''),
|
'$requires' => (($app) ? $app['app_requires'] : ''),
|
||||||
'$embed' => $embed,
|
'$embed' => $embed,
|
||||||
'$submit' => t('Submit')
|
'$submit' => t('Submit')
|
||||||
|
@ -13,7 +13,7 @@ class Apps extends \Zotlabs\Web\Controller {
|
|||||||
else
|
else
|
||||||
$mode = 'list';
|
$mode = 'list';
|
||||||
|
|
||||||
$_SESSION['return_url'] = \App::$cmd;
|
$_SESSION['return_url'] = \App::$query_string;
|
||||||
|
|
||||||
$apps = array();
|
$apps = array();
|
||||||
|
|
||||||
|
@ -104,7 +104,8 @@ function widget_appselect($arr) {
|
|||||||
'$authed' => ((local_channel()) ? true : false),
|
'$authed' => ((local_channel()) ? true : false),
|
||||||
'$personal' => t('Personal'),
|
'$personal' => t('Personal'),
|
||||||
'$new' => t('New App'),
|
'$new' => t('New App'),
|
||||||
'$edit' => t('Edit App')
|
'$edit' => t('Edit Apps'),
|
||||||
|
'$cat' => ((array_key_exists('cat',$_REQUEST)) ? $_REQUEST['cat'] : '')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,11 +442,13 @@ function widget_appcategories($arr) {
|
|||||||
if(! local_channel())
|
if(! local_channel())
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
$cat = ((x($_REQUEST,'cat')) ? htmlspecialchars($_REQUEST['cat'],ENT_COMPAT,'UTF-8') : '');
|
$selected = ((x($_REQUEST,'cat')) ? htmlspecialchars($_REQUEST['cat'],ENT_COMPAT,'UTF-8') : '');
|
||||||
$srchurl = App::$query_string;
|
|
||||||
$srchurl = rtrim(preg_replace('/cat\=[^\&].*?(\&|$)/is','',$srchurl),'&');
|
$srchurl = rtrim(preg_replace('/cat\=[^\&].*?(\&|$)/is','',$srchurl),'&');
|
||||||
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
|
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
|
||||||
|
|
||||||
|
$srchurl = z_root() . '/apps';
|
||||||
|
|
||||||
$terms = array();
|
$terms = array();
|
||||||
|
|
||||||
$r = q("select distinct(term.term)
|
$r = q("select distinct(term.term)
|
||||||
|
3
view/pdl/mod_appman.pdl
Normal file
3
view/pdl/mod_appman.pdl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[region=aside]
|
||||||
|
[widget=appcategories][/widget]
|
||||||
|
[/region]
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
<input type="hidden" name="requires" value="{{$requires}}" />
|
<input type="hidden" name="requires" value="{{$requires}}" />
|
||||||
<input type="hidden" name="system" value="{{$system}}" />
|
<input type="hidden" name="system" value="{{$system}}" />
|
||||||
|
<input type="hidden" name="plugin" value="{{$plugin}}" />
|
||||||
|
|
||||||
|
|
||||||
{{include file="field_input.tpl" field=$name}}
|
{{include file="field_input.tpl" field=$name}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<h3>{{$title}}</h3>
|
<h3>{{$title}}</h3>
|
||||||
<ul class="nav nav-pills nav-stacked">
|
<ul class="nav nav-pills nav-stacked">
|
||||||
<li><a href="appman"><i class="fa fa-plus"></i> {{$new}}</a></li>
|
<li><a href="appman"><i class="fa fa-plus"></i> {{$new}}</a></li>
|
||||||
<li><a href="apps/edit"><i class="fa fa-pencil"></i> {{$edit}}</a></li>
|
<li><a href="apps/edit{{if $cat}}/?f=&cat={{$cat}}{{/if}}"><i class="fa fa-pencil"></i> {{$edit}}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Reference in New Issue
Block a user