plugins/nuggie/postbit.php
changeset 4 f50742368f90
parent 2 4e7762863437
child 6 c51809bdf6af
--- a/plugins/nuggie/postbit.php	Fri Feb 01 21:54:00 2008 -0500
+++ b/plugins/nuggie/postbit.php	Sat Mar 15 15:19:42 2008 -0400
@@ -94,7 +94,10 @@
   {
     global $db, $session, $paths, $template, $plugins; // Common objects
     
-    if ( file_exists( ENANO_ROOT . "/themes/{$template->theme_id}/blog_post.tpl" ) )
+    if ( empty($template->theme) )
+      $template->load_theme();
+    
+    if ( file_exists( ENANO_ROOT . "/themes/{$template->theme}/blog_post.tpl" ) )
     {
       $parser = $template->makeParser('blog_post.tpl');
     }
@@ -283,7 +286,7 @@
     // entire blog, and they'll be inherited unless individual posts have overriding permissions.
     $perms_blog = $session->fetch_page_acl($row['username'], 'Blog');
     $perms = $session->fetch_page_acl("{$row['post_timestamp']}_{$row['post_id']}", 'Blog');
-    $perms->perms = $session->acl_merge($perms->perms, $perms_post->perms);
+    $perms->perms = $session->acl_merge($perms->perms, $perms_blog->perms);
     unset($perms_blog);
     
     if ( $row['blog_type'] == 'private' )