]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #5439 from MrPetovan/task/5410-remove-dbesc
authorMichael Vogel <icarus@dabo.de>
Mon, 23 Jul 2018 19:51:49 +0000 (21:51 +0200)
committerGitHub <noreply@github.com>
Mon, 23 Jul 2018 19:51:49 +0000 (21:51 +0200)
Move DBA to src/ part 4.1: Remove dbesc()

1  2 
mod/admin.php

diff --combined mod/admin.php
index ba570e583d496a3f4e010f620e6893e7528d9793,ec91a8a22bb47c4a8d33878d2c01b8feadf1ccee..5d688314987320eca8985f35652de2b97aad6ec5
@@@ -784,8 -784,7 +784,8 @@@ function admin_page_workerqueue(App $a
        $r = DBA::toArray($statement);
  
        for($i = 0; $i < count($r); $i++) {
 -              $r[$i]['parameter'] = implode(json_decode($r[$i]['parameter']), ': ');
 +              // fix GH-5469. ref: src/Core/Worker.php:217
 +              $r[$i]['parameter'] = implode(json_decode($r[$i]['parameter'], true), ': ');
        }
  
        $t = get_markup_template('admin/workerqueue.tpl');
  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::databaseName()));
+       $r = q("SELECT `engine` FROM `information_schema`.`tables` WHERE `engine` = 'myisam' AND `table_schema` = '%s' LIMIT 1", DBA::escape(DBA::databaseName()));
        $showwarning = false;
        $warningtext = [];
        if (DBA::isResult($r)) {
@@@ -949,8 -948,8 +949,8 @@@ function admin_page_site_post(App $a
  
                function update_table($table_name, $fields, $old_url, $new_url)
                {
-                       $dbold = dbesc($old_url);
-                       $dbnew = dbesc($new_url);
+                       $dbold = DBA::escape($old_url);
+                       $dbnew = DBA::escape($new_url);
  
                        $upd = [];
                        foreach ($fields as $f) {