Aleksander Machniak
2015-10-23 74ce01efc75fa9085436bfe79c3e6c42c2966783
Q() -> rcube::Q()
6 files modified
30 ■■■■ changed files
installer/index.php 2 ●●● patch | view | raw | blame | history
installer/test.php 6 ●●●● patch | view | raw | blame | history
plugins/archive/archive.php 2 ●●● patch | view | raw | blame | history
plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php 4 ●●●● patch | view | raw | blame | history
program/include/rcmail_install.php 12 ●●●● patch | view | raw | blame | history
program/steps/settings/func.inc 4 ●●●● patch | view | raw | blame | history
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);
  }
?>
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');
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'))
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" '
program/include/rcmail_install.php
@@ -601,7 +601,7 @@
   */
  function pass($name, $message = '')
  {
    echo Q($name) . ':&nbsp; <span class="success">OK</span>';
    echo rcube::Q($name) . ':&nbsp; <span class="success">OK</span>';
    $this->_showhint($message);
  }
@@ -620,7 +620,7 @@
      $this->failures++;
    }
    echo Q($name) . ':&nbsp; <span class="fail">NOT OK</span>';
    echo rcube::Q($name) . ':&nbsp; <span class="fail">NOT OK</span>';
    $this->_showhint($message, $url);
  }
@@ -634,7 +634,7 @@
   */
  function optfail($name, $message = '', $url = '')
  {
    echo Q($name) . ':&nbsp; <span class="na">NOT OK</span>';
    echo rcube::Q($name) . ':&nbsp; <span class="na">NOT OK</span>';
    $this->_showhint($message, $url);
  }
@@ -648,17 +648,17 @@
   */
  function na($name, $message = '', $url = '')
  {
    echo Q($name) . ':&nbsp; <span class="na">NOT AVAILABLE</span>';
    echo rcube::Q($name) . ':&nbsp; <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>';
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'];
        }
    }