Commit 6e414e3d authored by tinogo@blue-cable.de's avatar tinogo@blue-cable.de

- added some new options to the system settings

- use === instead of == in some parts
parent ec69bf66
......@@ -8,6 +8,7 @@
<li><a href="#tab-2">{lang t="common|date"}</a></li>
<li><a href="#tab-3">{lang t="system|maintenance"}</a></li>
<li><a href="#tab-4">{lang t="common|seo"}</a></li>
<li><a href="#tab-5">{lang t="system|performance"}</a></li>
</ul>
<div id="tab-1">
<dl>
......@@ -93,12 +94,21 @@
<span>({lang t="common|keywords_separate_with_commas"})</span>
</dt>
<dd><textarea name="form[seo_meta_keywords]" id="seo-meta-keywords" cols="50" rows="6">{$form.seo_meta_keywords}</textarea></dd>
<dt><label for="seo-aliases-1">{lang t="system|enable_seo_aliases"}</label></dt>
<dd>
{foreach $aliases as $row}
<label for="seo-aliases-{$row.value}">
<input type="radio" name="form[seo_aliases]" id="seo-aliases-{$row.value}" value="{$row.value}" class="checkbox"{$row.checked}>
{$row.lang}
</label>
{/foreach}
</dd>
<dt>
<label for="seo-mod-rewrite-1">{lang t="system|mod_rewrite"}</label>
<span>({lang t="system|mod_rewrite_description"})</span>
</dt>
<dd>
{foreach $sef as $row}
{foreach $mod_rewrite as $row}
<label for="seo-mod-rewrite-{$row.value}">
<input type="radio" name="form[seo_mod_rewrite]" id="seo-mod-rewrite-{$row.value}" value="{$row.value}" class="checkbox"{$row.checked}>
{$row.lang}
......@@ -107,6 +117,24 @@
</dd>
</dl>
</div>
<div id="tab-5" class="ui-tabs-hide">
<dl>
<dt><label for="cache-images-1">{lang t="system|cache_images"}</label></dt>
<dd>
{foreach $cache_images as $row}
<label for="cache_images-{$row.value}">
<input type="radio" name="form[cache_images]" id="cache-images-{$row.value}" value="{$row.value}" class="checkbox"{$row.checked}>
{$row.lang}
</label>
{/foreach}
</dd>
<dt>
<label for="cache-minify">{lang t="system|minify_cache_lifetime"}</label>
<span>({lang t="system|minify_cache_lifetime_description"})</span>
</dt>
<dd><input type="text" name="form[cache_minify]" id="cache-minify" value="{$form.cache_minify}" maxlength="20"></dd>
</dl>
</div>
</div>
<div class="form-bottom">
<input type="submit" value="{lang t="common|submit"}" class="form">
......
......@@ -40,10 +40,7 @@ class cache
public static function check($filename, $cache_id = '')
{
$cache_id.= $cache_id !== '' ? '_' : '';
if (is_file(ACP3_ROOT . self::$sql_cache_dir . $cache_id . md5($filename) . '.php')) {
return true;
}
return false;
return is_file(ACP3_ROOT . self::$sql_cache_dir . $cache_id . md5($filename) . '.php');
}
/**
* Erstellt den Cache
......@@ -60,8 +57,8 @@ class cache
$cache_id.= $cache_id !== '' ? '_' : '';
$bool = @file_put_contents(ACP3_ROOT . self::$sql_cache_dir . $cache_id . md5($filename) . '.php', serialize($data), LOCK_EX);
return $bool ? true : false;
} elseif (self::check($filename, $cache_id)) {
return $bool !== false ? true : false;
} elseif (self::check($filename, $cache_id) === true) {
return self::delete($filename, $cache_id);
}
return false;
......@@ -75,7 +72,7 @@ class cache
*/
public static function delete($filename, $cache_id = '')
{
if (self::check($filename)) {
if (self::check($filename) === true) {
$cache_id.= $cache_id !== '' ? '_' : '';
return unlink(ACP3_ROOT . self::$sql_cache_dir . $cache_id . md5($filename) . '.php');
}
......@@ -90,7 +87,7 @@ class cache
*/
public static function output($filename, $cache_id = '')
{
if (self::check($filename, $cache_id)) {
if (self::check($filename, $cache_id) === true) {
$cache_id.= $cache_id !== '' ? '_' : '';
$handle = fopen(ACP3_ROOT . self::$sql_cache_dir . $cache_id . md5($filename) . '.php', 'r');
flock($handle, LOCK_SH);
......
......@@ -32,6 +32,8 @@ class config
if (is_writable($path)){
// Konfigurationsdatei in ein Array schreiben
$config = array(
'cache_images' => CONFIG_CACHE_IMAGES,
'cache_minify' => CONFIG_CACHE_MINIFY,
'date_dst' => CONFIG_DATE_DST,
'date_format_long' => CONFIG_DATE_FORMAT_LONG,
'date_format_short' => CONFIG_DATE_FORMAT_SHORT,
......@@ -49,6 +51,7 @@ class config
'lang' => CONFIG_LANG,
'maintenance_message' => CONFIG_MAINTENANCE_MESSAGE,
'maintenance_mode' => CONFIG_MAINTENANCE_MODE,
'seo_aliases' => CONFIG_SEO_ALIASES,
'seo_meta_description' => CONFIG_SEO_META_DESCRIPTION,
'seo_meta_keywords' => CONFIG_SEO_META_KEYWORDS,
'seo_mod_rewrite' => CONFIG_SEO_MOD_REWRITE,
......@@ -63,16 +66,22 @@ class config
$content = "<?php\n";
$content.= "define('INSTALLED', true);\n";
if (defined('DEBUG')) {
$content.= "define('DEBUG', " . ((bool) DEBUG) . ");\n";
$content.= "define('DEBUG', " . ((bool) DEBUG === true ? 'true' : 'false') . ");\n";
}
$pattern = "define('CONFIG_%s', '%s');\n";
$pattern = "define('CONFIG_%s', %s);\n";
foreach ($data as $key => $value) {
if (array_key_exists($key, $config))
if (is_numeric($value) === true)
$value = $value;
elseif (is_bool($value) === true)
$value = $value === true ? 'true' : 'false';
else
$value = '\'' . $value . '\'';
$content.= sprintf($pattern, strtoupper($key), $value);
}
$content.= '?>';
$bool = @file_put_contents($path, $content, LOCK_EX);
return $bool ? true : false;
return $bool !== false ? true : false;
}
return false;
}
......@@ -103,7 +112,7 @@ class config
*/
public static function getModuleSettings($module)
{
if (!cache::check($module . '_settings'))
if (cache::check($module . '_settings') === false)
self::setModuleCache($module);
return cache::output($module . '_settings');
......
......@@ -73,7 +73,7 @@ class seo
{
global $uri;
if ($mode == 1) {
if ($mode === 1) {
$keywords = self::getKeywordsOrDescription($uri->query);
if (empty($keywords)) {
$keywords = self::getKeywordsOrDescription($uri->mod);
......@@ -98,7 +98,7 @@ class seo
if (empty(self::$aliases))
self::$aliases = self::getSEOCache();
return array_key_exists($path, self::$aliases) ? true : false;
return array_key_exists($path, self::$aliases);
}
/**
* Gibt einen URI-Alias aus
......
......@@ -46,11 +46,11 @@ class uri
define('IN_ADM', true);
// "acp/" entfernen
$this->query = substr($this->query, 4);
} elseif (!defined('IN_INSTALL')) {
} elseif (defined('IN_INSTALL') === false) {
global $db;
// Query auf eine benutzerdefinierte Startseite setzen
if ($this->query == '/' && CONFIG_HOMEPAGE != '')
if ($this->query === '/' && CONFIG_HOMEPAGE !== '')
$this->query = CONFIG_HOMEPAGE;
// Falls für Query ein Alias existiert, zu diesem weiterleiten
......@@ -79,7 +79,7 @@ class uri
for ($i = 2; $i < $c_query; ++$i) {
// Position
if (!defined('POS') && preg_match('/^(page_(\d+))$/', $query[$i])) {
if (defined('POS') === false && preg_match('/^(page_(\d+))$/', $query[$i])) {
global $auth;
define('POS', (substr($query[$i], 5) - 1) * $auth->entries);
// ID eines Datensatzes
......@@ -97,7 +97,7 @@ class uri
$this->cat = $_POST['cat'];
if (!empty($_POST['action']))
$this->action = $_POST['action'];
if (!defined('POS'))
if (defined('POS') === false)
define('POS', '0');
}
/**
......@@ -108,7 +108,7 @@ class uri
*/
public function __get($key)
{
if (isset($this->params[$key]))
if (isset($this->params[$key]) === true)
return $this->params[$key];
return null;
}
......@@ -121,7 +121,7 @@ class uri
public function __set($name, $value)
{
// Parameter sollten nicht überschrieben werden können
if (!isset($this->params[$name]))
if (isset($this->params[$name]) === false)
$this->params[$name] = $value;
}
/**
......@@ -144,10 +144,10 @@ class uri
public function redirect($args, $new_page = 0)
{
if (!empty($args)) {
if ($args == 'errors/404' || $args == 'errors/403')
if ($args === 'errors/404' || $args === 'errors/403')
$args = (defined('IN_ACP3') ? '' : 'acp/') . $args;
$protocol = empty($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'off' ? 'http://' : 'https://';
$protocol = empty($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) === 'off' ? 'http://' : 'https://';
$host = $_SERVER['HTTP_HOST'];
header('Location: ' . $protocol . $host . $this->route($args));
exit;
......@@ -170,13 +170,13 @@ class uri
$path = $path . (!preg_match('/\/$/', $path) ? '/' : '');
// Überprüfen, ob Alias vorhanden ist und diesen als URI verwenden
if ($alias == 1 && !preg_match('/^acp\//', $path)) {
if (CONFIG_SEO_ALIASES === true && $alias === 1 && !preg_match('/^acp\//', $path)) {
global $uri;
$alias = seo::getUriAlias($path);
$path = $alias . (!preg_match('/\/$/', $alias) ? '/' : '');
}
$prefix = CONFIG_SEO_MOD_REWRITE == '0' || preg_match('/^acp\//', $path) ? PHP_SELF . '/' : ROOT_DIR;
$prefix = CONFIG_SEO_MOD_REWRITE === false || preg_match('/^acp\//', $path) ? PHP_SELF . '/' : ROOT_DIR;
return $prefix . $path;
}
}
\ No newline at end of file
<?php
define('INSTALLED', true);
define('DEBUG', 1);
define('CONFIG_DATE_DST', '0');
define('DEBUG', true);
define('CONFIG_CACHE_IMAGES', true);
define('CONFIG_CACHE_MINIFY', 3600);
define('CONFIG_DATE_DST', 0);
define('CONFIG_DATE_FORMAT_LONG', 'd.m.y, H:i');
define('CONFIG_DATE_FORMAT_SHORT', 'd.m.y');
define('CONFIG_DATE_TIME_ZONE', '3600');
define('CONFIG_DATE_TIME_ZONE', 3600);
define('CONFIG_DB_HOST', 'localhost');
define('CONFIG_DB_NAME', 'acp3');
define('CONFIG_DB_PASSWORD', '');
define('CONFIG_DB_PRE', 'acp3_');
define('CONFIG_DB_USER', 'root');
define('CONFIG_DB_VERSION', '11');
define('CONFIG_DB_VERSION', 11);
define('CONFIG_DESIGN', 'acp3');
define('CONFIG_ENTRIES', '20');
define('CONFIG_FLOOD', '30');
define('CONFIG_ENTRIES', 20);
define('CONFIG_FLOOD', 30);
define('CONFIG_HOMEPAGE', 'news/list/');
define('CONFIG_LANG', 'de');
define('CONFIG_MAINTENANCE_MESSAGE', 'Wegen kurzfristigen Wartungsarbeiten ist diese Website zur Zeit nicht erreichbar. Bitte versuchen Sie es in einigen Minuten erneut.');
define('CONFIG_MAINTENANCE_MODE', '0');
define('CONFIG_MAINTENANCE_MODE', false);
define('CONFIG_SEO_ALIASES', true);
define('CONFIG_SEO_META_DESCRIPTION', '');
define('CONFIG_SEO_META_KEYWORDS', '');
define('CONFIG_SEO_MOD_REWRITE', '0');
define('CONFIG_SEO_MOD_REWRITE', false);
define('CONFIG_SEO_TITLE', 'ACP3');
define('CONFIG_VERSION', '4.0 SVN');
define('CONFIG_WYSIWYG', 'ckeditor');
......
......@@ -7,7 +7,7 @@
* @subpackage Core
*/
define('IN_ACP3', true);
define('ACP3_ROOT', dirname(__FILE__) . '/');
define('ACP3_ROOT', realpath(dirname(__FILE__)) . '/');
require ACP3_ROOT . 'includes/common.php';
modules::outputPage();
\ No newline at end of file
......@@ -98,15 +98,21 @@ function writeConfigFile(array $data)
$content = "<?php\n";
$content.= "define('INSTALLED', true);\n";
if (defined('DEBUG')) {
$content.= "define('DEBUG', " . ((bool) DEBUG) . ");\n";
$content.= "define('DEBUG', " . ((bool) DEBUG === true ? 'true' : 'false') . ");\n";
}
$pattern = "define('CONFIG_%s', '%s');\n";
$pattern = "define('CONFIG_%s', %s);\n";
foreach ($data as $key => $value) {
if (is_numeric($value) === true)
$value = $value;
elseif (is_bool($value) === true)
$value = $value === true ? 'true' : 'false';
else
$value = '\'' . $value . '\'';
$content.= sprintf($pattern, strtoupper($key), $value);
}
$content.= '?>';
$bool = @file_put_contents($path, $content, LOCK_EX);
return $bool ? true : false;
return $bool !== false ? true : false;
}
return false;
}
......
......@@ -10,7 +10,8 @@ define('ROOT_DIR', $php_self != '/' ? $php_self . '/' : '/');
define('INCLUDES_DIR', ACP3_ROOT . 'includes/');
define('MODULES_DIR', ACP3_ROOT . 'modules/');
define('CONFIG_VERSION', '4.0 SVN');
define('CONFIG_SEO_MOD_REWRITE', 0);
define('CONFIG_SEO_ALIASES', false);
define('CONFIG_SEO_MOD_REWRITE', false);
include INCLUDES_DIR . 'globals.php';
......
......@@ -7,7 +7,7 @@ define('IN_INSTALL', true);
// Evtl. gesetzten Content-Type des Servers überschreiben
header('Content-type: text/html; charset=UTF-8');
define('ACP3_ROOT', dirname(__FILE__) . '/../');
define('ACP3_ROOT', realpath(dirname(__FILE__) . '/../') . '/');
require ACP3_ROOT . 'installation/includes/startup.php';
// Überprüfen, ob die angeforderte Seite überhaupt existiert
......
......@@ -42,6 +42,8 @@ if (isset($_POST['submit'])) {
} else {
// Systemkonfiguration erstellen
$config = array(
'cache_images' => true,
'cache_minify' => 3600,
'date_dst' => $form['date_dst'],
'date_format_long' => $form['date_format_long'],
'date_format_short' => $form['date_format_short'],
......@@ -57,11 +59,12 @@ if (isset($_POST['submit'])) {
'flood' => $form['flood'],
'homepage' => 'news/list/',
'lang' => LANG,
'maintenance_mode' => 0,
'maintenance_mode' => false,
'maintenance_message' => $lang->t('installation', 'offline_message'),
'seo_aliases' => true,
'seo_meta_description' => '',
'seo_meta_keywords' => '',
'seo_mod_rewrite' => 0,
'seo_mod_rewrite' => false,
'seo_title' => !empty($form['seo_title']) ? $form['seo_title'] : 'ACP3',
'version' => CONFIG_VERSION,
'wysiwyg' => 'ckeditor'
......@@ -207,11 +210,10 @@ if (isset($_POST['submit'])) {
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
// Einträge pro Seite
$i = 0;
for ($j = 10; $j <= 50; $j = $j + 10) {
$entries = array();
for ($i = 0, $j = 10; $j <= 50; $j = $j + 10, ++$i) {
$entries[$i]['value'] = $j;
$entries[$i]['selected'] = selectEntry('entries', $j, '20');
$i++;
}
$tpl->assign('entries', $entries);
......@@ -219,6 +221,7 @@ if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
$time_zones = array(-12, -11, -10, -9.5, -9, -8, -7, -6, -5, -4, -3.5, -3, -2, -1, 0, 1, 2, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 8, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 14);
$check_dst = date('I');
$offset = date('Z') - ($check_dst == '1' ? 3600 : 0);
$time_zone = array();
$i = 0;
foreach ($time_zones as $row) {
$time_zone[$i]['value'] = $row * 3600;
......@@ -229,6 +232,7 @@ if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
$tpl->assign('time_zone', $time_zone);
// Sommerzeit an/aus
$dst = array();
$dst[0]['value'] = '1';
$dst[0]['checked'] = selectEntry('date_dst', '1', $check_dst, 'checked');
$dst[0]['lang'] = $lang->t('common', 'yes');
......
......@@ -476,7 +476,11 @@ if (CONFIG_DB_VERSION < 11) {
}
// Konfigurationsdatei aktualisieren
$config = array('db_version' => count($queries));
$config = array(
'db_version' => count($queries),
'maintenance_mode' => (bool) CONFIG_MAINTENANCE_MODE,
'seo_mod_rewrite' => (bool) CONFIG_SEO_MOD_REWRITE,
);
if (defined('CONFIG_DATE_FORMAT') && CONFIG_DB_VERSION == 0) {
$config['wysiwyg'] = CONFIG_WYSIWYG == 'fckeditor' ? 'ckeditor' : CONFIG_WYSIWYG;
......@@ -486,6 +490,12 @@ if (defined('CONFIG_DATE_FORMAT') && CONFIG_DB_VERSION == 0) {
define('CONFIG_DATE_FORMAT_LONG', CONFIG_DATE_FORMAT);
define('CONFIG_DATE_FORMAT_SHORT', $config['date_format_short']);
}
if (defined('CONFIG_CACHE_IMAGES') == false)
define('CONFIG_CACHE_IMAGES', true);
if (defined('CONFIG_CACHE_MINIFY') == false)
define('CONFIG_CACHE_MINIFY', 3600);
if (defined('CONFIG_SEO_ALIASES') == false)
define('CONFIG_SEO_ALIASES', true);
print config::system($config) ? 'Konfigurationsdatei erfolgreich aktualisiert!' : 'Die Konfigurationsdatei konnte nicht aktualisiert werden!';
......
......@@ -5,6 +5,7 @@
<item key="acp3_up_to_date">Sie verwenden bereits die aktuelle Version des ACP3.</item>
<item key="architecture">Architektur</item>
<item key="attention">Achtung</item>
<item key="cache_images">Bilder cachen</item>
<item key="complete_export">Komplett</item>
<item key="config_edit_error">Beim Bearbeiten der Konfiguration ist ein Fehler aufgetreten.</item>
<item key="config_edit_success">Die Konfiguration wurde erfolgreich bearbeitet.</item>
......@@ -18,8 +19,8 @@
<item key="disable_module">Modul deaktivieren</item>
<item key="drop_tables"><![CDATA[Mit &quot;DROP TABLE&quot; exportieren]]></item>
<item key="editor">Editor</item>
<item key="enable_disable_mod_rewrite">Bitte geben Sie an, ob die suchmaschinenfreundlichen URIs verwendet werden sollen, oder nicht</item>
<item key="enable_module">Modul aktivieren</item>
<item key="enable_seo_aliases">URI-Aliase aktivieren</item>
<item key="entries_per_page">Datensätze pro Seite</item>
<item key="error_messages">Ausgabe von Fehlermeldungen</item>
<item key="error_update_check">Es konnte keine Verbindung zum Update-Server hergestellt werden.</item>
......@@ -42,10 +43,12 @@
<item key="languages_edit_error">Beim Verändern der Sprache ist ein Fehler aufgetreten.</item>
<item key="languages_edit_success">Die Sprache wurde erfolgreich ausgewählt und kann nun verwendet werden.</item>
<item key="maintenance">Wartung</item>
<item key="maintenance_message_to_short">Die Wartungs Nachricht sollte mindestens 3 Zeichen lanng sein</item>
<item key="maintenance_message_to_short">Die Wartungsnachricht sollte mindestens 3 Zeichen lanng sein.</item>
<item key="maintenance_mode">In Wartungsmodus versetzen</item>
<item key="maintenance_msg">Wartungs Nachricht</item>
<item key="maintenance_msg">Wartungsnachricht</item>
<item key="max_upload_size">Maximale Uploadgröße</item>
<item key="minify_cache_lifetime">Cache-Lebenszeit der CSS- und JavaScript-Dateien</item>
<item key="minify_cache_lifetime_description">Angaben in Sekunden</item>
<item key="mod_activate_error">Beim Aktivieren des Moduls ist ein Fehler aufgetreten.</item>
<item key="mod_activate_success">Das Modul wurde erfolgreich aktiviert und kann nun verwendet werden.</item>
<item key="mod_deactivate_error">Beim Deaktivieren des Moduls ist ein Fehler aufgetreten.</item>
......@@ -70,6 +73,7 @@
<item key="output_as_file">Als Datei</item>
<item key="overall_overhead">Überhang gesamt</item>
<item key="overhead">Überhang</item>
<item key="performance">Leistung</item>
<item key="php_date_function"><![CDATA[siehe <a href="http://www.php.net/manual/function.date.php" onclick="window.open(this.href); return false">date</a>-Funktion von PHP]]></item>
<item key="php_extensions">Vorhandene PHP Erweiterungen</item>
<item key="php_settings">PHP Einstellungen</item>
......@@ -79,14 +83,17 @@
<item key="register_globals">Globale Registrierung</item>
<item key="result">Ergebnis</item>
<item key="safe_mode">Sicherer Modus</item>
<item key="select_editor">Bitte wählen Sie aus, mit welchen Editor Sie Ihre Einträge erstellen wollen</item>
<item key="select_entries_per_page">Bitte wählen Sie aus, wie viele Datensätze pro Seite angezeigt werden sollen</item>
<item key="select_export_type">Bitte wählen Sie die Exportart aus</item>
<item key="select_cache_images">Bitte wählen Sie aus, ob Bilder gecached werden sollen.</item>
<item key="select_editor">Bitte wählen Sie aus, mit welchen Editor Sie Ihre Einträge erstellen wollen.</item>
<item key="select_entries_per_page">Bitte wählen Sie aus, wie viele Datensätze pro Seite angezeigt werden sollen.</item>
<item key="select_export_type">Bitte wählen Sie die Exportart aus.</item>
<item key="select_menu_item">Bitte wählen Sie einen der obenstehenden Menüpunkte aus, um zur gewünschten Aktion zu gelangen.</item>
<item key="select_online_maintenance">Bitte wählen Sie aus, ob sich die Seite im Wartungsmodus befinden soll oder nicht</item>
<item key="select_mod_rewrite">Bitte geben Sie an, ob die suchmaschinenfreundlichen URIs verwendet werden sollen, oder nicht</item>
<item key="select_online_maintenance">Bitte wählen Sie aus, ob sich die Seite im Wartungsmodus befinden soll oder nicht.</item>
<item key="select_output">Bittw wählen Sie aus, ob die Sicherung der SQL-Tabellen als Datei oder als Text ausgegeben werden soll.</item>
<item key="select_sql_file">Die angegebene Datei ist keine Textdatei</item>
<item key="select_sql_tables">Bitte wählen Sie mindestens eine SQL-Tabelle aus, welche exportiert werden soll</item>
<item key="select_seo_aliases">Bitte wählen Sie aus, ob die URI-Aliase aktiviert werden sollen oder nicht.</item>
<item key="select_sql_file">Die angegebene Datei ist keine Textdatei.</item>
<item key="select_sql_tables">Bitte wählen Sie mindestens eine SQL-Tabelle aus, welche exportiert werden soll.</item>
<item key="server_config">Serverkonfiguration</item>
<item key="server_infos">Server Informationen</item>
<item key="server_software">Server Software</item>
......@@ -103,10 +110,11 @@
<item key="text">Text</item>
<item key="textarea">Textfeld</item>
<item key="title">Seitentitel</item>
<item key="title_to_short">Bitte geben Sie einen Seitentitel ein</item>
<item key="type_in_date_format">Bitte geben Sie eine Datumsformatierung ein</item>
<item key="type_in_flood_barrier">Bitte geben Sie ein, für wieviele Sekunden ein Benutzer keine Beiträge abschicken kann</item>
<item key="type_in_text_or_select_sql_file">Bitte geben Sie die SQL-Abfragen entweder in dem Textfeld ein oder laden Sie eine Datei hoch</item>
<item key="title_to_short">Bitte geben Sie einen Seitentitel ein.</item>
<item key="type_in_date_format">Bitte geben Sie eine Datumsformatierung ein.</item>
<item key="type_in_flood_barrier">Bitte geben Sie ein, für wieviele Sekunden ein Benutzer keine Beiträge abschicken kann.</item>
<item key="type_in_minify_cache_lifetime">Bitte geben Sie die Cache-Lebenszeit der CSS- und JavaScript-Dateien ein.</item>
<item key="type_in_text_or_select_sql_file">Bitte geben Sie die SQL-Abfragen entweder in dem Textfeld ein oder laden Sie eine Datei hoch.</item>
<item key="update_check">Versionsüberprüfung</item>
<item key="version">Version</item>
<item key="zend_engine">Zend Engine</item>
......
......@@ -5,6 +5,7 @@
<item key="acp3_up_to_date">You already use the most recent version of the ACP3.</item>
<item key="architecture">Architecture</item>
<item key="attention">Attention</item>
<item key="cache_images">Cache pictures</item>
<item key="complete_export">Complete</item>
<item key="config_edit_error">While editing the ACP3 configuration an error has occured.</item>
<item key="config_edit_success">The ACP3 configuration has been edited successfully.</item>
......@@ -12,17 +13,14 @@
<item key="current_version">Current version</item>
<item key="data_of_table">Data of table %s</item>
<item key="database">Database</item>
<item key="date_format_long">Long date format</item>
<item key="date_format_short">Short date format</item>
<item key="description">Description</item>
<item key="designs">Designs</item>
<item key="designs_edit_error">While switching the design an error has occured.</item>
<item key="designs_edit_success">The design was successfully selected and can now be used.</item>
<item key="disable_module">Disable module</item>
<item key="drop_tables"><![CDATA[Export with &quot;DROP TABLE&quot; statement]]></item>
<item key="editor">Editor</item>
<item key="enable_disable_mod_rewrite">Please select, whether search engine friendly URIs should be used, or not</item>
<item key="enable_module">Enable module</item>
<item key="enable_seo_aliases">Enable URI-Aliases</item>
<item key="entries_per_page">Resultsets per page</item>
<item key="error_messages">Output of error messages</item>
<item key="error_update_check">It wasn\'t possible to establish a connection to the update server.</item>
......@@ -49,6 +47,8 @@
<item key="maintenance_mode">Turn maintenance mode on</item>
<item key="maintenance_msg">Maintenance message</item>
<item key="max_upload_size">Maximum upload size</item>
<item key="minify_cache_lifetime">Cache lifetime of CSS and JavaScript files</item>
<item key="minify_cache_lifetime_description">Statements in seconds</item>
<item key="mod_activate_error">While enabling the module an error has occured.</item>
<item key="mod_activate_success">The module was successfully enabled and can now be used.</item>
<item key="mod_deactivate_error">While disabling the module an error has occured.</item>
......@@ -73,6 +73,7 @@
<item key="output_as_file">As file</item>
<item key="overall_overhead">Overall overhead</item>
<item key="overhead">Overhead</item>
<item key="performance">Performance</item>
<item key="php_date_function"><![CDATA[see <a href="http://www.php.net/manual/function.date.php" onclick="window.open(this.href); return false">date</a> function of PHP]]></item>
<item key="php_extensions">Available PHP extensions</item>
<item key="php_settings">PHP settings</item>
......@@ -82,12 +83,15 @@
<item key="register_globals">Register globals</item>
<item key="result">Result</item>
<item key="safe_mode">Safe mode</item>
<item key="select_cache_images">Please select, whether you want to cache pictures.</item>
<item key="select_editor">Please select, whether you want to use a WYSIWYG editor or a simple textarea</item>
<item key="select_entries_per_page">Please select, how many resultsets per page should be displayed</item>
<item key="select_export_type">Please select the export type</item>
<item key="select_menu_item">Please select one of the above-noted menu items, to reach the desired action.</item>
<item key="select_mod_rewrite">Please select, whether search engine friendly URIs should be used, or not</item>
<item key="select_online_maintenance">Please selecr, whether the maintenance mode should be turned on or off</item>
<item key="select_output">Please select, whether the backup should be output as a file or a text</item>
<item key="select_seo_aliases">Please select, whether to enable URI-Aliases or not.</item>
<item key="select_sql_file">The uploaded file is not a valid textfile</item>
<item key="select_sql_tables">Please select at least one SQL-table, that should be exported</item>
<item key="server_config">Serverconfiguration</item>
......@@ -109,6 +113,7 @@
<item key="title_to_short">Please type in a title</item>
<item key="type_in_date_format">Please type in a date format</item>
<item key="type_in_flood_barrier">Please type in, for how long an user can\'t submit new entries</item>
<item key="type_in_minify_cache_lifetime">Please type in the cache lifetime of CSS and JavaScript files.</item>
<item key="type_in_text_or_select_sql_file">Please either type in the sql queries into the textarea oder just upload a file</item>
<item key="update_check">Version check</item>
<item key="version">Version</item>
......
......@@ -17,7 +17,7 @@ if (validate::isNumber($uri->id)) {
$settings = config::getModuleSettings('gallery');
$options = array(
'enable_cache' => true,
'enable_cache' => CONFIG_CACHE_IMAGES,
'cache_prefix' => 'gallery_' . $action,
'max_width' => $settings[$action . 'width'],
'max_height' => $settings[$action . 'height'],
......
......@@ -19,7 +19,7 @@ if (isset($_POST['form'])) {
$errors[] = $lang->t('system', 'type_in_flood_barrier');
if (!validate::internalURI($form['homepage']))
$errors[] = $lang->t('system', 'incorrect_homepage');
if ($form['wysiwyg'] != 'textarea' && (preg_match('=/=', $form['wysiwyg']) || !is_file(INCLUDES_DIR . 'wysiwyg/' . $form['wysiwyg'] . '/info.xml')))
if ($form['wysiwyg'] != 'textarea' && (preg_match('=/=', $form['wysiwyg']) || is_file(INCLUDES_DIR . 'wysiwyg/' . $form['wysiwyg'] . '/info.xml') === false))
$errors[] = $lang->t('system', 'select_editor');
if (empty($form['date_format_long']) || empty($form['date_format_short']))
$errors[] = $lang->t('system', 'type_in_date_format');
......@@ -33,14 +33,22 @@ if (isset($_POST['form'])) {
$errors[] = $lang->t('system', 'maintenance_message_to_short');
if (empty($form['seo_title']))
$errors[] = $lang->t('system', 'title_to_short');
if (!validate::isNumber($form['seo_aliases']))
$errors[] = $lang->t('system', 'select_seo_aliases');
if (!validate::isNumber($form['seo_mod_rewrite']))
$errors[] = $lang->t('system', 'enable_disable_mod_rewrite');
$errors[] = $lang->t('system', 'select_mod_rewrite');
if (!validate::isNumber($form['cache_images']))
$errors[] = $lang->t('system', 'select_cache_images');
if (!validate::isNumber($form['cache_minify']))
$errors[] = $lang->t('system', 'type_in_minify_cache_lifetime');
if (isset($errors)) {
$tpl->assign('error_msg', comboBox($errors));
} else {
// Konfig aktualisieren
$config = array(
'cache_images' => (bool) $form['cache_images'],
'cache_minify' => $form['cache_minify'],
'date_dst' => $form['date_dst'],
'date_format_long' => $db->escape($form['date_format_long']),
'date_format_short' => $db->escape($form['date_format_short']),
......@@ -49,10 +57,11 @@ if (isset($_POST['form'])) {
'flood' => $form['flood'],
'homepage' => $form['homepage'],
'maintenance_message' => $db->escape($form['maintenance_message']),
'maintenance_mode' => $form['maintenance_mode'],
'maintenance_mode' => (bool) $form['maintenance_mode'],
'seo_aliases' => (bool) $form['seo_aliases'],
'seo_meta_description' => $db->escape($form['seo_meta_description']),
'seo_meta_keywords' => $db->escape($form['seo_meta_keywords']),
'seo_mod_rewrite' => $form['seo_mod_rewrite'],
'seo_mod_rewrite' => (bool) $form['seo_mod_rewrite'],
'seo_title' => $db->escape($form['seo_title']),
'wysiwyg' => $form['wysiwyg']
);
......@@ -64,6 +73,7 @@ if (isset($_POST['form'])) {
}
if (!isset($_POST['form']) || isset($errors) && is_array($errors)) {
// Einträge pro Seite
$entries = array();
for ($i = 0, $j = 10; $j <= 50; $i++, $j = $j + 10) {
$entries[$i]['value'] = $j;
$entries[$i]['selected'] = selectEntry('entries', $j, CONFIG_ENTRIES);
......@@ -93,6 +103,7 @@ if (!isset($_POST['form']) || isset($errors) && is_array($errors)) {
$tpl->assign('time_zone', timeZones(CONFIG_DATE_TIME_ZONE, 'date_time_zone'));
// Sommerzeit an/aus
$dst = array();
$dst[0]['value'] = '1';
$dst[0]['checked'] = selectEntry('date_dst', '1', CONFIG_DATE_DST, 'checked');
$dst[0]['lang'] = $lang->t('common', 'yes');
......@@ -102,6 +113,7 @@ if (!isset($_POST['form']) || isset($errors) && is_array($errors)) {
$tpl->assign('dst', $dst);
// Wartungsmodus an/aus
$maintenance = array();
$maintenance[0]['value'] = '1';
$maintenance[0]['checked'] = selectEntry('maintenance_mode', '1', CONFIG_MAINTENANCE_MODE, 'checked');
$maintenance[0]['lang'] = $lang->t('common', 'yes');
......@@ -111,22 +123,46 @@ if (!isset($_POST['form']) || isset($errors) && is_array($errors)) {
$tpl->assign('maintenance', $maintenance);
// Sef-URIs
$sef[0]['value'] = '1';
$sef[0]['checked'] = selectEntry('seo_mod_rewrite', '1', CONFIG_SEO_MOD_REWRITE, 'checked');
$sef[0]['lang'] = $lang->t('common', 'yes');
$sef[1]['value'] = '0';
$sef[1]['checked'] = selectEntry('seo_mod_rewrite', '0', CONFIG_SEO_MOD_REWRITE, 'checked');
$sef[1]['lang'] = $lang->t('common', 'no');
$tpl->assign('sef', $sef);
$current['date_format_long'] = CONFIG_DATE_FORMAT_LONG;
$current['date_format_short'] = CONFIG_DATE_FORMAT_SHORT;
$current['flood'] = CONFIG_FLOOD;
$current['homepage'] = CONFIG_HOMEPAGE;
$current['maintenance_message'] = CONFIG_MAINTENANCE_MESSAGE;
$current['seo_meta_description'] = CONFIG_SEO_META_DESCRIPTION;
$current['seo_meta_keywords'] = CONFIG_SEO_META_KEYWORDS;
$current['seo_title'] = CONFIG_SEO_TITLE;
$mod_rewrite = array();
$mod_rewrite[0]['value'] = '1';
$mod_rewrite[0]['checked'] = selectEntry('seo_mod_rewrite', '1', CONFIG_SEO_MOD_REWRITE, 'checked');
$mod_rewrite[0]['lang'] = $lang->t('common', 'yes');
$mod_rewrite[1]['value'] = '0';
$mod_rewrite[1]['checked'] = selectEntry('seo_mod_rewrite', '0', CONFIG_SEO_MOD_REWRITE, 'checked');
$mod_rewrite[1]['lang'] = $lang->t('common', 'no');
$tpl->assign('mod_rewrite', $mod_rewrite);
// URI-Aliases aktivieren/deaktivieren
$aliases = array();
$aliases[0]['value'] = '1';
$aliases[0]['checked'] = selectEntry('seo_aliases', '1', CONFIG_SEO_ALIASES, 'checked');
$aliases[0]['lang'] = $lang->t('common', 'yes');
$aliases[1]['value'] = '0';
$aliases[1]['checked'] = selectEntry('seo_aliases', '0', CONFIG_SEO_ALIASES, 'checked');
$aliases[1]['lang'] = $lang->t('common', 'no');
$tpl->assign('aliases', $aliases);
// Caching von Bildern
$cache_images = array();
$cache_images[0]['value'] = '1';
$cache_images[0]['checked'] = selectEntry('cache_images', '1', CONFIG_CACHE_IMAGES, 'checked');
$cache_images[0]['lang'] = $lang->t('common', 'yes');
$cache_images[1]['value'] = '0';
$cache_images[1]['checked'] = selectEntry('cache_images', '0', CONFIG_CACHE_IMAGES, 'checked');
$cache_images[1]['lang'] = $lang->t('common', 'no');
$tpl->assign('cache_images', $cache_images);
$current = array(
'cache_minify' => CONFIG_CACHE_MINIFY,
'date_format_long' => CONFIG_DATE_FORMAT_LONG,
'date_format_short' => CONFIG_DATE_FORMAT_SHORT,
'flood' => CONFIG_FLOOD,
'homepage' => CONFIG_HOMEPAGE,
'maintenance_message' => CONFIG_MAINTENANCE_MESSAGE,
'seo_meta_description'