Esempio n. 1
0
        $_GET['lookfor'] = '';
    }
    if (strlen($searchTerm) >= 256) {
        PEAR_Singleton::raiseError("Sorry your query is too long, please rephrase your query.");
        $_REQUEST['lookfor'] = '';
        $_GET['lookfor'] = '';
    }
}
if (!$analytics->isTrackingDisabled()) {
    $analytics->setModule($module);
    $analytics->setAction($action);
    $analytics->setObjectId(isset($_REQUEST['id']) ? $_REQUEST['id'] : null);
    $analytics->setMethod(isset($_REQUEST['method']) ? $_REQUEST['method'] : null);
    $analytics->setLanguage($interface->getLanguage());
    $analytics->setTheme($interface->getPrimaryTheme());
    $analytics->setMobile($interface->isMobile() ? 1 : 0);
    $analytics->setDevice(get_device_name());
    $analytics->setPhysicalLocation($physicalLocation);
    if ($user) {
        $analytics->setPatronType($user->patronType);
        $analytics->setHomeLocationId($user->homeLocationId);
    } else {
        $analytics->setPatronType('logged out');
        $analytics->setHomeLocationId(-1);
    }
}
// Process Authentication, must be done here so we can redirect based on user information
// immediately after logging in.
$interface->assign('loggedIn', $user == false ? 'false' : 'true');
if ($user) {
    $interface->assign('user', $user);