Skip to content

Commit

Permalink
Merge branch 'w31_MDL-28382_m20_iis' of git://github.com/skodak/moodl…
Browse files Browse the repository at this point in the history
…e into MOODLE_20_STABLE
  • Loading branch information
Sam Hemelryk committed Aug 8, 2011
2 parents 48db633 + 1a6bfd3 commit 11909e8
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions theme/yui_combo.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -161,23 +161,27 @@ function combo_send_uncached($content, $mimetype) {
die; die;
} }


function combo_not_found() { function combo_not_found($message = '') {
header('HTTP/1.0 404 not found'); header('HTTP/1.0 404 not found');
die('Combo resource not found, sorry.'); if ($message) {
echo $message;
} else {
echo 'Combo resource not found, sorry.';
}
die;
} }


function combo_params() { function combo_params() {
if (!empty($_SERVER['REQUEST_URI'])) { // note: buggy or misconfigured IIS does return the query string in REQUEST_URL
$parts = explode('?', $_SERVER['REQUEST_URI']); if (isset($_SERVER['REQUEST_URI']) and strpos($_SERVER['REQUEST_URI'], '?') !== false) {
if (count($parts) != 2) { $parts = explode('?', $_SERVER['REQUEST_URI'], 2);
return '';
}
return $parts[1]; return $parts[1];


} else if (!empty($_SERVER['QUERY_STRING'])) { } else if (isset($_SERVER['QUERY_STRING'])) {
return $_SERVER['QUERY_STRING']; return $_SERVER['QUERY_STRING'];


} else { } else {
return ''; // unsupported server, sorry!
combo_not_found('Unsupported server - query string can not be determined, try disabling YUI combo loading in admin settings.');
} }
} }

0 comments on commit 11909e8

Please sign in to comment.