Subversion Repositories oidplus

Rev

Rev 1321 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1321 Rev 1375
Line 37... Line 37...
37
        $plugins = OIDplus::getAllPlugins();
37
        $plugins = OIDplus::getAllPlugins();
38
        foreach ($plugins as $plugin) {
38
        foreach ($plugins as $plugin) {
39
                if ($plugin->handle404($_REQUEST['h404'])) $handled = true;
39
                if ($plugin->handle404($_REQUEST['h404'])) $handled = true;
40
        }
40
        }
41
        if (!$handled) {
41
        if (!$handled) {
-
 
42
                // TODO: Is canonical host OK? Because we might have a login cookie on this domain!
42
                header('Location:'.OIDplus::webpath().'?goto='.urlencode('oidplus:err:'.$_REQUEST['h404']));
43
                header('Location:'.OIDplus::webpath().'?goto='.urlencode('oidplus:err:'.$_REQUEST['h404']));
43
                die();
44
                die();
44
        }
45
        }
45
}
46
}
46
 
47
 
47
$static_node_id_original = $static_node_id;
48
$static_node_id_original = $static_node_id;
48
$static_node_id = OIDplus::prefilterQuery($static_node_id, false);
49
$static_node_id = OIDplus::prefilterQuery($static_node_id, false);
49
if ($static_node_id_original !== $static_node_id) {
50
if ($static_node_id_original !== $static_node_id) {
50
        // Redirect to the corrected query
51
        // Redirect to the corrected query
-
 
52
        // TODO: Is canonical host OK? Because we might have a login cookie on this domain!
51
        $canonical_url = OIDplus::canonicalURL($static_node_id);
53
        $canonical_url = OIDplus::canonicalURL($static_node_id);
52
        if ($canonical_url) {
54
        if ($canonical_url) {
53
                header('Location:'.$canonical_url);
55
                header('Location:'.$canonical_url);
54
                die();
56
                die();
55
        }
57
        }