Exemple #1
0
//get the display_limiting setting from the settings subsection for this module
$thedata = $modSettings['settings']['display_limiting'];
//if we are changing mode
if (isset($_GET['diskmode']) || !empty($_GET['diskmode'])) {
    $newmode = $_GET['diskmode'];
    switch ($newmode) {
        case "true":
            $mydata['settings']['display_limiting'] = "true";
            $mergedsettings = LoadUtility::ini_merge($modSettings, $mydata);
            LoadUtility::write_module_ini($mergedsettings, $module);
            header("Location: " . $links);
            break;
        case "false":
            $mydata['settings']['display_limiting'] = "false";
            $mergedsettings = LoadUtility::ini_merge($modSettings, $mydata);
            LoadUtility::write_module_ini($mergedsettings, $module);
            header("Location: " . $links);
            break;
    }
} else {
    //if not build the links
    switch ($thedata) {
        case "true":
            $links = $links . "diskmode=false";
            break;
        case "false":
            $links = $links . "diskmode=true";
            break;
    }
}
?>