The item id is now stored in every notification as well
This commit is contained in:
parent
7a1db2e083
commit
d42cea51a2
2
boot.php
2
boot.php
|
@ -18,7 +18,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDICA_CODENAME', 'Lily of the valley');
|
define ( 'FRIENDICA_CODENAME', 'Lily of the valley');
|
||||||
define ( 'FRIENDICA_VERSION', '3.4.0' );
|
define ( 'FRIENDICA_VERSION', '3.4.0' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1183 );
|
define ( 'DB_UPDATE_VERSION', 1184 );
|
||||||
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' );
|
||||||
|
|
||||||
|
|
|
@ -925,6 +925,7 @@ function db_definition() {
|
||||||
"msg" => array("type" => "mediumtext", "not null" => "1"),
|
"msg" => array("type" => "mediumtext", "not null" => "1"),
|
||||||
"uid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
"uid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
||||||
"link" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
"link" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
||||||
|
"iid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
||||||
"parent" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
"parent" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
|
||||||
"seen" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
"seen" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||||
"verb" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
"verb" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
||||||
|
|
|
@ -63,6 +63,11 @@ function notification($params) {
|
||||||
// e.g. "your post", "David's photo", etc.
|
// e.g. "your post", "David's photo", etc.
|
||||||
$possess_desc = t('%s <!item_type!>');
|
$possess_desc = t('%s <!item_type!>');
|
||||||
|
|
||||||
|
if (isset($params['item']['id']))
|
||||||
|
$item_id = $params['item']['id'];
|
||||||
|
else
|
||||||
|
$item_id = 0;
|
||||||
|
|
||||||
if (isset($params['parent']))
|
if (isset($params['parent']))
|
||||||
$parent_id = $params['parent'];
|
$parent_id = $params['parent'];
|
||||||
else
|
else
|
||||||
|
@ -405,6 +410,7 @@ function notification($params) {
|
||||||
$datarray['date'] = datetime_convert();
|
$datarray['date'] = datetime_convert();
|
||||||
$datarray['uid'] = $params['uid'];
|
$datarray['uid'] = $params['uid'];
|
||||||
$datarray['link'] = $itemlink;
|
$datarray['link'] = $itemlink;
|
||||||
|
$datarray['iid'] = $item_id;
|
||||||
$datarray['parent'] = $parent_id;
|
$datarray['parent'] = $parent_id;
|
||||||
$datarray['type'] = $params['type'];
|
$datarray['type'] = $params['type'];
|
||||||
$datarray['verb'] = $params['verb'];
|
$datarray['verb'] = $params['verb'];
|
||||||
|
@ -420,8 +426,8 @@ function notification($params) {
|
||||||
|
|
||||||
// create notification entry in DB
|
// create notification entry in DB
|
||||||
|
|
||||||
$r = q("insert into notify (hash,name,url,photo,date,uid,link,parent,type,verb,otype)
|
$r = q("insert into notify (hash,name,url,photo,date,uid,link,iid,parent,type,verb,otype)
|
||||||
values('%s','%s','%s','%s','%s',%d,'%s',%d,%d,'%s','%s')",
|
values('%s','%s','%s','%s','%s',%d,'%s',%d,%d,%d,'%s','%s')",
|
||||||
dbesc($datarray['hash']),
|
dbesc($datarray['hash']),
|
||||||
dbesc($datarray['name']),
|
dbesc($datarray['name']),
|
||||||
dbesc($datarray['url']),
|
dbesc($datarray['url']),
|
||||||
|
@ -429,6 +435,7 @@ function notification($params) {
|
||||||
dbesc($datarray['date']),
|
dbesc($datarray['date']),
|
||||||
intval($datarray['uid']),
|
intval($datarray['uid']),
|
||||||
dbesc($datarray['link']),
|
dbesc($datarray['link']),
|
||||||
|
intval($datarray['iid']),
|
||||||
intval($datarray['parent']),
|
intval($datarray['parent']),
|
||||||
intval($datarray['type']),
|
intval($datarray['type']),
|
||||||
dbesc($datarray['verb']),
|
dbesc($datarray['verb']),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define( 'UPDATE_VERSION' , 1183 );
|
define( 'UPDATE_VERSION' , 1184 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user