From 0111149248400025ca5fce3663d78d9b65a43391 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 30 Apr 2017 19:40:55 -0400 Subject: [PATCH 1/3] Add use Friendica\App to addons --- pumpio/pumpio_sync.php | 3 +++ twitter/twitter_sync.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pumpio/pumpio_sync.php b/pumpio/pumpio_sync.php index af843c1d..e691a387 100644 --- a/pumpio/pumpio_sync.php +++ b/pumpio/pumpio_sync.php @@ -1,4 +1,7 @@ Date: Sat, 13 May 2017 03:28:33 +0000 Subject: [PATCH 2/3] We delete now with dba::delete - if available --- twitter/twitter.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/twitter/twitter.php b/twitter/twitter.php index 74121d29..74245fa2 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -688,7 +688,15 @@ function twitter_expire($a,$b) { if ($days == 0) return; - $r = q("DELETE FROM `item` WHERE `deleted` AND `network` = '%s'", dbesc(NETWORK_TWITTER)); + if (method_exists('dba', 'delete')) { + $r = dba::select('item', array('id'), array('deleted' => true, 'network' => NETWORK_TWITTER)); + while ($row = dba::fetch($r)) { + dba::delete('item', array('id' => $row['id'])); + } + dba::close($r); + } else { + $r = q("DELETE FROM `item` WHERE `deleted` AND `network` = '%s'", dbesc(NETWORK_TWITTER)); + } require_once("include/items.php"); -- 2.45.2 From 62c26e09d1eadf40d061ae5bce68330a791fddea Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 22 May 2017 02:47:36 -0400 Subject: [PATCH 3/3] Use Friendica\App in SecureMail addon --- securemail/securemail.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/securemail/securemail.php b/securemail/securemail.php index c92410a6..79f5e2da 100644 --- a/securemail/securemail.php +++ b/securemail/securemail.php @@ -6,6 +6,8 @@ * Author: Fabio Comuni */ +use Friendica\App; + require_once 'include/Emailer.php'; /* because the fraking openpgp-php is in composer, require libs in composer -- 2.45.2