Permalink
Browse files

MINOR Allow overwriting of 'X-Controller' and 'X-Title' HTTP headers …

…in CMS
  • Loading branch information...
1 parent c70e70b commit 225776389a39709bf80836177844cdadc23e822c @chillu chillu committed Dec 20, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 admin/code/LeftAndMain.php
@@ -317,8 +317,8 @@ function handleRequest($request, DataModel $model) {
$title = $this->Title();
$response = parent::handleRequest($request, $model);
- $response->addHeader('X-Controller', $this->class);
- $response->addHeader('X-Title', $title);
+ if(!$response->getHeader('X-Controller')) $response->addHeader('X-Controller', $this->class);
+ if(!$response->getHeader('X-Title')) $response->addHeader('X-Title', $title);
return $response;
}

0 comments on commit 2257763

Please sign in to comment.