]> git.mxchange.org Git - friendica.git/commitdiff
infrastructure for personalised @ tags (no UI/settings form yet), allow own comments...
authorFriendika <info@friendika.com>
Fri, 2 Sep 2011 01:02:08 +0000 (18:02 -0700)
committerFriendika <info@friendika.com>
Fri, 2 Sep 2011 01:02:08 +0000 (18:02 -0700)
addon/statusnet/statusnet.php
boot.php
database.sql
mod/item.php
mod/photos.php
update.php
zot.txt

index 2f02ded54b12e1f45ce7c8881a2d404c7c9f60b9..f1b35d6c04ff4248d797490919c0d6ff22b400d2 100644 (file)
@@ -355,7 +355,10 @@ function statusnet_post_hook(&$a,&$b) {
 
         logger('StatusNet post invoked');
 
-       if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (!$b['parent']) ) {
+       if((local_user()) && (local_user() == $b['uid']) && (! $b['private'])) {
+
+               // mike 2-9-11 there was a restriction to only allow this for top level posts
+               // now relaxed so should allow one's own comments to be forwarded through the connector as well. 
 
                // Status.Net is not considered a private network
                if($b['prvnets'])
index 3578f3f3334fbfcce0ad3b69fceccd52d6d8c800..e8b3d7ac1826268043a7c77e0912e8fb03a25a65 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -7,9 +7,9 @@ require_once('include/text.php');
 require_once("include/pgettext.php");
 
 
-define ( 'FRIENDIKA_VERSION',      '2.2.1089' );
+define ( 'FRIENDIKA_VERSION',      '2.2.1090' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
-define ( 'DB_UPDATE_VERSION',      1084      );
+define ( 'DB_UPDATE_VERSION',      1085      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
index 9819914f7842f3496e030ed10b0eeaa9c2bec8f8..432ce76938d4e9f254a3091fc31402ed7e523fa4 100644 (file)
@@ -58,6 +58,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
   `network` char(255) NOT NULL,
   `name` char(255) NOT NULL,
   `nick` char(255) NOT NULL,
+  `attag` char(255) NOT NULL,
   `photo` text NOT NULL, 
   `thumb` text NOT NULL,
   `micro` text NOT NULL,
index b6ea8ff0859c3c3b12033a32195c3890c1021344..6ecca8f4a1d7df82c35a832dc481b0537b964a60 100644 (file)
@@ -404,7 +404,8 @@ function item_post(&$a) {
                                                );
                                        }
                                        else {
-                                               $r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1",
+                                               $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1",
+                                                       dbesc($name),
                                                        dbesc($name),
                                                        intval($profile_uid)
                                                );
index cb13b760364e72df276db5c3db5dc8eeeef0e074..b74ca85d71b5b1272b277f92c872614a5bb0be7a 100644 (file)
@@ -414,7 +414,8 @@ function photos_post(&$a) {
                                                                );
                                                        }
                                                        else {
-                                                               $r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1",
+                                                               $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1",
+                                                                       dbesc($name),
                                                                        dbesc($name),
                                                                        intval($page_owner_uid)
                                                                );
index 14bc48ab71871519963af6e02a2ef3d926219fa1..80761cce45168a73582ab2f9735a3118d715d263 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define( 'UPDATE_VERSION' , 1084 );
+define( 'UPDATE_VERSION' , 1085 );
 
 /**
  *
@@ -706,4 +706,8 @@ function update_1083() {
        `contact` INT NOT NULL
        ) ENGINE = MYISAM ;");
 
-}
\ No newline at end of file
+}
+
+function update_1084() {
+       q("ALTER TABLE `contact` ADD `attag` CHAR( 255 ) NOT NULL AFTER `nick` ");
+}
diff --git a/zot.txt b/zot.txt
index 93fdf3b9d8bd86f25cb3b07d65e892678927fdeb..dd9f709826c363791d6d5e8b0aa28852b18129c3 100644 (file)
--- a/zot.txt
+++ b/zot.txt
@@ -114,7 +114,7 @@ listed in the To:, Cc:, or Bcc: addresses matches the webfinger address of
 the "owner" of the endpoint.
 
        3. The current endpoint is a bulk delivery endpoint. The bulk delivery
-ednpoint is defined elsewhere in this document. The bulk delivery agent
+endpoint is defined elsewhere in this document. The bulk delivery agent
 will deliver to all local addresses found in the address lists. 
 
 zot:sig
@@ -243,7 +243,7 @@ and allow authenticated browsing to other resources on the website.
 
 Only authentication via OpenID is defined in this version of the specification.
 
-This can be used to provide access control to any web resource to any 
+This can be used to provide access control of any web resource to any 
 webfinger identity on the internet.
 
 *********