From 59fe5be9873bea6ff9b50095e76bd530f54772c3 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Tue, 26 Feb 2019 14:24:38 +0100 Subject: [PATCH 1/5] Diaspora - set host to empty if it doesn't exist. --- diaspora/Diaspora_Connection.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/diaspora/Diaspora_Connection.php b/diaspora/Diaspora_Connection.php index 67bc63df..a33bf608 100644 --- a/diaspora/Diaspora_Connection.php +++ b/diaspora/Diaspora_Connection.php @@ -46,7 +46,11 @@ class Diaspora_Connection { public function setDiasporaID($id) { $parts = explode('@', $id); $this->user = $parts[0]; - $this->host = $parts[1]; + if (count($parts) > 1) { + $this->host = $parts[1]; + } else { + $this->host = ''; + } } public function getDiasporaID() { -- 2.43.5 From f91b114ba7f8b6dc83639a19e50e35761900a549 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Tue, 26 Feb 2019 15:44:29 +0100 Subject: [PATCH 2/5] [irc] fixed index error --- irc/irc.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/irc/irc.php b/irc/irc.php index eab755c8..b8c0847b 100644 --- a/irc/irc.php +++ b/irc/irc.php @@ -6,6 +6,7 @@ * Author: tony baldwin * Author: Tobias Diekershoff */ + use Friendica\Core\Config; use Friendica\Core\Hook; use Friendica\Core\L10n; @@ -51,13 +52,17 @@ function irc_addon_settings(&$a,&$s) { } -function irc_addon_settings_post(&$a,&$b) { - if(! local_user()) +function irc_addon_settings_post(&$a, &$b) { + if(!local_user()) return; - if($_POST['irc-submit']) { - PConfig::set( local_user(), 'irc','autochans',trim($_POST['autochans'])); - PConfig::set( local_user(), 'irc','sitechats',trim($_POST['sitechats'])); + if(!empty($_POST['irc-submit']) && $_POST['irc-submit']) { + if (!isset($_POST['autochans'])) { + PConfig::set(local_user(), 'irc', 'autochans', trim(($_POST['autochans']))); + } + if (!isset($_POST['sitechats'])) { + PConfig::set(local_user(), 'irc', 'sitechats', trim($_POST['sitechats'])); + } /* upid pop-up thing */ info(L10n::t('IRC settings saved.') . EOL); } -- 2.43.5 From 979f12e51e0f7291298c02b6f5572737e2139869 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Tue, 26 Feb 2019 15:47:17 +0100 Subject: [PATCH 3/5] [pageheader] Avoid notice --- irc/irc.php | 6 +++--- pageheader/pageheader.php | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/irc/irc.php b/irc/irc.php index b8c0847b..aa727e2e 100644 --- a/irc/irc.php +++ b/irc/irc.php @@ -56,11 +56,11 @@ function irc_addon_settings_post(&$a, &$b) { if(!local_user()) return; - if(!empty($_POST['irc-submit']) && $_POST['irc-submit']) { - if (!isset($_POST['autochans'])) { + if(!empty($_POST['irc-submit'])) { + if (isset($_POST['autochans'])) { PConfig::set(local_user(), 'irc', 'autochans', trim(($_POST['autochans']))); } - if (!isset($_POST['sitechats'])) { + if (isset($_POST['sitechats'])) { PConfig::set(local_user(), 'irc', 'sitechats', trim($_POST['sitechats'])); } /* upid pop-up thing */ diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php index 2ec92509..473c5e66 100644 --- a/pageheader/pageheader.php +++ b/pageheader/pageheader.php @@ -7,7 +7,7 @@ * Hauke Altmann * */ -use Friendica\Core\Addon; + use Friendica\Core\Config; use Friendica\Core\Hook; use Friendica\Core\L10n; @@ -66,8 +66,10 @@ function pageheader_addon_settings_post(&$a,&$b) { if(! is_site_admin()) return; - if($_POST['pageheader-submit']) { - Config::set('pageheader','text',trim(strip_tags($_POST['pageheader-words']))); + if(!empty($_POST['pageheader-submit'])) { + if (isset($_POST['pageheader-words'])) { + Config::set('pageheader', 'text', trim(strip_tags($_POST['pageheader-words']))); + } info(L10n::t('pageheader Settings saved.') . EOL); } } -- 2.43.5 From 8e902c2fe0f693a795271893d72b6dd52f8d993f Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Tue, 26 Feb 2019 15:47:58 +0100 Subject: [PATCH 4/5] [pageheader] code cleanup --- pageheader/pageheader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php index 473c5e66..922f557c 100644 --- a/pageheader/pageheader.php +++ b/pageheader/pageheader.php @@ -61,9 +61,9 @@ function pageheader_addon_settings(&$a,&$s) { } -function pageheader_addon_settings_post(&$a,&$b) { +function pageheader_addon_settings_post(&$a, &$b) { - if(! is_site_admin()) + if(!is_site_admin()) return; if(!empty($_POST['pageheader-submit'])) { -- 2.43.5 From 62d93aaf887066157ce08344705812a883d6bd4c Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 27 Feb 2019 20:12:22 +0000 Subject: [PATCH 5/5] Blogger doesn't support XMLRPC anymore, so we deprecate this addon for now --- blogger/blogger.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blogger/blogger.php b/blogger/blogger.php index 066de29e..563d0ce4 100644 --- a/blogger/blogger.php +++ b/blogger/blogger.php @@ -3,7 +3,7 @@ * Name: Blogger Post Connector * Description: Post to Blogger (or anything else which uses blogger XMLRPC API) * Version: 1.0 - * + * Status: Unsupported */ use Friendica\App; -- 2.43.5