diff options
| author | lsces <lester@lsces.co.uk> | 2015-08-25 20:28:47 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2015-08-25 20:28:47 +0100 |
| commit | 128b4444d0322f54916f281abc7e628bb6b77635 (patch) | |
| tree | 8776f93e21ef1b90b745070b1d2ad072b30a8ae3 | |
| parent | 804b8a17f72a81e4abad6fd9ba0294843022e559 (diff) | |
| download | blogs-128b4444d0322f54916f281abc7e628bb6b77635.tar.gz blogs-128b4444d0322f54916f281abc7e628bb6b77635.tar.bz2 blogs-128b4444d0322f54916f281abc7e628bb6b77635.zip | |
Use correct hash and function to create display links
| -rw-r--r-- | BitBlog.php | 2 | ||||
| -rw-r--r-- | BitBlogPost.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/BitBlog.php b/BitBlog.php index 873cfc1..79a020e 100644 --- a/BitBlog.php +++ b/BitBlog.php @@ -312,7 +312,7 @@ class BitBlog extends LibertyMime { while ($res = $result->fetchRow()) { $blogContentId = $res['content_id']; $ret[$blogContentId] = $res; - $ret[$blogContentId]['blog_url'] = $this->getDisplayUrl( $res['blog_id'] ); + $ret[$blogContentId]['blog_url'] = $this->getDisplayUrlFromHash( $res ); //get count of post in each blog $ret[$blogContentId]['postscant'] = $this->getPostsCount( $res['content_id'] ); // deal with the parsing diff --git a/BitBlogPost.php b/BitBlogPost.php index 8cd98e7..3bfa1cc 100644 --- a/BitBlogPost.php +++ b/BitBlogPost.php @@ -89,8 +89,8 @@ class BitBlogPost extends LibertyMime { $this->mInfo['blogs'] = $this->getBlogMemberships( $this->mContentId ); // this is bad news right here, 'url' is wrong, standard is 'display_url' // we should remove this now that display_url is added - $this->mInfo['url'] = BitBlogPost::getDisplayUrlFromHash( $this->mContentId, $this->mInfo ); - $this->mInfo['display_url'] = BitBlogPost::getDisplayUrlFromHash( $this->mContentId, $this->mInfo ); + $this->mInfo['url'] = BitBlogPost::getDisplayUrlFromHash( $this->mInfo ); + $this->mInfo['display_url'] = BitBlogPost::getDisplayUrlFromHash( $this->mInfo ); foreach( array( 'avatar', 'image' ) as $img ) { $this->mInfo[$img] = liberty_fetch_thumbnails( array( 'source_file' => $this->getSourceFile( array( 'user_id'=>$this->getField( 'user_id' ), 'package'=>liberty_mime_get_storage_sub_dir_name( array( 'mime_type' => $this->getField( $img.'_mime_type' ), 'name' => $this->getField( $img.'_file_name' ) ) ), 'file_name' => basename( $this->mInfo[$img.'_file_name'] ), 'sub_dir' => $this->getField( $img.'_attachment_id' ) ) ) @@ -699,7 +699,7 @@ class BitBlogPost extends LibertyMime { $ret = $pTitle; if( $gBitSystem->isPackageActive( 'blogs' ) ) { - $ret = '<a title="'.htmlspecialchars( BitBlogPost::getTitle( $pMixed ) ).'" href="'.BitBlogPost::getDisplayUrlFromHash( $pMixed['content_id'] ).'">'.htmlspecialchars( BitBlogPost::getTitle( $pMixed ) ).'</a>'; + $ret = '<a title="'.htmlspecialchars( BitBlogPost::getTitle( $pMixed ) ).'" href="'.BitBlogPost::getDisplayUrlFromHash( $pMixed ).'">'.htmlspecialchars( BitBlogPost::getTitle( $pMixed ) ).'</a>'; } return $ret; |
