Aleksander Machniak
2012-08-27 6075f084ecbff71490fc5594f2d9470d87938317
Fix deprecated functions usage
5 files modified
21 ■■■■■ changed files
program/include/rcmail.php 4 ●●●● patch | view | raw | blame | history
program/include/rcube_bc.inc 5 ●●●●● patch | view | raw | blame | history
program/include/rcube_imap_cache.php 6 ●●●● patch | view | raw | blame | history
program/include/rcube_mime.php 4 ●●●● patch | view | raw | blame | history
program/include/rcube_vcard.php 2 ●●● patch | view | raw | blame | history
program/include/rcmail.php
@@ -308,7 +308,7 @@
  /**
   * Init output object for GUI and add common scripts.
   * This will instantiate a rcmail_template object and set
   * This will instantiate a rcube_output_html object and set
   * environment vars according to the current session and configuration
   *
   * @param boolean True if this request is loaded in a (i)frame
@@ -1209,7 +1209,7 @@
        }
        else {
            if (!empty($date)) {
                $timestamp = rcube_strtotime($date);
                $timestamp = rcube_utils::strtotime($date);
            }
            if (empty($timestamp)) {
program/include/rcube_bc.inc
@@ -38,11 +38,6 @@
    return rcmail::get_instance()->db->table_name($table);
}
function get_sequence_name($sequence)
{
    return rcmail::get_instance()->db->sequence_name($sequence);
}
function rcube_label($p, $domain=null)
{
    return rcmail::get_instance()->gettext($p, $domain);
program/include/rcube_imap_cache.php
@@ -617,13 +617,13 @@
        // get expiration timestamp
        $ts = get_offset_time($ttl, -1);
        $this->db->query("DELETE FROM ".get_table_name('cache_messages')
        $this->db->query("DELETE FROM ".$this->db->table_name('cache_messages')
              ." WHERE changed < " . $this->db->fromunixtime($ts));
        $this->db->query("DELETE FROM ".get_table_name('cache_index')
        $this->db->query("DELETE FROM ".$this->db->table_name('cache_index')
              ." WHERE changed < " . $this->db->fromunixtime($ts));
        $this->db->query("DELETE FROM ".get_table_name('cache_thread')
        $this->db->query("DELETE FROM ".$this->db->table_name('cache_thread')
              ." WHERE changed < " . $this->db->fromunixtime($ts));
    }
program/include/rcube_mime.php
@@ -541,10 +541,10 @@
                    $prefix = $regs[0];
                    $level = strlen($prefix);
                    $line  = rtrim(substr($line, $level));
                    $line  = $prefix . rc_wordwrap($line, $length - $level - 2, " \r\n$prefix ");
                    $line  = $prefix . self::wordwrap($line, $length - $level - 2, " \r\n$prefix ");
                }
                else if ($line) {
                    $line = rc_wordwrap(rtrim($line), $length - 2, " \r\n");
                    $line = self::wordwrap(rtrim($line), $length - 2, " \r\n");
                    // space-stuffing
                    $line = preg_replace('/(^|\r\n)(From| |>)/', '\\1 \\2', $line);
                }
program/include/rcube_vcard.php
@@ -313,7 +313,7 @@
      case 'birthday':
      case 'anniversary':
        if (($val = rcube_strtotime($value)) && ($fn = self::$fieldmap[$field]))
        if (($val = rcube_utils::strtotime($value)) && ($fn = self::$fieldmap[$field]))
          $this->raw[$fn][] = array(0 => date('Y-m-d', $val), 'value' => array('date'));
        break;