Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31744
Modified Files:
serendipity_config.inc.php
Log Message:
- Convert old .tpl files into plain and valid .php files
- Use native PHP array to store configuration templates
- Add flag called "nosave" which will cause the data not to be saved in the database (useful for db vars, leaves a very clean db table)
- Add flag called "hideValue" which will not print the value of the var to the user (for passwords)
- Add flag called "local" which will not save the variable in the database, but only when the var is being saved in the configuration
- Fix bug with autolang (someone misspelled $serendipity, bad bad)
- Convert list of languages to a real array, which is sexy - move it to serendipity_config.inc.php
Tested with installer and config saving.
Please test - any breakage will be fixed ASAP - but please don't commit anything without pinging me.
TODO: Make a function to parse/obey the configuration flags, so we don't have to maintain it 3 places. Will do tomorrow.
NOTE: Do not add any logic to config files, or I will personally hunt you down.
Index: serendipity_config.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- serendipity_config.inc.php 29 Nov 2004 10:39:23 -0000 1.106
+++ serendipity_config.inc.php 2 Dec 2004 20:57:44 -0000 1.107
@@ -4,8 +4,8 @@
if (!defined('S9Y_INCLUDE_PATH')) {
define('S9Y_INCLUDE_PATH', dirname(__FILE__) . '/');
}
-define('S9Y_CONFIG_TEMPLATE', S9Y_INCLUDE_PATH . 'include/tpl/config_local.tpl');
-define('S9Y_CONFIG_USERTEMPLATE', S9Y_INCLUDE_PATH . 'include/tpl/config_user.tpl');
+define('S9Y_CONFIG_TEMPLATE', S9Y_INCLUDE_PATH . 'include/tpl/config_local.inc.php');
+define('S9Y_CONFIG_USERTEMPLATE', S9Y_INCLUDE_PATH . 'include/tpl/config_personal.inc.php');
define('IS_installed', file_exists('serendipity_config_local.inc.php'));
@@ -55,6 +55,24 @@
// Should IFRAMEs be used for previewing entries and sending trackbacks?
$serendipity['use_iframe'] = true;
+/* Default language for autodetection */
+$serendipity['autolang'] = 'en';
+
+/* Availiable languages */
+$serendipity['languages'] = array('en' => 'English',
+ 'de' => 'German',
+ 'da' => 'Danish',
+ 'es' => 'Spanish',
+ 'fr' => 'French',
+ 'cs' => 'Czech (Win-1250)',
+ 'cz' => 'Czech (ISO-8859-2)',
+ 'nl' => 'Dutch',
+ 'pt' => 'Portuguese Brazilian',
+ 'bg' => 'Bulgarian',
+ 'no' => 'Norwegian',
+ 'it' => 'Italian',
+ 'tw' => 'Traditional Chinese');
+
/*
* Load main language file
*/
|