diff options
-rw-r--r-- | it_dbi.class | 8 |
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 } # |