| | $repoUrl = '?repo=' . urlencode( $this->currentRepo['safe_name'] ); |
| | $path = $_GET['name'] ?? ''; |
| | - $b = '<div class="breadcrumb">'; |
| | + $o = '<div class="breadcrumb">'; |
| | |
| | - $b .= '<a href="?">Repositories</a><span>/</span>'; |
| | - $b .= '<a href="' . $repoUrl . '">' . |
| | + $o .= '<a href="?">Repositories</a><span>/</span>'; |
| | + $o .= '<a href="' . $repoUrl . '">' . |
| | htmlspecialchars( $this->currentRepo['name'] ) . '</a>'; |
| | |
| | if( $path ) { |
| | $parts = explode( '/', trim( $path, '/' ) ); |
| | $acc = ''; |
| | |
| | foreach($parts as $idx => $part) { |
| | $acc .= ($idx===0?'':'/') . $part; |
| | - $b .= '<span>/</span>'; |
| | |
| | - if( $idx === count($parts) - 1 ) { |
| | - $b .= '<span>' . htmlspecialchars( $part ) . '</span>'; |
| | + if( $idx === count( $parts ) - 1 ) { |
| | + $o .= '<span>/</span><span>' . htmlspecialchars( $part ) . |
| | + '</span>'; |
| | } else { |
| | - $b .= '<a href="' . $repoUrl . '&name=' . urlencode( $acc ) . '">' . |
| | - htmlspecialchars( $part ) . '</a>'; |
| | + $o .= '<span>/</span><a href="' . $repoUrl . '&name=' . |
| | + urlencode( $acc ) . '">' . htmlspecialchars( $part ) . |
| | + '</a>'; |
| | } |
| | } |
| | } elseif( $this->hash ) { |
| | - $b .= '<span>/</span><span>' . $type . ' ' . |
| | + $o .= '<span>/</span><span>' . $type . ' ' . |
| | substr( $hash, 0, 7 ) . '</span>'; |
| | } |
| | |
| | - echo $b . '</div>'; |
| | + echo $o . '</div>'; |
| | } |
| | } |