Skip to content

Commit

Permalink
[FEATURE] Add PAGE_WEB_PATH Parameter To Administration Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasWeinert committed Oct 26, 2021
1 parent cb2febe commit b7c494f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/system/Papaya/CMS/Administration/UI.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ public function execute() {
\Papaya\Request\Log::getInstance();
}
$application->request->isAdministration = TRUE;
$this->template()->parameters()->set(
'PAGE_WEB_PATH',
\Papaya\Utility\File\Path::getBasePath(FALSE)
);
$application->session->isAdministration(TRUE);
if ($redirect = $application->session->activate(TRUE)) {
$redirect->send(TRUE);
Expand Down
3 changes: 1 addition & 2 deletions src/system/deprecated/papaya_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
if (!class_exists('\\Papaya\\Autoloader', FALSE)) {
if (!defined('PAPAYA_INCLUDE_PATH')) {
define('PAPAYA_INCLUDE_PATH', dirname(__DIR__).'papaya_page.php/');
define('PAPAYA_INCLUDE_PATH', dirname(__DIR__).'/../');
}
include_once PAPAYA_INCLUDE_PATH.'system/Papaya/Autoloader.php';
spl_autoload_register(\Papaya\Autoloader::class.'::load');
Expand Down Expand Up @@ -2816,4 +2816,3 @@ private function getPageModule($page) {
);
}
}

0 comments on commit b7c494f

Please sign in to comment.