summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-10-14 16:20:15 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-10-14 16:20:15 (GMT)
commit3c8ac6f38c9a18fa8f532d7dabf53a1af965eb04 (patch)
tree3d32e62e95f56c209c60f7c3a79e3bcd23574864
parentfbe1759c00984d4c5a99928b6a26216150ed4a2a (diff)
downloadroundcubemail-plugins-kolab-oracle.tar.gz
dirname(__FILE__) -> __DIR__oracle
-rw-r--r--plugins/calendar/drivers/kolab/kolab_driver.php10
-rw-r--r--plugins/kolab_addressbook/kolab_addressbook.php2
-rw-r--r--plugins/piwik_analytics/piwik_analytics.php21
3 files changed, 16 insertions, 17 deletions
diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php
index 938bcee..2f41b21 100644
--- a/plugins/calendar/drivers/kolab/kolab_driver.php
+++ b/plugins/calendar/drivers/kolab/kolab_driver.php
@@ -52,17 +52,17 @@ class kolab_driver extends calendar_driver
$cal->require_plugin('libkolab');
// load helper classes *after* libkolab has been loaded (#3248)
- require_once(dirname(__FILE__) . '/kolab_calendar.php');
- require_once(dirname(__FILE__) . '/kolab_user_calendar.php');
- require_once(dirname(__FILE__) . '/kolab_invitation_calendar.php');
+ require_once __DIR__ . '/kolab_calendar.php';
+ require_once __DIR__ . '/kolab_user_calendar.php';
+ require_once __DIR__ . '/kolab_invitation_calendar.php';
$this->cal = $cal;
$this->rc = $cal->rc;
$this->_read_calendars();
-
+
$this->cal->register_action('push-freebusy', array($this, 'push_freebusy'));
$this->cal->register_action('calendar-acl', array($this, 'calendar_acl'));
-
+
$this->freebusy_trigger = $this->rc->config->get('calendar_freebusy_trigger', false);
if (kolab_storage::$version == '2.0') {
diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php
index 421125b..5e608e1 100644
--- a/plugins/kolab_addressbook/kolab_addressbook.php
+++ b/plugins/kolab_addressbook/kolab_addressbook.php
@@ -46,7 +46,7 @@ class kolab_addressbook extends rcube_plugin
*/
public function init()
{
- require_once(dirname(__FILE__) . '/lib/rcube_kolab_contacts.php');
+ require_once __DIR__ . '/lib/rcube_kolab_contacts.php';
$this->rc = rcube::get_instance();
diff --git a/plugins/piwik_analytics/piwik_analytics.php b/plugins/piwik_analytics/piwik_analytics.php
index 4f69b7e..2bec2ed 100644
--- a/plugins/piwik_analytics/piwik_analytics.php
+++ b/plugins/piwik_analytics/piwik_analytics.php
@@ -20,13 +20,13 @@ class piwik_analytics extends rcube_plugin
{
function init()
{
- if (file_exists(dirname(__FILE__) . "/config.inc.php")) {
+ if (file_exists(__DIR__ . "/config.inc.php")) {
$this->load_config('config.inc.php');
- } elseif (file_exists(dirname(__FILE__) . "/config.inc.php.dist")) {
+ } elseif (file_exists(__DIR__ . "/config.inc.php.dist")) {
$this->load_config('config.inc.php.dist');
- } elseif (file_exists(dirname(__FILE__) . "/config/config.inc.php")) {
+ } elseif (file_exists(__DIR__ . "/config/config.inc.php")) {
$this->load_config('config/config.inc.php');
- } elseif (file_exists(dirname(__FILE__) . "/config/config.inc.php.dist")) {
+ } elseif (file_exists(__DIR__ . "/config/config.inc.php.dist")) {
$this->load_config('config/config.inc.php.dist');
/* } else {
error_log("Cannot find / load configuration for plugin piwik_analytics"); */
@@ -35,7 +35,8 @@ class piwik_analytics extends rcube_plugin
$this->add_hook('render_page', array($this, 'add_script'));
}
- function add_script($args) {
+ function add_script($args)
+ {
$rcmail = rcube::get_instance();
$exclude = $rcmail->config->get('piwik_analytics_exclude');
@@ -43,7 +44,7 @@ class piwik_analytics extends rcube_plugin
if (empty($exclude) || !is_array($exclude)) {
$exclude = Array();
}
-
+
if (isset($exclude[$args['template']])) {
return $args;
}
@@ -53,7 +54,7 @@ class piwik_analytics extends rcube_plugin
return $args;
}
}
-
+
if (!$rcmail->config->get('piwik_analytics_url', false)) {
return $args;
}
@@ -72,12 +73,10 @@ class piwik_analytics extends rcube_plugin
} catch( err ) {}
</script><noscript><p><img src="http://' . $rcmail->config->get('piwik_analytics_url') . '/piwik.php?idsite=' . $rcmail->config->get('piwik_analytics_id') . '" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tag -->';
-
+
// add script to end of page
$rcmail->output->add_footer($script);
-
+
return $args;
}
}
-
-?>