7th release

This commit is contained in:
Paolo
2017-05-05 18:45:28 +02:00
parent bc4ff5c8e9
commit 6a11cc09cf
8 changed files with 396 additions and 35 deletions
+27
View File
@@ -12,4 +12,31 @@ class UDF_model extends DB_Model
$this->pk = array('schema', 'table');
$this->hasSequence = false;
}
/**
*
*/
public function execQuery($query, $parametersArray = null)
{
//
if (
(
substr($query, 0, 6) == 'SELECT'
|| substr($query, 0, 4) == 'WITH'
)
&&
(
!stripos($query, 'INSERT')
&& !stripos($query, 'UPDATE')
&& !stripos($query, 'DELETE')
)
)
{
return parent::execQuery($query, $parametersArray);
}
else
{
return error('You are allowed to run only query for reading data');
}
}
}