1
1
Fork 0

Merge pull request #2210 from annando/1512-diaspora-p

Diaspora: The /p/ only should return top level posts - not comments
This commit is contained in:
Tobias Diekershoff 2015-12-28 05:23:00 +01:00
commit 3dd08094ca

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'));