diff options
| -rw-r--r-- | framework/Web/Services/TPageService.php | 1 | ||||
| -rw-r--r-- | framework/Web/UI/TPage.php | 11 | ||||
| -rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Layout.php | 2 | 
3 files changed, 13 insertions, 1 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index 988f665a..32f7514c 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -457,6 +457,7 @@ class TPageService extends TService  			$this->_page=new $className();
 +			$this->_page->setPagePath($this->getRequestedPagePath());
  			// initialize page properties with those set in configurations
  			foreach($this->_properties as $name=>$value)
  				$this->_page->setSubProperty($name,$value);
 diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 7a7cbce4..2e3dd68e 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -119,6 +119,7 @@ class TPage extends TTemplateControl  	 * @var TControl|string the control or the ID of the element on the page to be focused when the page is sent back to user
  	 */
  	private $_focus=null;
 +	private $_pagePath='';
  	/**
  	 * @var boolean whether or not to maintain page scroll position
  	 */
 @@ -845,6 +846,16 @@ class TPage extends TTemplateControl  	{
  		$this->_enableStateEncryption=TPropertyValue::ensureBoolean($value);
  	}
 +
 +	public function getPagePath()
 +	{
 +		return $this->_pagePath;
 +	}
 +
 +	public function setPagePath($value)
 +	{
 +		$this->_pagePath=$value;
 +	}
  }
  interface IPageStatePersister
 diff --git a/tests/FunctionalTests/tickets/protected/pages/Layout.php b/tests/FunctionalTests/tickets/protected/pages/Layout.php index 64b0aebe..c2a8a44c 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Layout.php +++ b/tests/FunctionalTests/tickets/protected/pages/Layout.php @@ -4,7 +4,7 @@ class Layout extends TTemplateControl  {
  	public function onLoad($param)
  	{
 -		$num = str_replace('Ticket','',get_class($this->getPage()));
 +		$num = str_replace('Ticket','',$this->getPage()->getPagePath());
  		$this->getPage()->setTitle("Verifying Ticket $num");
  		$this->ticketlink->setText("Verifying Ticket $num");
  		$this->ticketlink->setNavigateUrl("http://trac.pradosoft.com/ticket/{$num}");
  | 
