]> git.mxchange.org Git - friendica.git/commitdiff
update writable for dfrn contacts when using local delivery
authorfriendica <info@friendica.com>
Wed, 5 Sep 2012 23:26:11 +0000 (16:26 -0700)
committerfriendica <info@friendica.com>
Wed, 5 Sep 2012 23:26:11 +0000 (16:26 -0700)
include/delivery.php
include/notifier.php
mod/parse_url.php

index 1328771a6789bb3e623459e95e70ec76fd009c50..14226e4fba8a97b3473f12e91a68060ee60af307 100644 (file)
@@ -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'])
                                                        );
index 947818d597718e0ecc3f0346c938483a31177233..0add92a1cf9164984c18b697a607792df55770f8 100644 (file)
@@ -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'])
                                                                );
index ea05055f0cefc69b461c29b5e009786320bcc2b8..e66db37fed20e3f99ba58a9bb7d56bc39d936893 100644 (file)
@@ -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"] != "")