From: garvinhicking Date: Thu, 9 Feb 2006 13:03:59 +0000 (+0000) Subject: * Added config option for specifying number of entries in the RSS X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e294577593effd57869728e28eafb97c98dcadfe;p=s9y.git * Added config option for specifying number of entries in the RSS feed (garvinhicking) * Added option whether to issue the "SET NAMES" mysql command (garvinhicking) * Removed config option "XHTML11 compliance" and enabled by default now (garvinhicking) --- diff --git a/deployment/serendipity_editor.js b/deployment/serendipity_editor.js index 74e4ae0..30a0d21 100644 --- a/deployment/serendipity_editor.js +++ b/deployment/serendipity_editor.js @@ -206,26 +206,14 @@ function serendipity_imageSelector_done(textarea) } floating = 'center'; - if (XHTML11) { - if (f['serendipity[align]'][0].checked == true) { - img = "\"\""; - } else if (f['serendipity[align]'][1].checked == true) { - img = "\"\""; - floating = 'left'; - } else if (f['serendipity[align]'][2].checked == true) { - img = "\"\""; - floating = 'right'; - } - } else { - if (f['serendipity[align]'][0].checked == true) { - img = ""; - } else if (f['serendipity[align]'][1].checked == true) { - img = ""; - floating = 'left'; - } else if (f['serendipity[align]'][2].checked == true) { - img = ""; - floating = 'right'; - } + if (f['serendipity[align]'][0].checked == true) { + img = "\"\""; + } else if (f['serendipity[align]'][1].checked == true) { + img = "\"\""; + floating = 'left'; + } else if (f['serendipity[align]'][2].checked == true) { + img = "\"\""; + floating = 'right'; } if (f['serendipity[isLink]'][1].checked == true) { diff --git a/docs/NEWS b/docs/NEWS index 6c6a7ed..2fb8895 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -5,6 +5,15 @@ Version 1.1-alpha1() * Added first patches for image directory permissions. (garvinhicking) + * Added config option for specifying number of entries in the RSS + feed (garvinhicking) + + * Added option whether to issue the "SET NAMES" mysql command + (garvinhicking) + + * Removed config option "XHTML11 compliance" and enabled by default + now (garvinhicking) + Version 1.0-beta2 () ------------------------------------------------------------------------ diff --git a/include/compat.inc.php b/include/compat.inc.php index 966d962..94b2045 100644 --- a/include/compat.inc.php +++ b/include/compat.inc.php @@ -186,6 +186,33 @@ function serendipity_get_bool($item) { } } +/** + * Get the current charset + * + * @return string Empty string or "UTF-8/". + */ +function serendipity_getCharset() { + global $serendipity; + + $charset = $serendipity['charset']; + if (!empty($_POST['charset'])) { + if ($_POST['charset'] == 'UTF-8/') { + $charset = 'UTF-8/'; + } else { + $charset = ''; + } + } + + if (!empty($serendipity['POST']['charset'])) { + if ($serendipity['POST']['charset'] == 'UTF-8/') { + $charset = 'UTF-8/'; + } else { + $charset = ''; + } + } + return $charset; +} + /** * Detect the language of the User Agent/Visitor * @@ -202,11 +229,13 @@ function serendipity_detectLang($use_include = false) { $supported_languages = array_keys($serendipity['languages']); $possible_languages = explode(',', (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '')); if (is_array($possible_languages)) { + $charset = serendipity_getCharset(); + foreach($possible_languages as $index => $lang) { $preferred_language = strtolower(preg_replace('@^([^\-_;]*)_?.*$@', '\1', $lang)); if (in_array($preferred_language, $supported_languages)) { if ($use_include) { - @include_once(S9Y_INCLUDE_PATH . 'lang/serendipity_lang_' . $preferred_language . '.inc.php'); + @include_once(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_' . $preferred_language . '.inc.php'); $serendipity['autolang'] = $preferred_language; } return $preferred_language; diff --git a/include/functions.inc.php b/include/functions.inc.php index 7457a93..7d58a37 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -842,11 +842,7 @@ function serendipity_xhtml_target($target) { if ($serendipity['enablePopup'] != true) return ""; - if ($serendipity['XHTML11']) { - return ' onclick="window.open(this.href, \'target' . time() . '\'); return false;" '; - } else { - return ' target="' . $target . '" '; - } + return ' onclick="window.open(this.href, \'target' . time() . '\'); return false;" '; } /** diff --git a/include/functions_entries_admin.inc.php b/include/functions_entries_admin.inc.php index 151b31b..54c51d1 100644 --- a/include/functions_entries_admin.inc.php +++ b/include/functions_entries_admin.inc.php @@ -113,7 +113,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr ?>
-
action="" method="post" ="serendipityEntry" style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px"> + action="" method="post" id="serendipityEntry" style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px"> diff --git a/include/functions_installer.inc.php b/include/functions_installer.inc.php index 5fc795a..07c9eab 100644 --- a/include/functions_installer.inc.php +++ b/include/functions_installer.inc.php @@ -436,9 +436,6 @@ function serendipity_guessInput($type, $name, $value='', $default='') { */ function serendipity_printConfigTemplate($config, $from = false, $noForm = false, $folded = true, $allowToggle = true) { global $serendipity; - if (!isset($serendipity['XHTML11'])) { - $serendipity['XHTML11'] = FALSE; - } if ( $allowToggle ) { ?>