From e3b967f475e8933567ba7d80dacb6d496224fe55 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Mon, 15 Sep 2014 03:59:04 +0100 Subject: [PATCH 1/4] Very, very cautiously let a developer switch to the sys chan if they're also an administrator. --- include/security.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/security.php b/include/security.php index 0f2edc708..e83cc7061 100644 --- a/include/security.php +++ b/include/security.php @@ -82,6 +82,19 @@ function change_channel($change_channel) { 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) and not (channel_pageflags & %d ) limit 1", + intval($change_channel), + intval(PAGE_SYSTEM), + intval(PAGE_REMOVED) + ); + } + } + } + if($r) { $hash = $r[0]['channel_hash']; $_SESSION['uid'] = intval($r[0]['channel_id']); From 65441b95bbf84f8f88445b6352995c9c89beb1f4 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Thu, 18 Sep 2014 17:07:47 +0100 Subject: [PATCH 2/4] Doco - permissions needs some work, but this is a relative whopper. --- doc/permissions.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/permissions.bb b/doc/permissions.bb index 8a071a3f5..c893ed84f 100644 --- a/doc/permissions.bb +++ b/doc/permissions.bb @@ -66,7 +66,7 @@ This permission determines who can write to your wall when clicking through to y [i]Can comment on my posts.[/i] -This permission determines who can comment on posts you create. Normally, you would want this to match your "can view my public pages" permission +This permission determines who can comment on posts you create. Normally, you would want this to match your "can view my public stream and posts" permission [i]Can send me private mail messages.[/i] From fc93ee89a9d30d15a9dde4638f018303739f8d9d Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Thu, 18 Sep 2014 18:09:54 +0100 Subject: [PATCH 3/4] If a short ping causes lots of issues, and anyone who has been here a while tends to have a longer ping, we should probably have a longer ping --- boot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index 5118038d3..d412e82e4 100755 --- a/boot.php +++ b/boot.php @@ -982,9 +982,9 @@ class App { if ($user_scalable === false) $user_scalable = 1; - $interval = ((local_user()) ? get_pconfig(local_user(),'system','update_interval') : 40000); + $interval = ((local_user()) ? get_pconfig(local_user(),'system','update_interval') : 80000); if($interval < 10000) - $interval = 40000; + $interval = 80000; if(! x($this->page,'title')) $this->page['title'] = $this->config['system']['sitename']; From 5c8f5e2aa3afdf6608a7e95bea4a7c44e8b6e38b Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Thu, 18 Sep 2014 18:14:52 +0100 Subject: [PATCH 4/4] Catch the settings too --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/settings.php b/mod/settings.php index f9568feb3..37606985e 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -736,7 +736,7 @@ function settings_content(&$a) { $user_scalable = (($user_scalable===false)? '1': $user_scalable); // default if not set: 1 $browser_update = intval(get_pconfig(local_user(), 'system','update_interval')); - $browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds + $browser_update = (($browser_update == 0) ? 80 : $browser_update / 1000); // default if not set: 40 seconds $itemspage = intval(get_pconfig(local_user(), 'system','itemspage')); $itemspage = (($itemspage > 0 && $itemspage < 101) ? $itemspage : 20); // default if not set: 20 items