1
0

Maintain Tag Album IDs for breadcrumbs.

This commit is contained in:
rWatcher 2011-05-25 22:46:14 -04:00
parent f67cb4dfa8
commit b44fe999ef
2 changed files with 10 additions and 2 deletions

View File

@ -132,7 +132,11 @@ class Tag_Model_Core extends ORM {
* @param string $query the query string (eg "page=3")
*/
public function url($query=null) {
$url = url::site("/tag_albums/tag/{$this->id}/" . urlencode($this->name));
$album_id = Input::instance()->get("album");
if (!($album_id)) {
$album_id = 0;
}
$url = url::site("/tag_albums/tag/{$this->id}/{$album_id}/" . urlencode($this->name));
if ($query) {
$url .= "?$query";
}

View File

@ -132,7 +132,11 @@ class Tag_Model_Core extends ORM {
* @param string $query the query string (eg "page=3")
*/
public function url($query=null) {
$url = url::site("/tag_albums/tag/{$this->id}/" . urlencode($this->name));
$album_id = Input::instance()->get("album");
if (!($album_id)) {
$album_id = 0;
}
$url = url::site("/tag_albums/tag/{$this->id}/{$album_id}/" . urlencode($this->name));
if ($query) {
$url .= "?$query";
}