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

@@ -94,8 +94,8 @@ if (isset($_POST['day']))
$val = intval($val);
$key = intval($key);
$start = $db->qstr($_POST['start'][$key],get_magic_quotes_gpc());
$end = $db->qstr($_POST['end'][$key],get_magic_quotes_gpc());
$start = $db->qstr($_POST['start'][$key],0);
$end = $db->qstr($_POST['end'][$key],0);
$sql = "INSERT INTO availability (day_of_week,start,end,availability_group_id)
VALUES ('$val',$start,$end,$availability_group)";

View File

@@ -88,8 +88,8 @@ if (isset($_POST['day']))
$val = intval($val);
$key = intval($key);
$start = $db->qstr($_POST['start'][$key],get_magic_quotes_gpc());
$end = $db->qstr($_POST['end'][$key],get_magic_quotes_gpc());
$start = $db->qstr($_POST['start'][$key],0);
$end = $db->qstr($_POST['end'][$key],0);
$sql = "INSERT INTO call_restrict (day_of_week,start,end)
VALUES ('$val',$start,$end)";

View File

@@ -61,11 +61,11 @@ $client =""; $firstname="";$lastname="";$email=""; $time_zone_name="";
if (isset($_POST['client']) && !empty($_POST['client']))
{
$client = $db->qstr($_POST['client'],get_magic_quotes_gpc());
$firstname = $db->qstr($_POST['firstname'],get_magic_quotes_gpc());
$email = $db->qstr($_POST['email'],get_magic_quotes_gpc());
$lastname = $db->qstr($_POST['lastname'],get_magic_quotes_gpc());
$time_zone_name = $db->qstr($_POST['Time_zone_name'],get_magic_quotes_gpc());
$client = $db->qstr($_POST['client'],0);
$firstname = $db->qstr($_POST['firstname'],0);
$email = $db->qstr($_POST['email'],0);
$lastname = $db->qstr($_POST['lastname'],0);
$time_zone_name = $db->qstr($_POST['Time_zone_name'],0);
/* check if there'a record with this username*/
$sql = "SELECT `username`,`client_id` from client WHERE `username` LIKE $client";

View File

@@ -56,14 +56,14 @@ $a = false;
if (isset($_POST['operator']) && isset($_POST['adduser']))
{
$operator = $db->qstr($_POST['operator'],get_magic_quotes_gpc());
$email= $db->qstr($_POST['email'],get_magic_quotes_gpc());
$password = $db->qstr($_POST['password'],get_magic_quotes_gpc());
$firstname = $db->qstr($_POST['firstname'],get_magic_quotes_gpc());
$lastname = $db->qstr($_POST['lastname'],get_magic_quotes_gpc());
$chat_user = $db->qstr($_POST['chat_user'],get_magic_quotes_gpc());
$chat_password = $db->qstr($_POST['chat_password'],get_magic_quotes_gpc());
$time_zone_name = $db->qstr($_POST['Time_zone_name'],get_magic_quotes_gpc());
$operator = $db->qstr($_POST['operator'],0);
$email= $db->qstr($_POST['email'],0);
$password = $db->qstr($_POST['password'],0);
$firstname = $db->qstr($_POST['firstname'],0);
$lastname = $db->qstr($_POST['lastname'],0);
$chat_user = $db->qstr($_POST['chat_user'],0);
$chat_password = $db->qstr($_POST['chat_password'],0);
$time_zone_name = $db->qstr($_POST['Time_zone_name'],0);
$extension = "";
if (FREEPBX_PATH != false)
{

View File

@@ -85,8 +85,8 @@ if (isset($_POST['day']))
$val = intval($val);
$key = intval($key);
$start = $db->qstr($_POST['start'][$key],get_magic_quotes_gpc());
$end = $db->qstr($_POST['end'][$key],get_magic_quotes_gpc());
$start = $db->qstr($_POST['start'][$key],0);
$end = $db->qstr($_POST['end'][$key],0);
$sql = "INSERT INTO shift_template(day_of_week,start,end)
VALUES ($val,$start,$end)";

View File

@@ -72,7 +72,7 @@ if (isset($_GET['time_zone']))
{
//need to add sample to questionnaire
$tz = $db->qstr($_GET['time_zone'],get_magic_quotes_gpc());
$tz = $db->qstr($_GET['time_zone'],0);
$sql = "INSERT INTO timezone_template(Time_zone_name)
VALUES($tz)";
@@ -85,7 +85,7 @@ if (isset($_GET['tz']))
{
//need to remove rsid from questionnaire
$tz = $db->qstr($_GET['tz'],get_magic_quotes_gpc());
$tz = $db->qstr($_GET['tz'],0);
$sql = "DELETE FROM timezone_template
WHERE Time_zone_name = $tz";

View File

@@ -2534,10 +2534,10 @@ function add_respondent($case_id,$firstName,$lastName,$Time_zone_name)
{
global $db;
$case_id = $db->qstr($case_id,get_magic_quotes_gpc());
$firstName = $db->qstr($firstName,get_magic_quotes_gpc());
$lastName = $db->qstr($lastName,get_magic_quotes_gpc());
$Time_zone_name = $db->qstr($Time_zone_name,get_magic_quotes_gpc());
$case_id = $db->qstr($case_id,0);
$firstName = $db->qstr($firstName,0);
$lastName = $db->qstr($lastName,0);
$Time_zone_name = $db->qstr($Time_zone_name,0);
$sql = "INSERT INTO respondent (respondent_id,case_id,firstName,lastName,Time_zone_name)
VALUES (NULL,$case_id,$firstName,$lastName,$Time_zone_name)";

View File

@@ -185,7 +185,7 @@ function process_append_data($process_id,$data)
{
global $db;
$data = $db->qstr($data,get_magic_quotes_gpc());
$data = $db->qstr($data,0);
$sql = "INSERT INTO `process_log` (process_log_id,process_id,datetime,data)
VALUES (NULL,'$process_id',NOW(),$data)";

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);