Start enforcing PHP and SQL version limitations.
This commit is contained in:
parent
5a39280858
commit
30630c6c60
|
@ -8,8 +8,8 @@ require __DIR__.'/config.ini.php';
|
||||||
|
|
||||||
|
|
||||||
// Check PHP version compatibility
|
// Check PHP version compatibility
|
||||||
if (PHP_VERSION_ID < 70200)
|
if (PHP_VERSION_ID < 80000)
|
||||||
throw new Exception('Orcinus Site Search requires PHP version ">= 7.2.0". You are running '.PHP_VERSION.'.');
|
throw new Exception('Orcinus Site Search requires PHP version ">= 8.0.x". You are running '.PHP_VERSION.'.');
|
||||||
|
|
||||||
|
|
||||||
// ***** Connect to the database
|
// ***** Connect to the database
|
||||||
|
@ -35,13 +35,13 @@ $_DDATA['version'] = $version[0]['sql_version'];
|
||||||
|
|
||||||
// Check Database version compatibility
|
// Check Database version compatibility
|
||||||
if (preg_match('/^(\d+)\.(\d+)\.(\d+)-?(.*)$/', $_DDATA['version'], $ver)) {
|
if (preg_match('/^(\d+)\.(\d+)\.(\d+)-?(.*)$/', $_DDATA['version'], $ver)) {
|
||||||
// if (strpos($ver[4], 'MariaDB') === 0) {
|
if (strpos($ver[4], 'MariaDB') === 0) {
|
||||||
// if ((int)$ver[1] < 10 || (int)$ver[3] < 5)
|
if ((int)$ver[1] < 10 || (!(int)$ver[2] && (int)$ver[3] < 5))
|
||||||
// throw new Exception('Orcinus Site Search requires MariaDB version ">= 10.0.5". You are running '.$_DDATA['version'].'.');
|
throw new Exception('Orcinus Site Search requires MariaDB version ">= 10.0.5". You are running '.$_DDATA['version'].'.');
|
||||||
// } else {
|
} else {
|
||||||
// if ((int)$ver[1] < 8 || (int)$ver[3] < 17)
|
if ((int)$ver[1] < 8 || (!(int)$ver[2] && (int)$ver[3] < 17))
|
||||||
// throw new Exception('Orcinus Site Search requires MySQL version ">= 8.0.17". You are running '.$_DDATA['version'].'.');
|
throw new Exception('Orcinus Site Search requires MySQL version ">= 8.0.17". You are running '.$_DDATA['version'].'.');
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1399,7 +1399,7 @@ while ($_cURL && count($_RDATA['sp_queue'])) {
|
||||||
$data['content'] = str_replace(array("\\\n\r", "\\\n"), '', $data['content']);
|
$data['content'] = str_replace(array("\\\n\r", "\\\n"), '', $data['content']);
|
||||||
|
|
||||||
$data['info']['charset'] = mb_detect_encoding($data['content']);
|
$data['info']['charset'] = mb_detect_encoding($data['content']);
|
||||||
if (!$data['info']['charset']) $data['info']['charset'] = 'ISO-8859-1';
|
if (!$data['info']['charset']) $data['info']['charset'] = 'CP1252';
|
||||||
OS_cleanTextUTF8($data['content'], $data['info']['charset']);
|
OS_cleanTextUTF8($data['content'], $data['info']['charset']);
|
||||||
|
|
||||||
if ($data['content']) {
|
if ($data['content']) {
|
||||||
|
|
Loading…
Reference in a new issue