2005-09-29 06:30:58 +00:00
|
|
|
<?php
|
2009-09-25 04:02:46 +00:00
|
|
|
|
|
|
|
// This file is part of Moodle - http://moodle.org/
|
|
|
|
//
|
|
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2006-04-13 08:48:51 +00:00
|
|
|
/**
|
2009-09-25 04:02:46 +00:00
|
|
|
* Wrapper script redirecting user operations to correct destination.
|
|
|
|
*
|
|
|
|
* @copyright 1999 Martin Dougiamas http://dougiamas.com
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
|
* @package user
|
|
|
|
*/
|
2006-04-13 08:48:51 +00:00
|
|
|
|
2005-09-29 06:30:58 +00:00
|
|
|
require_once("../config.php");
|
|
|
|
|
2006-04-13 08:48:51 +00:00
|
|
|
$formaction = required_param('formaction', PARAM_FILE);
|
|
|
|
$id = required_param('id', PARAM_INT);
|
2005-09-29 06:30:58 +00:00
|
|
|
|
2010-01-16 15:39:56 +00:00
|
|
|
$PAGE->set_url('/user/action_redir.php', array('formaction'=>$formaction,'id'=>$id));
|
2009-09-25 04:02:46 +00:00
|
|
|
|
2005-09-29 06:30:58 +00:00
|
|
|
// Add every page will be redirected by this script
|
|
|
|
$actions = array(
|
|
|
|
'messageselect.php',
|
2007-07-05 06:53:17 +00:00
|
|
|
'addnote.php',
|
|
|
|
'groupaddnote.php',
|
2006-04-13 08:48:51 +00:00
|
|
|
);
|
2005-09-29 06:30:58 +00:00
|
|
|
|
2006-04-13 08:48:51 +00:00
|
|
|
if (array_search($formaction, $actions) === false) {
|
|
|
|
print_error('unknownuseraction');
|
2005-09-29 06:30:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!confirm_sesskey()) {
|
2006-04-13 08:48:51 +00:00
|
|
|
print_error('confirmsesskeybad');
|
2005-09-29 06:30:58 +00:00
|
|
|
}
|
|
|
|
|
2006-04-13 08:48:51 +00:00
|
|
|
require_once($formaction);
|