From a8ffab3f4ff54af41c9041a30eb989954d6ffc17 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 19 Dec 2012 08:15:11 -0500
Subject: [PATCH] Fix Call to undefined method rcube_db_sqlite::_get_result()

---
 program/lib/Roundcube/rcube_plugin_api.php |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/program/lib/Roundcube/rcube_plugin_api.php b/program/lib/Roundcube/rcube_plugin_api.php
index 51daf27..b462644 100644
--- a/program/lib/Roundcube/rcube_plugin_api.php
+++ b/program/lib/Roundcube/rcube_plugin_api.php
@@ -2,8 +2,6 @@
 
 /*
  +-----------------------------------------------------------------------+
- | program/include/rcube_plugin_api.php                                  |
- |                                                                       |
  | This file is part of the Roundcube Webmail client                     |
  | Copyright (C) 2008-2011, The Roundcube Dev Team                       |
  |                                                                       |
@@ -13,15 +11,14 @@
  |                                                                       |
  | PURPOSE:                                                              |
  |   Plugins repository                                                  |
- |                                                                       |
  +-----------------------------------------------------------------------+
  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
  +-----------------------------------------------------------------------+
 */
 
 // location where plugins are loade from
-if (!defined('RCMAIL_PLUGINS_DIR'))
-  define('RCMAIL_PLUGINS_DIR', INSTALL_PATH . 'plugins/');
+if (!defined('RCUBE_PLUGINS_DIR'))
+  define('RCUBE_PLUGINS_DIR', RCUBE_INSTALL_PATH . 'plugins/');
 
 
 /**
@@ -78,7 +75,8 @@
     'identity_save'     => 'identity_update',
     // to be removed after 0.8
     'imap_init'         => 'storage_init',
-    'mailboxes_list'    => 'storage_folders', 
+    'mailboxes_list'    => 'storage_folders',
+    'imap_connect'      => 'storage_connect',
   );
 
   /**
@@ -101,7 +99,7 @@
    */
   protected function __construct()
   {
-    $this->dir = slashify(RCMAIL_PLUGINS_DIR);
+    $this->dir = slashify(RCUBE_PLUGINS_DIR);
   }
 
 
@@ -370,6 +368,10 @@
    */
   public function register_task($task, $owner)
   {
+    // tasks are irrelevant in framework mode
+    if (!class_exists('rcmail', false))
+      return true;
+
     if ($task != asciiwords($task)) {
       rcube::raise_error(array('code' => 526, 'type' => 'php',
         'file' => __FILE__, 'line' => __LINE__,

--
Gitblit v1.9.1