Esempio n. 1
0
 function check_path()
 {
     if (!(defined("XOOPS_PATH") && defined("XOOPS_VAR_PATH") && defined("XOOPS_TRUST_PATH"))) {
         return false;
     }
     $ctrl = new PathStuffController();
     if (!$ctrl->checkPath()) {
         return false;
     }
     if (!$ctrl->checkPermissions()) {
         return false;
     }
     return true;
 }
Esempio n. 2
0
 * @author      Taiwen Jiang <*****@*****.**>
 * @author      DuGris (aka L. JEN) <*****@*****.**>
 * @version     $Id: page_pathsettings.php 2841 2009-02-21 10:24:09Z phppp $
**/
require_once './include/common.inc.php';
if (!defined('XOOPS_INSTALL')) {
    die('XOOPS Installation wizard die');
}
include_once './class/pathcontroller.php';
$pageHasForm = true;
$pageHasHelp = true;
$ctrl = new PathStuffController($wizard->configs['xoopsPathDefault'], $wizard->configs['dataPath']);
if ($_SERVER['REQUEST_METHOD'] == 'GET' && @$_GET['var'] && @$_GET['action'] == 'checkpath') {
    $path = $_GET['var'];
    $ctrl->xoopsPath[$path] = htmlspecialchars(trim($_GET['path']));
    echo genPathCheckHtml($path, $ctrl->checkPath($path));
    exit;
}
$ctrl->execute();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    return;
}
ob_start();
?>
<script type="text/javascript">
function removeTrailing(id, val) {
    if (val[val.length-1] == '/') {
        val = val.substr(0, val.length-1);
        $(id).value = val;
    }
    return val;