mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 07:15:13 +00:00
issue commenting from search/display if you're the site admin
This commit is contained in:
parent
b48a70641e
commit
ee99f8f27f
2 changed files with 5 additions and 3 deletions
|
@ -355,11 +355,13 @@ class Item extends Controller {
|
|||
|
||||
$profile_uid = ((isset($_REQUEST['profile_uid'])) ? intval($_REQUEST['profile_uid']) : 0);
|
||||
|
||||
// *If* you are logged in as the site admin you are allowed to create items for the sys channel.
|
||||
// *If* you are logged in as the site admin you are allowed to create top-level items for the sys channel.
|
||||
// This would typically be a webpage or webpage element.
|
||||
// Comments and replies are excluded because further below we also check for sys channel ownership and
|
||||
// will make a copy of the parent that you can interact with in your own stream
|
||||
|
||||
$sys = get_sys_channel();
|
||||
if ($sys && $profile_uid && ($sys['channel_id'] == $profile_uid) && is_site_admin()) {
|
||||
if ($sys && $profile_uid && ($sys['channel_id'] == $profile_uid) && is_site_admin() && ! $parent) {
|
||||
$uid = intval($sys['channel_id']);
|
||||
$channel = $sys;
|
||||
$observer = $sys;
|
||||
|
|
|
@ -498,7 +498,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
|
|||
// way and also you aren't writing a comment (discovered in javascript).
|
||||
|
||||
$live_update_div = '<div id="live-stream"></div>' . "\r\n"
|
||||
. "<script> var profile_uid = " . $_SESSION['uid']
|
||||
. "<script> var profile_uid = " . ((isset($_SESSION['uid'])) ? intval($_SESSION['uid']) : 0)
|
||||
. "; var netargs = '" . substr(App::$cmd,8)
|
||||
. '?f='
|
||||
. ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '')
|
||||
|
|
Loading…
Reference in a new issue