Rename DBA::inArray to DBA::toArray
[friendica.git/.git] / mod / admin.php
index 03035d9..7c465fe 100644 (file)
@@ -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,12 +782,11 @@ 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'] = stripslashes(implode(': ', explode('","', $r[$i]['parameter'])));
-               $r[$i]['parameter'] = substr($r[$i]['parameter'], 2, -2);
-       }
+               $r[$i]['parameter'] = implode(json_decode($r[$i]['parameter']), ': ');
+       }
 
        $t = get_markup_template('admin/workerqueue.tpl');
        return replace_macros($t, [
@@ -817,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)) {
@@ -2357,11 +2356,12 @@ function admin_page_logs_post(App $a)
 function admin_page_logs(App $a)
 {
        $log_choices = [
-               LOGGER_NORMAL   => 'Normal',
-               LOGGER_TRACE    => 'Trace',
-               LOGGER_DEBUG    => 'Debug',
-               LOGGER_DATA     => 'Data',
-               LOGGER_ALL      => 'All'
+               LOGGER_WARNING => 'Warning',
+               LOGGER_INFO    => 'Info',
+               LOGGER_TRACE   => 'Trace',
+               LOGGER_DEBUG   => 'Debug',
+               LOGGER_DATA    => 'Data',
+               LOGGER_ALL     => 'All'
        ];
 
        if (ini_get('log_errors')) {