aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-08-01 18:20:34 -0700
committerzotlabs <mike@macgirvin.com>2017-08-01 18:20:34 -0700
commit6e9fb9b9fdef11209a3ee1a85d5ba1d02659e209 (patch)
treeff58412b458a0b03325dc851707fe1e7e31323c6 /Zotlabs
parenta97b09210e977d52a5bda1dee2b1eddc19afc013 (diff)
parent6614d465d6b90286f2d4e9546d9adb8bcb02dec1 (diff)
downloadvolse-hubzilla-6e9fb9b9fdef11209a3ee1a85d5ba1d02659e209.tar.gz
volse-hubzilla-6e9fb9b9fdef11209a3ee1a85d5ba1d02659e209.tar.bz2
volse-hubzilla-6e9fb9b9fdef11209a3ee1a85d5ba1d02659e209.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Apps.php31
-rw-r--r--Zotlabs/Module/Ping.php4
2 files changed, 28 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 7287bdd52..1fb841008 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -169,7 +169,15 @@ class Apps {
$requires = explode(',',$ret['requires']);
foreach($requires as $require) {
$require = trim(strtolower($require));
+ $config = false;
+
+ if(substr($require, 0, 7) == 'config:') {
+ $config = true;
+ $require = ltrim($require, 'config:');
+ }
+
$toggle = (($require[0] == '!') ? 0 : 1);
+
switch($require) {
case 'nologin':
if(local_channel())
@@ -192,9 +200,10 @@ class Apps {
unset($ret);
break;
default:
- $unset = ((local_channel() && feature_enabled(local_channel(),$require)) ? false : true);
- $unset = ((get_config('system', ltrim($require, '!')) == $toggle) ? false : true);
-
+ if($config)
+ $unset = ((get_config('system', ltrim($require, '!')) == $toggle) ? false : true);
+ else
+ $unset = ((local_channel() && feature_enabled(local_channel(),$require)) ? false : true);
if($unset)
unset($ret);
break;
@@ -308,9 +317,18 @@ class Apps {
if($k === 'requires') {
$requires = explode(',',$v);
+
foreach($requires as $require) {
$require = trim(strtolower($require));
+ $config = false;
+
+ if(substr($require, 0, 7) == 'config:') {
+ $config = true;
+ $require = ltrim($require, 'config:');
+ }
+
$toggle = (($require[0] == '!') ? 0 : 1);
+
switch($require) {
case 'nologin':
if(local_channel())
@@ -334,9 +352,10 @@ class Apps {
return '';
break;
default:
- $unset = ((local_channel() && feature_enabled(local_channel(),$require)) ? false : true);
- $unset = ((get_config('system', ltrim($require, '!')) == $toggle) ? false : true);
-
+ if($config)
+ $unset = ((get_config('system', ltrim($require, '!')) == $toggle) ? false : true);
+ else
+ $unset = ((local_channel() && feature_enabled(local_channel(),$require)) ? false : true);
if($unset)
return '';
break;
diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php
index 190208727..f38ed510e 100644
--- a/Zotlabs/Module/Ping.php
+++ b/Zotlabs/Module/Ping.php
@@ -147,11 +147,13 @@ class Ping extends \Zotlabs\Web\Controller {
$pubs = q("SELECT count(id) as total from item
WHERE uid = %d
AND author_xchan != '%s'
+ AND obj_type != '%s'
AND item_unseen = 1
AND created > '" . datetime_convert('UTC','UTC',$_SESSION['static_loadtime']) . "'
$item_normal",
intval($sys['channel_id']),
- dbesc(get_observer_hash())
+ dbesc(get_observer_hash()),
+ dbesc(ACTIVITY_OBJ_FILE)
);
if($pubs)