]> git.mxchange.org Git - friendica.git/commitdiff
Define absolute paths for various includes
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 10 Mar 2019 04:21:19 +0000 (23:21 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 10 Mar 2019 04:21:19 +0000 (23:21 -0500)
- Fix errors running local tests in IDE

include/items.php
src/BaseObject.php
src/Render/FriendicaSmartyEngine.php

index 88eec1dc48794de8faa89f91ac80aeaaedf91ac0..a28e19a05a2cb11b9f3c8eeae17101dbb3f51c3c 100644 (file)
@@ -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);
index 4a6fa12d24b03ad18f4542114f1302d8a9e3573e..7e90478a9d613a378bf28dace96144a9b38f94b5 100644 (file)
@@ -4,7 +4,7 @@
  */
 namespace Friendica;
 
-require_once 'boot.php';
+require_once __DIR__ . '/../boot.php';
 
 use Friendica\Network\HTTPException\InternalServerErrorException;
 
index 69a34ae5658d797eec37415d0b134c4e3ab2c350..36e46435fe675124c7279b3f3a03e636c325ae4a 100644 (file)
@@ -17,7 +17,7 @@ class FriendicaSmartyEngine implements ITemplateEngine
 
        public function __construct()
        {
-               if (!is_writable('view/smarty3/')) {
+               if (!is_writable(__DIR__ . '/../../view/smarty3/')) {
                        echo "<b>ERROR:</b> folder <tt>view/smarty3/</tt> must be writable by webserver.";
                        exit();
                }