fixup keytypes so it returns the types no matter what kind of class it is

This commit is contained in:
Evan Prodromou 2010-01-06 23:34:59 -08:00
parent f4fa785fb7
commit b2bab7d7ca

View File

@ -194,6 +194,17 @@ class Memcached_DataObject extends DB_DataObject
function keyTypes()
{
// ini-based classes return number-indexed arrays. handbuilt
// classes return column => keytype. Make this uniform.
$keys = $this->keys();
$keyskeys = array_keys($keys);
if (is_string($keyskeys[0])) {
return $keys;
}
global $_DB_DATAOBJECT;
if (!isset($_DB_DATAOBJECT['INI'][$this->_database][$this->__table."__keys"])) {
$this->databaseStructure();