mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
Added missing page title to admin-ui when custom page method in use.
This commit is contained in:
@@ -674,6 +674,7 @@ class e_admin_response
|
||||
function getTitle($namespace = 'default', $reset = false, $glue = ' ')
|
||||
{
|
||||
$content = array();
|
||||
|
||||
if(isset($this->_title[$namespace]) && is_array($this->_title[$namespace]))
|
||||
{
|
||||
$content = $this->_title[$namespace];
|
||||
@@ -1814,6 +1815,8 @@ class e_admin_controller
|
||||
*/
|
||||
public function addTitle($title = true, $meta = true)
|
||||
{
|
||||
|
||||
|
||||
if(true === $title)
|
||||
{
|
||||
$_dispatcher = $this->getDispatcher();
|
||||
@@ -1828,6 +1831,9 @@ class e_admin_controller
|
||||
}
|
||||
$title = $res['caption'];
|
||||
}
|
||||
|
||||
// echo "<h3>".__METHOD__." - ".$title."</h3>";
|
||||
|
||||
// print_a($title);
|
||||
$this->getResponse()->appendTitle($title);
|
||||
if($meta) $this->addMetaTitle($title);
|
||||
@@ -1952,6 +1958,7 @@ class e_admin_controller
|
||||
if(method_exists($this, $actionObserverName))
|
||||
{
|
||||
$this->$actionObserverName();
|
||||
|
||||
}
|
||||
|
||||
// check for triggers, not available in Ajax mode
|
||||
@@ -2032,6 +2039,7 @@ class e_admin_controller
|
||||
$this->setRequest($request);
|
||||
}
|
||||
$response = $this->getResponse();
|
||||
// print_a($response);
|
||||
$this->_preDispatch($action);
|
||||
|
||||
if(null === $action)
|
||||
@@ -2047,6 +2055,12 @@ class e_admin_controller
|
||||
e107::getMessage()->add('Action '.$actionName.' no found!', E_MESSAGE_ERROR);
|
||||
return $response;
|
||||
}
|
||||
|
||||
if($action != 'Prefs' && $action != 'Create' && $action !='Edit' && $action != 'List') // Custom Page method in use, so add the title.
|
||||
{
|
||||
$this->addTitle();
|
||||
}
|
||||
|
||||
ob_start(); //catch any output
|
||||
$ret = $this->{$actionName}();
|
||||
|
||||
|
Reference in New Issue
Block a user