Browse Source

add verb and item to notifications to aid in localisation

pull/23/merge
friendica 10 years ago
parent
commit
fc7d0360bb
7 changed files with 63 additions and 10 deletions
  1. +3
    -3
      boot.php
  2. +17
    -0
      database.sql
  3. +2
    -0
      include/diaspora.php
  4. +13
    -3
      include/items.php
  5. +3
    -1
      mod/dfrn_request.php
  6. +6
    -2
      mod/item.php
  7. +19
    -1
      update.php

+ 3
- 3
boot.php View File

@ -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


+ 17
- 0
database.sql View 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;

+ 2
- 0
include/diaspora.php View 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'
));
}


+ 13
- 3
include/items.php View 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;


+ 3
- 1
mod/dfrn_request.php View 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'
));
}


+ 6
- 2
mod/item.php View 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'
));
}
}


+ 19
- 1
update.php View 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 ");
}

Loading…
Cancel
Save