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

Fix for warnings/notices/deprecated messages on PHP 7.4

This commit is contained in:
Adam Zammit
2021-01-28 14:07:17 +11:00
parent e7093af41e
commit ead8e5f0ea
53 changed files with 152 additions and 248 deletions

View File

@@ -20,12 +20,7 @@ include_once("login_check.php"); //Login Check dies also if the script is start
// Do not stripslashes on POSted fields because labels.php uses db_quoteall($str, $ispostvariable) that checks for magic_quotes_gpc
// However We need to stripslashes from $_POST['method'] compared to
// unescaped strings in switch case
//if (get_magic_quotes_gpc())
//$_POST = array_map('stripslashes', $_POST);
if (isset($_POST['method']) && get_magic_quotes_gpc())
{
$_POST['method'] = stripslashes($_POST['method']);
}
$labelsoutput='';
if($_SESSION['USER_RIGHT_SUPERADMIN'] == 1 || $_SESSION['USER_RIGHT_MANAGE_LABEL'] == 1)
@@ -600,14 +595,7 @@ function modlabelsetanswers($lid)
$sPostData=html_entity_decode($_POST['dataToSend'], ENT_QUOTES, "UTF-8");
$sPostData=str_replace("\t", '', $sPostData);
if (get_magic_quotes_gpc())
{
$data = json_decode(stripslashes($sPostData));
}
else
{
$data = json_decode($sPostData);
}
if ($ajax){
@@ -657,11 +645,6 @@ function modlabelsetanswers($lid)
$lang = db_quoteall($lang);
$title = trim($title, "'");
if (get_magic_quotes_gpc())
{
$title = str_replace("'","\'",$title);
}
$query = "INSERT INTO ".db_table_name('labels')." (lid,code,title,sortorder, assessment_value, language)
VALUES({$lid},{$actualcode},'".$title."',{$sort_order},{$assessmentvalue},{$lang})";