Diaspora: The /p/ only should return top level posts - not comments

This commit is contained in:
Michael Vogel 2015-12-27 21:12:53 +01:00
parent 8d8dc2d060
commit 435a29026d

View File

@ -19,7 +19,7 @@ function p_init($a){
$guid = strtolower(substr($guid, 0, -4)); $guid = strtolower(substr($guid, 0, -4));
$item = q("SELECT `title`, `body`, `guid`, `contact-id`, `private`, `created`, `app` FROM `item` WHERE `uid` = 0 AND `guid` = '%s' AND `network` IN ('%s', '%s') LIMIT 1", $item = q("SELECT `title`, `body`, `guid`, `contact-id`, `private`, `created`, `app` FROM `item` WHERE `uid` = 0 AND `guid` = '%s' AND `network` IN ('%s', '%s') AND `id` = `parent` LIMIT 1",
dbesc($guid), NETWORK_DFRN, NETWORK_DIASPORA); dbesc($guid), NETWORK_DFRN, NETWORK_DIASPORA);
if (!$item) { if (!$item) {
header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found')); header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found'));