add SSL servers and paths to pathadminpanel.php

This commit is contained in:
Evan Prodromou 2010-10-15 13:46:21 -04:00
parent fc6711327b
commit 9b9ba29791
1 changed files with 72 additions and 28 deletions

View File

@ -93,9 +93,10 @@ class PathsadminpanelAction extends AdminPanelAction
{
static $settings = array(
'site' => array('path', 'locale_path', 'ssl', 'sslserver'),
'theme' => array('server', 'dir', 'path'),
'theme' => array('server', 'dir', 'path', 'sslserver', 'sslpath'),
'avatar' => array('server', 'dir', 'path'),
'background' => array('server', 'dir', 'path')
'background' => array('server', 'dir', 'path', 'sslserver', 'sslpath'),
'attachments' => array('server', 'dir', 'path', 'sslserver', 'sslpath')
);
// XXX: If we're only going to have one boolean on thi page we
@ -243,7 +244,7 @@ class PathsAdminPanelForm extends AdminForm
$this->unli();
$this->li();
$this->input('locale_path', _('Path to locales'), _('Directory path to locales'), 'site');
$this->input('locale_path', _('Locale Directory'), _('Directory path to locales'), 'site');
$this->unli();
$this->li();
@ -261,15 +262,23 @@ class PathsAdminPanelForm extends AdminForm
$this->out->elementStart('ul', 'form_data');
$this->li();
$this->input('server', _('Theme server'), 'Server for themes', 'theme');
$this->input('server', _('Server'), _('Server for themes'), 'theme');
$this->unli();
$this->li();
$this->input('path', _('Theme path'), 'Web path to themes', 'theme');
$this->input('path', _('Path'), _('Web path to themes'), 'theme');
$this->unli();
$this->li();
$this->input('dir', _('Theme directory'), 'Directory where themes are located', 'theme');
$this->input('sslserver', _('SSL server'), _('SSL server for themes (default: SSL server)'), 'theme');
$this->unli();
$this->li();
$this->input('sslpath', _('SSL path'), _('SSL path to themes (default: /theme/)'), 'theme');
$this->unli();
$this->li();
$this->input('dir', _('Directory'), _('Directory where themes are located'), 'theme');
$this->unli();
$this->out->elementEnd('ul');
@ -302,15 +311,52 @@ class PathsAdminPanelForm extends AdminForm
$this->out->elementStart('ul', 'form_data');
$this->li();
$this->input('server', _('Background server'), 'Server for backgrounds', 'background');
$this->input('server', _('Server'), 'Server for backgrounds', 'background');
$this->unli();
$this->li();
$this->input('path', _('Background path'), 'Web path to backgrounds', 'background');
$this->input('path', _('Path'), 'Web path to backgrounds', 'background');
$this->unli();
$this->li();
$this->input('dir', _('Background directory'), 'Directory where backgrounds are located', 'background');
$this->input('sslserver', _('SSL server'), 'Server for backgrounds on SSL pages', 'background');
$this->unli();
$this->li();
$this->input('sslpath', _('SSL path'), 'Web path to backgrounds on SSL pages', 'background');
$this->unli();
$this->li();
$this->input('dir', _('Directory'), 'Directory where backgrounds are located', 'background');
$this->unli();
$this->out->elementEnd('ul');
$this->out->elementEnd('fieldset');
$this->out->elementStart('fieldset', array('id' =>
'settings_design_attachments-paths'));
$this->out->element('legend', null, _('Attachments'));
$this->out->elementStart('ul', 'form_data');
$this->li();
$this->input('server', _('Server'), 'Server for attachments', 'attachments');
$this->unli();
$this->li();
$this->input('path', _('Path'), 'Web path to attachments', 'attachments');
$this->unli();
$this->li();
$this->input('sslserver', _('SSL server'), 'Server for attachments on SSL pages', 'attachments');
$this->unli();
$this->li();
$this->input('sslpath', _('SSL path'), 'Web path to attachments on SSL pages', 'attachments');
$this->unli();
$this->li();
$this->input('dir', _('Directory'), 'Directory where attachments are located', 'attachments');
$this->unli();
$this->out->elementEnd('ul');
@ -320,12 +366,11 @@ class PathsAdminPanelForm extends AdminForm
$this->out->element('legend', null, _('SSL'));
$this->out->elementStart('ul', 'form_data');
$this->li();
$ssl = array('never' => _('Never'),
'sometimes' => _('Sometimes'),
'always' => _('Always'));
common_debug("site ssl = " . $this->value('site', 'ssl'));
$this->out->dropdown('site-ssl', _('Use SSL'),
$ssl, _('When to use SSL'),
false, $this->value('ssl', 'site'));
@ -370,5 +415,4 @@ class PathsAdminPanelForm extends AdminForm
{
$this->out->input("$section-$setting", $title, $this->value($setting, $section), $instructions);
}
}