From 74ce01efc75fa9085436bfe79c3e6c42c2966783 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak
Date: Fri, 23 Oct 2015 08:02:57 +0200
Subject: [PATCH] Q() -> rcube::Q()
---
installer/index.php | 2 +-
installer/test.php | 6 +++---
plugins/archive/archive.php | 2 +-
.../managesieve/lib/Roundcube/rcube_sieve_engine.php | 4 ++--
program/include/rcmail_install.php | 12 ++++++------
program/steps/settings/func.inc | 4 ++--
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/installer/index.php b/installer/index.php
index 052359c02..3e9c6b7c5 100644
--- a/installer/index.php
+++ b/installer/index.php
@@ -164,7 +164,7 @@ if ($RCI->configured && empty($_REQUEST['_step'])) {
foreach (array('Check environment', 'Create config', 'Test config') as $i => $item) {
$j = $i + 1;
- $link = ($RCI->step >= $j || $RCI->configured) ? '' . Q($item) . '' : Q($item);
+ $link = ($RCI->step >= $j || $RCI->configured) ? '' . rcube::Q($item) . '' : rcube::Q($item);
printf('%s', $j+1, $RCI->step > $j ? ' passed' : ($RCI->step == $j ? ' current' : ''), $link);
}
?>
diff --git a/installer/test.php b/installer/test.php
index 72be9686c..bb7648294 100644
--- a/installer/test.php
+++ b/installer/test.php
@@ -325,7 +325,7 @@ if (isset($_POST['sendmail'])) {
$status = mail($headers['To'], $headers['Subject'], $body, $header_str);
else
$status = mail($headers['To'], $headers['Subject'], $body, $header_str, '-f'.$headers['From']);
-
+
if (!$status)
$smtp_response[] = 'Mail delivery with mail() failed. Check your error logs for details';
}
@@ -340,7 +340,7 @@ if (isset($_POST['sendmail'])) {
else {
$RCI->fail('SMTP send', 'Invalid sender or recipient');
}
-
+
echo '
';
}
@@ -405,7 +405,7 @@ $pass_field = new html_passwordfield(array('name' => '_pass', 'id' => 'imappass'
if (isset($_POST['imaptest']) && !empty($_POST['_host']) && !empty($_POST['_user'])) {
- echo 'Connecting to ' . Q($_POST['_host']) . '...
';
+ echo '
Connecting to ' . rcube::Q($_POST['_host']) . '...
';
$imap_host = trim($_POST['_host']);
$imap_port = $RCI->getprop('default_port');
diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php
index 51854b7c3..ffa309aa6 100644
--- a/plugins/archive/archive.php
+++ b/plugins/archive/archive.php
@@ -265,7 +265,7 @@ class archive extends rcube_plugin
$archive_type->add($this->gettext('archivetypefolder'), 'folder');
$args['blocks']['archive'] = array(
- 'name' => Q($this->gettext('settingstitle')),
+ 'name' => rcube::Q($this->gettext('settingstitle')),
'options' => array('archive_type' => array(
'title' => $this->gettext('archivetype'),
'content' => $archive_type->show($rcmail->config->get('archive_type'))
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
index 362c529e5..ad3387c54 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -1606,7 +1606,7 @@ class rcube_sieve_engine
$mout .= '
';
}
@@ -1782,7 +1782,7 @@ class rcube_sieve_engine
$out .= ''. rcube::Q($this->plugin->gettext('vacationreason')) .'
'
.'\n";
+ . rcube::Q($action['reason'], 'strict', false) . "\n";
$out .= '
' .rcube::Q($this->plugin->gettext('vacationsubject')) . '
'
.'OK';
+ echo rcube::Q($name) . ': OK';
$this->_showhint($message);
}
@@ -620,7 +620,7 @@ class rcmail_install
$this->failures++;
}
- echo Q($name) . ': NOT OK';
+ echo rcube::Q($name) . ': NOT OK';
$this->_showhint($message, $url);
}
@@ -634,7 +634,7 @@ class rcmail_install
*/
function optfail($name, $message = '', $url = '')
{
- echo Q($name) . ': NOT OK';
+ echo rcube::Q($name) . ': NOT OK';
$this->_showhint($message, $url);
}
@@ -648,17 +648,17 @@ class rcmail_install
*/
function na($name, $message = '', $url = '')
{
- echo Q($name) . ': NOT AVAILABLE';
+ echo rcube::Q($name) . ': NOT AVAILABLE';
$this->_showhint($message, $url);
}
function _showhint($message, $url = '')
{
- $hint = Q($message);
+ $hint = rcube::Q($message);
if ($url)
- $hint .= ($hint ? '; ' : '') . 'See ' . Q($url) . '';
+ $hint .= ($hint ? '; ' : '') . 'See ' . rcube::Q($url) . '';
if ($hint)
echo '(' . $hint . ')';
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 061ba1263..3183f6227 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -1293,9 +1293,9 @@ function rcmail_user_prefs($current = null)
// allow plugins to add a header to each section
$data = $RCMAIL->plugins->exec_hook('preferences_section_header',
- array('section' => $sect['id'], 'header' => '', 'current' => $current));
+ array('section' => $sect['id'], 'header' => '', 'current' => $current));
- if(!empty($data['header'])) {
+ if (!empty($data['header'])) {
$sections[$idx]['header'] = $data['header'];
}
}