Changeset 57404
- Timestamp:
- 04/07/08 14:52:23 (3 months ago)
- Location:
- modules/sapphire/branches/roa/core/control
- Files:
-
- 2 modified
-
HTTPResponse.php (modified) (1 diff)
-
RequestHandlingData.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/sapphire/branches/roa/core/control/HTTPResponse.php
r55557 r57404 76 76 function getStatusCode() { 77 77 return $this->statusCode; 78 } 79 80 /** 81 * Returns true if this HTTP response is in error 82 */ 83 function isError() { 84 return $this->statusCode && ($this->statusCode < 200 || $this->statusCode > 399); 78 85 } 79 86 -
modules/sapphire/branches/roa/core/control/RequestHandlingData.php
r53655 r57404 76 76 if(isset($_REQUEST['debug_request'])) Debug::message("Testing '$rule' with '" . $request->remaining() . "' on $this->class"); 77 77 if($params = $request->match($rule, true)) { 78 if(isset($_REQUEST['debug_request'])) Debug::message("Rule '$rule' matched on $this->class");78 if(isset($_REQUEST['debug_request'])) Debug::message("Rule '$rule' matched to action '$action' on $this->class"); 79 79 80 80 // Actions can reference URL parameters, eg, '$Action/$ID/$OtherID' => '$Action', … … 85 85 } else { 86 86 return $this->httpError(403, "Action '$action' isn't allowed on class $this->class"); 87 } 88 89 if($result instanceof HTTPResponse && $result->isError()) { 90 if(isset($_REQUEST['debug_request'])) Debug::message("Rule resulted in HTTP error; breaking"); 91 return $result; 87 92 } 88 93
