diff --git a/resources/classes/database.php b/resources/classes/database.php index 1602aabee8..8cf1f64288 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -666,7 +666,7 @@ class database { if ($this->type == "mssql") { $sql = "SELECT * FROM sys.Tables order by name asc"; } - $prep_statement = $this->db->prepare(check_sql($sql)); + $prep_statement = $this->db->prepare($sql); $prep_statement->execute(); $tmp = $prep_statement->fetchAll(PDO::FETCH_NAMED); if ($this->type == "pgsql" || $this->type == "sqlite" || $this->type == "mssql") { @@ -2295,7 +2295,6 @@ class database { //run the query and return the results try { - //$this->db->query(check_sql($sql)); $prep_statement = $this->db->prepare($sql); $prep_statement->execute($params); unset($prep_statement); @@ -2506,7 +2505,6 @@ class database { try { $prep_statement = $this->db->prepare($sql); $prep_statement->execute($params); - //$this->db->query(check_sql($sql)); $message["message"] = "OK"; $message["code"] = "200"; $message["uuid"] = $parent_key_value; diff --git a/resources/functions.php b/resources/functions.php index 1cd1270b65..3be6b2de4d 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -127,22 +127,6 @@ if (!function_exists('check_str')) { } } -if (!function_exists('check_sql')) { - /** - * Alias of trim - * - * @param string $string - * - * @return void - * @see trim() - * @deprecated 5.0 - */ - function check_sql($string) { - trigger_error('check_sql should not be used. Use parameterized queries instead.', E_USER_WARNING); - return trim($string); //remove white space - } -} - if (!function_exists('check_cidr')) { /** * Checks if the $ip_address is within the range of the given $cidr