summaryrefslogtreecommitdiff
path: root/program/include/rcube_plugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_plugin.php')
-rw-r--r--program/include/rcube_plugin.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/program/include/rcube_plugin.php b/program/include/rcube_plugin.php
index aeb05afa1..e20f7ce6a 100644
--- a/program/include/rcube_plugin.php
+++ b/program/include/rcube_plugin.php
@@ -110,9 +110,10 @@ abstract class rcube_plugin
public function load_config($fname = 'config.inc.php')
{
$fpath = $this->home.'/'.$fname;
- $rcmail = rcmail::get_instance();
+ $rcmail = rcube::get_instance();
if (is_file($fpath) && !$rcmail->config->load_from_file($fpath)) {
- raise_error(array('code' => 527, 'type' => 'php',
+ rcube::raise_error(array(
+ 'code' => 527, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Failed to load config from $fpath"), true, false);
return false;
@@ -176,7 +177,7 @@ abstract class rcube_plugin
foreach ($texts as $key => $value)
$add[$domain.'.'.$key] = $value;
- $rcmail = rcmail::get_instance();
+ $rcmail = rcube::get_instance();
$rcmail->load_language($lang, $add);
// add labels to client
@@ -196,7 +197,7 @@ abstract class rcube_plugin
*/
public function gettext($p)
{
- return rcmail::get_instance()->gettext($p, $this->ID);
+ return rcube::get_instance()->gettext($p, $this->ID);
}
/**
@@ -309,9 +310,10 @@ abstract class rcube_plugin
*/
public function local_skin_path()
{
- $skin_path = 'skins/'.$this->api->config->get('skin');
- if (!is_dir(realpath(slashify($this->home) . $skin_path)))
- $skin_path = 'skins/default';
+ $rcmail = rcube::get_instance();
+ $skin_path = 'skins/' . $rcmail->config->get('skin');
+ if (!is_dir(realpath(slashify($this->home) . $skin_path)))
+ $skin_path = 'skins/default';
return $skin_path;
}