this should fix the foreign language like notifications (again)
This commit is contained in:
parent
46c66e2e4c
commit
3c328083d2
@ -1479,7 +1479,7 @@ function item_store($arr,$allow_exec = false) {
|
|||||||
$arr['changed'] = datetime_convert();
|
$arr['changed'] = datetime_convert();
|
||||||
$arr['location'] = ((x($arr,'location')) ? notags(trim($arr['location'])) : '');
|
$arr['location'] = ((x($arr,'location')) ? notags(trim($arr['location'])) : '');
|
||||||
$arr['coord'] = ((x($arr,'coord')) ? notags(trim($arr['coord'])) : '');
|
$arr['coord'] = ((x($arr,'coord')) ? notags(trim($arr['coord'])) : '');
|
||||||
$arr['parent_mid'] = ((x($arr,'parent_mid')) ? notags(trim($arr['parent_mid'])) : '');
|
$arr['parent_mid'] = ((x($arr,'parent_mid')) ? notags(trim($arr['parent_mid'])) : $arr['mid']);
|
||||||
$arr['thr_parent'] = ((x($arr,'thr_parent')) ? notags(trim($arr['thr_parent'])) : $arr['parent_mid']);
|
$arr['thr_parent'] = ((x($arr,'thr_parent')) ? notags(trim($arr['thr_parent'])) : $arr['parent_mid']);
|
||||||
$arr['verb'] = ((x($arr,'verb')) ? notags(trim($arr['verb'])) : '');
|
$arr['verb'] = ((x($arr,'verb')) ? notags(trim($arr['verb'])) : '');
|
||||||
$arr['obj_type'] = ((x($arr,'obj_type')) ? notags(trim($arr['obj_type'])) : '');
|
$arr['obj_type'] = ((x($arr,'obj_type')) ? notags(trim($arr['obj_type'])) : '');
|
||||||
@ -1591,7 +1591,7 @@ function item_store($arr,$allow_exec = false) {
|
|||||||
intval($arr['uid'])
|
intval($arr['uid'])
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
logger('item-store: duplicate item ignored. ' . print_r($arr,true));
|
logger('item_store: duplicate item ignored. ' . print_r($arr,true));
|
||||||
$ret['message'] = 'duplicate post.';
|
$ret['message'] = 'duplicate post.';
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
@ -1631,6 +1631,7 @@ function item_store($arr,$allow_exec = false) {
|
|||||||
|
|
||||||
if($r && count($r)) {
|
if($r && count($r)) {
|
||||||
$current_post = $r[0]['id'];
|
$current_post = $r[0]['id'];
|
||||||
|
$arr = $r[0]; // This will gives us a fresh copy of what's now in the DB and undo the db escaping, which really messes up the notifications
|
||||||
logger('item_store: created item ' . $current_post, LOGGER_DEBUG);
|
logger('item_store: created item ' . $current_post, LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1668,6 +1669,7 @@ function item_store($arr,$allow_exec = false) {
|
|||||||
intval($current_post)
|
intval($current_post)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// These are probably redundant now that we've queried the just stored post
|
||||||
$arr['id'] = $current_post;
|
$arr['id'] = $current_post;
|
||||||
$arr['parent'] = $parent_id;
|
$arr['parent'] = $parent_id;
|
||||||
$arr['allow_cid'] = $allow_cid;
|
$arr['allow_cid'] = $allow_cid;
|
||||||
|
Reference in New Issue
Block a user