]> git.mxchange.org Git - friendica.git/commitdiff
add verb and item to notifications to aid in localisation
authorfriendica <info@friendica.com>
Wed, 4 Jan 2012 04:26:20 +0000 (20:26 -0800)
committerfriendica <info@friendica.com>
Wed, 4 Jan 2012 04:26:20 +0000 (20:26 -0800)
boot.php
database.sql
include/diaspora.php
include/items.php
mod/dfrn_request.php
mod/item.php
update.php

index df9daf4835b170c581c2875ee62c65da02e1dbbf..61deae18b73c06ac39f2b9d0b05411e4a9ef4b6c 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -4,14 +4,14 @@ require_once('include/config.php');
 require_once('include/network.php');
 require_once('include/plugin.php');
 require_once('include/text.php');
-require_once("include/pgettext.php");
+require_once('include/pgettext.php');
 require_once('include/nav.php');
 require_once('include/cache.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_VERSION',      '2.3.1215' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.22'    );
-define ( 'DB_UPDATE_VERSION',      1114      );
+define ( 'DB_UPDATE_VERSION',      1115      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
@@ -103,7 +103,7 @@ define ( 'NETWORK_MAIL',             'mail');    // IMAP/POP
 define ( 'NETWORK_FACEBOOK',         'face');    // Facebook API     
 define ( 'NETWORK_LINKEDIN',         'lnkd');    // LinkedIn
 define ( 'NETWORK_XMPP',             'xmpp');    // XMPP     
-
+define ( 'NETWORK_MYSPACE',          'mysp');    // MySpace
 
 /**
  * Maximum number of "people who like (or don't like) this"  that we will list by name
index 4dc1973ed5f39cd7e412c45258be886eb2fb5f12..6826aa6f89641010ffb721018fbc3b82d1858dea 100644 (file)
@@ -751,3 +751,20 @@ INDEX ( `uid` ),
 INDEX ( `seen` ),
 INDEX ( `date` )
 ) ENGINE = MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `item_id` (
+`iid` INT NOT NULL ,
+`uid` INT NOT NULL ,
+`face` CHAR( 255 ) NOT NULL ,
+`dspr` CHAR( 255 ) NOT NULL ,
+`twit` CHAR( 255 ) NOT NULL ,
+`stat` CHAR( 255 ) NOT NULL ,
+PRIMARY KEY ( `iid` ),
+INDEX ( `uid` ),
+INDEX ( `face` ),
+INDEX ( `dspr` ),
+INDEX ( `twit` ),
+INDEX ( `stat` )
+) ENGINE = MyISAM DEFAULT CHARSET=utf8;
+
+
index 2d139c77c32750e8c6e789af7222ea7ad0f03572..25ca11ed03e3fda85cda18666914c7055cf530ab 100644 (file)
@@ -1235,6 +1235,8 @@ function diaspora_conversation($importer,$xml,$msg) {
                        'source_name' => $person['name'],
                        'source_link' => $person['url'],
                        'source_photo' => $person['thumb'],
+                       'verb' => ACTIVITY_POST,
+                       'otype' => 'mail'
                ));
        }       
 
index 9f006306f8e37b7b9a7eae93dec95e256e43d6e4..a63468d925f9fef36f53cb52d466e6a9729130b5 100644 (file)
@@ -1798,7 +1798,9 @@ function local_delivery($importer,$data) {
                        'link'         => $a->get_baseurl() . '/notifications/intros',
                        'source_name'  => $importer['name'],
                        'source_link'  => $importer['url'],
-                       'source_photo' => $importer['photo']
+                       'source_photo' => $importer['photo'],
+                       'verb'         => ACTIVITY_REQ_FRIEND,
+                       'otype'        => 'intro'
                ));
 
                return 0;
@@ -1847,6 +1849,8 @@ function local_delivery($importer,$data) {
                        'source_name' => $msg['from-name'],
                        'source_link' => $importer['url'],
                        'source_photo' => $importer['thumb'],
+                       'verb' => ACTIVITY_POST,
+                       'otype' => 'mail'
                );
                        
                notification($notif_params);
@@ -2118,7 +2122,10 @@ function local_delivery($importer,$data) {
                                                                'source_name'  => stripslashes($datarray['author-name']),
                                                                'source_link'  => $datarray['author-link'],
                                                                'source_photo' => ((link_compare($datarray['author-link'],$importer['url'])) 
-                                                                       ? $importer['thumb'] : $datarray['author-avatar'])
+                                                                       ? $importer['thumb'] : $datarray['author-avatar']),
+                                                               'verb'         => ACTIVITY_POST,
+                                                               'otype'        => 'item'
+
                                                        ));
 
                                                }
@@ -2234,7 +2241,10 @@ function local_delivery($importer,$data) {
                                                                'source_name'  => stripslashes($datarray['author-name']),
                                                                'source_link'  => $datarray['author-link'],
                                                                'source_photo' => ((link_compare($datarray['author-link'],$importer['url'])) 
-                                                                       ? $importer['thumb'] : $datarray['author-avatar'])
+                                                                       ? $importer['thumb'] : $datarray['author-avatar']),
+                                                               'verb'         => ACTIVITY_POST,
+                                                               'otype'        => 'item'
+
                                                        ));
 
                                                        break;
index a968604039521b3ec350327cc9a504c737cb9639..aa14bc473dddd54b1ba40267b53e6ba42e0a52b6 100644 (file)
@@ -580,7 +580,9 @@ function dfrn_request_content(&$a) {
                                                'link'             => $a->get_baseurl() . '/notifications/intros',
                                                'source_name'  => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
                                                'source_link'  => $r[0]['url'],
-                                               'source_photo' => $r[0]['photo']
+                                               'source_photo' => $r[0]['photo'],
+                                               'verb'         => ACTIVITY_REQ_FRIEND,
+                                               'otype'        => 'intro'
                                        ));
                                }
 
index ece92f0f3d74a873ac23f4fd1eed63335db83f5f..c4e66ebeb0601d884260f2a6cd345773a97fa7fc 100644 (file)
@@ -691,7 +691,9 @@ function item_post(&$a) {
                                        'link'             => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id,
                                        'source_name'  => $datarray['author-name'],
                                        'source_link'  => $datarray['author-link'],
-                                       'source_photo' => $datarray['author-avatar']
+                                       'source_photo' => $datarray['author-avatar'],
+                                       'verb'         => ACTIVITY_POST,
+                                       'otype'        => 'item'
                                ));
                        
                        }
@@ -731,7 +733,9 @@ function item_post(&$a) {
                                        'link'             => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id,
                                        'source_name'  => $datarray['author-name'],
                                        'source_link'  => $datarray['author-link'],
-                                       'source_photo' => $datarray['author-avatar']
+                                       'source_photo' => $datarray['author-avatar'],
+                                       'verb'         => ACTIVITY_POST,
+                                       'otype'        => 'item'
                                ));
                        }
                }
index 6eade22f7044c57cd38d9977c9781d8762c2a0a0..4dff59c984d7ff159bd91175917e12a4a6f9a53b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define( 'UPDATE_VERSION' , 1114 );
+define( 'UPDATE_VERSION' , 1115 );
 
 /**
  *
@@ -972,3 +972,21 @@ function update_1113() {
        q("ALTER TABLE `notify` ADD `verb` CHAR( 255 ) NOT NULL ,
 ADD `otype` CHAR( 16 ) NOT NULL");
 }
+
+function update_1114() {
+       q("CREATE TABLE IF NOT EXISTS `item_id` (
+`iid` INT NOT NULL ,
+`uid` INT NOT NULL ,
+`face` CHAR( 255 ) NOT NULL ,
+`dspr` CHAR( 255 ) NOT NULL ,
+`twit` CHAR( 255 ) NOT NULL ,
+`stat` CHAR( 255 ) NOT NULL ,
+PRIMARY KEY ( `iid` ),
+INDEX ( `uid` ),
+INDEX ( `face` ),
+INDEX ( `dspr` ),
+INDEX ( `twit` ),
+INDEX ( `stat` )
+) ENGINE = MYISAM ");
+
+}