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