diff options
author | zottel <github@zottel.net> | 2016-08-02 10:56:47 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2016-08-02 10:56:47 +0200 |
commit | dd83f6f3567ffa58b6addf2bc070ee244c868138 (patch) | |
tree | e9b9ab6e5b9b04a5a667f1ae0363b5f11d140f52 /Zotlabs | |
parent | 55eda16b61041cf5d3aa941f3b2b4329246b1028 (diff) | |
parent | 69354e808f35b57e169fa662b75498a97dd1dfee (diff) | |
download | volse-hubzilla-dd83f6f3567ffa58b6addf2bc070ee244c868138.tar.gz volse-hubzilla-dd83f6f3567ffa58b6addf2bc070ee244c868138.tar.bz2 volse-hubzilla-dd83f6f3567ffa58b6addf2bc070ee244c868138.zip |
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Daemon/Cron.php | 10 | ||||
-rw-r--r-- | Zotlabs/Module/Impel.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Like.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Settings.php | 12 |
4 files changed, 18 insertions, 8 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index c6e82b13a..c66b62f55 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -64,12 +64,16 @@ class Cron { // delete expired access tokens - q("delete from atoken where atoken_expires != '%s' && atoken_expires < %s", + $r = q("select atoken_id from atoken where atoken_expires != '%s' && atoken_expires < %s", dbesc(NULL_DATE), db_utcnow() ); - - + if($r) { + require_once('include/security.php'); + foreach($r as $rr) { + atoken_delete($rr['atoken_id']); + } + } // Ensure that every channel pings a directory server once a month. This way we can discover // channels and sites that quietly vanished and prevent the directory from accumulating stale diff --git a/Zotlabs/Module/Impel.php b/Zotlabs/Module/Impel.php index c1bf45a77..197d9f859 100644 --- a/Zotlabs/Module/Impel.php +++ b/Zotlabs/Module/Impel.php @@ -90,7 +90,7 @@ class Impel extends \Zotlabs\Web\Controller { $mitem['mitem_link'] = str_replace('[channelurl]',z_root() . '/channel/' . $channel['channel_address'],$it['link']); $mitem['mitem_link'] = str_replace('[pageurl]',z_root() . '/page/' . $channel['channel_address'],$it['link']); - $mitem['mitem_link'] = str_replace('[storeurl]',z_root() . '/store/' . $channel['channel_address'],$it['link']); + $mitem['mitem_link'] = str_replace('[cloudurl]',z_root() . '/cloud/' . $channel['channel_address'],$it['link']); $mitem['mitem_link'] = str_replace('[baseurl]',z_root(),$it['link']); $mitem['mitem_desc'] = escape_tags($it['desc']); diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php index 170349509..dd0bc99d4 100644 --- a/Zotlabs/Module/Like.php +++ b/Zotlabs/Module/Like.php @@ -495,6 +495,8 @@ class Like extends \Zotlabs\Web\Controller { $arr['deny_gid'] = $deny_gid; $arr['item_private'] = $private; + call_hooks('post_local',$arr); + $post = item_store($arr); $post_id = $post['item_id']; diff --git a/Zotlabs/Module/Settings.php b/Zotlabs/Module/Settings.php index 48ab6b8bf..ecf6d03d6 100644 --- a/Zotlabs/Module/Settings.php +++ b/Zotlabs/Module/Settings.php @@ -2,7 +2,7 @@ namespace Zotlabs\Module; /** @file */ require_once('include/zot.php'); - +require_once('include/security.php'); class Settings extends \Zotlabs\Web\Controller { @@ -781,6 +781,8 @@ class Settings extends \Zotlabs\Web\Controller { if((argc() > 1) && (argv(1) === 'tokens')) { $atoken = null; + $atoken_xchan = ''; + if(argc() > 2) { $id = argv(2); @@ -793,12 +795,14 @@ class Settings extends \Zotlabs\Web\Controller { $atoken = $atoken[0]; $atoken_xchan = substr($channel['channel_hash'],0,16) . '.' . $atoken['atoken_name']; } + if($atoken && argc() > 3 && argv(3) === 'drop') { - $r = q("delete from atoken where atoken_id = %d", - intval($id) - ); + atoken_delete($id); + $atoken = null; + $atoken_xchan = ''; } } + $t = q("select * from atoken where atoken_uid = %d", intval(local_channel()) ); |