Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'w31_MDL-28382_m20_iis' of git://github.com/skodak/moodl…

…e into MOODLE_20_STABLE
  • Loading branch information...
commit 11909e87a0a9ac1b7226f2c1edb8070666778555 2 parents 48db633 + 1a6bfd3
@samhemelryk samhemelryk authored
Showing with 13 additions and 9 deletions.
  1. +13 −9 theme/yui_combo.php
View
22 theme/yui_combo.php
@@ -161,23 +161,27 @@ function combo_send_uncached($content, $mimetype) {
die;
}
-function combo_not_found() {
+function combo_not_found($message = '') {
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() {
- if (!empty($_SERVER['REQUEST_URI'])) {
- $parts = explode('?', $_SERVER['REQUEST_URI']);
- if (count($parts) != 2) {
- return '';
- }
+ // note: buggy or misconfigured IIS does return the query string in REQUEST_URL
+ if (isset($_SERVER['REQUEST_URI']) and strpos($_SERVER['REQUEST_URI'], '?') !== false) {
+ $parts = explode('?', $_SERVER['REQUEST_URI'], 2);
return $parts[1];
- } else if (!empty($_SERVER['QUERY_STRING'])) {
+ } else if (isset($_SERVER['QUERY_STRING'])) {
return $_SERVER['QUERY_STRING'];
} else {
- return '';
+ // unsupported server, sorry!
+ combo_not_found('Unsupported server - query string can not be determined, try disabling YUI combo loading in admin settings.');
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.