Exemplo n.º 1
0
function isSurvey($l)
{
    if (trim($l) == "" || !is_numeric($l)) {
        return false;
    }
    /* forego checks below */
    if (Config::checkComponents() == false) {
        return true;
    }
    // if equal to current suid, then no need to check
    // (we already did so before, otherwise suid would not have been set)
    global $suid;
    if ($l == $suid) {
        return true;
    }
    // check if real survey
    $sv = new Surveys();
    $surveys = $sv->getSurveyIdentifiers();
    foreach ($surveys as $surv) {
        if ($surv == $l) {
            return true;
        }
    }
    return false;
}