29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-07-01 01:23:43 +00:00

Modified JString to load after pre-installation check (phputf8 will crash on wrong settings)

Added local mbstring environmental settings in htaccess.txt ready for uncommenting if needed


git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@2294 6f6e1ebd-4c2b-0410-823f-f34bde69bce9
This commit is contained in:
David Gal 2006-02-11 19:08:22 +00:00
parent 7ca7e7aef5
commit 9be4e8c932
4 changed files with 25 additions and 9 deletions

View File

@ -37,7 +37,10 @@ Legend:
- -> Removed
! -> Note
11-Feb-2006 David Gal
^ Modified JString to load after pre-installation check (phputf8 will crash on wrong settings)
+ Added local mbstring environmental settings in htaccess.txt ready for uncommenting if needed
08-Feb-2005 Louis Landry
# Fixed artf3432 : Administrator toolbar items do not contain port number

View File

@ -86,6 +86,14 @@ RewriteRule ^(content/|component/) index.php
#
########## End 3rd Party or Core SEF Section
########## Begin mbstring section
## UNCOMMENT THE APPROPRIATE SETTING WHEN SETTINGS IN php.ini CAN'T BE CHANGED
## THIS WILL PROVIDE LOCAL SETTINGS WITHOUT DISTURBING SITE DEFAULTS
#
# php_value mbstring.func_overload 0
# php_value mbstring.language neutral
#
########## End mbstring section
############################################
## Used to disable session.use_trans_sid, which can conflict with gzip compression

View File

@ -54,10 +54,15 @@ jimport( 'joomla.factory' );
jimport( 'joomla.filesystem.*' );
jimport( 'joomla.parameter.parameter' );
jimport( 'joomla.i18n.language' );
jimport( 'joomla.i18n.string' );
jimport( 'joomla.model.model' );
jimport( 'joomla.application.application');
jimport( 'joomla.application.environment.request' );
jimport( 'joomla.application.environment.session' );
jimport( 'joomla.application.user.user' );
// JString should only be loaded after pre-install checks
$task = mosGetParam( $_REQUEST, 'task', '' );
if (!($task == '' || $task == 'preinstall' || $task == 'lang')){
jimport( 'joomla.i18n.string' );
}
?>

View File

@ -91,8 +91,8 @@ class JRegistryFormatINI extends JRegistryFormat {
if ($line == '') {
continue;
}
if ($line && $line[0] == '[' && $line[JString::strlen($line) - 1] == ']') {
$sec_name = JString::substr($line, 1, JString::strlen($line) - 2);
if ($line && $line[0] == '[' && $line[strlen($line) - 1] == ']') {
$sec_name = substr($line, 1, strlen($line) - 2);
if ($process_sections) {
if ($asArray) {
$obj[$sec_name] = array ();
@ -101,22 +101,22 @@ class JRegistryFormatINI extends JRegistryFormat {
}
}
} else {
if ($pos = JString::strpos($line, '=')) {
$property = trim(JString::substr($line, 0, $pos));
if ($pos = strpos($line, '=')) {
$property = trim(substr($line, 0, $pos));
// property is assumed to be ascii
if (substr($property, 0, 1) == '"' && substr($property, -1) == '"') {
$property = stripcslashes(substr($property, 1, count($property) - 2));
}
$value = trim(JString::substr($line, $pos +1));
$value = trim(substr($line, $pos +1));
if ($value == 'false') {
$value = false;
}
if ($value == 'true') {
$value = true;
}
if (JString::substr($value, 0, 1) == '"' && JString::substr($value, -1) == '"') {
$value = stripcslashes(JString::substr($value, 1, JString::strlen($value) - 2));
if (substr($value, 0, 1) == '"' && substr($value, -1) == '"') {
$value = stripcslashes(substr($value, 1, strlen($value) - 2));
}
if ($process_sections) {