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 88eec1d..a28e19a 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 4a6fa12..7e90478 100644 (file)
@@ -4,7 +4,7 @@
  */
 namespace Friendica;
 
-require_once 'boot.php';
+require_once __DIR__ . '/../boot.php';
 
 use Friendica\Network\HTTPException\InternalServerErrorException;
 
index 69a34ae..36e4643 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();
                }