Whoops. NOW compatible with Enano rev. 953.
--- a/plugins/Newsboy.php Tue May 05 00:18:09 2009 -0400
+++ b/plugins/Newsboy.php Tue May 05 00:21:13 2009 -0400
@@ -83,7 +83,7 @@
if ( $paths->namespace != 'NewsBoy' )
return;
- if ( $paths->cpage['urlname_nons'] == 'Portal' || preg_match('/^Archive(\/|$)/', $page->page_id) )
+ if ( $page->page_id == 'Portal' || preg_match('/^Archive(\/|$)/', $page->page_id) )
{
// Add admin opener Javascript function
@@ -111,7 +111,11 @@
</script>
</enano:no-opt>');
- if ( !$page->perms->get_permissions('read') )
+ $perms =& $page->perms;
+ if ( !$perms )
+ $perms = $session->fetch_page_acl($page->page_id, $page->namespace);
+
+ if ( !$perms->get_permissions('read') )
{
$page->err_access_denied();
return false;
@@ -157,9 +161,7 @@
}
parent::__construct($page_id, $namespace, $revision);
- $this->perms = $session->fetch_page_acl($this->page_id, $this->namespace);
- $this->build_cdata();
- }
+ }
function build_cdata()
{