From: friendica Date: Wed, 5 Sep 2012 23:26:11 +0000 (-0700) Subject: update writable for dfrn contacts when using local delivery X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3968dc932fe527fe7c370fa52c084bc693d8d316;p=friendica.git update writable for dfrn contacts when using local delivery --- diff --git a/include/delivery.php b/include/delivery.php index 1328771a67..14226e4fba 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -328,8 +328,9 @@ function delivery_run($argv, $argc){ dbesc($nickname) ); - if(count($x)) { - if($owner['page-flags'] == PAGE_COMMUNITY && ! $x[0]['writable']) { + if($x && count($x)) { + $write_flag = ((($x[0]['rel']) && ($x[0]['rel'] != CONTACT_IS_SHARING)) ? true : false); + if((($owner['page-flags'] == PAGE_COMMUNITY) || ($write_flag)) && (! $x[0]['writable'])) { q("update contact set writable = 1 where id = %d limit 1", intval($x[0]['id']) ); diff --git a/include/notifier.php b/include/notifier.php index 947818d597..0add92a1cf 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -580,9 +580,9 @@ function notifier_run($argv, $argc){ dbesc($nickname) ); - if(count($x)) { - - if($owner['page-flags'] == PAGE_COMMUNITY && ! $x[0]['writable']) { + if($x && count($x)) { + $write_flag = ((($x[0]['rel']) && ($x[0]['rel'] != CONTACT_IS_SHARING)) ? true : false); + if((($owner['page-flags'] == PAGE_COMMUNITY) || ($write_flag)) && (! $x[0]['writable'])) { q("update contact set writable = 1 where id = %d limit 1", intval($x[0]['id']) ); diff --git a/mod/parse_url.php b/mod/parse_url.php index ea05055f0c..e66db37fed 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -36,6 +36,9 @@ function completeurl($url, $scheme) { if ($schemearr["port"] != "") $complete .= ":".$schemearr["port"]; + if(strpos($urlarr['path'],'/') !== 0) + $complete .= '/'; + $complete .= $urlarr["path"]; if ($urlarr["query"] != "")