summaryrefslogtreecommitdiff
path: root/actions/pathsadminpanel.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-01-27 14:27:22 -0800
committerZach Copley <zach@status.net>2010-01-27 14:27:22 -0800
commit78079f34e273357d03ceee13269f9a388e66c4e3 (patch)
tree8f29f6fb7de5b6b6627a7eba3e16b86fa9b2ae1f /actions/pathsadminpanel.php
parent656d95418c6d7f8b884c4c8af14ad6952032ace6 (diff)
parent2494d3fa25a44b3cacf85c594683675ae9e6d0cb (diff)
Merge branch 'testing' into -1.9.x
* testing: (130 commits) HTTP auth provided is evaluated even if it's not required Rename rc3to09.sql to rc3torc4.sql to avoid confusion if we add a last-minute change after this! Add new oauth tables and modifications to 'consumer' table for rc4 Centred leaderboard ad camelcase the uap param names move leaderboard to after the header Moved rectangle ad into aside and leaderboard to the right in header. Aligning wide skyscraper to the right instead of left CSS ids and classes fixed in UAPPlugin wrong height for rectangle in BlankAd Add the moved BlankAdPlugin make BlankAd dir and change to use a 1x1 image move BlankAdPlugin to its own dir Add BlankAdPlugin to test ad layout in different themes make uapplugin an abstract class move UAP plugin to core Lowercased switch cases in UAP Plugin Plugin for Universal Ad Package. Outputs four most widely used ad types. Add persistent:true property to Stomp messages so ActiveMQ doesn't decide to discard them even though persistence is enabled on the broker. :) (Thanks Aric!) quick fix: use common_path() on realtime update JS so it works with the new JS path code (will pull from main server for now) ... Conflicts: actions/apioauthaccesstoken.php actions/apioauthauthorize.php actions/apioauthrequesttoken.php actions/editapplication.php actions/newapplication.php lib/apiauth.php lib/queuemanager.php lib/router.php
Diffstat (limited to 'actions/pathsadminpanel.php')
-rw-r--r--actions/pathsadminpanel.php33
1 files changed, 30 insertions, 3 deletions
diff --git a/actions/pathsadminpanel.php b/actions/pathsadminpanel.php
index 3779fcfaa..9155a7e42 100644
--- a/actions/pathsadminpanel.php
+++ b/actions/pathsadminpanel.php
@@ -24,7 +24,7 @@
* @author Evan Prodromou <evan@status.net>
* @author Zach Copley <zach@status.net>
* @author Sarven Capadisli <csarven@status.net>
- * @copyright 2008-2009 StatusNet, Inc.
+ * @copyright 2008-2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
@@ -98,6 +98,11 @@ class PathsadminpanelAction extends AdminPanelAction
'background' => array('server', 'dir', 'path')
);
+ // XXX: If we're only going to have one boolean on thi page we
+ // can remove some of the boolean processing code --Z
+
+ static $booleans = array('site' => array('fancy'));
+
$values = array();
foreach ($settings as $section => $parts) {
@@ -106,6 +111,12 @@ class PathsadminpanelAction extends AdminPanelAction
}
}
+ foreach ($booleans as $section => $parts) {
+ foreach ($parts as $setting) {
+ $values[$section][$setting] = ($this->boolean($setting)) ? 1 : 0;
+ }
+ }
+
$this->validate($values);
// assert(all values are valid);
@@ -120,7 +131,13 @@ class PathsadminpanelAction extends AdminPanelAction
}
}
- $config->query('COMMIT');
+ foreach ($booleans as $section => $parts) {
+ foreach ($parts as $setting) {
+ Config::save($section, $setting, $values[$section][$setting]);
+ }
+ }
+
+ $config->query('COMMIT');
return;
}
@@ -213,10 +230,14 @@ class PathsAdminPanelForm extends AdminForm
function formData()
{
- $this->out->elementStart('fieldset', array('id' => 'settings_paths_locale'));
+ $this->out->elementStart('fieldset', array('id' => 'settings_paths_locale'));
$this->out->element('legend', null, _('Site'), 'site');
$this->out->elementStart('ul', 'form_data');
+ $this->li();
+ $this->input('server', _('Server'), _('Site\'s server hostname.'));
+ $this->unli();
+
$this->li();
$this->input('path', _('Path'), _('Site path'));
$this->unli();
@@ -225,6 +246,12 @@ class PathsAdminPanelForm extends AdminForm
$this->input('locale_path', _('Path to locales'), _('Directory path to locales'), 'site');
$this->unli();
+ $this->li();
+ $this->out->checkbox('fancy', _('Fancy URLs'),
+ (bool) $this->value('fancy'),
+ _('Use fancy (more readable and memorable) URLs?'));
+ $this->unli();
+
$this->out->elementEnd('ul');
$this->out->elementEnd('fieldset');