From e42cf4d4fc723ed8ede2517520b1c08763f8aeb7 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 20 Jul 2018 21:58:15 -0400 Subject: [PATCH 1/9] Rename DBA::affected_rows to DBA::affectedRows --- src/Database/DBA.php | 2 +- src/Model/Item.php | 2 +- src/Worker/Expire.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Database/DBA.php b/src/Database/DBA.php index 3fae84c76..151277004 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -704,7 +704,7 @@ class DBA * * @return int Number of rows */ - public static function affected_rows() { + public static function affectedRows() { return self::$affected_rows; } diff --git a/src/Model/Item.php b/src/Model/Item.php index 5db1b0bb4..85c4ce3c0 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -809,7 +809,7 @@ class Item extends BaseObject } // When there is no content for the "old" item table, this will count the fetched items - $rows = DBA::affected_rows(); + $rows = DBA::affectedRows(); while ($item = DBA::fetch($items)) { diff --git a/src/Worker/Expire.php b/src/Worker/Expire.php index 7dd5a9b5a..d40d72eca 100644 --- a/src/Worker/Expire.php +++ b/src/Worker/Expire.php @@ -52,12 +52,12 @@ class Expire logger('Deleting orphaned item activities - start', LOGGER_DEBUG); $condition = ["NOT EXISTS (SELECT `iaid` FROM `item` WHERE `item`.`iaid` = `item-activity`.`id`)"]; DBA::delete('item-activity', $condition); - logger('Orphaned item activities deleted: ' . DBA::affected_rows(), LOGGER_DEBUG); + logger('Orphaned item activities deleted: ' . DBA::affectedRows(), LOGGER_DEBUG); logger('Deleting orphaned item content - start', LOGGER_DEBUG); $condition = ["NOT EXISTS (SELECT `icid` FROM `item` WHERE `item`.`icid` = `item-content`.`id`)"]; DBA::delete('item-content', $condition); - logger('Orphaned item content deleted: ' . DBA::affected_rows(), LOGGER_DEBUG); + logger('Orphaned item content deleted: ' . DBA::affectedRows(), LOGGER_DEBUG); // make this optional as it could have a performance impact on large sites if (intval(Config::get('system', 'optimize_items'))) { From 910e832dc28f6fcedf31ba4456888221612fd1da Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 20 Jul 2018 21:58:30 -0400 Subject: [PATCH 2/9] Rename DBA::any_value_fallback to DBA::anyValueFallback --- include/dba.php | 2 +- src/Database/DBA.php | 4 ++-- src/Database/DBStructure.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/dba.php b/include/dba.php index 57a277f34..4b7fb8009 100644 --- a/include/dba.php +++ b/include/dba.php @@ -29,7 +29,7 @@ function q($sql) { } $sql = DBA::clean_query($sql); - $sql = DBA::any_value_fallback($sql); + $sql = DBA::anyValueFallback($sql); $stmt = @vsprintf($sql, $args); diff --git a/src/Database/DBA.php b/src/Database/DBA.php index 151277004..79c442271 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -288,7 +288,7 @@ class DBA * @param string $sql An SQL string without the values * @return string The input SQL string modified if necessary. */ - public static function any_value_fallback($sql) { + public static function anyValueFallback($sql) { $server_info = self::server_info(); if (version_compare($server_info, '5.7.5', '<') || (stripos($server_info, 'MariaDB') !== false)) { @@ -397,7 +397,7 @@ class DBA } $sql = self::clean_query($sql); - $sql = self::any_value_fallback($sql); + $sql = self::anyValueFallback($sql); $orig_sql = $sql; diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 20865bfc4..d0db9e572 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -460,7 +460,7 @@ class DBStructure if ($ignore != "") { echo "SET session old_alter_table=0;\n"; } else { - echo "INSERT INTO `".$temp_name."` SELECT ".DBA::any_value_fallback($field_list)." FROM `".$name."`".$group_by.";\n"; + echo "INSERT INTO `".$temp_name."` SELECT ".DBA::anyValueFallback($field_list)." FROM `".$name."`".$group_by.";\n"; echo "DROP TABLE `".$name."`;\n"; echo "RENAME TABLE `".$temp_name."` TO `".$name."`;\n"; } From abbaaf5aa5a581c6eb8f2a67377ea61b8ab0d821 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 20 Jul 2018 21:59:17 -0400 Subject: [PATCH 3/9] Rename DBA::clean_query to DBA::cleanQuery --- include/dba.php | 2 +- src/Database/DBA.php | 4 ++-- src/Database/DBStructure.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/dba.php b/include/dba.php index 4b7fb8009..32d3b1dde 100644 --- a/include/dba.php +++ b/include/dba.php @@ -28,7 +28,7 @@ function q($sql) { return false; } - $sql = DBA::clean_query($sql); + $sql = DBA::cleanQuery($sql); $sql = DBA::anyValueFallback($sql); $stmt = @vsprintf($sql, $args); diff --git a/src/Database/DBA.php b/src/Database/DBA.php index 79c442271..62283b3b3 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -306,7 +306,7 @@ class DBA * @param string $sql An SQL string without the values * @return string The input SQL string modified if necessary. */ - public static function clean_query($sql) { + public static function cleanQuery($sql) { $search = ["\t", "\n", "\r", " "]; $replace = [' ', ' ', ' ', ' ']; do { @@ -396,7 +396,7 @@ class DBA logger('Parameter mismatch. Query "'.$sql.'" - Parameters '.print_r($args, true), LOGGER_DEBUG); } - $sql = self::clean_query($sql); + $sql = self::cleanQuery($sql); $sql = self::anyValueFallback($sql); $orig_sql = $sql; diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index d0db9e572..33e9c0d4d 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -322,8 +322,8 @@ class DBStructure $parameters['comment'] = ""; } - $current_field_definition = DBA::clean_query(implode(",", $field_definition)); - $new_field_definition = DBA::clean_query(implode(",", $parameters)); + $current_field_definition = DBA::cleanQuery(implode(",", $field_definition)); + $new_field_definition = DBA::cleanQuery(implode(",", $parameters)); if ($current_field_definition != $new_field_definition) { $sql2 = self::modifyTableField($fieldname, $parameters); if ($sql3 == "") { From 591939dfc03a5948c0c0f538d20ed8f7ee0f6249 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 20 Jul 2018 22:00:16 -0400 Subject: [PATCH 4/9] Rename DBA::database_name to DBA::databaseName --- mod/admin.php | 2 +- src/Database/DBA.php | 2 +- src/Database/DBStructure.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 3245cde0d..a6a09112e 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -816,7 +816,7 @@ function admin_page_workerqueue(App $a) function admin_page_summary(App $a) { // are there MyISAM tables in the DB? If so, trigger a warning message - $r = q("SELECT `engine` FROM `information_schema`.`tables` WHERE `engine` = 'myisam' AND `table_schema` = '%s' LIMIT 1", dbesc(DBA::database_name())); + $r = q("SELECT `engine` FROM `information_schema`.`tables` WHERE `engine` = 'myisam' AND `table_schema` = '%s' LIMIT 1", dbesc(DBA::databaseName())); $showwarning = false; $warningtext = []; if (DBM::is_result($r)) { diff --git a/src/Database/DBA.php b/src/Database/DBA.php index 62283b3b3..f7fc8a6ae 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -183,7 +183,7 @@ class DBA * * @return string */ - public static function database_name() { + public static function databaseName() { $ret = self::p("SELECT DATABASE() AS `db`"); $data = self::inArray($ret); return $data[0]['db']; diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 33e9c0d4d..2637cf99e 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -26,7 +26,7 @@ class DBStructure */ public static function convertToInnoDB() { $r = q("SELECT `TABLE_NAME` FROM `information_schema`.`tables` WHERE `engine` = 'MyISAM' AND `table_schema` = '%s'", - dbesc(DBA::database_name())); + dbesc(DBA::databaseName())); if (!DBM::is_result($r)) { echo L10n::t('There are no tables on MyISAM.')."\n"; From f051ae169868905d3f3debbed37c8cf0f8b2be35 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 20 Jul 2018 22:01:53 -0400 Subject: [PATCH 5/9] Rename DBA::fetch_first to DBA::fetchFirst --- mod/dfrn_notify.php | 4 ++-- mod/directory.php | 2 +- mod/display.php | 2 +- src/App.php | 2 +- src/Content/ContactSelector.php | 2 +- src/Core/Worker.php | 6 +++--- src/Database/DBA.php | 4 ++-- src/Model/Contact.php | 2 +- src/Model/Item.php | 4 ++-- src/Model/Profile.php | 4 ++-- src/Model/User.php | 2 +- src/Worker/Delivery.php | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 726f8335d..08c43d0fb 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -213,7 +213,7 @@ function dfrn_dispatch_public($postdata) } // We now have some contact, so we fetch it - $importer = DBA::fetch_first("SELECT *, `name` as `senderName` + $importer = DBA::fetchFirst("SELECT *, `name` as `senderName` FROM `contact` WHERE NOT `blocked` AND `id` = ? LIMIT 1", $contact['id']); @@ -252,7 +252,7 @@ function dfrn_dispatch_private($user, $postdata) } // We now have some contact, so we fetch it - $importer = DBA::fetch_first("SELECT *, `name` as `senderName` + $importer = DBA::fetchFirst("SELECT *, `name` as `senderName` FROM `contact` WHERE NOT `blocked` AND `id` = ? LIMIT 1", $cid); diff --git a/mod/directory.php b/mod/directory.php index 2f5d364e9..08354e3a9 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -83,7 +83,7 @@ function directory_content(App $a) $publish = (Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 " ); - $cnt = DBA::fetch_first("SELECT COUNT(*) AS `total` FROM `profile` + $cnt = DBA::fetchFirst("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` $sql_extra"); if (DBM::is_result($cnt)) { diff --git a/mod/display.php b/mod/display.php index e615b6843..98478024f 100644 --- a/mod/display.php +++ b/mod/display.php @@ -87,7 +87,7 @@ function display_init(App $a) $nickname = str_replace(normalise_link(System::baseUrl())."/profile/", "", normalise_link($profiledata["url"])); if (($nickname != $a->user["nickname"])) { - $profile = DBA::fetch_first("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile` + $profile = DBA::fetchFirst("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile` INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` INNER JOIN `user` ON `profile`.`uid` = `user`.`uid` WHERE `user`.`nickname` = ? AND `profile`.`is-default` AND `contact`.`self` LIMIT 1", $nickname diff --git a/src/App.php b/src/App.php index 1e24c3214..815b583c3 100644 --- a/src/App.php +++ b/src/App.php @@ -496,7 +496,7 @@ class App $this->mode |= App::MODE_DBAVAILABLE; - if (DBA::fetch_first("SHOW TABLES LIKE 'config'") === false) { + if (DBA::fetchFirst("SHOW TABLES LIKE 'config'") === false) { return; } diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index 797ec7861..64b6ca7c6 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -102,7 +102,7 @@ class ContactSelector $networkname = str_replace($search, $replace, $s); if ((in_array($s, [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS])) && ($profile != "")) { - $r = DBA::fetch_first("SELECT `gserver`.`platform` FROM `gcontact` + $r = DBA::fetchFirst("SELECT `gserver`.`platform` FROM `gcontact` INNER JOIN `gserver` ON `gserver`.`nurl` = `gcontact`.`server_url` WHERE `gcontact`.`nurl` = ? AND `platform` != ''", normalise_link($profile)); diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 633b8e12e..2d4a8cb94 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -477,7 +477,7 @@ class Worker if ($max == 0) { // the maximum number of possible user connections can be a system variable - $r = DBA::fetch_first("SHOW VARIABLES WHERE `variable_name` = 'max_user_connections'"); + $r = DBA::fetchFirst("SHOW VARIABLES WHERE `variable_name` = 'max_user_connections'"); if (DBM::is_result($r)) { $max = $r["Value"]; } @@ -513,7 +513,7 @@ class Worker // We will now check for the system values. // This limit could be reached although the user limits are fine. - $r = DBA::fetch_first("SHOW VARIABLES WHERE `variable_name` = 'max_connections'"); + $r = DBA::fetchFirst("SHOW VARIABLES WHERE `variable_name` = 'max_connections'"); if (!DBM::is_result($r)) { return false; } @@ -521,7 +521,7 @@ class Worker if ($max == 0) { return false; } - $r = DBA::fetch_first("SHOW STATUS WHERE `variable_name` = 'Threads_connected'"); + $r = DBA::fetchFirst("SHOW STATUS WHERE `variable_name` = 'Threads_connected'"); if (!DBM::is_result($r)) { return false; } diff --git a/src/Database/DBA.php b/src/Database/DBA.php index f7fc8a6ae..64ee3a00d 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -683,7 +683,7 @@ class DBA * @param string $sql SQL statement * @return array first row of query */ - public static function fetch_first($sql) { + public static function fetchFirst($sql) { $params = self::getParam(func_get_args()); $stmt = self::p($sql, $params); @@ -1344,7 +1344,7 @@ class DBA $sql = "SELECT COUNT(*) AS `count` FROM `".$table."`".$condition_string; - $row = self::fetch_first($sql, $condition); + $row = self::fetchFirst($sql, $condition); return $row['count']; } diff --git a/src/Model/Contact.php b/src/Model/Contact.php index f8957c8a6..14382d418 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -72,7 +72,7 @@ class Contact extends BaseObject { $return = 0; if (intval($gid)) { - $contacts = DBA::fetch_first('SELECT COUNT(*) AS `count` + $contacts = DBA::fetchFirst('SELECT COUNT(*) AS `count` FROM `contact` INNER JOIN `group_member` ON `contact`.`id` = `group_member`.`contact-id` diff --git a/src/Model/Item.php b/src/Model/Item.php index 85c4ce3c0..b9ba0d4c3 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2427,7 +2427,7 @@ class Item extends BaseObject // Does the given user have this item? if ($uid) { - $item = DBA::fetch_first("SELECT `item`.`id`, `user`.`nickname` FROM `item` + $item = DBA::fetchFirst("SELECT `item`.`id`, `user`.`nickname` FROM `item` INNER JOIN `user` ON `user`.`uid` = `item`.`uid` WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated` AND `item`.`guid` = ? AND `item`.`uid` = ?", $guid, $uid); @@ -2439,7 +2439,7 @@ class Item extends BaseObject // Or is it anywhere on the server? if ($nick == "") { - $item = DBA::fetch_first("SELECT `item`.`id`, `user`.`nickname` FROM `item` + $item = DBA::fetchFirst("SELECT `item`.`id`, `user`.`nickname` FROM `item` INNER JOIN `user` ON `user`.`uid` = `item`.`uid` WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated` AND NOT `item`.`private` AND `item`.`wall` diff --git a/src/Model/Profile.php b/src/Model/Profile.php index d975dbb3f..82507b9c0 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -210,7 +210,7 @@ class Profile $profile = null; if ($profile_id) { - $profile = DBA::fetch_first( + $profile = DBA::fetchFirst( "SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` AS `contact_photo`, `contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`, `profile`.`uid` AS `profile_uid`, `profile`.*, @@ -224,7 +224,7 @@ class Profile ); } if (!DBM::is_result($profile)) { - $profile = DBA::fetch_first( + $profile = DBA::fetchFirst( "SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` as `contact_photo`, `contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`, `profile`.`uid` AS `profile_uid`, `profile`.*, diff --git a/src/Model/User.php b/src/Model/User.php index 125b722bc..8d4e52cac 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -38,7 +38,7 @@ class User * @return boolean|array */ public static function getOwnerDataById($uid) { - $r = DBA::fetch_first("SELECT + $r = DBA::fetchFirst("SELECT `contact`.*, `user`.`prvkey` AS `uprvkey`, `user`.`timezone`, diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index 28658e5cd..072765868 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -254,7 +254,7 @@ class Delivery extends BaseObject } // We now have some contact, so we fetch it - $target_importer = DBA::fetch_first("SELECT *, `name` as `senderName` + $target_importer = DBA::fetchFirst("SELECT *, `name` as `senderName` FROM `contact` WHERE NOT `blocked` AND `id` = ? LIMIT 1", $cid); From 4db98eb43d90a56b1e983628910641c9cc567b8a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 20 Jul 2018 22:03:40 -0400 Subject: [PATCH 6/9] Rename DBA::inArray to DBA::toArray --- include/dba.php | 2 +- include/security.php | 8 ++++---- mod/admin.php | 4 ++-- mod/community.php | 4 ++-- mod/network.php | 2 +- src/Content/ContactSelector.php | 2 +- src/Core/ACL.php | 4 ++-- src/Core/Addon.php | 2 +- src/Core/Worker.php | 4 ++-- src/Database/DBA.php | 6 +++--- src/Model/Contact.php | 14 +++++++------- src/Model/Event.php | 2 +- src/Model/Group.php | 2 +- src/Model/Profile.php | 2 +- src/Network/FKOAuthDataStore.php | 4 ++-- src/Worker/Notifier.php | 4 ++-- src/Worker/Queue.php | 2 +- 17 files changed, 34 insertions(+), 34 deletions(-) diff --git a/include/dba.php b/include/dba.php index 32d3b1dde..bccd9792b 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 987f3b08e..53e554c3d 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 a6a09112e..7c465fe17 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 7775fdba4..61b523ba4 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 79910152b..50eb025c2 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 64b6ca7c6..21757d429 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -27,7 +27,7 @@ class ContactSelector $o .= "