Revision 629
Added by doc almost 17 years ago
save.php | ||
---|---|---|
163 | 163 |
} |
164 | 164 |
// End path and timezone details code |
165 | 165 |
|
166 |
// Get the default language |
|
167 |
$allowed_languages = array('CA', 'DA', 'DE', 'EN', 'ES', 'ET', 'FI', 'FR', 'HR', 'HU', 'IT', 'LV', 'NL', 'PT','SE', 'TR'); |
|
168 |
if(!isset($_POST['default_language']) OR !in_array($_POST['default_language'], $allowed_languages)) { |
|
169 |
set_error('Please select a valid default backend language'); |
|
170 |
} else { |
|
171 |
$default_language = $_POST['default_language']; |
|
172 |
// make sure the selected language file exists in the language folder |
|
173 |
if(!file_exists('../languages/' .$default_language .'.php')) { |
|
174 |
set_error('The language file: \'' .$default_language .'.php\' is missing. Upload file to language folder or choose another language'); |
|
175 |
} |
|
176 |
} |
|
177 |
// End default language details code |
|
178 |
|
|
166 | 179 |
// Begin operating system specific code |
167 | 180 |
// Get operating system |
168 | 181 |
if(!isset($_POST['operating_system']) OR $_POST['operating_system'] != 'linux' AND $_POST['operating_system'] != 'windows') { |
... | ... | |
422 | 435 |
." ('wysiwyg_style', 'font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;')," |
423 | 436 |
." ('rename_files_on_upload', 'php,asp,phpx,aspx')," |
424 | 437 |
." ('er_level', '')," |
425 |
." ('default_language', 'EN'),"
|
|
438 |
." ('default_language', '$default_language'),"
|
|
426 | 439 |
." ('app_name', 'wb_$session_rand')," |
427 | 440 |
." ('default_timezone', '$default_timezone')," |
428 | 441 |
." ('default_date_format', 'M d Y')," |
... | ... | |
473 | 486 |
. ' `timezone` INT NOT NULL DEFAULT \'0\',' |
474 | 487 |
. ' `date_format` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,' |
475 | 488 |
. ' `time_format` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,' |
476 |
. ' `language` VARCHAR( 5 ) NOT NULL DEFAULT \'EN\' ,'
|
|
489 |
. ' `language` VARCHAR( 5 ) NOT NULL DEFAULT \'' .$default_language .'\' ,'
|
|
477 | 490 |
. ' `home_folder` TEXT NOT NULL ,' |
478 | 491 |
. ' `login_when` INT NOT NULL DEFAULT \'0\',' |
479 | 492 |
. ' `login_ip` VARCHAR( 15 ) NOT NULL DEFAULT \'\' ,' |
Also available in: Unified diff
added possibility to select the default backend language during installation process