includes/namespaces/api.php
changeset 800 9cdfe82c56cd
child 801 eb8b23f11744
equal deleted inserted replaced
799:4629ad98ee88 800:9cdfe82c56cd
       
     1 <?php
       
     2 
       
     3 /*
       
     4  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
       
     5  * Version 1.1.5 (Caoineag alpha 5)
       
     6  * Copyright (C) 2006-2008 Dan Fuhry
       
     7  *
       
     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.
       
    10  *
       
    11  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
       
    12  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
       
    13  */
       
    14 
       
    15 class Namespace_API extends Namespace_Default
       
    16 {
       
    17   function send()
       
    18   {
       
    19     global $output, $session;
       
    20     $uri = scriptPath . '/' . $this->page_id;
       
    21     if ( $output->naked )
       
    22     {
       
    23       $sep = ( strstr($uri, '?') ) ? '&' : '?';
       
    24       $uri .= "{$sep}noheaders";
       
    25     }
       
    26     if ( $session->sid_super )
       
    27     {
       
    28       $sep = ( strstr($uri, '?') ) ? '&' : '?';
       
    29       $uri .= "{$sep}auth={$session->sid_super}";
       
    30     }
       
    31     redirect( $uri, '', '', 0 );
       
    32   }
       
    33 }
       
    34