Dotclear


Ignore:
Timestamp:
12/19/12 07:34:57 (13 years ago)
Author:
JcDenis
Branch:
twig
Message:

Put reusable globals variables in admin context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/class.dc.admincontext.php

    r1087 r1088  
    145145          $this->protected_globals['current_page'] = $p['base']; 
    146146          $this->protected_globals['blog_count'] = $this->core->auth->blog_count; 
     147          $this->protected_globals['rtl'] = l10n::getTextDirection( 
     148               $this->protected_globals['current_user']['lang']) == 'rtl'; 
     149          $this->protected_globals['session'] = array( 
     150               'id' => session_id(), 
     151               'uid' => isset($_SESSION['sess_browser_uid']) ? $_SESSION['sess_browser_uid'] : '', 
     152               'nonce' => $this->core->getNonce() 
     153          ); 
    147154           
    148155          # Keep protected globals safe 
     
    324331               'id' => '', 
    325332               'super' => false, 
    326                'options' => array(), 
    327                'prefs' => array() 
     333               'lang' => 'en', 
     334               'options' => $this->core->userDefaults(), 
     335               'prefs' => array(), 
     336               'rights' => array( 
     337                    'media' => false 
     338               ) 
    328339          ); 
    329340           
     
    337348                    'id' => $this->core->auth->userID(), 
    338349                    'super' => $this->core->auth->isSuperAdmin(), 
    339                     'options' => $this->core->auth->getOptions() 
     350                    'options' => $this->core->auth->getOptions(), 
     351                    'rights' => array( 
     352                         'media' => $this->core->auth->check('media,media_admin',$this->core->blog->id) 
     353                    ) 
    340354               ); 
    341355                
Note: See TracChangeset for help on using the changeset viewer.

Sites map