com web/bugs: Change dirname(__FILE__) to short er __DIR__: include/prepend.php scripts/cron/ no-feedback
| From: | Peter Kokot | Date: | Tue, 23 Oct 2018 15:02:10 +0000 |
| Subject: | com web/bugs: Change dirname(__FILE__) to short er __DIR__: include/prepend.php scripts/cron/ no-feedback | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-27381@lists.php.net to get a copy of this message | ||
Commit: 21e0f760f1375486398655266263b3a2a9dcf6be
Author: Peter Kokot <peterkokot@gmail.com> Tue, 23 Oct 2018 17:02:10 +0200
Parents: ddd17b47b0bdefb5bb0d2b5f24fb4bc7704a9896
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=21e0f760f1375486398655266263b3a2a9dcf6be
Log:
Change dirname(__FILE__) to shorter __DIR__
Changed paths:
M include/prepend.php
M scripts/cron/no-feedback
Diff:
diff --git a/include/prepend.php b/include/prepend.php
index ba285e4..2e67f40 100644
--- a/include/prepend.php
+++ b/include/prepend.php
@@ -4,7 +4,7 @@ ini_set('display_errors', 0);
$site = 'php';
$siteBig = 'PHP';
-$ROOT_DIR = realpath(dirname(__FILE__) . '/../');
+$ROOT_DIR = realpath(__DIR__ . '/../');
$local_cfg = "{$ROOT_DIR}/local_config.php";
if (file_exists($local_cfg)) {
diff --git a/scripts/cron/no-feedback b/scripts/cron/no-feedback
index cc658c9..a6d263b 100755
--- a/scripts/cron/no-feedback
+++ b/scripts/cron/no-feedback
@@ -3,7 +3,7 @@
# this script closes bugs due to lack of feedback.
-require dirname(__FILE__).'/../../include/prepend.php';
+require __DIR__.'/../../include/prepend.php';
# date interval to close after
$after = "7 DAY";