using more UTF-8, optimized the initial froxlor.sql statements, refs #1117

Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
This commit is contained in:
Arnold Bechtoldt
2012-08-17 15:47:27 +02:00
parent f575e94ddb
commit 68308c4fca
14 changed files with 350 additions and 541 deletions

View File

@@ -3187,7 +3187,7 @@ class ApsParser
{
$Temp.= '<textarea name="text" rows="10" cols="55">';
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'ISO-8859-1');
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'UTF-8');
$Temp.= '</textarea>';
$Groupname = $lng['aps']['license'];
$Fieldname = $lng['aps']['license'];
@@ -3378,7 +3378,7 @@ class ApsParser
if($license->text->name)$Temp = $license->text->name . '<br/>';
$Temp.= '<form name="license" action="#"><textarea name="text" rows="10" cols="70">';
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'ISO-8859-1');
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'UTF-8');
$Temp.= '</textarea></form>';
$Fieldname = $lng['aps']['license'];
$Fieldvalue = $Temp;

View File

@@ -56,7 +56,7 @@ class PHPMailer {
* Sets the CharSet of the message.
* @var string
*/
public $CharSet = 'iso-8859-1';
public $CharSet = 'UTF-8';
/**
* Sets the Content-type of the message.
@@ -2317,4 +2317,4 @@ class phpmailerException extends Exception {
return $errorMsg;
}
}
?>
?>

View File

@@ -89,7 +89,7 @@ class ticket
// initialize purifier
require_once dirname(dirname(__FILE__)).'/htmlpurifier/library/HTMLPurifier.auto.php';
$config = HTMLPurifier_Config::createDefault();
$config->set('Core.Encoding', 'ISO-8859-1'); // for now
$config->set('Core.Encoding', 'UTF-8'); //htmlpurifier uses utf-8 anyway as default
$config->set('HTML.Doctype', 'XHTML 1.0 Transitional');
$this->_purifier = new HTMLPurifier($config);

View File

@@ -31,7 +31,7 @@
* @author Florian Lippert <flo@syscp.org>
*/
function html_entity_decode_array($subject, $fields = '', $complete = false, $quote_style = ENT_COMPAT, $charset = 'ISO-8859-1')
function html_entity_decode_array($subject, $fields = '', $complete = false, $quote_style = ENT_COMPAT, $charset = 'UTF-8')
{
if(is_array($subject))
{

View File

@@ -27,9 +27,21 @@
function html_entity_decode_complete($string)
{
while($string != html_entity_decode($string))
global $theme;
if($theme == 'Classic')
{
$string = html_entity_decode($string);
while($string != html_entity_decode($string))
{
$string = html_entity_decode($string);
}
}
else
{
while($string != html_entity_decode($string, ENT_COMPAT | ENT_HTML5, 'UTF-8'))
{
$string = html_entity_decode($string, ENT_COMPAT | ENT_HTML5, 'UTF-8');
}
}
return $string;

View File

@@ -29,7 +29,7 @@
* @author Florian Lippert <flo@syscp.org>
*/
function htmlentities_array($subject, $fields = '', $quote_style = ENT_QUOTES, $charset = 'ISO-8859-1')
function htmlentities_array($subject, $fields = '', $quote_style = ENT_QUOTES, $charset = 'UTF-8')
{
if(is_array($subject))
{

View File

@@ -17,7 +17,7 @@
*
*/
header("Content-Type: text/html; charset=iso-8859-1");
header("Content-Type: text/html; charset=UTF-8");
// prevent Froxlor pages from being cached
header("Cache-Control: no-store, no-cache, must-revalidate");
@@ -67,27 +67,27 @@ unset($value);
unset($key);
$filename = basename($_SERVER['PHP_SELF']);
if(!file_exists('./lib/userdata.inc.php'))
if(!file_exists('lib/userdata.inc.php'))
{
$config_hint = file_get_contents('./templates/Froxlor/misc/configurehint.tpl');
$config_hint = file_get_contents('templates/Froxlor/misc/configurehint.tpl');
die($config_hint);
}
if(!is_readable('./lib/userdata.inc.php'))
if(!is_readable('lib/userdata.inc.php'))
{
die('You have to make the file "./lib/userdata.inc.php" readable for the http-process!');
die('You have to make the file "lib/userdata.inc.php" readable for the http-process!');
}
/**
* Includes the Usersettings eg. MySQL-Username/Passwort etc.
*/
require ('./lib/userdata.inc.php');
require ('lib/userdata.inc.php');
if(!isset($sql)
|| !is_array($sql))
{
$config_hint = file_get_contents('./templates/Froxlor/misc/configurehint.tpl');
$config_hint = file_get_contents('templates/Froxlor/misc/configurehint.tpl');
die($config_hint);
}
@@ -103,13 +103,13 @@ if(isset($sql['root_user']) && isset($sql['root_password']) && (!isset($sql_root
* Includes the Functions
*/
require ('./lib/functions.php');
require ('lib/functions.php');
/**
* Includes the MySQL-Tabledefinitions etc.
*/
require ('./lib/tables.inc.php');
require ('lib/tables.inc.php');
/**
* Includes the MySQL-Connection-Class
@@ -177,7 +177,7 @@ if(get_magic_quotes_gpc())
* Selects settings from MySQL-Table
*/
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
$settings_data = loadConfigArrayDir('actions/admin/settings/');
$settings = loadSettings($settings_data, $db);
/**
@@ -449,7 +449,7 @@ if(AREA == 'admin' || AREA == 'customer')
}
else
{
$navigation_data = loadConfigArrayDir('./lib/navigation/');
$navigation_data = loadConfigArrayDir('lib/navigation/');
$navigation = buildNavigation($navigation_data[AREA], $userinfo);
}
unset($navigation_data);

View File

@@ -73,6 +73,6 @@ define('PACKAGE_ENABLED', 2);
// VERSION INFO
$version = '0.9.28-svn3';
$version = '0.9.28-svn4';
$dbversion = '2';
$branding = '';