plugins/Newsboy.php
changeset 11 b0995e600bde
parent 9 162b0f10e3d0
child 12 62c594682bf6
equal deleted inserted replaced
9:162b0f10e3d0 11:b0995e600bde
    68   $session->acl_extend_scope('php_in_pages',           'NewsBoy', $paths);
    68   $session->acl_extend_scope('php_in_pages',           'NewsBoy', $paths);
    69   $session->acl_extend_scope('edit_acl',               'NewsBoy', $paths);
    69   $session->acl_extend_scope('edit_acl',               'NewsBoy', $paths);
    70   
    70   
    71 }
    71 }
    72 
    72 
    73 function NewsBoy_namespace_handler($page)
    73 function NewsBoy_namespace_handler(&$page)
    74 {
    74 {
    75   global $db, $session, $paths, $template, $plugins; // Common objects
    75   global $db, $session, $paths, $template, $plugins; // Common objects
    76   
    76   
    77   if ( defined('ENANO_FEEDBURNER_INCLUDED') )
    77   if ( defined('ENANO_FEEDBURNER_INCLUDED') )
    78   {
    78   {
   187         // can't find it.
   187         // can't find it.
   188         return;
   188         return;
   189       }
   189       }
   190       return;
   190       return;
   191     }
   191     }
       
   192   }
       
   193 }
       
   194 
       
   195 class Namespace_NewsBoy extends Namespace_Default
       
   196 {
       
   197   public $perms;
       
   198   
       
   199   function __construct($a, $b, $c = 0)
       
   200   {
       
   201     global $db, $session, $paths, $template, $plugins; // Common objects
       
   202     
       
   203     parent::__construct($a, $b, $c);
       
   204     $this->perms = $session->fetch_page_acl($this->page_id, $this->namespace);
       
   205   }
       
   206   
       
   207   function send()
       
   208   {
       
   209     NewsBoy_namespace_handler($this);
   192   }
   210   }
   193 }
   211 }
   194 
   212 
   195 function NewsBoy_set_page_string()
   213 function NewsBoy_set_page_string()
   196 {
   214 {