Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / course / jumpto.php
blobce4df789f03b9a7dac5f6a9706fb3000d3e18930
1 <?php // $Id$
3 /*
4 * Jumps to a given relative or Moodle absolute URL.
5 * Mostly used for accessibility.
7 */
9 require('../config.php');
11 $jump = optional_param('jump', '', PARAM_RAW);
13 if (!confirm_sesskey()) {
14 print_error('confirmsesskeybad');
17 if (strpos($jump, $CFG->wwwroot) === 0) { // Anything on this site
18 redirect(urldecode($jump));
19 } else if (preg_match('/^[a-z]+\.php\?/', $jump)) {
20 redirect(urldecode($jump));
23 redirect($_SERVER['HTTP_REFERER']); // Return to sender, just in case