use escapeStr (fix type hint)

master
Jean-Christian Paul Denis 2023-04-11 23:17:37 +02:00
parent 68bcb0c060
commit 0f6852a46b
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 5 additions and 5 deletions

View File

@ -93,7 +93,7 @@ class advancedCleanerSettings extends advancedCleaner
dcCore::app()->con->execute( dcCore::app()->con->execute(
'DELETE FROM ' . dcCore::app()->prefix . 'setting ' . 'DELETE FROM ' . dcCore::app()->prefix . 'setting ' .
'WHERE blog_id IS NULL ' . 'WHERE blog_id IS NULL ' .
"AND setting_ns = '" . dcCore::app()->con->escape($ns) . "' " "AND setting_ns = '" . dcCore::app()->con->escapeStr((string) $ns) . "' "
); );
return true; return true;
@ -101,8 +101,8 @@ class advancedCleanerSettings extends advancedCleaner
if ($action == 'delete_local') { if ($action == 'delete_local') {
dcCore::app()->con->execute( dcCore::app()->con->execute(
'DELETE FROM ' . dcCore::app()->prefix . 'setting ' . 'DELETE FROM ' . dcCore::app()->prefix . 'setting ' .
"WHERE blog_id = '" . dcCore::app()->con->escape(dcCore::app()->blog->id) . "' " . "WHERE blog_id = '" . dcCore::app()->con->escapeStr((string) dcCore::app()->blog->id) . "' " .
"AND setting_ns = '" . dcCore::app()->con->escape($ns) . "' " "AND setting_ns = '" . dcCore::app()->con->escapeStr((string) $ns) . "' "
); );
return true; return true;
@ -110,7 +110,7 @@ class advancedCleanerSettings extends advancedCleaner
if ($action == 'delete_all') { if ($action == 'delete_all') {
dcCore::app()->con->execute( dcCore::app()->con->execute(
'DELETE FROM ' . dcCore::app()->prefix . 'setting ' . 'DELETE FROM ' . dcCore::app()->prefix . 'setting ' .
"WHERE setting_ns = '" . dcCore::app()->con->escape($ns) . "' " . "WHERE setting_ns = '" . dcCore::app()->con->escapeStr((string) $ns) . "' " .
"AND (blog_id IS NULL OR blog_id != '') " "AND (blog_id IS NULL OR blog_id != '') "
); );
@ -281,7 +281,7 @@ class advancedCleanerVersions extends advancedCleaner
if ($action == 'delete') { if ($action == 'delete') {
dcCore::app()->con->execute( dcCore::app()->con->execute(
'DELETE FROM ' . dcCore::app()->prefix . 'version ' . 'DELETE FROM ' . dcCore::app()->prefix . 'version ' .
"WHERE module = '" . dcCore::app()->con->escape($ns) . "' " "WHERE module = '" . dcCore::app()->con->escapeStr((string) $ns) . "' "
); );
return true; return true;