equal
deleted
inserted
replaced
92 |
92 |
93 function render_post() |
93 function render_post() |
94 { |
94 { |
95 global $db, $session, $paths, $template, $plugins; // Common objects |
95 global $db, $session, $paths, $template, $plugins; // Common objects |
96 |
96 |
97 if ( file_exists( ENANO_ROOT . "/themes/{$template->theme_id}/blog_post.tpl" ) ) |
97 if ( empty($template->theme) ) |
|
98 $template->load_theme(); |
|
99 |
|
100 if ( file_exists( ENANO_ROOT . "/themes/{$template->theme}/blog_post.tpl" ) ) |
98 { |
101 { |
99 $parser = $template->makeParser('blog_post.tpl'); |
102 $parser = $template->makeParser('blog_post.tpl'); |
100 } |
103 } |
101 else |
104 else |
102 { |
105 { |
281 // The way we're doing this is first fetching permissions for the blog, and then merging them |
284 // The way we're doing this is first fetching permissions for the blog, and then merging them |
282 // with permissions specific to the post. This way the admin can set custom permissions for the |
285 // with permissions specific to the post. This way the admin can set custom permissions for the |
283 // entire blog, and they'll be inherited unless individual posts have overriding permissions. |
286 // entire blog, and they'll be inherited unless individual posts have overriding permissions. |
284 $perms_blog = $session->fetch_page_acl($row['username'], 'Blog'); |
287 $perms_blog = $session->fetch_page_acl($row['username'], 'Blog'); |
285 $perms = $session->fetch_page_acl("{$row['post_timestamp']}_{$row['post_id']}", 'Blog'); |
288 $perms = $session->fetch_page_acl("{$row['post_timestamp']}_{$row['post_id']}", 'Blog'); |
286 $perms->perms = $session->acl_merge($perms->perms, $perms_post->perms); |
289 $perms->perms = $session->acl_merge($perms->perms, $perms_blog->perms); |
287 unset($perms_blog); |
290 unset($perms_blog); |
288 |
291 |
289 if ( $row['blog_type'] == 'private' ) |
292 if ( $row['blog_type'] == 'private' ) |
290 { |
293 { |
291 $allowed_users = unserialize($row['allowed_users']); |
294 $allowed_users = unserialize($row['allowed_users']); |