diff options
| author | Tekimaki <tekimaki_admin@users.sourceforge.net> | 2009-02-04 19:14:43 +0000 |
|---|---|---|
| committer | Tekimaki <tekimaki_admin@users.sourceforge.net> | 2009-02-04 19:14:43 +0000 |
| commit | db6ceffa0026923736b9135681b0de604c483316 (patch) | |
| tree | cc4ae749c33448b7472613cfc493df49d7d83f18 | |
| parent | 484a82950b953ac6c98b4745e4497e1233467cb0 (diff) | |
| download | liberty-db6ceffa0026923736b9135681b0de604c483316.tar.gz liberty-db6ceffa0026923736b9135681b0de604c483316.tar.bz2 liberty-db6ceffa0026923736b9135681b0de604c483316.zip | |
fix comments getDisplayUrl - gets url based on root_id - related fix boards topics urls which are derived from comments - note the tpl tweak in boards
| -rw-r--r-- | LibertyComment.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/LibertyComment.php b/LibertyComment.php index 1485351..de0dbb2 100644 --- a/LibertyComment.php +++ b/LibertyComment.php @@ -3,7 +3,7 @@ * Management of Liberty Content * * @package liberty - * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyComment.php,v 1.74 2009/02/03 21:15:36 tekimaki_admin Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyComment.php,v 1.75 2009/02/04 19:14:43 tekimaki_admin Exp $ * @author spider <spider@steelsun.com> */ @@ -283,13 +283,18 @@ class LibertyComment extends LibertyContent { if( empty( $pMixed ) ) { $pMixed = &$this->mInfo; } + $ret = NULL; - if( @$this->verifyId( $pMixed['parent_id'] ) && $viewContent = LibertyBase::getLibertyObject( $pMixed['parent_id'] ) ) { - $ret = $viewContent->getDisplayUrl().( @BitBase::verifyId( $pMixed['content_id'] ) ? "#comment_".$pMixed['content_id'] : '' ); + + if( @$this->verifyId( $pMixed['root_id'] ) && $viewContent = LibertyBase::getLibertyObject( $pMixed['root_id'] ) ) { + // pass in cooment hash to the url func incase the root package needs to do something fancy + $pUrlHash['comment'] = $pMixed; + $ret = $viewContent->getDisplayUrl( NULL, $pUrlHash ).( @BitBase::verifyId( $pMixed['content_id'] ) ? "#comment_".$pMixed['content_id'] : '' ); }elseif( @BitBase::verifyId( $pMixed['content_id'] )) { $ret = parent::getDisplayUrl( NULL, $pMixed ); $ret .= "&view_comment_id=".$pMixed['content_id']."#comment_{$pMixed['content_id']}"; } + return( $ret ); } |
