diff options
| author | spiderr <spider@viovio.com> | 2012-04-20 01:01:53 -0400 |
|---|---|---|
| committer | spiderr <spider@viovio.com> | 2012-04-20 01:01:53 -0400 |
| commit | 924b97272e3ebde675f66a20bdb85b9c52265d79 (patch) | |
| tree | 592d2eefb492a1eb150c1bcd79568ab166fdf50e | |
| parent | 1006fa88105f5a61d67267706f8da05800f176d5 (diff) | |
| download | liberty-924b97272e3ebde675f66a20bdb85b9c52265d79.tar.gz liberty-924b97272e3ebde675f66a20bdb85b9c52265d79.tar.bz2 liberty-924b97272e3ebde675f66a20bdb85b9c52265d79.zip | |
fix getDisplayUrl in LibertyComment
| -rw-r--r-- | LibertyComment.php | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/LibertyComment.php b/LibertyComment.php index edd56e6..6d9a756 100644 --- a/LibertyComment.php +++ b/LibertyComment.php @@ -329,31 +329,30 @@ class LibertyComment extends LibertyMime { /** * @param pLinkText name of - * @param pMixed different possibilities depending on derived class + * @param pParamHash different possibilities depending on derived class * @return the link to display the page. */ - public static function getDisplayUrlFromHash( $pLinkText=NULL, $pMixed=NULL ) { + public static function getDisplayUrlFromHash( $pParamHash ) { $ret = NULL; - - if( @BitBase::verifyId( $pMixed['root_id'] ) && $viewContent = LibertyBase::getLibertyObject( $pMixed['root_id'] ) ) { + if( @BitBase::verifyId( $pParamHash['root_id'] ) && $viewContent = LibertyBase::getLibertyObject( $pParamHash['root_id'] ) ) { // pass in cooment hash to the url func incase the root package needs to do something fancy - $pUrlHash['comment'] = $pMixed; - $ret = $viewContent->getDisplayUrlFromHash( $pUrlHash ).( @BitBase::verifyId( $pMixed['content_id'] ) ? "#comment_".$pMixed['content_id'] : '' ); - }elseif( @BitBase::verifyId( $pMixed['content_id'] )) { - $ret = parent::getDisplayUrlFromHash( NULL, $pMixed ); - $ret .= "#comment_{$pMixed['content_id']}"; + $viewContent->mInfo['comment'] = $pParamHash; + $ret = $viewContent->getDisplayUrl().( @self::verifyId( $pParamHash['content_id'] ) ? "#comment_".$pParamHash['content_id'] : '' ); + } elseif( @BitBase::verifyId( $pParamHash['content_id'] ) ) { + $ret = parent::getDisplayUrlFromHash( $pParamHash ); + $ret .= "#comment_{$pParamHash['content_id']}"; } return( $ret ); } //generate a URL to directly access and display a single comment and the associated root content - public static function getDirectUrlFromHash( $pMixed=NULL ) { - if( empty( $pMixed ) ) { - $pMixed = &$this->mInfo; + public static function getDirectUrlFromHash( $pParamHash=NULL ) { + if( empty( $pParamHash ) ) { + $pParamHash = &$this->mInfo; } $ret = NULL; - if( !empty( $pMixed['root_id'] ) && $viewContent = LibertyBase::getLibertyObject( $pMixed['root_id'] ) ) { + if( !empty( $pParamHash['root_id'] ) && $viewContent = LibertyBase::getLibertyObject( $pParamHash['root_id'] ) ) { $ret = $viewContent->getDisplayUrl(); if ( strstr($ret, '?') ) { $ret .= "&"; @@ -361,7 +360,7 @@ class LibertyComment extends LibertyMime { else { $ret .= "?"; } - $ret .= "view_comment_id=" . $pMixed['content_id'] . "#comment_".$pMixed['content_id']; + $ret .= "view_comment_id=" . $pParamHash['content_id'] . "#comment_".$pParamHash['content_id']; } return ( $ret ); } |
