private function getSinglePromotion(PlPage &$page, $promo)
{
- if (!ctype_digit($promo) || $promo < 1920 || $promo > date('Y')) {
+ if (!(is_int($promo) || ctype_digit($promo)) || $promo < 1920 || $promo > date('Y')) {
$page->trigError('Promotion invalide : ' . $promo . '.');
return null;
}
$this->_add_rss_link($page);
$uid = S::i('uid');
- $user = Env::v('user');
+ $user = S::user();
// For XSRF protection, checks both the normal xsrf token, and the special RSS token.
// It allows direct linking to contact adding in the RSS feed.
}
$search = false;
- $user = S::user();
require_once 'userset.inc.php';
}
if ($search && trim(Env::v('quick'))) {
$base = 'carnet/contacts/search';
-
- Platal::load('search', 'classes.inc.php');
$view = new SearchSet(true, false, new UFC_Contact($user));
} else {
$base = 'carnet/contacts';