mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-01 21:58:51 +02:00
Add getter and change visibility for whitelist_array property
This commit is contained in:
parent
d740998463
commit
80e4886c3f
@ -32,7 +32,6 @@ abstract class Database
|
|||||||
* 'SELECT "Version" FROM "SiteTree_Live" WHERE "ID" = ?' => 'full_query',
|
* 'SELECT "Version" FROM "SiteTree_Live" WHERE "ID" = ?' => 'full_query',
|
||||||
* ])
|
* ])
|
||||||
* </code>
|
* </code>
|
||||||
* @internal
|
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected static $whitelist_array = [];
|
protected static $whitelist_array = [];
|
||||||
@ -266,7 +265,7 @@ abstract class Database
|
|||||||
* @param mixed $query
|
* @param mixed $query
|
||||||
* @param float $endtime
|
* @param float $endtime
|
||||||
*/
|
*/
|
||||||
private function displayQuery($query, $endtime)
|
protected function displayQuery($query, $endtime)
|
||||||
{
|
{
|
||||||
$queryCount = sprintf("%04d", $this->queryCount);
|
$queryCount = sprintf("%04d", $this->queryCount);
|
||||||
Debug::message("\n$queryCount: $query\n{$endtime}s\n", false);
|
Debug::message("\n$queryCount: $query\n{$endtime}s\n", false);
|
||||||
@ -282,6 +281,16 @@ abstract class Database
|
|||||||
self::$whitelist_array = $whitelistArray;
|
self::$whitelist_array = $whitelistArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the sql queries that need to be partially or fully matched
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public static function getWhitelistQueryArray()
|
||||||
|
{
|
||||||
|
return self::$whitelist_array;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the autogenerated ID from the previous INSERT query.
|
* Get the autogenerated ID from the previous INSERT query.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user