Use dirname(__FILE__) instead of DOCUMENT_ROOT. Apparently many people have something wrong in DOCUMENT_ROOT. I don't understand it, but it seems like dirname(__FILE__) is a better solution anyways.

pull/3680/head
Isaac Connor 2023-03-21 18:22:53 -04:00
parent 3e1963231a
commit 01ba5f59f9
1 changed files with 2 additions and 2 deletions

View File

@ -2441,7 +2441,7 @@ function getHomeView() {
global $skin;
if ($user and $user['HomeView']) {
$view = detaintPath($user['HomeView']);
$path = $_SERVER['DOCUMENT_ROOT'].'/skins/'.$skin.'/views/'.$view.'.php';
$path = dirname(__FILE__, 2).'/skins/'.$skin.'/views/'.$view.'.php';
if (file_exists($path)) {
return $view;
} else {
@ -2450,7 +2450,7 @@ function getHomeView() {
}
if (defined('ZM_WEB_HOMEVIEW') and ZM_WEB_HOMEVIEW) {
$view = detaintPath(ZM_WEB_HOMEVIEW);
$path = $_SERVER['DOCUMENT_ROOT'].'/skins/'.$skin.'/views/'.$view.'.php';
$path = dirname(__FILE__, 2).'/skins/'.$skin.'/views/'.$view.'.php';
if (file_exists($path)) {
return $view;
} else {