re-add old IDNA class so we do not have to force the php-5.6 requirement for froxlor

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-06-19 18:59:44 +02:00
parent 6c55a40606
commit 5789e9a8a4
6 changed files with 3489 additions and 11 deletions

View File

@@ -114,7 +114,7 @@ return array(
'varname' => 'letsencryptstate',
'type' => 'string',
'string_emptyallowed' => false,
'default' => 'Germany',
'default' => 'Hessen',
'save_method' => 'storeSettingField',
),
'system_letsencryptchallengepath' => array(

View File

@@ -907,9 +907,13 @@ class FroxlorInstall
if (version_compare("5.3.0", PHP_VERSION, ">=")) {
$content .= $this->_status_message('red', $this->_lng['requirements']['notfound'] . ' (' . PHP_VERSION . ')');
$_die = true;
} else {
if (version_compare("5.6.0", PHP_VERSION, ">=")) {
$content .= $this->_status_message('orange', $this->_lng['requirements']['newerphpprefered'] . ' (' .PHP_VERSION . ')');
} else {
$content .= $this->_status_message('green', PHP_VERSION);
}
}
// Check if magic_quotes_runtime is active | get_magic_quotes_runtime() is always FALSE since 5.4
if (version_compare(PHP_VERSION, "5.4.0", "<")) {

View File

@@ -24,6 +24,7 @@ $lng['requirements']['notfound'] = 'not found';
$lng['requirements']['notinstalled'] = 'not installed';
$lng['requirements']['activated'] = 'enabled';
$lng['requirements']['phpversion'] = 'PHP version >= 5.3';
$lng['requirements']['newerphpprefered'] = 'Good, but php-5.6 is prefered.';
$lng['requirements']['phpmagic_quotes_runtime'] = 'magic_quotes_runtime...';
$lng['requirements']['phpmagic_quotes_runtime_description'] = 'PHP setting "magic_quotes_runtime" must be set to "Off". We have disabled it temporary for now please fix the coresponding php.ini.';
$lng['requirements']['phppdo'] = 'PHP PDO extension and PDO-MySQL driver...';

View File

@@ -24,6 +24,7 @@ $lng['requirements']['notfound'] = 'nicht gefunden';
$lng['requirements']['notinstalled'] = 'nicht installiert';
$lng['requirements']['activated'] = 'ist aktiviert.';
$lng['requirements']['phpversion'] = 'PHP Version >= 5.3';
$lng['requirements']['newerphpprefered'] = 'Passt, aber php-5.6 wird bevorzugt.';
$lng['requirements']['phpmagic_quotes_runtime'] = 'magic_quotes_runtime';
$lng['requirements']['phpmagic_quotes_runtime_description'] = 'Die PHP Einstellung "magic_quotes_runtime" muss deaktiviert sein ("Off"). Die Einstellung wurde temporär deaktiviert, bitte ändern Sie diese in der entsprechenden php.ini.';
$lng['requirements']['phppdo'] = 'PHP PDO Erweiterung und PDO-MySQL Treiber...';

File diff suppressed because it is too large Load Diff

View File

@@ -39,11 +39,13 @@ class idna_convert_wrapper
public function __construct()
{
// Instantiate it
//$this->idna_converter = new idna_convert(array('idn_version' => '2008', 'encode_german_sz' => false));
if (version_compare("5.6.0", PHP_VERSION, ">=")) {
$this->idna_converter = new idna_convert(array('idn_version' => '2008', 'encode_german_sz' => false));
} else {
// use this when using new version of IdnaConverter (which does not work yet)
$this->idna_converter = new Mso\IdnaConvert\IdnaConvert();
}
}
/**
* Encode a domain name, a email address or a list of one of both.
@@ -57,9 +59,12 @@ class idna_convert_wrapper
public function encode($to_encode)
{
if (version_compare("5.6.0", PHP_VERSION, ">=")) {
return $this->_do_action('encode', $to_encode);
} else {
$to_encode = $this->is_utf8($to_encode) ? $to_encode : utf8_encode($to_encode);
return $this->idna_converter->encode($to_encode);
//return $this->_do_action('encode', $to_encode);
}
}
/**
@@ -74,8 +79,11 @@ class idna_convert_wrapper
public function decode($to_decode)
{
if (version_compare("5.6.0", PHP_VERSION, ">=")) {
return $this->_do_action('decode', $to_decode);
} else {
return $this->idna_converter->decode($to_decode);
//return $this->_do_action('decode', $to_decode);
}
}
/**