Browse Source

Fix calls to DBA::select missing parameters

pull/6482/head
Hypolite Petovan 2 years ago
parent
commit
57ab858486
5 changed files with 6 additions and 6 deletions
  1. +1
    -1
      mod/network.php
  2. +1
    -1
      src/Model/Attach.php
  3. +2
    -2
      src/Model/Contact.php
  4. +1
    -1
      src/Model/Item.php
  5. +1
    -1
      src/Model/Photo.php

+ 1
- 1
mod/network.php View File

@ -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)) {


+ 1
- 1
src/Model/Attach.php View File

@ -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);


+ 2
- 2
src/Model/Contact.php View File

@ -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;
}


+ 1
- 1
src/Model/Item.php View File

@ -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;
}


+ 1
- 1
src/Model/Photo.php View File

@ -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…
Cancel
Save