Browse Source

Fix deprecated functions usage

pull/21/head
Aleksander Machniak 13 years ago
parent
commit
6075f084ec
  1. 4
      program/include/rcmail.php
  2. 5
      program/include/rcube_bc.inc
  3. 6
      program/include/rcube_imap_cache.php
  4. 4
      program/include/rcube_mime.php
  5. 2
      program/include/rcube_vcard.php

4
program/include/rcmail.php

@ -308,7 +308,7 @@ class rcmail extends rcube
/**
* 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 @@ class rcmail extends rcube
}
else {
if (!empty($date)) {
$timestamp = rcube_strtotime($date);
$timestamp = rcube_utils::strtotime($date);
}
if (empty($timestamp)) {

5
program/include/rcube_bc.inc

@ -38,11 +38,6 @@ function get_table_name($table)
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);

6
program/include/rcube_imap_cache.php

@ -617,13 +617,13 @@ class rcube_imap_cache
// 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));
}

4
program/include/rcube_mime.php

@ -541,10 +541,10 @@ class rcube_mime
$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);
}

2
program/include/rcube_vcard.php

@ -313,7 +313,7 @@ class rcube_vcard
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;

Loading…
Cancel
Save