add verb and item to notifications to aid in localisation
This commit is contained in:
parent
8e6c02cda3
commit
fc7d0360bb
6
boot.php
6
boot.php
|
@ -4,14 +4,14 @@ require_once('include/config.php');
|
||||||
require_once('include/network.php');
|
require_once('include/network.php');
|
||||||
require_once('include/plugin.php');
|
require_once('include/plugin.php');
|
||||||
require_once('include/text.php');
|
require_once('include/text.php');
|
||||||
require_once("include/pgettext.php");
|
require_once('include/pgettext.php');
|
||||||
require_once('include/nav.php');
|
require_once('include/nav.php');
|
||||||
require_once('include/cache.php');
|
require_once('include/cache.php');
|
||||||
|
|
||||||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDICA_VERSION', '2.3.1215' );
|
define ( 'FRIENDICA_VERSION', '2.3.1215' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1114 );
|
define ( 'DB_UPDATE_VERSION', 1115 );
|
||||||
|
|
||||||
define ( 'EOL', "<br />\r\n" );
|
define ( 'EOL', "<br />\r\n" );
|
||||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
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_FACEBOOK', 'face'); // Facebook API
|
||||||
define ( 'NETWORK_LINKEDIN', 'lnkd'); // LinkedIn
|
define ( 'NETWORK_LINKEDIN', 'lnkd'); // LinkedIn
|
||||||
define ( 'NETWORK_XMPP', 'xmpp'); // XMPP
|
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
|
* Maximum number of "people who like (or don't like) this" that we will list by name
|
||||||
|
|
17
database.sql
17
database.sql
|
@ -751,3 +751,20 @@ INDEX ( `uid` ),
|
||||||
INDEX ( `seen` ),
|
INDEX ( `seen` ),
|
||||||
INDEX ( `date` )
|
INDEX ( `date` )
|
||||||
) ENGINE = MyISAM DEFAULT CHARSET=utf8;
|
) 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;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1235,6 +1235,8 @@ function diaspora_conversation($importer,$xml,$msg) {
|
||||||
'source_name' => $person['name'],
|
'source_name' => $person['name'],
|
||||||
'source_link' => $person['url'],
|
'source_link' => $person['url'],
|
||||||
'source_photo' => $person['thumb'],
|
'source_photo' => $person['thumb'],
|
||||||
|
'verb' => ACTIVITY_POST,
|
||||||
|
'otype' => 'mail'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1798,7 +1798,9 @@ function local_delivery($importer,$data) {
|
||||||
'link' => $a->get_baseurl() . '/notifications/intros',
|
'link' => $a->get_baseurl() . '/notifications/intros',
|
||||||
'source_name' => $importer['name'],
|
'source_name' => $importer['name'],
|
||||||
'source_link' => $importer['url'],
|
'source_link' => $importer['url'],
|
||||||
'source_photo' => $importer['photo']
|
'source_photo' => $importer['photo'],
|
||||||
|
'verb' => ACTIVITY_REQ_FRIEND,
|
||||||
|
'otype' => 'intro'
|
||||||
));
|
));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1847,6 +1849,8 @@ function local_delivery($importer,$data) {
|
||||||
'source_name' => $msg['from-name'],
|
'source_name' => $msg['from-name'],
|
||||||
'source_link' => $importer['url'],
|
'source_link' => $importer['url'],
|
||||||
'source_photo' => $importer['thumb'],
|
'source_photo' => $importer['thumb'],
|
||||||
|
'verb' => ACTIVITY_POST,
|
||||||
|
'otype' => 'mail'
|
||||||
);
|
);
|
||||||
|
|
||||||
notification($notif_params);
|
notification($notif_params);
|
||||||
|
@ -2118,7 +2122,10 @@ function local_delivery($importer,$data) {
|
||||||
'source_name' => stripslashes($datarray['author-name']),
|
'source_name' => stripslashes($datarray['author-name']),
|
||||||
'source_link' => $datarray['author-link'],
|
'source_link' => $datarray['author-link'],
|
||||||
'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
|
'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_name' => stripslashes($datarray['author-name']),
|
||||||
'source_link' => $datarray['author-link'],
|
'source_link' => $datarray['author-link'],
|
||||||
'source_photo' => ((link_compare($datarray['author-link'],$importer['url']))
|
'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;
|
break;
|
||||||
|
|
|
@ -580,7 +580,9 @@ function dfrn_request_content(&$a) {
|
||||||
'link' => $a->get_baseurl() . '/notifications/intros',
|
'link' => $a->get_baseurl() . '/notifications/intros',
|
||||||
'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
|
'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
|
||||||
'source_link' => $r[0]['url'],
|
'source_link' => $r[0]['url'],
|
||||||
'source_photo' => $r[0]['photo']
|
'source_photo' => $r[0]['photo'],
|
||||||
|
'verb' => ACTIVITY_REQ_FRIEND,
|
||||||
|
'otype' => 'intro'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -691,7 +691,9 @@ function item_post(&$a) {
|
||||||
'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id,
|
'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id,
|
||||||
'source_name' => $datarray['author-name'],
|
'source_name' => $datarray['author-name'],
|
||||||
'source_link' => $datarray['author-link'],
|
'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,
|
'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id,
|
||||||
'source_name' => $datarray['author-name'],
|
'source_name' => $datarray['author-name'],
|
||||||
'source_link' => $datarray['author-link'],
|
'source_link' => $datarray['author-link'],
|
||||||
'source_photo' => $datarray['author-avatar']
|
'source_photo' => $datarray['author-avatar'],
|
||||||
|
'verb' => ACTIVITY_POST,
|
||||||
|
'otype' => 'item'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
20
update.php
20
update.php
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?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 ,
|
q("ALTER TABLE `notify` ADD `verb` CHAR( 255 ) NOT NULL ,
|
||||||
ADD `otype` CHAR( 16 ) 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 ");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue