From: Hypolite Petovan Date: Sat, 21 Jul 2018 02:03:40 +0000 (-0400) Subject: Rename DBA::inArray to DBA::toArray X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4db98eb43d90a56b1e983628910641c9cc567b8a;p=friendica.git Rename DBA::inArray to DBA::toArray --- diff --git a/include/dba.php b/include/dba.php index 32d3b1dde0..bccd9792be 100644 --- a/include/dba.php +++ b/include/dba.php @@ -41,7 +41,7 @@ function q($sql) { $columns = DBA::columnCount($ret); - $data = DBA::inArray($ret); + $data = DBA::toArray($ret); if ((count($data) == 0) && ($columns == 0)) { return true; diff --git a/include/security.php b/include/security.php index 987f3b08e2..53e554c3d0 100644 --- a/include/security.php +++ b/include/security.php @@ -116,7 +116,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive $r = DBA::select('user', ['uid', 'username', 'nickname'], ['parent-uid' => $master_record['uid'], 'account_removed' => false]); if (DBM::is_result($r)) { - $a->identities = array_merge($a->identities, DBA::inArray($r)); + $a->identities = array_merge($a->identities, DBA::toArray($r)); } } else { // Just ensure that the array is always defined @@ -126,14 +126,14 @@ function authenticate_success($user_record, $login_initial = false, $interactive $r = DBA::select('user', ['uid', 'username', 'nickname'], ['uid' => $master_record['parent-uid'], 'account_removed' => false]); if (DBM::is_result($r)) { - $a->identities = DBA::inArray($r); + $a->identities = DBA::toArray($r); } // Then add all siblings $r = DBA::select('user', ['uid', 'username', 'nickname'], ['parent-uid' => $master_record['parent-uid'], 'account_removed' => false]); if (DBM::is_result($r)) { - $a->identities = array_merge($a->identities, DBA::inArray($r)); + $a->identities = array_merge($a->identities, DBA::toArray($r)); } } @@ -144,7 +144,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive $master_record['uid'] ); if (DBM::is_result($r)) { - $a->identities = array_merge($a->identities, DBA::inArray($r)); + $a->identities = array_merge($a->identities, DBA::toArray($r)); } if ($login_initial) { diff --git a/mod/admin.php b/mod/admin.php index a6a09112ec..7c465fe176 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -479,7 +479,7 @@ function admin_page_contactblock(App $a) $statement = DBA::select('contact', [], $condition, ['limit' => [$a->pager['start'], $a->pager['itemspage']]]); - $contacts = DBA::inArray($statement); + $contacts = DBA::toArray($statement); $t = get_markup_template('admin/contactblock.tpl'); $o = replace_macros($t, [ @@ -782,7 +782,7 @@ function admin_page_workerqueue(App $a) { // get jobs from the workerqueue table $statement = DBA::select('workerqueue', ['id', 'parameter', 'created', 'priority'], ['done' => 0], ['order'=> ['priority']]); - $r = DBA::inArray($statement); + $r = DBA::toArray($statement); for($i = 0; $i < count($r); $i++) { $r[$i]['parameter'] = implode(json_decode($r[$i]['parameter']), ': '); diff --git a/mod/community.php b/mod/community.php index 7775fdba4a..61b523ba48 100644 --- a/mod/community.php +++ b/mod/community.php @@ -198,14 +198,14 @@ function community_getitems($start, $itemspage, $content) AND NOT `thread`.`private` AND `thread`.`wall` AND `thread`.`origin` ORDER BY `thread`.`commented` DESC LIMIT " . intval($start) . ", " . intval($itemspage) ); - return DBA::inArray($r); + return DBA::toArray($r); } elseif ($content == 'global') { $r = DBA::p("SELECT `uri` FROM `thread` INNER JOIN `item` ON `item`.`id` = `thread`.`iid` INNER JOIN `contact` AS `author` ON `author`.`id`=`item`.`author-id` WHERE `thread`.`uid` = 0 AND NOT `author`.`hidden` AND NOT `author`.`blocked` ORDER BY `thread`.`commented` DESC LIMIT " . intval($start) . ", " . intval($itemspage)); - return DBA::inArray($r); + return DBA::toArray($r); } // Should never happen diff --git a/mod/network.php b/mod/network.php index 79910152b3..50eb025c23 100644 --- a/mod/network.php +++ b/mod/network.php @@ -845,7 +845,7 @@ function networkThreadedView(App $a, $update, $parent) local_user(), TERM_OBJ_POST, TERM_HASHTAG, $top_limit, $bottom_limit); - $data = DBA::inArray($items); + $data = DBA::toArray($items); if (count($data) > 0) { $tag_top_limit = current($data)['order_date']; diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index 64b6ca7c6e..21757d4299 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -27,7 +27,7 @@ class ContactSelector $o .= "