summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-10-13 14:41:55 +0200
committerAleksander Machniak <alec@alec.pl>2014-10-13 14:41:55 +0200
commit0ea079d604ef1f34cc47646ab23176a3c66f16ee (patch)
treef32d974513f62e11e50c5ef7c5e8b2b24164ddf2
parent94791f6fd5a0e742cda92c73bfb16fda00761850 (diff)
dirname(__FILE__) -> __DIR__
-rwxr-xr-xbin/cleandb.sh2
-rwxr-xr-xbin/decrypt.sh2
-rwxr-xr-xbin/deluser.sh2
-rwxr-xr-xbin/dumpschema.sh2
-rwxr-xr-xbin/exportgettext.sh2
-rwxr-xr-xbin/gc.sh2
-rwxr-xr-xbin/importgettext.sh2
-rwxr-xr-xbin/indexcontacts.sh2
-rwxr-xr-xbin/installto.sh2
-rwxr-xr-xbin/moduserprefs.sh2
-rwxr-xr-xbin/msgexport.sh2
-rwxr-xr-xbin/msgimport.sh2
-rwxr-xr-xbin/update.sh2
-rwxr-xr-xbin/updatecss.sh2
-rwxr-xr-xbin/updatedb.sh2
-rw-r--r--installer/index.php2
-rw-r--r--plugins/acl/tests/Acl.php2
-rw-r--r--plugins/additional_message_headers/tests/AdditionalMessageHeaders.php2
-rw-r--r--plugins/archive/tests/Archive.php2
-rw-r--r--plugins/autologon/tests/Autologon.php2
-rw-r--r--plugins/database_attachments/tests/DatabaseAttachments.php2
-rw-r--r--plugins/debug_logger/debug_logger.php8
-rw-r--r--plugins/debug_logger/tests/DebugLogger.php2
-rw-r--r--plugins/emoticons/tests/Emoticons.php2
-rw-r--r--plugins/enigma/tests/Enigma.php2
-rw-r--r--plugins/example_addressbook/example_addressbook.php2
-rw-r--r--plugins/example_addressbook/tests/ExampleAddressbook.php2
-rw-r--r--plugins/filesystem_attachments/tests/FilesystemAttachments.php2
-rw-r--r--plugins/help/tests/Help.php2
-rw-r--r--plugins/hide_blockquote/tests/HideBlockquote.php2
-rw-r--r--plugins/http_authentication/tests/HttpAuthentication.php2
-rw-r--r--plugins/identity_select/tests/IdentitySelect.php2
-rw-r--r--plugins/jqueryui/tests/Jqueryui.php2
-rw-r--r--plugins/legacy_browser/tests/LegacyBrowser.php2
-rw-r--r--plugins/managesieve/tests/Managesieve.php2
-rw-r--r--plugins/managesieve/tests/Parser.php4
-rw-r--r--plugins/managesieve/tests/Tokenizer.php2
-rw-r--r--plugins/managesieve/tests/Vacation.php4
-rw-r--r--plugins/markasjunk/tests/Markasjunk.php2
-rw-r--r--plugins/new_user_dialog/tests/NewUserDialog.php2
-rw-r--r--plugins/new_user_identity/tests/NewUserIdentity.php2
-rw-r--r--plugins/newmail_notifier/tests/NewmailNotifier.php2
-rw-r--r--plugins/password/tests/Password.php2
-rw-r--r--plugins/redundant_attachments/tests/RedundantAttachments.php2
-rw-r--r--plugins/show_additional_headers/tests/ShowAdditionalHeaders.php2
-rw-r--r--plugins/squirrelmail_usercopy/tests/SquirrelmailUsercopy.php2
-rw-r--r--plugins/subscriptions_option/tests/SubscriptionsOption.php2
-rw-r--r--plugins/userinfo/tests/Userinfo.php2
-rw-r--r--plugins/vcard_attachments/tests/VcardAttachments.php2
-rw-r--r--plugins/virtuser_file/tests/VirtuserFile.php2
-rw-r--r--plugins/virtuser_query/tests/VirtuserQuery.php2
-rw-r--r--plugins/zipdownload/tests/Zipdownload.php2
-rw-r--r--program/lib/Roundcube/bootstrap.php2
-rw-r--r--tests/Framework/VCard.php2
-rw-r--r--tests/Selenium/bootstrap.php4
-rw-r--r--tests/bootstrap.php4
56 files changed, 63 insertions, 63 deletions
diff --git a/bin/cleandb.sh b/bin/cleandb.sh
index 9edfeec91..d811c8d01 100755
--- a/bin/cleandb.sh
+++ b/bin/cleandb.sh
@@ -19,7 +19,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require INSTALL_PATH.'program/include/clisetup.php';
diff --git a/bin/decrypt.sh b/bin/decrypt.sh
index 7f83f3a7f..dd4525972 100755
--- a/bin/decrypt.sh
+++ b/bin/decrypt.sh
@@ -52,7 +52,7 @@
* - you are dealing with counterfeit header data.
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__).'/..') . '/');
+define('INSTALL_PATH', realpath(__DIR__ .'/..') . '/');
require INSTALL_PATH . 'program/include/clisetup.php';
diff --git a/bin/deluser.sh b/bin/deluser.sh
index 0489f4da4..1e93793cf 100755
--- a/bin/deluser.sh
+++ b/bin/deluser.sh
@@ -20,7 +20,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require_once INSTALL_PATH . 'program/include/clisetup.php';
diff --git a/bin/dumpschema.sh b/bin/dumpschema.sh
index 6d5cde723..32c90ac13 100755
--- a/bin/dumpschema.sh
+++ b/bin/dumpschema.sh
@@ -19,7 +19,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require INSTALL_PATH.'program/include/clisetup.php';
diff --git a/bin/exportgettext.sh b/bin/exportgettext.sh
index b220b2242..314cae7d2 100755
--- a/bin/exportgettext.sh
+++ b/bin/exportgettext.sh
@@ -15,7 +15,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require INSTALL_PATH.'program/include/clisetup.php';
if ($argc < 2) {
diff --git a/bin/gc.sh b/bin/gc.sh
index 1ee610741..e0d722a18 100755
--- a/bin/gc.sh
+++ b/bin/gc.sh
@@ -19,7 +19,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require INSTALL_PATH.'program/include/clisetup.php';
diff --git a/bin/importgettext.sh b/bin/importgettext.sh
index 285f5680f..5a91e6bc1 100755
--- a/bin/importgettext.sh
+++ b/bin/importgettext.sh
@@ -15,7 +15,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require INSTALL_PATH.'program/include/clisetup.php';
if ($argc < 2) {
diff --git a/bin/indexcontacts.sh b/bin/indexcontacts.sh
index 9509dc06a..2844742f7 100755
--- a/bin/indexcontacts.sh
+++ b/bin/indexcontacts.sh
@@ -19,7 +19,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require_once INSTALL_PATH.'program/include/clisetup.php';
ini_set('memory_limit', -1);
diff --git a/bin/installto.sh b/bin/installto.sh
index fbd951bdf..d239c633d 100755
--- a/bin/installto.sh
+++ b/bin/installto.sh
@@ -19,7 +19,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require_once INSTALL_PATH . 'program/include/clisetup.php';
diff --git a/bin/moduserprefs.sh b/bin/moduserprefs.sh
index e892b1f4d..3d46baaa4 100755
--- a/bin/moduserprefs.sh
+++ b/bin/moduserprefs.sh
@@ -18,7 +18,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require_once INSTALL_PATH.'program/include/clisetup.php';
diff --git a/bin/msgexport.sh b/bin/msgexport.sh
index f68688b67..f76aefe86 100755
--- a/bin/msgexport.sh
+++ b/bin/msgexport.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
ini_set('memory_limit', -1);
require_once INSTALL_PATH.'program/include/clisetup.php';
diff --git a/bin/msgimport.sh b/bin/msgimport.sh
index 1fcc34680..0c72622c4 100755
--- a/bin/msgimport.sh
+++ b/bin/msgimport.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
ini_set('memory_limit', -1);
require_once INSTALL_PATH.'program/include/clisetup.php';
diff --git a/bin/update.sh b/bin/update.sh
index f0c6d2f6c..cbacb940a 100755
--- a/bin/update.sh
+++ b/bin/update.sh
@@ -19,7 +19,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require_once INSTALL_PATH . 'program/include/clisetup.php';
diff --git a/bin/updatecss.sh b/bin/updatecss.sh
index 53d237c77..6ecfeac98 100755
--- a/bin/updatecss.sh
+++ b/bin/updatecss.sh
@@ -18,7 +18,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require_once INSTALL_PATH . 'program/include/clisetup.php';
diff --git a/bin/updatedb.sh b/bin/updatedb.sh
index e9818074d..ffeac0ba8 100755
--- a/bin/updatedb.sh
+++ b/bin/updatedb.sh
@@ -19,7 +19,7 @@
+-----------------------------------------------------------------------+
*/
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require_once INSTALL_PATH . 'program/include/clisetup.php';
diff --git a/installer/index.php b/installer/index.php
index b93ad2f94..61ff40076 100644
--- a/installer/index.php
+++ b/installer/index.php
@@ -39,7 +39,7 @@
ini_set('error_reporting', E_ALL &~ (E_NOTICE | E_STRICT));
ini_set('display_errors', 1);
-define('INSTALL_PATH', realpath(dirname(__FILE__) . '/../').'/');
+define('INSTALL_PATH', realpath(__DIR__ . '/../').'/');
define('RCUBE_INSTALL_PATH', INSTALL_PATH);
define('RCUBE_CONFIG_DIR', INSTALL_PATH . 'config/');
diff --git a/plugins/acl/tests/Acl.php b/plugins/acl/tests/Acl.php
index e752ac977..56ae3b5bb 100644
--- a/plugins/acl/tests/Acl.php
+++ b/plugins/acl/tests/Acl.php
@@ -5,7 +5,7 @@ class Acl_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../acl.php';
+ include_once __DIR__ . '/../acl.php';
}
/**
diff --git a/plugins/additional_message_headers/tests/AdditionalMessageHeaders.php b/plugins/additional_message_headers/tests/AdditionalMessageHeaders.php
index 1c54ffc42..55e8c441e 100644
--- a/plugins/additional_message_headers/tests/AdditionalMessageHeaders.php
+++ b/plugins/additional_message_headers/tests/AdditionalMessageHeaders.php
@@ -5,7 +5,7 @@ class AdditionalMessageHeaders_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../additional_message_headers.php';
+ include_once __DIR__ . '/../additional_message_headers.php';
}
/**
diff --git a/plugins/archive/tests/Archive.php b/plugins/archive/tests/Archive.php
index 0a1eeae11..17fcdf7a1 100644
--- a/plugins/archive/tests/Archive.php
+++ b/plugins/archive/tests/Archive.php
@@ -5,7 +5,7 @@ class Archive_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../archive.php';
+ include_once __DIR__ . '/../archive.php';
}
/**
diff --git a/plugins/autologon/tests/Autologon.php b/plugins/autologon/tests/Autologon.php
index 0de193e4a..f3f6b4206 100644
--- a/plugins/autologon/tests/Autologon.php
+++ b/plugins/autologon/tests/Autologon.php
@@ -5,7 +5,7 @@ class Autologon_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../autologon.php';
+ include_once __DIR__ . '/../autologon.php';
}
/**
diff --git a/plugins/database_attachments/tests/DatabaseAttachments.php b/plugins/database_attachments/tests/DatabaseAttachments.php
index f260737ab..15ea5f44e 100644
--- a/plugins/database_attachments/tests/DatabaseAttachments.php
+++ b/plugins/database_attachments/tests/DatabaseAttachments.php
@@ -5,7 +5,7 @@ class DatabaseAttachments_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../database_attachments.php';
+ include_once __DIR__ . '/../database_attachments.php';
}
/**
diff --git a/plugins/debug_logger/debug_logger.php b/plugins/debug_logger/debug_logger.php
index 88237d767..07190e5a1 100644
--- a/plugins/debug_logger/debug_logger.php
+++ b/plugins/debug_logger/debug_logger.php
@@ -66,8 +66,8 @@ class debug_logger extends rcube_plugin
{
function init()
{
- require_once(dirname(__FILE__).'/runlog/runlog.php');
- $this->runlog = new runlog();
+ require_once(__DIR__ . '/runlog/runlog.php');
+ $this->runlog = new runlog();
if(!rcmail::get_instance()->config->get('log_dir')){
rcmail::get_instance()->config->set('log_dir',INSTALL_PATH.'logs');
@@ -83,10 +83,10 @@ class debug_logger extends rcube_plugin
$action = rcmail::get_instance()->action;
$task = rcmail::get_instance()->task;
if($action){
- $start_string .= "Action: ".$action.". ";
+ $start_string .= "Action: ".$action.". ";
}
if($task){
- $start_string .= "Task: ".$task.". ";
+ $start_string .= "Task: ".$task.". ";
}
$this->runlog->start($start_string);
diff --git a/plugins/debug_logger/tests/DebugLogger.php b/plugins/debug_logger/tests/DebugLogger.php
index de20a069d..8dd0c03fe 100644
--- a/plugins/debug_logger/tests/DebugLogger.php
+++ b/plugins/debug_logger/tests/DebugLogger.php
@@ -5,7 +5,7 @@ class DebugLogger_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../debug_logger.php';
+ include_once __DIR__ . '/../debug_logger.php';
}
/**
diff --git a/plugins/emoticons/tests/Emoticons.php b/plugins/emoticons/tests/Emoticons.php
index 4b6c303c2..e04502285 100644
--- a/plugins/emoticons/tests/Emoticons.php
+++ b/plugins/emoticons/tests/Emoticons.php
@@ -5,7 +5,7 @@ class Emoticons_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../emoticons.php';
+ include_once __DIR__ . '/../emoticons.php';
}
/**
diff --git a/plugins/enigma/tests/Enigma.php b/plugins/enigma/tests/Enigma.php
index 0d0d8f8ae..3972694fc 100644
--- a/plugins/enigma/tests/Enigma.php
+++ b/plugins/enigma/tests/Enigma.php
@@ -5,7 +5,7 @@ class Enigma_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../enigma.php';
+ include_once __DIR__ . '/../enigma.php';
}
/**
diff --git a/plugins/example_addressbook/example_addressbook.php b/plugins/example_addressbook/example_addressbook.php
index 31077adf7..22e230c6f 100644
--- a/plugins/example_addressbook/example_addressbook.php
+++ b/plugins/example_addressbook/example_addressbook.php
@@ -1,6 +1,6 @@
<?php
-require_once(dirname(__FILE__) . '/example_addressbook_backend.php');
+require_once(__DIR__ . '/example_addressbook_backend.php');
/**
* Sample plugin to add a new address book
diff --git a/plugins/example_addressbook/tests/ExampleAddressbook.php b/plugins/example_addressbook/tests/ExampleAddressbook.php
index 4a54bd950..762ee7307 100644
--- a/plugins/example_addressbook/tests/ExampleAddressbook.php
+++ b/plugins/example_addressbook/tests/ExampleAddressbook.php
@@ -5,7 +5,7 @@ class ExampleAddressbook_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../example_addressbook.php';
+ include_once __DIR__ . '/../example_addressbook.php';
}
/**
diff --git a/plugins/filesystem_attachments/tests/FilesystemAttachments.php b/plugins/filesystem_attachments/tests/FilesystemAttachments.php
index dcab315d3..3b60e12c9 100644
--- a/plugins/filesystem_attachments/tests/FilesystemAttachments.php
+++ b/plugins/filesystem_attachments/tests/FilesystemAttachments.php
@@ -5,7 +5,7 @@ class FilesystemAttachments_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../filesystem_attachments.php';
+ include_once __DIR__ . '/../filesystem_attachments.php';
}
/**
diff --git a/plugins/help/tests/Help.php b/plugins/help/tests/Help.php
index baba492ae..ff5771bf9 100644
--- a/plugins/help/tests/Help.php
+++ b/plugins/help/tests/Help.php
@@ -5,7 +5,7 @@ class Help_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../help.php';
+ include_once __DIR__ . '/../help.php';
}
/**
diff --git a/plugins/hide_blockquote/tests/HideBlockquote.php b/plugins/hide_blockquote/tests/HideBlockquote.php
index 030c05324..90e209459 100644
--- a/plugins/hide_blockquote/tests/HideBlockquote.php
+++ b/plugins/hide_blockquote/tests/HideBlockquote.php
@@ -5,7 +5,7 @@ class HideBlockquote_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../hide_blockquote.php';
+ include_once __DIR__ . '/../hide_blockquote.php';
}
/**
diff --git a/plugins/http_authentication/tests/HttpAuthentication.php b/plugins/http_authentication/tests/HttpAuthentication.php
index c17236821..5de968d87 100644
--- a/plugins/http_authentication/tests/HttpAuthentication.php
+++ b/plugins/http_authentication/tests/HttpAuthentication.php
@@ -5,7 +5,7 @@ class HttpAuthentication_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../http_authentication.php';
+ include_once __DIR__ . '/../http_authentication.php';
}
/**
diff --git a/plugins/identity_select/tests/IdentitySelect.php b/plugins/identity_select/tests/IdentitySelect.php
index 3d7269711..461e79d85 100644
--- a/plugins/identity_select/tests/IdentitySelect.php
+++ b/plugins/identity_select/tests/IdentitySelect.php
@@ -5,7 +5,7 @@ class IdentitySelect_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../identity_select.php';
+ include_once __DIR__ . '/../identity_select.php';
}
/**
diff --git a/plugins/jqueryui/tests/Jqueryui.php b/plugins/jqueryui/tests/Jqueryui.php
index 3bcd27c9f..ee25818ec 100644
--- a/plugins/jqueryui/tests/Jqueryui.php
+++ b/plugins/jqueryui/tests/Jqueryui.php
@@ -5,7 +5,7 @@ class Jqueryui_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../jqueryui.php';
+ include_once __DIR__ . '/../jqueryui.php';
}
/**
diff --git a/plugins/legacy_browser/tests/LegacyBrowser.php b/plugins/legacy_browser/tests/LegacyBrowser.php
index 8e9762fb2..7a35ee5b6 100644
--- a/plugins/legacy_browser/tests/LegacyBrowser.php
+++ b/plugins/legacy_browser/tests/LegacyBrowser.php
@@ -5,7 +5,7 @@ class Legacy_Browser_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../legacy_browser.php';
+ include_once __DIR__ . '/../legacy_browser.php';
}
/**
diff --git a/plugins/managesieve/tests/Managesieve.php b/plugins/managesieve/tests/Managesieve.php
index d802f5614..6e930b81d 100644
--- a/plugins/managesieve/tests/Managesieve.php
+++ b/plugins/managesieve/tests/Managesieve.php
@@ -5,7 +5,7 @@ class Managesieve_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../managesieve.php';
+ include_once __DIR__ . '/../managesieve.php';
}
/**
diff --git a/plugins/managesieve/tests/Parser.php b/plugins/managesieve/tests/Parser.php
index 9050f09c6..33edce0f0 100644
--- a/plugins/managesieve/tests/Parser.php
+++ b/plugins/managesieve/tests/Parser.php
@@ -5,7 +5,7 @@ class Parser extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../lib/Roundcube/rcube_sieve_script.php';
+ include_once __DIR__ . '/../lib/Roundcube/rcube_sieve_script.php';
}
/**
@@ -34,7 +34,7 @@ class Parser extends PHPUnit_Framework_TestCase
*/
function data_parser()
{
- $dir_path = realpath(dirname(__FILE__) . '/src');
+ $dir_path = realpath(__DIR__ . '/src');
$dir = opendir($dir_path);
$result = array();
diff --git a/plugins/managesieve/tests/Tokenizer.php b/plugins/managesieve/tests/Tokenizer.php
index e71bae015..f50ed75b7 100644
--- a/plugins/managesieve/tests/Tokenizer.php
+++ b/plugins/managesieve/tests/Tokenizer.php
@@ -5,7 +5,7 @@ class Tokenizer extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../lib/Roundcube/rcube_sieve_script.php';
+ include_once __DIR__ . '/../lib/Roundcube/rcube_sieve_script.php';
}
function data_tokenizer()
diff --git a/plugins/managesieve/tests/Vacation.php b/plugins/managesieve/tests/Vacation.php
index e34eb7aa2..942525c2f 100644
--- a/plugins/managesieve/tests/Vacation.php
+++ b/plugins/managesieve/tests/Vacation.php
@@ -5,8 +5,8 @@ class Managesieve_Vacation extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../lib/Roundcube/rcube_sieve_engine.php';
- include_once dirname(__FILE__) . '/../lib/Roundcube/rcube_sieve_vacation.php';
+ include_once __DIR__ . '/../lib/Roundcube/rcube_sieve_engine.php';
+ include_once __DIR__ . '/../lib/Roundcube/rcube_sieve_vacation.php';
}
/**
diff --git a/plugins/markasjunk/tests/Markasjunk.php b/plugins/markasjunk/tests/Markasjunk.php
index cdf13255e..73494b0ec 100644
--- a/plugins/markasjunk/tests/Markasjunk.php
+++ b/plugins/markasjunk/tests/Markasjunk.php
@@ -5,7 +5,7 @@ class Markasjunk_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../markasjunk.php';
+ include_once __DIR__ . '/../markasjunk.php';
}
/**
diff --git a/plugins/new_user_dialog/tests/NewUserDialog.php b/plugins/new_user_dialog/tests/NewUserDialog.php
index 3a52f20f3..e58489a09 100644
--- a/plugins/new_user_dialog/tests/NewUserDialog.php
+++ b/plugins/new_user_dialog/tests/NewUserDialog.php
@@ -5,7 +5,7 @@ class NewUserDialog_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../new_user_dialog.php';
+ include_once __DIR__ . '/../new_user_dialog.php';
}
/**
diff --git a/plugins/new_user_identity/tests/NewUserIdentity.php b/plugins/new_user_identity/tests/NewUserIdentity.php
index c1d385853..21197362e 100644
--- a/plugins/new_user_identity/tests/NewUserIdentity.php
+++ b/plugins/new_user_identity/tests/NewUserIdentity.php
@@ -5,7 +5,7 @@ class NewUserIdentity_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../new_user_identity.php';
+ include_once __DIR__ . '/../new_user_identity.php';
}
/**
diff --git a/plugins/newmail_notifier/tests/NewmailNotifier.php b/plugins/newmail_notifier/tests/NewmailNotifier.php
index 571912a61..ccddccd39 100644
--- a/plugins/newmail_notifier/tests/NewmailNotifier.php
+++ b/plugins/newmail_notifier/tests/NewmailNotifier.php
@@ -5,7 +5,7 @@ class NewmailNotifier_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../newmail_notifier.php';
+ include_once __DIR__ . '/../newmail_notifier.php';
}
/**
diff --git a/plugins/password/tests/Password.php b/plugins/password/tests/Password.php
index a9663a946..b64c6b889 100644
--- a/plugins/password/tests/Password.php
+++ b/plugins/password/tests/Password.php
@@ -5,7 +5,7 @@ class Password_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../password.php';
+ include_once __DIR__ . '/../password.php';
}
/**
diff --git a/plugins/redundant_attachments/tests/RedundantAttachments.php b/plugins/redundant_attachments/tests/RedundantAttachments.php
index 386f97e59..53f0c0138 100644
--- a/plugins/redundant_attachments/tests/RedundantAttachments.php
+++ b/plugins/redundant_attachments/tests/RedundantAttachments.php
@@ -5,7 +5,7 @@ class RedundantAttachments_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../redundant_attachments.php';
+ include_once __DIR__ . '/../redundant_attachments.php';
}
/**
diff --git a/plugins/show_additional_headers/tests/ShowAdditionalHeaders.php b/plugins/show_additional_headers/tests/ShowAdditionalHeaders.php
index 902ce510b..ab77351a4 100644
--- a/plugins/show_additional_headers/tests/ShowAdditionalHeaders.php
+++ b/plugins/show_additional_headers/tests/ShowAdditionalHeaders.php
@@ -5,7 +5,7 @@ class ShowAdditionalHeaders_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../show_additional_headers.php';
+ include_once __DIR__ . '/../show_additional_headers.php';
}
/**
diff --git a/plugins/squirrelmail_usercopy/tests/SquirrelmailUsercopy.php b/plugins/squirrelmail_usercopy/tests/SquirrelmailUsercopy.php
index 2e35509f0..0e3a5c48a 100644
--- a/plugins/squirrelmail_usercopy/tests/SquirrelmailUsercopy.php
+++ b/plugins/squirrelmail_usercopy/tests/SquirrelmailUsercopy.php
@@ -5,7 +5,7 @@ class SquirrelmailUsercopy_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../squirrelmail_usercopy.php';
+ include_once __DIR__ . '/../squirrelmail_usercopy.php';
}
/**
diff --git a/plugins/subscriptions_option/tests/SubscriptionsOption.php b/plugins/subscriptions_option/tests/SubscriptionsOption.php
index 6932a955f..10168315e 100644
--- a/plugins/subscriptions_option/tests/SubscriptionsOption.php
+++ b/plugins/subscriptions_option/tests/SubscriptionsOption.php
@@ -5,7 +5,7 @@ class SubscriptionsOption_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../subscriptions_option.php';
+ include_once __DIR__ . '/../subscriptions_option.php';
}
/**
diff --git a/plugins/userinfo/tests/Userinfo.php b/plugins/userinfo/tests/Userinfo.php
index 762d5a1fa..7eb0758b5 100644
--- a/plugins/userinfo/tests/Userinfo.php
+++ b/plugins/userinfo/tests/Userinfo.php
@@ -5,7 +5,7 @@ class Userinfo_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../userinfo.php';
+ include_once __DIR__ . '/../userinfo.php';
}
/**
diff --git a/plugins/vcard_attachments/tests/VcardAttachments.php b/plugins/vcard_attachments/tests/VcardAttachments.php
index 35fd7f447..4b37cfc01 100644
--- a/plugins/vcard_attachments/tests/VcardAttachments.php
+++ b/plugins/vcard_attachments/tests/VcardAttachments.php
@@ -5,7 +5,7 @@ class VcardAttachments_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../vcard_attachments.php';
+ include_once __DIR__ . '/../vcard_attachments.php';
}
/**
diff --git a/plugins/virtuser_file/tests/VirtuserFile.php b/plugins/virtuser_file/tests/VirtuserFile.php
index a4362c3dc..80feecd15 100644
--- a/plugins/virtuser_file/tests/VirtuserFile.php
+++ b/plugins/virtuser_file/tests/VirtuserFile.php
@@ -5,7 +5,7 @@ class VirtuserFile_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../virtuser_file.php';
+ include_once __DIR__ . '/../virtuser_file.php';
}
/**
diff --git a/plugins/virtuser_query/tests/VirtuserQuery.php b/plugins/virtuser_query/tests/VirtuserQuery.php
index d5bd4ee4b..6c68f4c64 100644
--- a/plugins/virtuser_query/tests/VirtuserQuery.php
+++ b/plugins/virtuser_query/tests/VirtuserQuery.php
@@ -5,7 +5,7 @@ class VirtuserQuery_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../virtuser_query.php';
+ include_once __DIR__ . '/../virtuser_query.php';
}
/**
diff --git a/plugins/zipdownload/tests/Zipdownload.php b/plugins/zipdownload/tests/Zipdownload.php
index f3b4e1b35..3882dea87 100644
--- a/plugins/zipdownload/tests/Zipdownload.php
+++ b/plugins/zipdownload/tests/Zipdownload.php
@@ -5,7 +5,7 @@ class Zipdownload_Plugin extends PHPUnit_Framework_TestCase
function setUp()
{
- include_once dirname(__FILE__) . '/../zipdownload.php';
+ include_once __DIR__ . '/../zipdownload.php';
}
/**
diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php
index 98bbce5d4..fe9c389fe 100644
--- a/program/lib/Roundcube/bootstrap.php
+++ b/program/lib/Roundcube/bootstrap.php
@@ -58,7 +58,7 @@ define('RCUBE_VERSION', '1.1-git');
define('RCUBE_CHARSET', 'UTF-8');
if (!defined('RCUBE_LIB_DIR')) {
- define('RCUBE_LIB_DIR', dirname(__FILE__) . '/');
+ define('RCUBE_LIB_DIR', __DIR__ . '/');
}
if (!defined('RCUBE_INSTALL_PATH')) {
diff --git a/tests/Framework/VCard.php b/tests/Framework/VCard.php
index c23dba844..6eea2c1a4 100644
--- a/tests/Framework/VCard.php
+++ b/tests/Framework/VCard.php
@@ -10,7 +10,7 @@ class Framework_VCard extends PHPUnit_Framework_TestCase
function _srcpath($fn)
{
- return realpath(dirname(__FILE__) . '/../src/' . $fn);
+ return realpath(__DIR__ . '/../src/' . $fn);
}
function test_parse_one()
diff --git a/tests/Selenium/bootstrap.php b/tests/Selenium/bootstrap.php
index ed9c2eb32..124a81ef2 100644
--- a/tests/Selenium/bootstrap.php
+++ b/tests/Selenium/bootstrap.php
@@ -22,9 +22,9 @@
if (php_sapi_name() != 'cli')
die("Not in shell mode (php-cli)");
-if (!defined('INSTALL_PATH')) define('INSTALL_PATH', realpath(dirname(__FILE__) . '/../../') . '/' );
+if (!defined('INSTALL_PATH')) define('INSTALL_PATH', realpath(__DIR__ . '/../../') . '/' );
-define('TESTS_DIR', dirname(__FILE__) . '/');
+define('TESTS_DIR', __DIR__ . '/');
if (@is_dir(TESTS_DIR . 'config')) {
define('RCUBE_CONFIG_DIR', TESTS_DIR . 'config');
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 192997d0d..bf7199c1e 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -22,9 +22,9 @@
if (php_sapi_name() != 'cli')
die("Not in shell mode (php-cli)");
-if (!defined('INSTALL_PATH')) define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+if (!defined('INSTALL_PATH')) define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
-define('TESTS_DIR', dirname(__FILE__) . '/');
+define('TESTS_DIR', __DIR__ . '/');
if (@is_dir(TESTS_DIR . 'config')) {
define('RCUBE_CONFIG_DIR', TESTS_DIR . 'config');