summaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-12-11 21:11:34 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-12-11 21:11:34 +0100
commit52d09886558361bd818182da9ddc204e83f618ba (patch)
treeb7e6c54c6ae71629b6101ab386b3b43bd32cbb10 /p
parenteca01e366481c73d24d3db8d488a53d38d6ecf5d (diff)
Use __DIR__ for relative include and require
For uniformity, and to avoid having PHP searching in include_path. http://php.net/manual/function.include.php https://github.com/FreshRSS/FreshRSS/pull/1715 https://github.com/FreshRSS/FreshRSS/pull/1711#issuecomment-350581350
Diffstat (limited to 'p')
-rw-r--r--p/api/greader.php2
-rw-r--r--p/api/index.php2
-rw-r--r--p/api/pshb.php2
-rw-r--r--p/ext.php2
-rw-r--r--p/f.php2
-rwxr-xr-xp/i/index.php2
6 files changed, 6 insertions, 6 deletions
diff --git a/p/api/greader.php b/p/api/greader.php
index b27f5bd43..99304f4ec 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -20,7 +20,7 @@ Server-side API compatible with Google Reader API layer 2
* https://github.com/theoldreader/api
*/
-require('../../constants.php');
+require(__DIR__ . '/../../constants.php');
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
$ORIGINAL_INPUT = file_get_contents('php://input', false, null, 0, 1048576);
diff --git a/p/api/index.php b/p/api/index.php
index 08f7b6b7b..429b25225 100644
--- a/p/api/index.php
+++ b/p/api/index.php
@@ -14,7 +14,7 @@
<dl>
<dt>Your API address:</dt>
<dd><?php
-require('../../constants.php');
+require(__DIR__ . '/../../constants.php');
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
Minz_Configuration::register('system', DATA_PATH . '/config.php', FRESHRSS_PATH . '/config.default.php');
echo Minz_Url::display('/api/greader.php', 'html', true);
diff --git a/p/api/pshb.php b/p/api/pshb.php
index 578681cc4..57a7bb0dd 100644
--- a/p/api/pshb.php
+++ b/p/api/pshb.php
@@ -1,5 +1,5 @@
<?php
-require('../../constants.php');
+require(__DIR__ . '/../../constants.php');
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
const MAX_PAYLOAD = 3145728;
diff --git a/p/ext.php b/p/ext.php
index 5c9f9125f..bb16d02d3 100644
--- a/p/ext.php
+++ b/p/ext.php
@@ -5,7 +5,7 @@ if (!isset($_GET['f']) ||
die();
}
-require('../constants.php');
+require(__DIR__ . '/../constants.php');
/**
* Check if a file can be served by ext.php. A valid file is under a
diff --git a/p/f.php b/p/f.php
index c47fa747a..81df8984b 100644
--- a/p/f.php
+++ b/p/f.php
@@ -1,5 +1,5 @@
<?php
-require('../constants.php');
+require(__DIR__ . '/../constants.php');
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
require(LIB_PATH . '/favicons.php');
require(LIB_PATH . '/http-conditional.php');
diff --git a/p/i/index.php b/p/i/index.php
index d3fc0b37c..a1212b570 100755
--- a/p/i/index.php
+++ b/p/i/index.php
@@ -18,7 +18,7 @@
#
# ***** END LICENSE BLOCK *****
-require('../../constants.php');
+require(__DIR__ . '/../../constants.php');
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
if (file_exists(DATA_PATH . '/do-install.txt')) {