From 6075f084ecbff71490fc5594f2d9470d87938317 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 27 Aug 2012 05:47:42 -0400
Subject: [PATCH] Fix deprecated functions usage

---
 program/include/rcube_mime.php       |    4 ++--
 program/include/rcube_bc.inc         |    5 -----
 program/include/rcmail.php           |    4 ++--
 program/include/rcube_imap_cache.php |    6 +++---
 program/include/rcube_vcard.php      |    2 +-
 5 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 336e9ca..02f38e6 100644
--- a/program/include/rcmail.php
+++ b/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)) {
diff --git a/program/include/rcube_bc.inc b/program/include/rcube_bc.inc
index 1932f86..1894873 100644
--- a/program/include/rcube_bc.inc
+++ b/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);
diff --git a/program/include/rcube_imap_cache.php b/program/include/rcube_imap_cache.php
index 4d6d5e1..f36ace0 100644
--- a/program/include/rcube_imap_cache.php
+++ b/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));
     }
 
diff --git a/program/include/rcube_mime.php b/program/include/rcube_mime.php
index e1f736a..d8e04a9 100644
--- a/program/include/rcube_mime.php
+++ b/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);
                 }
diff --git a/program/include/rcube_vcard.php b/program/include/rcube_vcard.php
index 37cd3ab..2bfd474 100644
--- a/program/include/rcube_vcard.php
+++ b/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;
 

--
Gitblit v1.9.1