baby steps
This commit is contained in:
parent
ff43d62e44
commit
4302134fdd
24
mod/item.php
24
mod/item.php
@ -191,11 +191,26 @@ function item_post(&$a) {
|
|||||||
|
|
||||||
if(! $channel) {
|
if(! $channel) {
|
||||||
logger("mod_item: no channel.");
|
logger("mod_item: no channel.");
|
||||||
if(x($_REQUEST,'return'))
|
if(x($_REQUEST,'return'))
|
||||||
goaway($a->get_baseurl() . "/" . $return_path );
|
goaway($a->get_baseurl() . "/" . $return_path );
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$owner_xchan = null;
|
||||||
|
|
||||||
|
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
|
||||||
|
dbesc($channel['channel_hash'])
|
||||||
|
);
|
||||||
|
if($r && count($r)) {
|
||||||
|
$owner_xchan = $r[0];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logger("mod_item: no owner.");
|
||||||
|
if(x($_REQUEST,'return'))
|
||||||
|
goaway($a->get_baseurl() . "/" . $return_path );
|
||||||
|
killme();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($orig_post) {
|
if($orig_post) {
|
||||||
$str_group_allow = $orig_post['allow_gid'];
|
$str_group_allow = $orig_post['allow_gid'];
|
||||||
@ -566,14 +581,13 @@ function item_post(&$a) {
|
|||||||
if(! $parent)
|
if(! $parent)
|
||||||
$datarray['parent_uri'] = $uri;
|
$datarray['parent_uri'] = $uri;
|
||||||
|
|
||||||
|
|
||||||
$datarray['aid'] = get_account_id(); // fixme
|
$datarray['aid'] = get_account_id(); // fixme
|
||||||
|
|
||||||
$datarray['uid'] = $profile_uid;
|
$datarray['uid'] = $profile_uid;
|
||||||
$datarray['type'] = $post_type;
|
$datarray['type'] = $post_type;
|
||||||
$datarray['wall'] = $wall;
|
$datarray['wall'] = $wall;
|
||||||
$datarray['gravity'] = $gravity;
|
$datarray['gravity'] = $gravity;
|
||||||
$datarray['owner_xchan'] = $observer['xchan_hash']; // fixme
|
$datarray['owner_xchan'] = $owner_xchan['xchan_hash'];
|
||||||
$datarray['author_xchan'] = $observer['xchan_hash'];
|
$datarray['author_xchan'] = $observer['xchan_hash'];
|
||||||
$datarray['created'] = datetime_convert();
|
$datarray['created'] = datetime_convert();
|
||||||
$datarray['edited'] = datetime_convert();
|
$datarray['edited'] = datetime_convert();
|
||||||
|
Reference in New Issue
Block a user