Fix calls to DBA::select missing parameters
This commit is contained in:
parent
abe60f0f9a
commit
57ab858486
5 changed files with 6 additions and 6 deletions
|
@ -449,7 +449,7 @@ function networkFlatView(App $a, $update = 0)
|
|||
$condition = ["`term` = ? AND `otype` = ? AND `type` = ? AND `uid` = ?",
|
||||
$file, TERM_OBJ_POST, TERM_FILE, local_user()];
|
||||
$params = ['order' => ['tid' => true], 'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
|
||||
$result = DBA::select('term', ['oid'], $condition);
|
||||
$result = DBA::select('term', ['oid'], $condition, $params);
|
||||
|
||||
$posts = [];
|
||||
while ($term = DBA::fetch($result)) {
|
||||
|
|
|
@ -50,7 +50,7 @@ class Attach extends BaseObject
|
|||
public static function select(array $fields = [], array $conditions = [], array $params = [])
|
||||
{
|
||||
if (empty($fields)) {
|
||||
$selected = self::getFields();
|
||||
$fields = self::getFields();
|
||||
}
|
||||
|
||||
$r = DBA::select('attach', $fields, $conditions, $params);
|
||||
|
|
|
@ -662,7 +662,7 @@ class Contact extends BaseObject
|
|||
{
|
||||
if (!isset($contact['url']) && !empty($contact['id'])) {
|
||||
$fields = ['id', 'url', 'archive', 'self', 'term-date'];
|
||||
$contact = DBA::selectFirst('contact', [], ['id' => $contact['id']]);
|
||||
$contact = DBA::selectFirst('contact', $fields, ['id' => $contact['id']]);
|
||||
if (!DBA::isResult($contact)) {
|
||||
return;
|
||||
}
|
||||
|
@ -725,7 +725,7 @@ class Contact extends BaseObject
|
|||
|
||||
if (!isset($contact['url']) && !empty($contact['id'])) {
|
||||
$fields = ['id', 'url', 'batch'];
|
||||
$contact = DBA::selectFirst('contact', [], ['id' => $contact['id']]);
|
||||
$contact = DBA::selectFirst('contact', $fields, ['id' => $contact['id']]);
|
||||
if (!DBA::isResult($contact)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -2019,7 +2019,7 @@ class Item extends BaseObject
|
|||
$condition = ['id' => $itemid, 'uid' => 0,
|
||||
'network' => [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS, ""],
|
||||
'visible' => true, 'deleted' => false, 'moderated' => false, 'private' => false];
|
||||
$item = self::selectFirst(self::ITEM_FIELDLIST, ['id' => $itemid]);
|
||||
$item = self::selectFirst(self::ITEM_FIELDLIST, $condition);
|
||||
if (!DBA::isResult($item)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ class Photo extends BaseObject
|
|||
public static function select(array $fields = [], array $conditions = [], array $params = [])
|
||||
{
|
||||
if (empty($fields)) {
|
||||
$selected = self::getFields();
|
||||
$fields = self::getFields();
|
||||
}
|
||||
|
||||
$r = DBA::select("photo", $fields, $conditions, $params);
|
||||
|
|
Loading…
Reference in a new issue