summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
authorChristian Schneider2021-01-13 13:58:00 +0100
committerChristian Schneider2021-01-13 13:58:00 +0100
commit7c50aebc15878dcc51247c8198f388a01ad2bdcc (patch)
treee7f52ad40c9c5f07dddb191db248e4daf6da06ab /it_dbi.class
parent333809bea4b0ee8386db1464c90ee9a2cb95569d (diff)
downloaditools-7c50aebc15878dcc51247c8198f388a01ad2bdcc.tar.gz
itools-7c50aebc15878dcc51247c8198f388a01ad2bdcc.tar.bz2
itools-7c50aebc15878dcc51247c8198f388a01ad2bdcc.zip
Fix caching problem by using it_dbi/it_dbi_postgres in key instead of table name
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class8
1 files changed, 4 insertions, 4 deletions
diff --git a/it_dbi.class b/it_dbi.class
index e032a03..71b6c95 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -180,7 +180,7 @@ static function createclass($p)
if (substr($classname, 0, 4) != 'PMA_') # It is designed behaviour that an error is generated if this class already exists!
{
$interface = function_exists("interface_exists") && interface_exists("Iterator", false) ? "implements Iterator" : "";
- $parentname = get_called_class();
+ $parentname = static::$_global_key;
$code = "class $classname extends $parentname $interface
{
function __construct(/* \$query ... */)
@@ -971,7 +971,7 @@ function _get_field_info()
static function _state_get($dbid)
{
if (!($result = $GLOBALS[static::$_global_key]->_state[$dbid]))
- $result = $GLOBALS[static::$_global_key]->_state[$dbid] = (array)it_cache::get(get_called_class() . ":$dbid");
+ $result = $GLOBALS[static::$_global_key]->_state[$dbid] = (array)it_cache::get(static::$_global_key . ":$dbid");
#var_dump("get", $dbid, $result);
return $result;
@@ -982,13 +982,13 @@ static function _state_put($dbid, $state, $shared = true)
#var_dump("put", $dbid, $state);
$GLOBALS[static::$_global_key]->_state[$dbid] = $state;
if ($shared)
- it_cache::put(get_called_class() . ":$dbid", array('link' => null) + (array)$state); # link is not transferable
+ it_cache::put(static::$_global_key . ":$dbid", array('link' => null) + (array)$state); # link is not transferable
}
static function _state_purgeshared($dbid = null)
{
#var_dump("purgeshared", $dbid);
- it_cache::put(get_called_class(). ":" . ($dbid ? $dbid : $GLOBALS[static::$_global_key]->_dbid), array()); # Nuke shared cache
+ it_cache::put(static::$_global_key. ":" . ($dbid ? $dbid : $GLOBALS[static::$_global_key]->_dbid), array()); # Nuke shared cache
}
#