Changeset 505:3cf15f858012 for inc/core
- Timestamp:
- 07/04/11 12:42:05 (14 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.media.php
r407 r505 175 175 176 176 @param href <b>string</b> URL pattern 177 @param last <b>string</b> Last item pattern 177 178 @return <b>string</b> HTML code 178 179 */ 179 public function breadCrumb($href )180 public function breadCrumb($href,$last='') 180 181 { 181 182 $res = ''; 182 183 if ($this->relpwd && $this->relpwd != '.') { 183 184 $pwd = ''; 184 foreach (explode('/',$this->relpwd) as $v) { 185 $pwd .= rawurlencode($v).'/'; 186 $res .= '<a href="'.sprintf($href,$pwd).'">'.$v.'</a> / '; 185 $arr = explode('/',$this->relpwd); 186 $count = count($arr); 187 foreach ($arr as $v) { 188 if (($last != '') && (0 === --$count)) { 189 $res .= sprintf($last,$v); 190 } else { 191 $pwd .= rawurlencode($v).'/'; 192 $res .= '<a href="'.sprintf($href,$pwd).'">'.$v.'</a> / '; 193 } 187 194 } 188 195 }
Note: See TracChangeset
for help on using the changeset viewer.