aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-01-03 20:26:20 -0800
committerfriendica <info@friendica.com>2012-01-03 20:26:20 -0800
commitfc7d0360bb059bf87c5c531a2bfd5bcee3aef3f6 (patch)
tree091edb45d73b6bf79534a5d6fbda144b4d81ddf5
parent8e6c02cda383b7655ef7c045a1c9cb2c63541b60 (diff)
downloadvolse-hubzilla-fc7d0360bb059bf87c5c531a2bfd5bcee3aef3f6.tar.gz
volse-hubzilla-fc7d0360bb059bf87c5c531a2bfd5bcee3aef3f6.tar.bz2
volse-hubzilla-fc7d0360bb059bf87c5c531a2bfd5bcee3aef3f6.zip
add verb and item to notifications to aid in localisation
-rw-r--r--boot.php6
-rw-r--r--database.sql17
-rw-r--r--include/diaspora.php2
-rw-r--r--include/items.php16
-rw-r--r--mod/dfrn_request.php4
-rw-r--r--mod/item.php8
-rw-r--r--update.php20
7 files changed, 63 insertions, 10 deletions
diff --git a/boot.php b/boot.php
index df9daf483..61deae18b 100644
--- 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
diff --git a/database.sql b/database.sql
index 4dc1973ed..6826aa6f8 100644
--- a/database.sql
+++ b/database.sql
@@ -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;
+
+
diff --git a/include/diaspora.php b/include/diaspora.php
index 2d139c77c..25ca11ed0 100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -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'
));
}
diff --git a/include/items.php b/include/items.php
index 9f006306f..a63468d92 100644
--- a/include/items.php
+++ b/include/items.php
@@ -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;
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index a96860403..aa14bc473 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -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'
));
}
diff --git a/mod/item.php b/mod/item.php
index ece92f0f3..c4e66ebeb 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -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'
));
}
}
diff --git a/update.php b/update.php
index 6eade22f7..4dff59c98 100644
--- a/update.php
+++ b/update.php
@@ -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 ");
+
+}