Dotclear


Ignore:
Timestamp:
05/20/14 08:39:33 (11 years ago)
Author:
Dsls
Branch:
twig
Parents:
2683:fb8aa74332f1 (diff), 2714:eed2e5727277 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with default (admin/post.php still to update with editor preferences, in twig template)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/prepend.php

    r2613 r2715  
    44# This file is part of Dotclear 2. 
    55# 
    6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 
     6# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear 
    77# Licensed under the GPL version 2.0 license. 
    88# See LICENSE file or 
     
    174174*/ 
    175175} 
     176 
     177$core->adminurl = new dcAdminURL($core); 
     178 
     179$core->adminurl->register('admin.posts','posts.php'); 
     180$core->adminurl->register('admin.post','post.php'); 
     181$core->adminurl->register('admin.blog.theme','blog_theme.php'); 
     182$core->adminurl->register('admin.blog.pref','blog_pref.php'); 
     183$core->adminurl->register('admin.blogs','blogs.php'); 
     184$core->adminurl->register('admin.categories','categories.php'); 
     185$core->adminurl->register('admin.category','category.php'); 
     186$core->adminurl->register('admin.comments','comments.php'); 
     187$core->adminurl->register('admin.comments','comment.php'); 
     188$core->adminurl->register('admin.help','help.php'); 
     189$core->adminurl->register('admin.home','index.php'); 
     190$core->adminurl->register('admin.langs','langs.php'); 
     191$core->adminurl->register('admin.media','media.php'); 
     192$core->adminurl->register('admin.media_item','media_item.php'); 
     193$core->adminurl->register('admin.plugins','plugins.php'); 
     194$core->adminurl->register('admin.plugin','plugin.php'); 
     195$core->adminurl->register('admin.user.preferences','preferences.php'); 
     196$core->adminurl->register('admin.user','user.php'); 
     197$core->adminurl->register('admin.users','users.php'); 
    176198 
    177199if ($core->auth->userID() && $core->blog !== null) 
  • inc/admin/prepend.php

    r2708 r2715  
    2424function dc_load_locales() { 
    2525     global $_lang, $core; 
    26  
     26      
    2727     $_lang = $core->auth->getInfo('user_lang'); 
    2828     $_lang = preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_lang) ? $_lang : 'en'; 
    29  
     29      
    3030     l10n::lang($_lang); 
    3131     if (l10n::set(dirname(__FILE__).'/../../locales/'.$_lang.'/date') === false && $_lang != 'en') { 
     
    4040{ 
    4141     global $core; 
    42  
     42      
    4343     $core->auth->user_prefs->addWorkspace('interface'); 
    4444     $user_ui_iconset = @$core->auth->user_prefs->interface->iconset; 
    4545     if (($user_ui_iconset) && ($img)) { 
    4646          $icon = false; 
    47           if ((preg_match('/^images\/menu\/(.+)$/',$img,$m)) || 
     47          if ((preg_match('/^images\/menu\/(.+)$/',$img,$m)) ||  
    4848               (preg_match('/^index\.php\?pf=(.+)$/',$img,$m))) { 
    4949               if ($m[1]) { 
     
    6565     # We have session information in constants 
    6666     $_COOKIE[DC_SESSION_NAME] = DC_AUTH_SESS_ID; 
    67  
     67      
    6868     if (!$core->auth->checkSession(DC_AUTH_SESS_UID)) { 
    6969          throw new Exception('Invalid session data.'); 
    7070     } 
    71  
     71      
    7272     # Check nonce from POST requests 
    7373     if (!empty($_POST)) 
     
    7777          } 
    7878     } 
    79  
     79      
    8080     if (empty($_SESSION['sess_blog_id'])) { 
    8181          throw new Exception('Permission denied.'); 
    8282     } 
    83  
     83      
    8484     # Loading locales 
    8585     dc_load_locales(); 
    86  
     86      
    8787     $core->setBlog($_SESSION['sess_blog_id']); 
    8888     if (!$core->blog->id) { 
     
    100100               $p[3] = '/'; 
    101101               call_user_func_array('setcookie',$p); 
    102  
     102                
    103103               http::redirect('auth.php'); 
    104104          } 
     
    108108               ,20); 
    109109     } 
    110  
     110      
    111111     # Check nonce from POST requests 
    112112     if (!empty($_POST)) 
     
    119119          } 
    120120     } 
    121  
    122  
     121      
     122      
    123123     if (!empty($_REQUEST['switchblog']) 
    124124     && $core->auth->getPermissions($_REQUEST['switchblog']) !== false) 
     
    131131               unset($_SESSION['media_manager_page']); 
    132132          } 
    133  
     133           
    134134          # Removing switchblog from URL 
    135135          $redir = $_SERVER['REQUEST_URI']; 
     
    139139          exit; 
    140140     } 
    141  
     141      
    142142     # Check blog to use and log out if no result 
    143143     if (isset($_SESSION['sess_blog_id'])) 
     
    154154          } 
    155155     } 
    156  
     156      
    157157     # Loading locales 
    158158     dc_load_locales(); 
    159  
     159      
    160160     if (isset($_SESSION['sess_blog_id'])) { 
    161161          $core->setBlog($_SESSION['sess_blog_id']); 
     
    165165     } 
    166166 
    167 /* 
     167/*    
    168168     # Check add to my fav fired 
    169169     if (!empty($_REQUEST['add-favorite'])) { 
     
    206206     } 
    207207     unset($f); 
    208  
     208      
    209209     if (($hfiles = @scandir($locales_root.$_lang.'/help')) !== false) 
    210210     { 
     
    227227     # [] : Title, URL, small icon, large icon, permissions, id, class 
    228228     # NB : '*' in permissions means any, null means super admin only 
    229  
    230  
     229      
     230      
    231231     # Menus creation 
    232232     $_menu = new ArrayObject(); 
     
    246246     } 
    247247 
    248  
     248      
    249249     # Set menu titles 
    250  
     250      
    251251     $_menu['System']->title = __('System settings'); 
    252252     $_menu['Blog']->title = __('Blog'); 
     
    278278          preg_match('/post.php$/',$_SERVER['REQUEST_URI']), 
    279279          $core->auth->check('usage,contentadmin',$core->blog->id)); 
    280  
     280      
    281281     $_menu['System']->prependItem(__('Update'),'update.php','images/menu/update.png', 
    282282          preg_match('/update.php(\?.*)?$/',$_SERVER['REQUEST_URI']), 
     
    301301} 
    302302 
     303# Add admin default templates path 
     304$core->tpl->getLoader()->addPath(dirname(__FILE__).'/default-templates'); 
     305# Set admin context 
     306$_ctx = new dcAdminContext($core); 
     307$core->tpl->addExtension($_ctx); 
     308 
     309# --BEHAVIOR-- adminPrepend 
     310$core->callBehavior('adminPrepend',$core,$_ctx); 
     311?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map