includes/comment.php
changeset 261 5f1cd51bf1be
parent 259 112debff64bd
child 283 e133d321fce4
equal deleted inserted replaced
259:112debff64bd 261:5f1cd51bf1be
     1 <?php
     1 <?php
     2 
     2 
     3 /*
     3 /*
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     5  * Version 1.1.1
     5  * Version 1.0.3 (Dyrad)
     6  * Copyright (C) 2006-2007 Dan Fuhry
     6  * Copyright (C) 2006-2007 Dan Fuhry
     7  *
     7  *
     8  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     8  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     9  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
     9  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    10  *
    10  *
    52   function __construct($page_id, $namespace)
    52   function __construct($page_id, $namespace)
    53   {
    53   {
    54     global $db, $session, $paths, $template, $plugins; // Common objects
    54     global $db, $session, $paths, $template, $plugins; // Common objects
    55     
    55     
    56     // Initialize permissions
    56     // Initialize permissions
    57     if ( $page_id == $paths->cpage['urlname_nons'] && $namespace == $paths->namespace )
    57     if ( $page_id == $paths->page_id && $namespace == $paths->namespace )
    58       $this->perms =& $GLOBALS['session'];
    58       $this->perms =& $GLOBALS['session'];
    59     else
    59     else
    60       $this->perms = $session->fetch_page_acl($page_id, $namespace);
    60       $this->perms = $session->fetch_page_acl($page_id, $namespace);
    61     
    61     
    62     $this->page_id = $db->escape($page_id);
    62     $this->page_id = $db->escape($page_id);