Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…e into MOODLE_21_STABLE
  • Loading branch information...
commit 6b9c6cc54e983157a7d9015ef4da8a976f566bbd 2 parents 31b4fda + c2edea7
Sam Hemelryk samhemelryk authored

Showing 1 changed file with 13 additions and 9 deletions. Show diff stats Hide diff stats

  1. +13 9 theme/yui_combo.php
22 theme/yui_combo.php
@@ -161,23 +161,27 @@ function combo_send_uncached($content, $mimetype) {
161 161 die;
162 162 }
163 163
164   -function combo_not_found() {
  164 +function combo_not_found($message = '') {
165 165 header('HTTP/1.0 404 not found');
166   - die('Combo resource not found, sorry.');
  166 + if ($message) {
  167 + echo $message;
  168 + } else {
  169 + echo 'Combo resource not found, sorry.';
  170 + }
  171 + die;
167 172 }
168 173
169 174 function combo_params() {
170   - if (!empty($_SERVER['REQUEST_URI'])) {
171   - $parts = explode('?', $_SERVER['REQUEST_URI']);
172   - if (count($parts) != 2) {
173   - return '';
174   - }
  175 + // note: buggy or misconfigured IIS does return the query string in REQUEST_URL
  176 + if (isset($_SERVER['REQUEST_URI']) and strpos($_SERVER['REQUEST_URI'], '?') !== false) {
  177 + $parts = explode('?', $_SERVER['REQUEST_URI'], 2);
175 178 return $parts[1];
176 179
177   - } else if (!empty($_SERVER['QUERY_STRING'])) {
  180 + } else if (isset($_SERVER['QUERY_STRING'])) {
178 181 return $_SERVER['QUERY_STRING'];
179 182
180 183 } else {
181   - return '';
  184 + // unsupported server, sorry!
  185 + combo_not_found('Unsupported server - query string can not be determined, try disabling YUI combo loading in admin settings.');
182 186 }
183 187 }

0 comments on commit 6b9c6cc

Please sign in to comment.
Something went wrong with that request. Please try again.