Beispiel #1
0
    } else {
        $cm =& cronmanager::create($db);
        $cm->save_email($update_email);
        $json_array['status'] = true;
    }
    header("Content-type: application/json");
    echo json_encode($json_array);
    exit;
}
$extdisplay = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay'] : '';
global $active_repos;
$loc_domain = 'amp';
if (isset($_REQUEST['check_online'])) {
    $online = 1;
    $active_repos = $_REQUEST['active_repos'];
    module_set_active_repos($active_repos);
} else {
    $online = isset($_REQUEST['online']) && $_REQUEST['online'] && !EXTERNAL_PACKAGE_MANAGEMENT ? 1 : 0;
    $active_repos = module_get_active_repos();
}
// fix php errors from undefined variable. Not sure if we can just change the reference below to use
// online since it changes values so just setting to what we decided it is here.
$moduleaction = isset($_REQUEST['moduleaction']) ? $_REQUEST['moduleaction'] : false;
/*
	moduleaction is an array with the key as the module name, and possible values:

	downloadinstall - download and install (used when a module is not locally installed)
	upgrade - download and install (used when a module is locally installed)
	install - install/upgrade locally available module
	enable - enable local module
	disable - disable local module
function module_get_active_repos()
{
    global $active_repos;
    if (!isset($active_repos) || !$active_repos) {
        $repos_serialized = sql("SELECT `data` FROM `module_xml` WHERE `id` = 'repos_serialized'", "getOne");
        if (isset($repos_serialized) && $repos_serialized) {
            $active_repos = unserialize($repos_serialized);
        } else {
            $active_repos = array('standard' => 1);
            module_set_active_repos($active_repos);
        }
        return $active_repos;
    } else {
        return $active_repos;
    }
}