From 0ea079d604ef1f34cc47646ab23176a3c66f16ee Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 13 Oct 2014 14:41:55 +0200 Subject: dirname(__FILE__) -> __DIR__ --- bin/cleandb.sh | 2 +- bin/decrypt.sh | 2 +- bin/deluser.sh | 2 +- bin/dumpschema.sh | 2 +- bin/exportgettext.sh | 2 +- bin/gc.sh | 2 +- bin/importgettext.sh | 2 +- bin/indexcontacts.sh | 2 +- bin/installto.sh | 2 +- bin/moduserprefs.sh | 2 +- bin/msgexport.sh | 2 +- bin/msgimport.sh | 2 +- bin/update.sh | 2 +- bin/updatecss.sh | 2 +- bin/updatedb.sh | 2 +- installer/index.php | 2 +- plugins/acl/tests/Acl.php | 2 +- .../additional_message_headers/tests/AdditionalMessageHeaders.php | 2 +- plugins/archive/tests/Archive.php | 2 +- plugins/autologon/tests/Autologon.php | 2 +- plugins/database_attachments/tests/DatabaseAttachments.php | 2 +- plugins/debug_logger/debug_logger.php | 8 ++++---- plugins/debug_logger/tests/DebugLogger.php | 2 +- plugins/emoticons/tests/Emoticons.php | 2 +- plugins/enigma/tests/Enigma.php | 2 +- plugins/example_addressbook/example_addressbook.php | 2 +- plugins/example_addressbook/tests/ExampleAddressbook.php | 2 +- plugins/filesystem_attachments/tests/FilesystemAttachments.php | 2 +- plugins/help/tests/Help.php | 2 +- plugins/hide_blockquote/tests/HideBlockquote.php | 2 +- plugins/http_authentication/tests/HttpAuthentication.php | 2 +- plugins/identity_select/tests/IdentitySelect.php | 2 +- plugins/jqueryui/tests/Jqueryui.php | 2 +- plugins/legacy_browser/tests/LegacyBrowser.php | 2 +- plugins/managesieve/tests/Managesieve.php | 2 +- plugins/managesieve/tests/Parser.php | 4 ++-- plugins/managesieve/tests/Tokenizer.php | 2 +- plugins/managesieve/tests/Vacation.php | 4 ++-- plugins/markasjunk/tests/Markasjunk.php | 2 +- plugins/new_user_dialog/tests/NewUserDialog.php | 2 +- plugins/new_user_identity/tests/NewUserIdentity.php | 2 +- plugins/newmail_notifier/tests/NewmailNotifier.php | 2 +- plugins/password/tests/Password.php | 2 +- plugins/redundant_attachments/tests/RedundantAttachments.php | 2 +- plugins/show_additional_headers/tests/ShowAdditionalHeaders.php | 2 +- plugins/squirrelmail_usercopy/tests/SquirrelmailUsercopy.php | 2 +- plugins/subscriptions_option/tests/SubscriptionsOption.php | 2 +- plugins/userinfo/tests/Userinfo.php | 2 +- plugins/vcard_attachments/tests/VcardAttachments.php | 2 +- plugins/virtuser_file/tests/VirtuserFile.php | 2 +- plugins/virtuser_query/tests/VirtuserQuery.php | 2 +- plugins/zipdownload/tests/Zipdownload.php | 2 +- program/lib/Roundcube/bootstrap.php | 2 +- tests/Framework/VCard.php | 2 +- tests/Selenium/bootstrap.php | 4 ++-- tests/bootstrap.php | 4 ++-- 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 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 @@