]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge remote-tracking branch 'gitorious/1.0.x' into 1.0.x
authorEvan Prodromou <evan@status.net>
Mon, 22 Aug 2011 15:25:13 +0000 (11:25 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 22 Aug 2011 15:25:13 +0000 (11:25 -0400)
Conflicts:
classes/Memcached_DataObject.php

1  2 
classes/Memcached_DataObject.php

index e515e3d9e0abd6c87e0fb71b880bd2492471e335,9cedcc6ff604c891a1d5628ac5eaacc3ebd7bcb5..b857ae64b9fdfe79a6a9fdd5417b946963024229
@@@ -313,40 -185,36 +313,40 @@@ class Memcached_DataObject extends Safe
                      $copy = clone($i);
                      $copy->encache();
                      $result[$i->$keyCol][] = $copy;
 +                    $pkeyVal = array();
 +                    foreach ($pkeyCols as $pkeyCol) {
 +                        $pkeyVal[] = $i->$pkeyCol;
 +                    }
 +                    $pkeyMap[$i->$keyCol][] = $pkeyVal;
                  }
 -            }
 -            foreach ($toFetch as $keyVal)
 -            {
 -                self::cacheSet(sprintf("%s:list:%s:%s", $cls, $keyCol, $keyVal),
 -                               $result[$keyVal]);
 -            }
 +            }       
 +              foreach ($toFetch as $keyVal) {
 +                self::cacheSet(sprintf("%s:list-ids:%s:%s", $cls, $keyCol, $keyVal),
 +                               $pkeyMap[$keyVal]);
 +            }      
          }
  
 -        return $result;
 -    }
 -
 -    function columnType($columnName)
 -    {
 -        $keys = $this->table();
 -        if (!array_key_exists($columnName, $keys)) {
 -            throw new Exception('Unknown key column ' . $columnName . ' in ' . join(',', array_keys($keys)));
 -        }
 -
 -        $def = $keys[$columnName];
 -
 -        if ($def & DB_DATAOBJECT_INT) {
 -            return 'integer';
 -        } else {
 -            return 'string';
 -        }
 +      return $result;        
      }
  
 +      function columnType($columnName)
 +      {
 +              $keys = $this->table();
 +              if (!array_key_exists($columnName, $keys)) {
 +                      throw new Exception('Unknown key column ' . $columnName . ' in ' . join(',', array_keys($keys)));
 +              }
 +              
 +              $def = $keys[$columnName];
 +              
 +              if ($def & DB_DATAOBJECT_INT) {
 +                      return 'integer';
 +              } else {
 +                      return 'string';
 +              }
 +      }
 +      
      /**
-      * @fixme Should this return false on lookup fail to match staticGet?
+      * @todo FIXME: Should this return false on lookup fail to match staticGet?
       */
      function pkeyGet($cls, $kv)
      {