Commit 8d53d6aa authored by Alexander Butenko's avatar Alexander Butenko

Allow " and ' chars in orderBy

parent 12c0a1db
......@@ -713,7 +713,7 @@ class MysqliDb
{
$allowedDirection = Array ("ASC", "DESC");
$orderbyDirection = strtoupper (trim ($orderbyDirection));
$orderByField = preg_replace ("/[^-a-z0-9\.\(\),_`\*]+/i",'', $orderByField);
$orderByField = preg_replace ("/[^-a-z0-9\.\(\),_`\*\'\"]+/i",'', $orderByField);
// Add table prefix to orderByField if needed.
//FIXME: We are adding prefix only if table is enclosed into `` to distinguish aliases
......@@ -1239,8 +1239,10 @@ class MysqliDb
{
if ($this->isSubQuery)
return;
if ($this->_mysqli)
if ($this->_mysqli) {
$this->_mysqli->close();
$this->_mysqli = null;
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment