From 5991988b9a54a17c90bf5a6583064f71eaca9186 Mon Sep 17 00:00:00 2001
From: Thomas B. <thomas@roundcube.net>
Date: Tue, 14 Jan 2014 02:35:46 -0500
Subject: [PATCH] Merge pull request #160 from Takika/patch-1

---
 program/lib/Roundcube/rcube_plugin.php |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/program/lib/Roundcube/rcube_plugin.php b/program/lib/Roundcube/rcube_plugin.php
index aa6d837..a571609 100644
--- a/program/lib/Roundcube/rcube_plugin.php
+++ b/program/lib/Roundcube/rcube_plugin.php
@@ -131,6 +131,16 @@
                 'file' => __FILE__, 'line' => __LINE__,
                 'message' => "Failed to load config from $fpath"), true, false);
             return false;
+        } else {
+            $fname = $this->ID . '.inc.php';
+            // Search plugin_name.inc.php file in any configured path
+            if (!$rcube->config->load_from_file($fname)) {
+                rcube::raise_error(array(
+                    'code' => 527, 'type' => 'php',
+                    'file' => __FILE__, 'line' => __LINE__,
+                    'message' => "Failed to load $fname config file from any configured path"), true, false);
+                return false;
+            }
         }
 
         return true;

--
Gitblit v1.9.1