summaryrefslogtreecommitdiff
path: root/inbox_settings.php
diff options
context:
space:
mode:
authorCarson Fleming <[email protected]>2024-12-30 20:55:43 -0800
committerCarson Fleming <[email protected]>2024-12-30 20:55:43 -0800
commita8067fb0ad3f1de956ef48b95a21afae1bc00a06 (patch)
treeda24bab2e0f7d91ba1098ef6a9fa54f61ebb6442 /inbox_settings.php
parent2290fe83f666c659344d6560acb91cab271f537b (diff)
downloadrc-inbox-settings-a8067fb0ad3f1de956ef48b95a21afae1bc00a06.tar.gz
I was right, it was sus
Diffstat (limited to 'inbox_settings.php')
-rw-r--r--inbox_settings.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/inbox_settings.php b/inbox_settings.php
index a0b36b5..5a7658b 100644
--- a/inbox_settings.php
+++ b/inbox_settings.php
@@ -180,7 +180,7 @@ class inbox_settings extends rcube_plugin {
}
function delete_selected_keys() {
- run_query('delete_keys', $_POST['keys']);
+ $this->run_query('delete_keys', ['%k' => $_POST['keys']]);
$this->rcmail->output->set_pagetitle($this->gettext('deleting_key'));
$this->rcmail->output->send('plugin');
}
@@ -271,9 +271,11 @@ class inbox_settings extends rcube_plugin {
private static function quote_replacement($db, $value) {
if (!is_array($value)) return $db->quote($value, 'text');
- return '(' . implode(', ', array_map(function ($inner) {
- return self::quote_replacement($db, $inner);
- }, $value)) . ')';
+ $quoted = [];
+ foreach ($value as $item) {
+ $quoted[] = self::quote_replacement($db, $item);
+ }
+ return '(' . implode(', ', $quoted) . ')';
}
private static function parse_dsn($dsn) {