Changed Attach::select to Attach::selectToArray
This commit is contained in:
parent
975ff86bae
commit
ac6bfd3e4c
|
@ -38,7 +38,7 @@ class Attach extends BaseObject
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Select rows from the attach table
|
||||
* @brief Select rows from the attach table and return them as array
|
||||
*
|
||||
* @param array $fields Array of selected fields, empty for all
|
||||
* @param array $conditions Array of fields for conditions
|
||||
|
@ -47,9 +47,9 @@ class Attach extends BaseObject
|
|||
* @return boolean|array
|
||||
*
|
||||
* @throws \Exception
|
||||
* @see \Friendica\Database\DBA::select
|
||||
* @see \Friendica\Database\DBA::selectToArray
|
||||
*/
|
||||
public static function select(array $fields = [], array $conditions = [], array $params = [])
|
||||
public static function selectToArray(array $fields = [], array $conditions = [], array $params = [])
|
||||
{
|
||||
if (empty($fields)) {
|
||||
$fields = self::getFields();
|
||||
|
@ -264,7 +264,7 @@ class Attach extends BaseObject
|
|||
{
|
||||
if (!is_null($img)) {
|
||||
// get items to update
|
||||
$items = self::select(['backend-class','backend-ref'], $conditions);
|
||||
$items = self::selectToArray(['backend-class','backend-ref'], $conditions);
|
||||
|
||||
foreach($items as $item) {
|
||||
/** @var IStorage $backend_class */
|
||||
|
@ -297,7 +297,7 @@ class Attach extends BaseObject
|
|||
public static function delete(array $conditions, array $options = [])
|
||||
{
|
||||
// get items to delete data info
|
||||
$items = self::select(['backend-class','backend-ref'], $conditions);
|
||||
$items = self::selectToArray(['backend-class','backend-ref'], $conditions);
|
||||
|
||||
foreach($items as $item) {
|
||||
/** @var IStorage $backend_class */
|
||||
|
|
Loading…
Reference in a new issue