patch by ian

This commit is contained in:
Garvin Hicking 2011-09-28 09:19:05 +00:00
parent 3eee3e4cd7
commit ebaa8afe04
4 changed files with 22 additions and 15 deletions

View File

@ -7,6 +7,8 @@ Version 1.7 ()
Version 1.6 ()
------------------------------------------------------------------------
* Fix XSS issue in mediadatabase filtering, thanks to Stefan Schurtz
* Fix problem with autosave plugin used in conjunction with
entryproperties (chrisbra)

View File

@ -2075,9 +2075,10 @@ function serendipity_setFormToken($type = 'form') {
* into an array.
*
* @param array Referenced variable coming from the config.inc.php file, where the config values will be stored in
* @param boolean Use true boolean mode in array $template_config in the config.inc.php file
* @return array Final return array with default values
*/
function &serendipity_loadThemeOptions(&$template_config, $okey = '') {
function &serendipity_loadThemeOptions(&$template_config, $okey = '', $bc_bool = false) {
global $serendipity;
if (empty($okey)) {
@ -2098,7 +2099,14 @@ function &serendipity_loadThemeOptions(&$template_config, $okey = '') {
$template_vars[$item['var']] = $item['default'];
}
}
if($bc_bool) {
foreach($template_vars AS $k => $i) {
if($i == 'true' || $i == 'false') {
$template_vars[$k] = serendipity_db_bool($i);
}
}
//reset smarty compiled template ?
}
return $template_vars;
}
@ -2116,19 +2124,16 @@ function serendipity_loadGlobalThemeOptions(&$template_config, &$template_loaded
if ($supported['navigation']) {
$navlinks = array();
if (!isset($template_loaded_config['amount'])) {
$conf_amount = array(
$conf_amount = array(
'var' => 'amount',
'name' => NAVLINK_AMOUNT,
'desc' => NAVLINK_AMOUNT_BLAHBLAH,
'type' => 'string',
'default' => '5',
'scope' => 'global'
);
$template_config[] = $conf_amount;
}
);
if (empty($template_loaded_config['amount'])) {
if (!isset($template_loaded_config['amount']) || empty($template_loaded_config['amount'])) {
$template_config[] = $conf_amount;
$template_loaded_config['amount'] = $conf_amount['default'];
}

View File

@ -960,9 +960,9 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');
@define('NAVLINK_AMOUNT', 'Anzahl der Links in der Navigationsleiste (Styles verwalten-Seite muss danach neu geladen werden)');
@define('NAV_LINK_TEXT', 'Text des Navigationsleisten-Links');
@define('NAV_LINK_URL', 'URL des Navigationsleisten-Links');
@define('MODERATE_SELECTED_COMMENTS', 'Markierte Kommentare freischalten');
@define('WEBLOG', 'Weblog');
@define('ACTIVE_COMMENT_SUBSCRIPTION', 'Subscribed');

View File

@ -960,9 +960,9 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');
@define('NAVLINK_AMOUNT', 'Anzahl der Links in der Navigationsleiste (Styles verwalten-Seite muss danach neu geladen werden)');
@define('NAV_LINK_TEXT', 'Text des Navigationsleisten-Links');
@define('NAV_LINK_URL', 'URL des Navigationsleisten-Links');
@define('MODERATE_SELECTED_COMMENTS', 'Markierte Kommentare freischalten');
@define('WEBLOG', 'Weblog');
@define('ACTIVE_COMMENT_SUBSCRIPTION', 'Subscribed');