mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
7th release
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user