1
0

Use Item_Model::relative_url() instead of relying on

Item_Model::$relative_url_cache directly.
This commit is contained in:
Bharat Mediratta 2011-12-25 20:31:42 -08:00
parent 1b002243a7
commit 1023321cff
3 changed files with 4 additions and 4 deletions

View File

@ -247,7 +247,7 @@ dTree.prototype.closeAllChildren = function(node) {
if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) { if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {
if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls); if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);
this.aNodes[n]._io = false; this.aNodes[n]._io = false;
this.closeAllChildren(this.aNodes[n]); this.closeAllChildren(this.aNodes[n]);
} }
} }
} }
@ -398,7 +398,7 @@ albumTree.config.cookieDomain = '';
<? <?
function addtree($album){ function addtree($album){
?> ?>
albumTree.add(<?= $album->id -1 ?>, <?= $album->parent_id -1 ?>, "<?= $album->title ?>", pf+'<?= $album->relative_url_cache ?>'); albumTree.add(<?= $album->id -1 ?>, <?= $album->parent_id -1 ?>, "<?= $album->title ?>", pf+'<?= $album->relative_url() ?>');
<? <?
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){ foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){
addtree($child); addtree($child);

View File

@ -15,7 +15,7 @@ function makelist($album,$level){
//print out the list item //print out the list item
?> ?>
<li> <li>
<a href="<?= item::root()->url() ?><?= $album->relative_url_cache ?>"><?= str_repeat("&nbsp;&nbsp;", $level) ?><?= $album->title ?></a> <a href="<?= item::root()->url() ?><?= $album->relative_url() ?>"><?= str_repeat("&nbsp;&nbsp;", $level) ?><?= $album->title ?></a>
</li> </li>
<? <?
//recurse over the children, and print their list items as well //recurse over the children, and print their list items as well

View File

@ -4,7 +4,7 @@
function makeselect($album, $level){ function makeselect($album, $level){
//print out the list item as a select option //print out the list item as a select option
?> ?>
<option value="<?= item::root()->url() ?><?= $album->relative_url_cache ?>"><?= str_repeat("&nbsp;&nbsp;", $level) ?><?= $album->title ?></option> <option value="<?= item::root()->url() ?><?= $album->relative_url() ?>"><?= str_repeat("&nbsp;&nbsp;", $level) ?><?= $album->title ?></option>
<? <?
//recurse over the children, and print their list items as well //recurse over the children, and print their list items as well
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){ foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){