activeholdingco/ls-devel-module — Issue #10: checking if is_backend
Author: ericmuyser
Created: 2011-12-07 18:16:07+00:00
State: open
Labels: bug

need to normalize the request path as well, otherwise ending slashes don't match.

```php
public function is_backend() {
$backend_url = '/' . Core_String::normalizeUri(Phpr::$config->get('BACKEND_URL', 'backend'));
$current_url = '/' . Core_String::normalizeUri(isset($_REQUEST['q']) ? $_REQUEST['q'] : '');

return stristr($current_url, $backend_url) !== false;
}
```