<?php
/***************************************************************************
- * Copyright (C) 2003-2009 Polytechnique.org *
+ * Copyright (C) 2003-2011 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'ajax/reminder' => $this->make_hook('reminder', AUTH_COOKIE),
+ 'ajax/reminder' => $this->make_hook('reminder', AUTH_COOKIE, 'user'),
);
}
- function handler_reminder(&$page, $reminder_name = null, $action = null)
+ function handler_reminder($page, $reminder_name = null, $action = null)
{
require_once 'reminder.inc.php';
$user = S::user();
// displayed.
$reminder->HandleAction($action);
- if ($new_reminder = Reminder::GetCandidateReminder($user)) {
- $new_reminder->Display($page);
+ $previous_reminder = $reminder->title();
+
+ if (($new_reminder = Reminder::GetCandidateReminder($user))) {
+ $new_reminder->DisplayStandalone($page, $previous_reminder);
} else {
- exit;
+ $reminder->NotifiesAction($page);
}
}
}