summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-02-01 15:05:24 +0000
committerlsces <lester@lsces.co.uk>2026-02-01 15:05:24 +0000
commit433ba6d9e0c7f6fe70dbfea0b43d1278a3d75b21 (patch)
tree38c45a8df2d8b0e4db975343ad30f1323856ce30
parentc5660e6cb6cf1ae8f07e4ac8be6101700f51585e (diff)
downloadblogs-433ba6d9e0c7f6fe70dbfea0b43d1278a3d75b21.tar.gz
blogs-433ba6d9e0c7f6fe70dbfea0b43d1278a3d75b21.tar.bz2
blogs-433ba6d9e0c7f6fe70dbfea0b43d1278a3d75b21.zip
Additional namespace tidies and 8.4 style fixes
-rwxr-xr-xprint_blog_post.php5
-rwxr-xr-xtemplates/list_blogs.tpl2
-rwxr-xr-xtemplates/print_blog_post.tpl4
3 files changed, 5 insertions, 6 deletions
diff --git a/print_blog_post.php b/print_blog_post.php
index d50406c..9fcaf45 100755
--- a/print_blog_post.php
+++ b/print_blog_post.php
@@ -1,6 +1,7 @@
<?php
-
+use Bitweaver\Blogs\BitBlogPost;
use Bitweaver\KernelTools;
+
/**
* @version $Header$
@@ -16,8 +17,6 @@ use Bitweaver\KernelTools;
*/
require_once '../kernel/includes/setup_inc.php';
-include_once BLOGS_PKG_CLASS_PATH.'BitBlogPost.php';
-
$gBitSystem->verifyPackage( 'blogs' );
if (!isset($_REQUEST["post_id"])) {
diff --git a/templates/list_blogs.tpl b/templates/list_blogs.tpl
index 2a86d72..50c2f72 100755
--- a/templates/list_blogs.tpl
+++ b/templates/list_blogs.tpl
@@ -44,7 +44,7 @@
<li class="item {cycle values='odd,even'}">
<div class="floaticon">
{if $gBitUser->hasPermission( 'p_liberty_assign_content_perms' ) and $listBlog.content_id}
- {if $gContent->mPerms} {* org note from liberty:service_content_icon_inc: don't think there is a serviceHash way of working out if there are individual permissions set *}
+ {if !empty($gContent->mPerms)} {* org note from liberty:service_content_icon_inc: don't think there is a serviceHash way of working out if there are individual permissions set *}
{assign var=perm_icon value="icon-lock"}
{else}
{assign var=perm_icon value="icon-key"}
diff --git a/templates/print_blog_post.tpl b/templates/print_blog_post.tpl
index 4154af0..048dcda 100755
--- a/templates/print_blog_post.tpl
+++ b/templates/print_blog_post.tpl
@@ -53,9 +53,9 @@ a:hover { background-color : #deceae; }
<hr />
<table>
<tr><td>
-<a href="{$smarty.const.BLOGS_PKG_URL}view_post.php?blog_id={$post_info.blog_id}&post_id={$post_info.post_id}" rel="bookmark">{tr}Permalink{/tr}</a>
+<a href="{$smarty.const.BLOGS_PKG_URL}view_post.php?blog_id={$post_info.blog_id|default:0}&post_id={$post_info.post_id}" rel="bookmark">{tr}Permalink{/tr}</a>
({tr}referenced by{/tr}: {$post_info.trackbacks_from_count} {tr}posts{/tr} {tr}references{/tr}: {$post_info.trackbacks_to_count} {tr}posts{/tr})
-{if $post_info.allow_comments eq 'y' and $gBitSystem->isFeatureActive( 'blog_posts_comments' )}
+{if !empty($post_info.allow_comments) and $post_info.allow_comments eq 'y' and $gBitSystem->isFeatureActive( 'blog_posts_comments' )}
{$post_info.num_comments} {tr}comments{/tr}
&nbsp;<a href="{$smarty.const.BLOGS_PKG_URL}view_post.php?find={$find}&amp;blog_id={$post_info.blog_id}&amp;offset={$offset}&amp;sort_mode={$sort_mode}&amp;post_id={$post_info.post_id}">{tr}view comments{/tr}</a>
{/if}