Minahito
minah****@users*****
2007年 3月 28日 (水) 14:48:32 JST
Index: xoops2jp/html/include/cp_header.php diff -u xoops2jp/html/include/cp_header.php:1.2.8.5.2.4 xoops2jp/html/include/cp_header.php:1.2.8.5.2.4.2.1 --- xoops2jp/html/include/cp_header.php:1.2.8.5.2.4 Sat Dec 16 23:10:30 2006 +++ xoops2jp/html/include/cp_header.php Wed Mar 28 14:48:32 2007 @@ -2,7 +2,7 @@ /** * * @package Legacy - * @version $Id: cp_header.php,v 1.2.8.5.2.4 2006/12/16 14:10:30 nobunobu Exp $ + * @version $Id: cp_header.php,v 1.2.8.5.2.4.2.1 2007/03/28 05:48:32 minahito Exp $ * @copyright Copyright 2005, 2006 XOOPSCube.org <http://xoopscube.org/> * @license http://www.gnu.org/licenses/gpl.txt GNU GENERAL PUBLIC LICENSE Version 2 * @@ -12,7 +12,16 @@ | keeping compatibility with XOOPS 2.0.x <http://www.xoops.org> | *------------------------------------------------------------------------*/ -if (!defined('XOOPS_ROOT_PATH')) require_once "../../../mainfile.php"; +if (!defined('XOOPS_ROOT_PATH')) { + // + // Strange code? This file is used from files in admin directories having no include "mainfile.php". + // Ummm..., such uses is deprecated in Legacy. + // + if (!file_exists("../../../mainfile.php")) exit(); + + require_once "../../../mainfile.php"; +} + if (!defined('XOOPS_CPFUNC_LOADED')) require_once XOOPS_ROOT_PATH . "/include/cp_functions.php"; //