From be98dfc2c0bdc4f911c6daa94e3fddc29afc89a8 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 16 Apr 2012 07:59:08 -0400
Subject: [PATCH] - Replace some references to rcmail with rcube

---
 program/include/rcube_ldap.php |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index 0b25e63..88b7cd0 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -163,8 +163,8 @@
         $this->mail_domain = $mail_domain;
 
         // initialize cache
-        $rcmail = rcmail::get_instance();
-        $this->cache = $rcmail->get_cache('LDAP.' . asciiwords($this->prop['name']), 'db', 600);
+        $rcube = rcube::get_instance();
+        $this->cache = $rcube->get_cache('LDAP.' . asciiwords($this->prop['name']), 'db', 600);
 
         $this->_connect();
     }
@@ -175,7 +175,7 @@
     */
     private function _connect()
     {
-        $RCMAIL = rcmail::get_instance();
+        $rcube = rcube::get_instance();
 
         if (!function_exists('ldap_connect'))
             rcube::raise_error(array('code' => 100, 'type' => 'ldap',
@@ -194,7 +194,7 @@
 
         foreach ($this->prop['hosts'] as $host)
         {
-            $host     = idn_to_ascii(rcube_utils::parse_host($host));
+            $host     = rcube_utils::idn_to_ascii(rcube_utils::parse_host($host));
             $hostname = $host.($this->prop['port'] ? ':'.$this->prop['port'] : '');
 
             $this->_debug("C: Connect [$hostname] [{$this->prop['name']}]");
@@ -243,11 +243,11 @@
         if ($this->prop['user_specific']) {
             // No password set, use the session password
             if (empty($bind_pass)) {
-                $bind_pass = $RCMAIL->decrypt($_SESSION['password']);
+                $bind_pass = $rcube->decrypt($_SESSION['password']);
             }
 
             // Get the pieces needed for variable replacement.
-            if ($fu = $RCMAIL->get_user_name())
+            if ($fu = $rcube->get_user_name())
                 list($u, $d) = explode('@', $fu);
             else
                 $d = $this->mail_domain;
@@ -1562,7 +1562,7 @@
     private function _debug($str)
     {
         if ($this->debug) {
-            rcmail::write_log('ldap', $str);
+            rcube::write_log('ldap', $str);
         }
     }
 

--
Gitblit v1.9.1