forked from GNUsocial/gnu-social
Merge branch '1.0.x' into activity
This commit is contained in:
commit
c712eefe14
@ -34,11 +34,12 @@ class Memcached_DataObject extends Safe_DataObject
|
|||||||
{
|
{
|
||||||
if (is_null($v)) {
|
if (is_null($v)) {
|
||||||
$v = $k;
|
$v = $k;
|
||||||
// XXX: HACK!
|
$keys = self::pkeyCols($cls);
|
||||||
$i = new $cls;
|
if (count($keys) > 1) {
|
||||||
$keys = $i->keys();
|
// FIXME: maybe call pkeyGet() ourselves?
|
||||||
|
throw new Exception('Use pkeyGet() for compound primary keys');
|
||||||
|
}
|
||||||
$k = $keys[0];
|
$k = $keys[0];
|
||||||
unset($i);
|
|
||||||
}
|
}
|
||||||
$i = Memcached_DataObject::getcached($cls, $k, $v);
|
$i = Memcached_DataObject::getcached($cls, $k, $v);
|
||||||
if ($i === false) { // false == cache miss
|
if ($i === false) { // false == cache miss
|
||||||
|
@ -81,7 +81,12 @@ class MoreMenu extends Menu
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($toShow as $item) {
|
foreach ($toShow as $item) {
|
||||||
|
if (count($item) == 5) {
|
||||||
list($actionName, $args, $label, $description, $id) = $item;
|
list($actionName, $args, $label, $description, $id) = $item;
|
||||||
|
} else {
|
||||||
|
list($actionName, $args, $label, $description) = $item;
|
||||||
|
$id = null;
|
||||||
|
}
|
||||||
$this->item($actionName, $args, $label, $description, $id);
|
$this->item($actionName, $args, $label, $description, $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user