From: Hypolite Petovan Date: Sun, 10 Mar 2019 04:21:19 +0000 (-0500) Subject: Define absolute paths for various includes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ad854d5d401b34758cabb5c5ec18d46c79b7565d;p=friendica.git Define absolute paths for various includes - Fix errors running local tests in IDE --- diff --git a/include/items.php b/include/items.php index 88eec1dc48..a28e19a05a 100644 --- a/include/items.php +++ b/include/items.php @@ -24,7 +24,8 @@ use Friendica\Util\ParseUrl; use Friendica\Util\Strings; use Friendica\Util\Temporal; -require_once 'mod/share.php'; +require_once __DIR__ . '/../mod/share.php'; + function add_page_info_data(array $data, $no_photos = false) { Hook::callAll('page_info_data', $data); diff --git a/src/BaseObject.php b/src/BaseObject.php index 4a6fa12d24..7e90478a9d 100644 --- a/src/BaseObject.php +++ b/src/BaseObject.php @@ -4,7 +4,7 @@ */ namespace Friendica; -require_once 'boot.php'; +require_once __DIR__ . '/../boot.php'; use Friendica\Network\HTTPException\InternalServerErrorException; diff --git a/src/Render/FriendicaSmartyEngine.php b/src/Render/FriendicaSmartyEngine.php index 69a34ae565..36e46435fe 100644 --- a/src/Render/FriendicaSmartyEngine.php +++ b/src/Render/FriendicaSmartyEngine.php @@ -17,7 +17,7 @@ class FriendicaSmartyEngine implements ITemplateEngine public function __construct() { - if (!is_writable('view/smarty3/')) { + if (!is_writable(__DIR__ . '/../../view/smarty3/')) { echo "ERROR: folder view/smarty3/ must be writable by webserver."; exit(); }