summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-09-26 12:33:57 -0400
committerEvan Prodromou <evan@controlyourself.ca>2008-09-26 12:33:57 -0400
commitd3f8cd39a172b6dd9bd373f5e1eda5a9886e4641 (patch)
treec117f8c5ae17b0f17c121434c48d1cc8793d6524 /classes
parent88b19d8ab50307b7b16ad9937a7c147bbb945347 (diff)
handle one-argument calls to staticGet
darcs-hash:20080926163357-5ed1f-49bd6d85d34d0e6ac3514c06d99e5b5b9a78b0fc.gz
Diffstat (limited to 'classes')
-rw-r--r--classes/Memcached_DataObject.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index ab56d2474..ff1ca0bdf 100644
--- a/classes/Memcached_DataObject.php
+++ b/classes/Memcached_DataObject.php
@@ -24,6 +24,11 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
class Memcached_DataObject extends DB_DataObject
{
function &staticGet($cls, $k, $v=NULL) {
+ if (is_null($v)) {
+ $v = $k;
+ $keys = $cls->keys();
+ $k = $keys[0];
+ }
$i = Memcached_DataObject::getcached($cls, $k, $v);
if (!is_null($i)) {
return $i;