2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Remove deprecated functions for php 7.4

This commit is contained in:
Adam Zammit
2021-01-28 14:24:26 +11:00
parent ad6d89834b
commit 30c4376765
14 changed files with 37 additions and 37 deletions

View File

@@ -290,7 +290,7 @@ class HTML_QuickForm extends HTML_Common
$attributes = array('action'=>$action, 'method'=>$method, 'name'=>$formName, 'id'=>$formName) + $target;
$this->updateAttributes($attributes);
if (!$trackSubmit || isset($_REQUEST['_qf__' . $formName])) {
if (1 == get_magic_quotes_gpc()) {
if (1 == 0) {
$this->_submitValues = $this->_recursiveFilter('stripslashes', 'get' == $method? $_GET: $_POST);
foreach ($_FILES as $keyFirst => $valFirst) {
foreach ($valFirst as $keySecond => $valSecond) {

View File

@@ -970,7 +970,7 @@ class PEAR_Config extends PEAR
return $this->raiseError("PEAR_Config::readConfigFile fopen('$file','r') failed");
}
$size = filesize($file);
$rt = get_magic_quotes_runtime();
$rt = 0;
set_magic_quotes_runtime(0);
if (function_exists('file_get_contents')) {
fclose($fp);

View File

@@ -501,7 +501,7 @@ class PEAR_DependencyDB
$err = PEAR::raiseError("Could not open dependencies file `".$this->_depdb."'");
return $err;
}
$rt = get_magic_quotes_runtime();
$rt = 0;
set_magic_quotes_runtime(0);
clearstatcache();
if (function_exists('file_get_contents')) {
@@ -531,7 +531,7 @@ class PEAR_DependencyDB
$this->_unlock();
return PEAR::raiseError("Could not open dependencies file `".$this->_depdb."' for writing");
}
$rt = get_magic_quotes_runtime();
$rt = 0;
set_magic_quotes_runtime(0);
fwrite($fp, serialize($deps));
set_magic_quotes_runtime($rt);

View File

@@ -696,7 +696,7 @@ class PEAR_Registry extends PEAR
return $this->raiseError('PEAR_Registry: could not open filemap "' . $this->filemap . '"', PEAR_REGISTRY_ERROR_FILE, null, null, $php_errormsg);
}
clearstatcache();
$rt = get_magic_quotes_runtime();
$rt = 0;
set_magic_quotes_runtime(0);
$fsize = filesize($this->filemap);
if (function_exists('file_get_contents')) {
@@ -998,7 +998,7 @@ class PEAR_Registry extends PEAR
if ($fp === null) {
return null;
}
$rt = get_magic_quotes_runtime();
$rt = 0;
set_magic_quotes_runtime(0);
clearstatcache();
if (function_exists('file_get_contents')) {
@@ -1040,7 +1040,7 @@ class PEAR_Registry extends PEAR
if ($fp === null) {
return null;
}
$rt = get_magic_quotes_runtime();
$rt = 0;
set_magic_quotes_runtime(0);
clearstatcache();
if (function_exists('file_get_contents')) {

View File

@@ -98,7 +98,7 @@ class gettext_reader {
* @param object Reader the StreamReader object
* @param boolean enable_cache Enable or disable caching of strings (default on)
*/
function gettext_reader($Reader, $enable_cache = true) {
function __construct($Reader, $enable_cache = true) {
// If there isn't a StreamReader, turn on short circuit mode.
if (! $Reader || isset($Reader->error) ) {
$this->short_circuit = true;

View File

@@ -49,7 +49,7 @@ class StringReader {
var $_pos;
var $_str;
function StringReader($str='') {
function __construct($str='') {
$this->_str = $str;
$this->_pos = 0;
}
@@ -86,7 +86,7 @@ class FileReader {
var $_fd;
var $_length;
function FileReader($filename) {
function __construct($filename) {
if (file_exists($filename)) {
$this->_length=filesize($filename);
@@ -143,7 +143,7 @@ class FileReader {
// Preloads entire file in memory first, then creates a StringReader
// over it (it assumes knowledge of StringReader internals)
class CachedFileReader extends StringReader {
function CachedFileReader($filename) {
function __construct($filename) {
if (file_exists($filename)) {
$length=filesize($filename);