forked from GNUsocial/gnu-social
fix a couple bugs in Managed_DataObject
This commit is contained in:
parent
692ef9c330
commit
62d4701148
@ -68,7 +68,7 @@ abstract class Managed_DataObject extends Memcached_DataObject
|
|||||||
|
|
||||||
function sequenceKey()
|
function sequenceKey()
|
||||||
{
|
{
|
||||||
$table = self::schemaDef();
|
$table = call_user_func(array(get_class($this), 'schemaDef'));
|
||||||
foreach ($table['fields'] as $name => $column) {
|
foreach ($table['fields'] as $name => $column) {
|
||||||
if ($column['type'] == 'serial') {
|
if ($column['type'] == 'serial') {
|
||||||
// We have a serial/autoincrement column.
|
// We have a serial/autoincrement column.
|
||||||
@ -92,8 +92,7 @@ abstract class Managed_DataObject extends Memcached_DataObject
|
|||||||
|
|
||||||
function keyTypes()
|
function keyTypes()
|
||||||
{
|
{
|
||||||
$keys = array();
|
$table = call_user_func(array(get_class($this), 'schemaDef'));
|
||||||
$table = self::schemaDef();
|
|
||||||
|
|
||||||
if (!empty($table['unique keys'])) {
|
if (!empty($table['unique keys'])) {
|
||||||
foreach ($table['unique keys'] as $idx => $fields) {
|
foreach ($table['unique keys'] as $idx => $fields) {
|
||||||
|
Loading…
Reference in New Issue
Block a user