summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-07 23:16:34 -0500
committerEvan Prodromou <evan@status.net>2009-11-07 23:16:34 -0500
commitdd9fa0e6833432b1936a6375e4cb411fe340dec8 (patch)
treee5454302ebf189c3dd708bbdfc0b1b141d0fec28 /lib
parent144f8171099aa6d1f3807554443573195c26f986 (diff)
only load user once, reload settings in admin panel
Diffstat (limited to 'lib')
-rw-r--r--lib/adminpanelaction.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/adminpanelaction.php b/lib/adminpanelaction.php
index 2e9261711..fa3272f8a 100644
--- a/lib/adminpanelaction.php
+++ b/lib/adminpanelaction.php
@@ -75,6 +75,10 @@ class AdminPanelAction extends Action
$user = common_current_user();
+ // ...because they're logged in
+
+ assert(!empty($user));
+
// It must be a "real" login, not saved cookie login
if (!common_is_real_login()) {
@@ -88,8 +92,6 @@ class AdminPanelAction extends Action
// User must have the right to change admin settings
- $user = common_current_user();
-
if (!$user->hasRight(Right::CONFIGURESITE)) {
$this->clientError(_('You cannot make changes to this site.'));
return;
@@ -116,6 +118,10 @@ class AdminPanelAction extends Action
try {
$this->saveSettings();
+ // Reload settings
+
+ Config::loadSettings();
+
$this->success = true;
$this->msg = _('Settings saved.');
} catch (Exception $e) {