From 74ce01efc75fa9085436bfe79c3e6c42c2966783 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 23 Oct 2015 02:02:57 -0400
Subject: [PATCH] Q() -> rcube::Q()
---
plugins/archive/archive.php | 2 +-
program/include/rcmail_install.php | 12 ++++++------
program/steps/settings/func.inc | 4 ++--
installer/test.php | 6 +++---
plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php | 4 ++--
installer/index.php | 2 +-
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/installer/index.php b/installer/index.php
index 052359c..3e9c6b7 100644
--- a/installer/index.php
+++ b/installer/index.php
@@ -164,7 +164,7 @@
foreach (array('Check environment', 'Create config', 'Test config') as $i => $item) {
$j = $i + 1;
- $link = ($RCI->step >= $j || $RCI->configured) ? '<a href="./index.php?_step='.$j.'">' . Q($item) . '</a>' : Q($item);
+ $link = ($RCI->step >= $j || $RCI->configured) ? '<a href="./index.php?_step='.$j.'">' . rcube::Q($item) . '</a>' : rcube::Q($item);
printf('<li class="step%d%s">%s</li>', $j+1, $RCI->step > $j ? ' passed' : ($RCI->step == $j ? ' current' : ''), $link);
}
?>
diff --git a/installer/test.php b/installer/test.php
index 72be968..bb76482 100644
--- a/installer/test.php
+++ b/installer/test.php
@@ -325,7 +325,7 @@
$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 @@
else {
$RCI->fail('SMTP send', 'Invalid sender or recipient');
}
-
+
echo '</p>';
}
@@ -405,7 +405,7 @@
if (isset($_POST['imaptest']) && !empty($_POST['_host']) && !empty($_POST['_user'])) {
- echo '<p>Connecting to ' . Q($_POST['_host']) . '...<br />';
+ echo '<p>Connecting to ' . rcube::Q($_POST['_host']) . '...<br />';
$imap_host = trim($_POST['_host']);
$imap_port = $RCI->getprop('default_port');
diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php
index 51854b7..ffa309a 100644
--- a/plugins/archive/archive.php
+++ b/plugins/archive/archive.php
@@ -265,7 +265,7 @@
$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 362c529..ad3387c 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -1606,7 +1606,7 @@
$mout .= '<div id="rule_date_header_div' .$id. '" class="adv"'. ($rule['test'] != 'date' ? ' style="display:none"' : '') .'>';
$mout .= '<span class="label">' . rcube::Q($this->plugin->gettext('dateheader')) . '</span>';
$mout .= '<input type="text" name="_rule_date_header[]" id="rule_date_header'.$id
- . '" value="'. Q($rule['test'] == 'date' ? $rule['header'] : '')
+ . '" value="'. rcube::Q($rule['test'] == 'date' ? $rule['header'] : '')
. '" size="15"' . $this->error_class($id, 'test', 'dateheader', 'rule_date_header') .' />';
$mout .= '</div>';
}
@@ -1782,7 +1782,7 @@
$out .= '<span class="label">'. rcube::Q($this->plugin->gettext('vacationreason')) .'</span><br />'
.'<textarea name="_action_reason['.$id.']" id="action_reason' .$id. '" '
.'rows="3" cols="35" '. $this->error_class($id, 'action', 'reason', 'action_reason') . '>'
- . Q($action['reason'], 'strict', false) . "</textarea>\n";
+ . rcube::Q($action['reason'], 'strict', false) . "</textarea>\n";
$out .= '<br /><span class="label">' .rcube::Q($this->plugin->gettext('vacationsubject')) . '</span><br />'
.'<input type="text" name="_action_subject['.$id.']" id="action_subject'.$id.'" '
.'value="' . (is_array($action['subject']) ? rcube::Q(implode(', ', $action['subject']), 'strict', false) : $action['subject']) . '" size="35" '
diff --git a/program/include/rcmail_install.php b/program/include/rcmail_install.php
index d16c22e..02f1565 100644
--- a/program/include/rcmail_install.php
+++ b/program/include/rcmail_install.php
@@ -601,7 +601,7 @@
*/
function pass($name, $message = '')
{
- echo Q($name) . ': <span class="success">OK</span>';
+ echo rcube::Q($name) . ': <span class="success">OK</span>';
$this->_showhint($message);
}
@@ -620,7 +620,7 @@
$this->failures++;
}
- echo Q($name) . ': <span class="fail">NOT OK</span>';
+ echo rcube::Q($name) . ': <span class="fail">NOT OK</span>';
$this->_showhint($message, $url);
}
@@ -634,7 +634,7 @@
*/
function optfail($name, $message = '', $url = '')
{
- echo Q($name) . ': <span class="na">NOT OK</span>';
+ echo rcube::Q($name) . ': <span class="na">NOT OK</span>';
$this->_showhint($message, $url);
}
@@ -648,17 +648,17 @@
*/
function na($name, $message = '', $url = '')
{
- echo Q($name) . ': <span class="na">NOT AVAILABLE</span>';
+ echo rcube::Q($name) . ': <span class="na">NOT AVAILABLE</span>';
$this->_showhint($message, $url);
}
function _showhint($message, $url = '')
{
- $hint = Q($message);
+ $hint = rcube::Q($message);
if ($url)
- $hint .= ($hint ? '; ' : '') . 'See <a href="' . Q($url) . '" target="_blank">' . Q($url) . '</a>';
+ $hint .= ($hint ? '; ' : '') . 'See <a href="' . rcube::Q($url) . '" target="_blank">' . rcube::Q($url) . '</a>';
if ($hint)
echo '<span class="indent">(' . $hint . ')</span>';
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 061ba12..3183f62 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -1293,9 +1293,9 @@
// 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'];
}
}
--
Gitblit v1.9.1