com web/php: Fixed BC issue with PHP 5.2 and __DIR__. : Gateway/NewsFileSystemGateway.php index-beta.php
| From: | Levi Morrison | Date: | Wed, 11 Jul 2012 18:07:29 +0000 |
| Subject: | com web/php: Fixed BC issue with PHP 5.2 and __DIR__. : Gateway/NewsFileSystemGateway.php index-beta.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-13913@lists.php.net to get a copy of this message | ||
Commit: 40755d0dbf67c35a1f03e41c4a36da45e3e9cc9c
Author: Levi Morrison <levim@php.net> Wed, 11 Jul 2012 12:07:29 -0600
Parents: dfbc65131f9641c0fb1b667bcf6ba7cd028cdb75
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=40755d0dbf67c35a1f03e41c4a36da45e3e9cc9c
Log:
Fixed BC issue with PHP 5.2 and __DIR__.
Changed paths:
M Gateway/NewsFileSystemGateway.php
M index-beta.php
Diff:
diff --git a/Gateway/NewsFileSystemGateway.php b/Gateway/NewsFileSystemGateway.php
index c381d15..849ac7f 100644
--- a/Gateway/NewsFileSystemGateway.php
+++ b/Gateway/NewsFileSystemGateway.php
@@ -1,7 +1,7 @@
<?php
-require_once 'Entity/NewsItem.php';
-require_once 'NewsGateway.php';
+require_once dirname(__FILE__) . '/../Entity/NewsItem.php';
+require_once dirname(__FILE__) . '/NewsGateway.php';
class NewsFileSystemGateway implements NewsGateway {
diff --git a/index-beta.php b/index-beta.php
index 64ad438..fbf377d 100644
--- a/index-beta.php
+++ b/index-beta.php
@@ -43,11 +43,11 @@ else {
}
$_SERVER['BASE_PAGE'] = 'index.php';
-include_once '/include/prepend.inc';
-include_once '/include/pregen-events.inc';
-include_once '/include/pregen-confs.inc';
-include_once '/include/pregen-news.inc';
-include_once '/include/version.inc';
+include_once 'include/prepend.inc';
+include_once 'include/pregen-events.inc';
+include_once 'include/pregen-confs.inc';
+include_once 'include/pregen-news.inc';
+include_once 'include/version.inc';
// Prepare announcements.
if (is_array($CONF_TEASER) && $CONF_TEASER) {