fix mod display and others that require a non-zero profile_uid for updates
This commit is contained in:
parent
cb39d9435d
commit
24d256e253
@ -14,6 +14,7 @@ class Display extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$module_format = 'html';
|
$module_format = 'html';
|
||||||
|
|
||||||
|
|
||||||
if(argc() > 1) {
|
if(argc() > 1) {
|
||||||
$module_format = substr(argv(1),strrpos(argv(1),'.') + 1);
|
$module_format = substr(argv(1),strrpos(argv(1),'.') + 1);
|
||||||
if(! in_array($module_format,['atom','zot','json']))
|
if(! in_array($module_format,['atom','zot','json']))
|
||||||
@ -30,7 +31,7 @@ class Display extends \Zotlabs\Web\Controller {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(argc() > 1 && argv(1) !== 'load') {
|
if(argc() > 1) {
|
||||||
$item_hash = argv(1);
|
$item_hash = argv(1);
|
||||||
if($module_format !== 'html') {
|
if($module_format !== 'html') {
|
||||||
$item_hash = substr($item_hash,0,strrpos($item_hash,'.'));
|
$item_hash = substr($item_hash,0,strrpos($item_hash,'.'));
|
||||||
@ -260,7 +261,7 @@ class Display extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
elseif($update && !$load) {
|
elseif($update && !$load) {
|
||||||
$r = null;
|
$r = null;
|
||||||
|
|
||||||
require_once('include/channel.php');
|
require_once('include/channel.php');
|
||||||
$sys = get_sys_channel();
|
$sys = get_sys_channel();
|
||||||
$sysid = $sys['channel_id'];
|
$sysid = $sys['channel_id'];
|
||||||
@ -285,7 +286,6 @@ class Display extends \Zotlabs\Web\Controller {
|
|||||||
// make that content unsearchable by ensuring the owner_xchan can't match
|
// make that content unsearchable by ensuring the owner_xchan can't match
|
||||||
if(! perm_is_allowed($sysid,$observer_hash,'view_stream'))
|
if(! perm_is_allowed($sysid,$observer_hash,'view_stream'))
|
||||||
$sysid = 0;
|
$sysid = 0;
|
||||||
|
|
||||||
$r = q("SELECT item.parent AS item_id from item
|
$r = q("SELECT item.parent AS item_id from item
|
||||||
WHERE parent_mid = '%s'
|
WHERE parent_mid = '%s'
|
||||||
AND (((( item.allow_cid = '' AND item.allow_gid = '' AND item.deny_cid = ''
|
AND (((( item.allow_cid = '' AND item.allow_gid = '' AND item.deny_cid = ''
|
||||||
@ -315,7 +315,6 @@ class Display extends \Zotlabs\Web\Controller {
|
|||||||
WHERE parent in ( %s ) $item_normal ",
|
WHERE parent in ( %s ) $item_normal ",
|
||||||
dbesc($parents_str)
|
dbesc($parents_str)
|
||||||
);
|
);
|
||||||
|
|
||||||
xchan_query($items);
|
xchan_query($items);
|
||||||
$items = fetch_post_tags($items,true);
|
$items = fetch_post_tags($items,true);
|
||||||
$items = conv_sort($items,'created');
|
$items = conv_sort($items,'created');
|
||||||
|
@ -8,6 +8,9 @@ class Update extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$profile_uid = intval($_GET['p']);
|
$profile_uid = intval($_GET['p']);
|
||||||
|
|
||||||
|
if((! $profile_uid) && in_array(argv(1),['display','search','pubstream','home']))
|
||||||
|
$profile_uid = (-1);
|
||||||
|
|
||||||
if(argc() < 2) {
|
if(argc() < 2) {
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
@ -24,6 +27,9 @@ class Update extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
header("Content-type: text/html");
|
header("Content-type: text/html");
|
||||||
|
|
||||||
|
\App::$argv = [ argv(1) ];
|
||||||
|
\App::$argc = 1;
|
||||||
|
|
||||||
echo "<!DOCTYPE html><html><body><section>\r\n";
|
echo "<!DOCTYPE html><html><body><section>\r\n";
|
||||||
echo $mod->get($profile_uid, $load);
|
echo $mod->get($profile_uid, $load);
|
||||||
echo "</section></body></html>\r\n";
|
echo "</section></body></html>\r\n";
|
||||||
|
Reference in New Issue
Block a user