Commits

Christoffer Niska  committed 0f9d266

fixed setting active for BootBreadcrumbs::homeLink

  • Participants
  • Parent commits 1c04cb9

Comments (0)

Files changed (1)

File widgets/BootBreadcrumbs.php

 	 */
 	public function run()
 	{
-		if (empty($this->links))
-			return;
-		
 		$links = array();
 
-		if ($this->homeLink === null)
+		if (!isset($this->homeLink))
 			$this->homeLink = array('label'=>Yii::t('bootstrap', 'Home'), 'url'=>Yii::app()->homeUrl);
 
 		if ($this->homeLink !== false)
 			if (is_array($this->homeLink))
 				$this->homeLink = CHtml::link($this->homeLink['label'], $this->homeLink['url']);
 			
-			$links[] = $this->renderItem($this->homeLink);
+			$links[] = $this->renderItem($this->homeLink, Yii::app()->request->requestUri === Yii::app()->homeUrl);
 		}
 		
 		foreach ($this->links as $label=>$url)