Changeset 20512
- Timestamp:
- 07/27/09 08:21:48 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfTabMenuPeytzPlugin/lib/sfTabMenuPeytz.class.php
r20510 r20512 48 48 ), 49 49 'matches' => array(), 50 'priority' => 0, 50 51 ); 51 52 … … 180 181 $parseArray['module'] = $moduleAction[0]; 181 182 182 $parseArray['action'] = 'index';183 183 if (isset($moduleAction[1])) { 184 184 $parseArray['action'] = $moduleAction[1]; … … 213 213 foreach ($matches as $match) { 214 214 $score = 0; 215 $match = $this->parseMatch($match); ;215 $match = $this->parseMatch($match); 216 216 217 217 if ($module == $match['module']) { … … 247 247 248 248 if ($scores[$index] > 0) { 249 $this->_ActiveTabIndex = $index; 249 $priorities = array(); 250 foreach ($scores as $key => $score) { 251 if ($score != $scores[$index]) { 252 continue; 253 } 254 255 $tab = self::merge($this->_DefaultTabConfig, $this->config['tabs'][$key]); 256 if ($tab['priority']) { 257 $priorities[$key] = $tab['priority']; 258 } 259 } 260 261 if (count($priorities)) { 262 asort($priorities); 263 $priorityKeys = array_keys($priorities); 264 $this->_ActiveTabIndex = end($priorityKeys); 265 } else { 266 $this->_ActiveTabIndex = $index; 267 } 250 268 } 251 269 }