Merge pull request #3001 from annando/1612-store-gcontact
The gcontact-id and the object field can now be stored with item_post
This commit is contained in:
commit
8659a09e17
1 changed files with 7 additions and 3 deletions
|
@ -174,6 +174,7 @@ function item_post(&$a) {
|
||||||
$post_id = ((x($_REQUEST,'post_id')) ? intval($_REQUEST['post_id']) : 0);
|
$post_id = ((x($_REQUEST,'post_id')) ? intval($_REQUEST['post_id']) : 0);
|
||||||
$app = ((x($_REQUEST,'source')) ? strip_tags($_REQUEST['source']) : '');
|
$app = ((x($_REQUEST,'source')) ? strip_tags($_REQUEST['source']) : '');
|
||||||
$extid = ((x($_REQUEST,'extid')) ? strip_tags($_REQUEST['extid']) : '');
|
$extid = ((x($_REQUEST,'extid')) ? strip_tags($_REQUEST['extid']) : '');
|
||||||
|
$object = ((x($_REQUEST,'object')) ? $_REQUEST['object'] : '');
|
||||||
|
|
||||||
// Check for multiple posts with the same message id (when the post was created via API)
|
// Check for multiple posts with the same message id (when the post was created via API)
|
||||||
if (($message_id != '') AND ($profile_uid != 0)) {
|
if (($message_id != '') AND ($profile_uid != 0)) {
|
||||||
|
@ -718,6 +719,7 @@ function item_post(&$a) {
|
||||||
$datarray['moderated'] = $allow_moderated;
|
$datarray['moderated'] = $allow_moderated;
|
||||||
$datarray['gcontact-id'] = get_gcontact_id(array("url" => $datarray['author-link'], "network" => $datarray['network'],
|
$datarray['gcontact-id'] = get_gcontact_id(array("url" => $datarray['author-link'], "network" => $datarray['network'],
|
||||||
"photo" => $datarray['author-avatar'], "name" => $datarray['author-name']));
|
"photo" => $datarray['author-avatar'], "name" => $datarray['author-name']));
|
||||||
|
$datarray['object'] = $object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These fields are for the convenience of plugins...
|
* These fields are for the convenience of plugins...
|
||||||
|
@ -815,7 +817,7 @@ function item_post(&$a) {
|
||||||
`tag`, `inform`, `verb`, `object-type`, `postopts`,
|
`tag`, `inform`, `verb`, `object-type`, `postopts`,
|
||||||
`allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`,
|
`allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`,
|
||||||
`pubmail`, `attach`, `bookmark`,`origin`, `moderated`, `file`,
|
`pubmail`, `attach`, `bookmark`,`origin`, `moderated`, `file`,
|
||||||
`rendered-html`, `rendered-hash`,
|
`rendered-html`, `rendered-hash`, `gcontact-id`, `object`,
|
||||||
`parent`, `parent-uri`, `plink`, `last-child`, `visible`)
|
`parent`, `parent-uri`, `plink`, `last-child`, `visible`)
|
||||||
VALUES('%s', '%s', %d, '%s', %d, %d, '%s', %d,
|
VALUES('%s', '%s', %d, '%s', %d, %d, '%s', %d,
|
||||||
'%s', '%s', '%s', %d,
|
'%s', '%s', '%s', %d,
|
||||||
|
@ -825,7 +827,7 @@ function item_post(&$a) {
|
||||||
'%s', '%s', '%s', '%s', '%s',
|
'%s', '%s', '%s', '%s', '%s',
|
||||||
'%s', '%s', '%s', '%s', %d,
|
'%s', '%s', '%s', '%s', %d,
|
||||||
%d, '%s', %d, %d, %d, '%s',
|
%d, '%s', %d, %d, %d, '%s',
|
||||||
'%s', '%s',
|
'%s', '%s', %d, '%s',
|
||||||
%d, '%s', '%s', %d, %d)",
|
%d, '%s', '%s', %d, %d)",
|
||||||
dbesc($datarray['guid']),
|
dbesc($datarray['guid']),
|
||||||
dbesc($datarray['extid']),
|
dbesc($datarray['extid']),
|
||||||
|
@ -873,6 +875,8 @@ function item_post(&$a) {
|
||||||
dbesc($datarray['file']),
|
dbesc($datarray['file']),
|
||||||
dbesc($datarray['rendered-html']),
|
dbesc($datarray['rendered-html']),
|
||||||
dbesc($datarray['rendered-hash']),
|
dbesc($datarray['rendered-hash']),
|
||||||
|
intval($datarray['gcontact-id']),
|
||||||
|
dbesc($datarray['object']),
|
||||||
intval($datarray['parent']),
|
intval($datarray['parent']),
|
||||||
dbesc($datarray['parent-uri']),
|
dbesc($datarray['parent-uri']),
|
||||||
dbesc($datarray['plink']),
|
dbesc($datarray['plink']),
|
||||||
|
|
Loading…
Reference in a new issue