From cd3ed83c4f89831e192b021c8d660574a95eb168 Mon Sep 17 00:00:00 2001
From: Matthias Schulte
Date: Fri, 2 Aug 2013 18:44:12 +0200
Subject: de/de-informal/en: Removed redundant suffixes in TOC of configuration
manager / Synchronize terms in de and de-informal
---
lib/plugins/config/admin.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'lib/plugins/config/admin.php')
diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php
index cbe9d336a..29529760c 100644
--- a/lib/plugins/config/admin.php
+++ b/lib/plugins/config/admin.php
@@ -268,7 +268,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
// fill in the plugin name if missing (should exist for plugins with settings)
if (!isset($this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'])) {
$this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'] =
- ucwords(str_replace('_', ' ', $plugin)).' '.$this->getLang('_plugin_sufix');
+ ucwords(str_replace('_', ' ', $plugin));
}
}
closedir($dh);
@@ -289,7 +289,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
// fill in the template name if missing (should exist for templates with settings)
if (!isset($this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'])) {
$this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'] =
- ucwords(str_replace('_', ' ', $tpl)).' '.$this->getLang('_template_sufix');
+ ucwords(str_replace('_', ' ', $tpl));
}
return true;
--
cgit v1.2.3
From 7ef8e99fe605c5da36ab6b5d317b22fcd17f665b Mon Sep 17 00:00:00 2001
From: Matt Perry
Date: Thu, 22 Aug 2013 01:01:41 -0700
Subject: Fix CodeSniffer violations
Change indentation to ensure code confirms to CodeSniffer rules.
---
lib/plugins/config/admin.php | 488 +++++++++++++++++++++----------------------
1 file changed, 244 insertions(+), 244 deletions(-)
(limited to 'lib/plugins/config/admin.php')
diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php
index 29529760c..404560548 100644
--- a/lib/plugins/config/admin.php
+++ b/lib/plugins/config/admin.php
@@ -38,168 +38,168 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
* handle user request
*/
function handle() {
- global $ID, $INPUT;
+ global $ID, $INPUT;
- if (!$this->_restore_session()) return $this->_close_session();
- if ($INPUT->int('save') != 1) return $this->_close_session();
- if (!checkSecurityToken()) return $this->_close_session();
+ if (!$this->_restore_session()) return $this->_close_session();
+ if ($INPUT->int('save') != 1) return $this->_close_session();
+ if (!checkSecurityToken()) return $this->_close_session();
- if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
+ if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
- // don't go any further if the configuration is locked
- if ($this->_config->_locked) return $this->_close_session();
+ // don't go any further if the configuration is locked
+ if ($this->_config->_locked) return $this->_close_session();
- $this->_input = $INPUT->arr('config');
+ $this->_input = $INPUT->arr('config');
- while (list($key) = each($this->_config->setting)) {
- $input = isset($this->_input[$key]) ? $this->_input[$key] : NULL;
- if ($this->_config->setting[$key]->update($input)) {
- $this->_changed = true;
+ while (list($key) = each($this->_config->setting)) {
+ $input = isset($this->_input[$key]) ? $this->_input[$key] : NULL;
+ if ($this->_config->setting[$key]->update($input)) {
+ $this->_changed = true;
+ }
+ if ($this->_config->setting[$key]->error()) $this->_error = true;
}
- if ($this->_config->setting[$key]->error()) $this->_error = true;
- }
- if ($this->_changed && !$this->_error) {
- $this->_config->save_settings($this->getPluginName());
+ if ($this->_changed && !$this->_error) {
+ $this->_config->save_settings($this->getPluginName());
- // save state & force a page reload to get the new settings to take effect
- $_SESSION['PLUGIN_CONFIG'] = array('state' => 'updated', 'time' => time());
- $this->_close_session();
- send_redirect(wl($ID,array('do'=>'admin','page'=>'config'),true,'&'));
- exit();
- } elseif(!$this->_error) {
- $this->_config->touch_settings(); // just touch to refresh cache
- }
+ // save state & force a page reload to get the new settings to take effect
+ $_SESSION['PLUGIN_CONFIG'] = array('state' => 'updated', 'time' => time());
+ $this->_close_session();
+ send_redirect(wl($ID,array('do'=>'admin','page'=>'config'),true,'&'));
+ exit();
+ } elseif(!$this->_error) {
+ $this->_config->touch_settings(); // just touch to refresh cache
+ }
- $this->_close_session();
+ $this->_close_session();
}
/**
* output appropriate html
*/
function html() {
- $allow_debug = $GLOBALS['conf']['allowdebug']; // avoid global $conf; here.
- global $lang;
- global $ID;
-
- if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
- $this->setupLocale(true);
-
- print $this->locale_xhtml('intro');
-
- ptln('
');
-
- if ($this->_config->locked)
- ptln('
'.$this->getLang('locked').'
');
- elseif ($this->_error)
- ptln('
'.$this->getLang('error').'
');
- elseif ($this->_changed)
- ptln('
'.$this->getLang('updated').'
');
-
- // POST to script() instead of wl($ID) so config manager still works if
- // rewrite config is broken. Add $ID as hidden field to remember
- // current ID in most cases.
- ptln('