Dotclear

Changeset 2914:e4199034aa95


Ignore:
Timestamp:
01/12/15 11:32:24 (11 years ago)
Author:
Dsls
Branch:
twig
Message:

repaired admin.prepend.php, switch to latest twig version

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • composer.json

    r2655 r2914  
    11{ 
    22     "require": { 
    3           "twig/twig": "v1.15.0", 
     3          "twig/twig": "v1.16.3", 
    44          "dotclear/clearbricks": "0.9.0" 
    55     } 
  • composer.lock

    r2655 r2914  
    22    "_readme": [ 
    33        "This file locks the dependencies of your project to a known state", 
    4         "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" 
     4        "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 
     5        "This file is @generated automatically" 
    56    ], 
    6     "hash": "0e1a745045996affedec510865a37f2d", 
     7    "hash": "c34c1a4718309acee66818ce4f8d919a", 
    78    "packages": [ 
    89        { 
     
    4243        { 
    4344            "name": "twig/twig", 
    44             "version": "v1.15.0", 
     45            "version": "v1.16.3", 
    4546            "source": { 
    4647                "type": "git", 
    47                 "url": "https://github.com/fabpot/Twig.git", 
    48                 "reference": "85e4ff98000157ff753d934b9f13659a953f5666" 
     48                "url": "https://github.com/twigphp/Twig.git", 
     49                "reference": "6dc11a1e8ecfc30e2c68aaeb218148409d8e68af" 
    4950            }, 
    5051            "dist": { 
    5152                "type": "zip", 
    52                 "url": "https://api.github.com/repos/fabpot/Twig/zipball/85e4ff98000157ff753d934b9f13659a953f5666", 
    53                 "reference": "85e4ff98000157ff753d934b9f13659a953f5666", 
     53                "url": "https://api.github.com/repos/twigphp/Twig/zipball/6dc11a1e8ecfc30e2c68aaeb218148409d8e68af", 
     54                "reference": "6dc11a1e8ecfc30e2c68aaeb218148409d8e68af", 
    5455                "shasum": "" 
    5556            }, 
     
    6061            "extra": { 
    6162                "branch-alias": { 
    62                     "dev-master": "1.15-dev" 
     63                    "dev-master": "1.16-dev" 
    6364                } 
    6465            }, 
     
    8384                    "email": "armin.ronacher@active-4.com", 
    8485                    "role": "Project Founder" 
     86                }, 
     87                { 
     88                    "name": "Twig Team", 
     89                    "homepage": "http://twig.sensiolabs.org/contributors", 
     90                    "role": "Contributors" 
    8591                } 
    8692            ], 
     
    9096                "templating" 
    9197            ], 
    92             "time": "2013-12-06 07:47:10" 
     98            "time": "2014-12-25 19:58:19" 
    9399        } 
    94100    ], 
    95     "packages-dev": [ 
    96  
    97     ], 
    98     "aliases": [ 
    99  
    100     ], 
     101    "packages-dev": [], 
     102    "aliases": [], 
    101103    "minimum-stability": "stable", 
    102     "stability-flags": [ 
    103  
    104     ], 
    105     "platform": [ 
    106  
    107     ], 
    108     "platform-dev": [ 
    109  
    110     ] 
     104    "stability-flags": [], 
     105    "prefer-stable": false, 
     106    "prefer-lowest": false, 
     107    "platform": [], 
     108    "platform-dev": [] 
    111109} 
  • inc/admin/prepend.php

    r2911 r2914  
    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]) { 
     
    7373     # We have session information in constants 
    7474     $_COOKIE[DC_SESSION_NAME] = DC_AUTH_SESS_ID; 
    75       
     75 
    7676     if (!$core->auth->checkSession(DC_AUTH_SESS_UID)) { 
    7777          throw new Exception('Invalid session data.'); 
    7878     } 
    79       
     79 
    8080     # Check nonce from POST requests 
    8181     if (!empty($_POST)) 
     
    8585          } 
    8686     } 
    87       
     87 
    8888     if (empty($_SESSION['sess_blog_id'])) { 
    8989          throw new Exception('Permission denied.'); 
    9090     } 
    91       
     91 
    9292     # Loading locales 
    9393     dc_load_locales(); 
    94       
     94 
    9595     $core->setBlog($_SESSION['sess_blog_id']); 
    9696     if (!$core->blog->id) { 
     
    108108               $p[3] = '/'; 
    109109               call_user_func_array('setcookie',$p); 
    110                 
     110 
    111111               http::redirect('auth.php'); 
    112112          } 
     
    116116               ,20); 
    117117     } 
    118       
     118 
    119119     # Check nonce from POST requests 
    120120     if (!empty($_POST)) 
     
    127127          } 
    128128     } 
    129       
     129 
    130130     if (!empty($_REQUEST['switchblog']) 
    131131     && $core->auth->getPermissions($_REQUEST['switchblog']) !== false) 
     
    138138               unset($_SESSION['media_manager_page']); 
    139139          } 
    140            
     140 
    141141          # Removing switchblog from URL 
    142142          $redir = $_SERVER['REQUEST_URI']; 
     
    146146          exit; 
    147147     } 
    148       
     148 
    149149     # Check blog to use and log out if no result 
    150150     if (isset($_SESSION['sess_blog_id'])) 
     
    161161          } 
    162162     } 
    163       
     163 
    164164     # Loading locales 
    165165     dc_load_locales(); 
    166       
     166 
    167167     if (isset($_SESSION['sess_blog_id'])) { 
    168168          $core->setBlog($_SESSION['sess_blog_id']); 
     
    172172     } 
    173173} 
     174# Add admin default templates path 
     175$core->loadTemplateEnvironment(); 
     176$core->tpl->getLoader()->addPath(dirname(__FILE__).'/default-templates'); 
     177# Set admin context 
     178$_ctx = new dcAdminContext($core); 
     179$core->tpl->addExtension($_ctx); 
    174180 
    175181$core->adminurl = new dcAdminURL($core); 
     
    214220     } 
    215221     unset($f); 
    216       
     222 
    217223     if (($hfiles = @scandir($locales_root.$_lang.'/help')) !== false) 
    218224     { 
     
    235241     # [] : Title, URL, small icon, large icon, permissions, id, class 
    236242     # NB : '*' in permissions means any, null means super admin only 
    237       
     243 
    238244     # Menus creation 
    239245     $_menu = new ArrayObject(); 
     
    254260 
    255261     # Set menu titles 
    256       
     262 
    257263     $_menu['System']->title = __('System settings'); 
    258264     $_menu['Blog']->title = __('Blog'); 
     
    275281     addMenuItem('Blog',__('New entry'),'admin.post','images/menu/edit.png', 
    276282          $core->auth->check('usage,contentadmin',$core->blog->id)); 
    277       
     283 
    278284     addMenuItem('System',__('Update'),'admin.update','images/menu/update.png', 
    279285          $core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)); 
     
    293299} 
    294300 
    295 # Add admin default templates path 
    296 $core->tpl->getLoader()->addPath(dirname(__FILE__).'/default-templates'); 
    297 # Set admin context 
    298 $_ctx = new dcAdminContext($core); 
    299 $core->tpl->addExtension($_ctx); 
     301 
    300302 
    301303# --BEHAVIOR-- adminPrepend 
  • plugins/aboutConfig/_admin.php

    r2911 r2914  
    1111# -- END LICENSE BLOCK ----------------------------------------- 
    1212if (!defined('DC_CONTEXT_ADMIN')) { return; } 
    13  
    1413$_menu['System']->addItem('about:config', 
    1514     $core->adminurl->get('admin.plugin.aboutConfig'), 
     
    1817          $core->auth->isSuperAdmin()); 
    1918 
    20 $core->tpl->getLoader()->addPath(dirname(__FILE__).'/admtpl/','aboutConfig'); 
     19$GLOBALS['core']->tpl->getLoader()->addPath(dirname(__FILE__).'/admtpl/','aboutConfig'); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map