if(preg_match('!^ *(\d{4}) *$!', $arg, $matches)) {
$p = intval($matches[1]);
if($p<1900 || $p>2100) {
if(preg_match('!^ *(\d{4}) *$!', $arg, $matches)) {
$p = intval($matches[1]);
if($p<1900 || $p>2100) {
$p1 = intval($matches[1]);
$p2 = intval($matches[2]);
if($p1<1900 || $p1>2100) {
$p1 = intval($matches[1]);
$p2 = intval($matches[2]);
if($p1<1900 || $p1>2100) {
} else {
if ($action == 'add_promo') {
$watch->_promos->addRange($p1, $p2);
} else {
if ($action == 'add_promo') {
$watch->_promos->addRange($p1, $p2);
$promo_sortie = $res->fetchOneCell();
$page->assign('promo_sortie', $promo_sortie);
$promo_sortie = $res->fetchOneCell();
$page->assign('promo_sortie', $promo_sortie);
$this->handler_contacts($page);
}
function handler_contacts(&$page, $action = null, $subaction = null, $ssaction = null)
{
$this->handler_contacts($page);
}
function handler_contacts(&$page, $action = null, $subaction = null, $ssaction = null)
{
+ // 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.
+ if (Env::v('action') && Env::v('token') !== S::v('core_rss_hash')) {
+ S::assert_xsrf_token();
+ }
INNER JOIN aliases AS a ON (c.contact=a.id and a.type!="homonyme")
WHERE c.uid = {?} AND a.alias={?}', $uid, $user))
{
INNER JOIN aliases AS a ON (c.contact=a.id and a.type!="homonyme")
WHERE c.uid = {?} AND a.alias={?}', $uid, $user))
{
ThrowError::$throwHook = array($this, 'searchErrorHandler');
$view = new SearchSet(true, false, "INNER JOIN contacts AS c2 ON (u.user_id = c2.contact)", "c2.uid = $uid");
} else {
$base = 'carnet/contacts';
$view = new UserSet("INNER JOIN contacts AS c2 ON (u.user_id = c2.contact)", " c2.uid = $uid ");
}
ThrowError::$throwHook = array($this, 'searchErrorHandler');
$view = new SearchSet(true, false, "INNER JOIN contacts AS c2 ON (u.user_id = c2.contact)", "c2.uid = $uid");
} else {
$base = 'carnet/contacts';
$view = new UserSet("INNER JOIN contacts AS c2 ON (u.user_id = c2.contact)", " c2.uid = $uid ");
}
$view->addMod('trombi', 'Trombinoscope', false, array('with_admin' => false, 'with_promo' => true));
$view->addMod('geoloc', 'Planisphère', false, array('with_annu' => 'carnet/contacts/search'));
$view->apply($base, $page, $action, $subaction);
$view->addMod('trombi', 'Trombinoscope', false, array('with_admin' => false, 'with_promo' => true));
$view->addMod('geoloc', 'Planisphère', false, array('with_annu' => 'carnet/contacts/search'));
$view->apply($base, $page, $action, $subaction);
- require_once 'rss.inc.php';
- require_once 'notifs.inc.php';
-
- $uid = init_rss('carnet/rss.tpl', $user, $hash);
- $notifs = new Notifs($uid, false);
- $page->assign('notifs', $notifs);
+ $this->load('feed.inc.php');
+ $feed = new CarnetFeed();
+ return $feed->run($page, $user, $hash);