Very, very cautiously, let a developer switch to the sys chan, if
they're also an admin.
This commit is contained in:
parent
f2b0311f9d
commit
e3783dfdd4
@ -82,6 +82,20 @@ function change_channel($change_channel) {
|
|||||||
intval(PAGE_REMOVED)
|
intval(PAGE_REMOVED)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// It's not there. Is this an administrator, and is this the sys channel?
|
||||||
|
if (is_developer()) {
|
||||||
|
if (! $r) {
|
||||||
|
if (is_site_admin()) {
|
||||||
|
$r = q("select channel.*, xchan.* from channel left join xchan on channel.channel_hash = xchan.xchan_hash where channel_id = %d and ( channel_pageflags & %d) a$
|
||||||
|
intval($change_channel),
|
||||||
|
intval(PAGE_SYSTEM),
|
||||||
|
intval(PAGE_REMOVED)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
$hash = $r[0]['channel_hash'];
|
$hash = $r[0]['channel_hash'];
|
||||||
$_SESSION['uid'] = intval($r[0]['channel_id']);
|
$_SESSION['uid'] = intval($r[0]['channel_id']);
|
||||||
|
Reference in New Issue
Block a user