fix permalinks to children of articles and cards
This commit is contained in:
parent
fe401203bd
commit
b7386a0e88
@ -132,7 +132,7 @@ class Display extends \Zotlabs\Web\Controller {
|
|||||||
$y = q("select * from iconfig left join item on iconfig.iid = item.id
|
$y = q("select * from iconfig left join item on iconfig.iid = item.id
|
||||||
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'WEBPAGE' and item.id = %d limit 1",
|
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'WEBPAGE' and item.id = %d limit 1",
|
||||||
intval($target_item['uid']),
|
intval($target_item['uid']),
|
||||||
intval($target_item['id'])
|
intval($target_item['parent'])
|
||||||
);
|
);
|
||||||
if($x && $y) {
|
if($x && $y) {
|
||||||
goaway(z_root() . '/page/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
|
goaway(z_root() . '/page/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
|
||||||
@ -149,7 +149,7 @@ class Display extends \Zotlabs\Web\Controller {
|
|||||||
$y = q("select * from iconfig left join item on iconfig.iid = item.id
|
$y = q("select * from iconfig left join item on iconfig.iid = item.id
|
||||||
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'ARTICLE' and item.id = %d limit 1",
|
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'ARTICLE' and item.id = %d limit 1",
|
||||||
intval($target_item['uid']),
|
intval($target_item['uid']),
|
||||||
intval($target_item['id'])
|
intval($target_item['parent'])
|
||||||
);
|
);
|
||||||
if($x && $y) {
|
if($x && $y) {
|
||||||
goaway(z_root() . '/articles/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
|
goaway(z_root() . '/articles/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
|
||||||
@ -166,7 +166,7 @@ class Display extends \Zotlabs\Web\Controller {
|
|||||||
$y = q("select * from iconfig left join item on iconfig.iid = item.id
|
$y = q("select * from iconfig left join item on iconfig.iid = item.id
|
||||||
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'CARD' and item.id = %d limit 1",
|
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'CARD' and item.id = %d limit 1",
|
||||||
intval($target_item['uid']),
|
intval($target_item['uid']),
|
||||||
intval($target_item['id'])
|
intval($target_item['parent'])
|
||||||
);
|
);
|
||||||
if($x && $y) {
|
if($x && $y) {
|
||||||
goaway(z_root() . '/cards/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
|
goaway(z_root() . '/cards/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
|
||||||
|
@ -468,6 +468,7 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
$private = intval($acl->is_private() || $parent_item['item_private']);
|
$private = intval($acl->is_private() || $parent_item['item_private']);
|
||||||
$public_policy = $parent_item['public_policy'];
|
$public_policy = $parent_item['public_policy'];
|
||||||
$owner_hash = $parent_item['owner_xchan'];
|
$owner_hash = $parent_item['owner_xchan'];
|
||||||
|
$webpage = $parent_item['item_type'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if((! $allow_empty) && (! strlen($body))) {
|
if((! $allow_empty) && (! strlen($body))) {
|
||||||
|
@ -419,6 +419,7 @@ class Like extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$arr['item_origin'] = 1;
|
$arr['item_origin'] = 1;
|
||||||
$arr['item_notshown'] = 1;
|
$arr['item_notshown'] = 1;
|
||||||
|
$arr['item_type'] = $item['item_type'];
|
||||||
|
|
||||||
if(intval($item['item_wall']))
|
if(intval($item['item_wall']))
|
||||||
$arr['item_wall'] = 1;
|
$arr['item_wall'] = 1;
|
||||||
|
@ -49,6 +49,7 @@ class React extends \Zotlabs\Web\Controller {
|
|||||||
$n['aid'] = $channel['channel_account_id'];
|
$n['aid'] = $channel['channel_account_id'];
|
||||||
$n['uid'] = $channel['channel_id'];
|
$n['uid'] = $channel['channel_id'];
|
||||||
$n['item_origin'] = true;
|
$n['item_origin'] = true;
|
||||||
|
$n['item_type'] = $i[0]['item_type'];
|
||||||
$n['parent'] = $postid;
|
$n['parent'] = $postid;
|
||||||
$n['parent_mid'] = $i[0]['mid'];
|
$n['parent_mid'] = $i[0]['mid'];
|
||||||
$n['mid'] = item_message_id();
|
$n['mid'] = item_message_id();
|
||||||
|
Reference in New Issue
Block a user