aboutsummaryrefslogtreecommitdiffhomepage
path: root/application
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-10-16 19:26:03 +0200
committerGitHub <noreply@github.com>2020-10-16 19:26:03 +0200
commit81c9df1363116b0f70161ccf55af4d6aab8c7f6b (patch)
tree92f5b8c6d4efab2533033ebf4422b20c25f33dd6 /application
parentcd2878edeeb1f28356c486c73a12af827b2d9f93 (diff)
parent7836ed9b2e98e2c6898f011e431d3a58ebcfa3e5 (diff)
downloadShaarli-81c9df1363116b0f70161ccf55af4d6aab8c7f6b.tar.gz
Shaarli-81c9df1363116b0f70161ccf55af4d6aab8c7f6b.tar.zst
Shaarli-81c9df1363116b0f70161ccf55af4d6aab8c7f6b.zip
Merge pull request #1593 from ArthurHoaro/fix/no-url-rewriting
Diffstat (limited to 'application')
-rw-r--r--application/front/controller/visitor/ShaarliVisitorController.php1
-rw-r--r--application/plugin/PluginManager.php1
-rw-r--r--application/render/PageBuilder.php4
3 files changed, 5 insertions, 1 deletions
diff --git a/application/front/controller/visitor/ShaarliVisitorController.php b/application/front/controller/visitor/ShaarliVisitorController.php
index 55c075a2..54f9fe03 100644
--- a/application/front/controller/visitor/ShaarliVisitorController.php
+++ b/application/front/controller/visitor/ShaarliVisitorController.php
@@ -106,6 +106,7 @@ abstract class ShaarliVisitorController
106 'target' => $template, 106 'target' => $template,
107 'loggedin' => $this->container->loginManager->isLoggedIn(), 107 'loggedin' => $this->container->loginManager->isLoggedIn(),
108 'basePath' => $this->container->basePath, 108 'basePath' => $this->container->basePath,
109 'rootPath' => preg_replace('#/index\.php$#', '', $this->container->basePath),
109 'bookmarkService' => $this->container->bookmarkService 110 'bookmarkService' => $this->container->bookmarkService
110 ]; 111 ];
111 } 112 }
diff --git a/application/plugin/PluginManager.php b/application/plugin/PluginManager.php
index 1b2197c9..da66dea3 100644
--- a/application/plugin/PluginManager.php
+++ b/application/plugin/PluginManager.php
@@ -104,6 +104,7 @@ class PluginManager
104 'target' => '_PAGE_', 104 'target' => '_PAGE_',
105 'loggedin' => '_LOGGEDIN_', 105 'loggedin' => '_LOGGEDIN_',
106 'basePath' => '_BASE_PATH_', 106 'basePath' => '_BASE_PATH_',
107 'rootPath' => '_ROOT_PATH_',
107 'bookmarkService' => '_BOOKMARK_SERVICE_', 108 'bookmarkService' => '_BOOKMARK_SERVICE_',
108 ]; 109 ];
109 110
diff --git a/application/render/PageBuilder.php b/application/render/PageBuilder.php
index 41b357dd..2d6d2dbe 100644
--- a/application/render/PageBuilder.php
+++ b/application/render/PageBuilder.php
@@ -174,10 +174,12 @@ class PageBuilder
174 } 174 }
175 } 175 }
176 176
177 $rootPath = preg_replace('#/index\.php$#', '', $basePath);
177 $this->assign('base_path', $basePath); 178 $this->assign('base_path', $basePath);
179 $this->assign('root_path', $rootPath);
178 $this->assign( 180 $this->assign(
179 'asset_path', 181 'asset_path',
180 $basePath . '/' . 182 $rootPath . '/' .
181 rtrim($this->conf->get('resource.raintpl_tpl', 'tpl'), '/') . '/' . 183 rtrim($this->conf->get('resource.raintpl_tpl', 'tpl'), '/') . '/' .
182 $this->conf->get('resource.theme', 'default') 184 $this->conf->get('resource.theme', 'default')
183 ); 185 );