Changeset 2914:e4199034aa95
- Timestamp:
- 01/12/15 11:32:24 (11 years ago)
- Branch:
- twig
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
composer.json
r2655 r2914 1 1 { 2 2 "require": { 3 "twig/twig": "v1.1 5.0",3 "twig/twig": "v1.16.3", 4 4 "dotclear/clearbricks": "0.9.0" 5 5 } -
composer.lock
r2655 r2914 2 2 "_readme": [ 3 3 "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" 5 6 ], 6 "hash": " 0e1a745045996affedec510865a37f2d",7 "hash": "c34c1a4718309acee66818ce4f8d919a", 7 8 "packages": [ 8 9 { … … 42 43 { 43 44 "name": "twig/twig", 44 "version": "v1.1 5.0",45 "version": "v1.16.3", 45 46 "source": { 46 47 "type": "git", 47 "url": "https://github.com/ fabpot/Twig.git",48 "reference": " 85e4ff98000157ff753d934b9f13659a953f5666"48 "url": "https://github.com/twigphp/Twig.git", 49 "reference": "6dc11a1e8ecfc30e2c68aaeb218148409d8e68af" 49 50 }, 50 51 "dist": { 51 52 "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", 54 55 "shasum": "" 55 56 }, … … 60 61 "extra": { 61 62 "branch-alias": { 62 "dev-master": "1.1 5-dev"63 "dev-master": "1.16-dev" 63 64 } 64 65 }, … … 83 84 "email": "armin.ronacher@active-4.com", 84 85 "role": "Project Founder" 86 }, 87 { 88 "name": "Twig Team", 89 "homepage": "http://twig.sensiolabs.org/contributors", 90 "role": "Contributors" 85 91 } 86 92 ], … … 90 96 "templating" 91 97 ], 92 "time": "201 3-12-06 07:47:10"98 "time": "2014-12-25 19:58:19" 93 99 } 94 100 ], 95 "packages-dev": [ 96 97 ], 98 "aliases": [ 99 100 ], 101 "packages-dev": [], 102 "aliases": [], 101 103 "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": [] 111 109 } -
inc/admin/prepend.php
r2911 r2914 24 24 function dc_load_locales() { 25 25 global $_lang, $core; 26 26 27 27 $_lang = $core->auth->getInfo('user_lang'); 28 28 $_lang = preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$_lang) ? $_lang : 'en'; 29 29 30 30 l10n::lang($_lang); 31 31 if (l10n::set(dirname(__FILE__).'/../../locales/'.$_lang.'/date') === false && $_lang != 'en') { … … 40 40 { 41 41 global $core; 42 42 43 43 $core->auth->user_prefs->addWorkspace('interface'); 44 44 $user_ui_iconset = @$core->auth->user_prefs->interface->iconset; 45 45 if (($user_ui_iconset) && ($img)) { 46 46 $icon = false; 47 if ((preg_match('/^images\/menu\/(.+)$/',$img,$m)) || 47 if ((preg_match('/^images\/menu\/(.+)$/',$img,$m)) || 48 48 (preg_match('/^index\.php\?pf=(.+)$/',$img,$m))) { 49 49 if ($m[1]) { … … 73 73 # We have session information in constants 74 74 $_COOKIE[DC_SESSION_NAME] = DC_AUTH_SESS_ID; 75 75 76 76 if (!$core->auth->checkSession(DC_AUTH_SESS_UID)) { 77 77 throw new Exception('Invalid session data.'); 78 78 } 79 79 80 80 # Check nonce from POST requests 81 81 if (!empty($_POST)) … … 85 85 } 86 86 } 87 87 88 88 if (empty($_SESSION['sess_blog_id'])) { 89 89 throw new Exception('Permission denied.'); 90 90 } 91 91 92 92 # Loading locales 93 93 dc_load_locales(); 94 94 95 95 $core->setBlog($_SESSION['sess_blog_id']); 96 96 if (!$core->blog->id) { … … 108 108 $p[3] = '/'; 109 109 call_user_func_array('setcookie',$p); 110 110 111 111 http::redirect('auth.php'); 112 112 } … … 116 116 ,20); 117 117 } 118 118 119 119 # Check nonce from POST requests 120 120 if (!empty($_POST)) … … 127 127 } 128 128 } 129 129 130 130 if (!empty($_REQUEST['switchblog']) 131 131 && $core->auth->getPermissions($_REQUEST['switchblog']) !== false) … … 138 138 unset($_SESSION['media_manager_page']); 139 139 } 140 140 141 141 # Removing switchblog from URL 142 142 $redir = $_SERVER['REQUEST_URI']; … … 146 146 exit; 147 147 } 148 148 149 149 # Check blog to use and log out if no result 150 150 if (isset($_SESSION['sess_blog_id'])) … … 161 161 } 162 162 } 163 163 164 164 # Loading locales 165 165 dc_load_locales(); 166 166 167 167 if (isset($_SESSION['sess_blog_id'])) { 168 168 $core->setBlog($_SESSION['sess_blog_id']); … … 172 172 } 173 173 } 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); 174 180 175 181 $core->adminurl = new dcAdminURL($core); … … 214 220 } 215 221 unset($f); 216 222 217 223 if (($hfiles = @scandir($locales_root.$_lang.'/help')) !== false) 218 224 { … … 235 241 # [] : Title, URL, small icon, large icon, permissions, id, class 236 242 # NB : '*' in permissions means any, null means super admin only 237 243 238 244 # Menus creation 239 245 $_menu = new ArrayObject(); … … 254 260 255 261 # Set menu titles 256 262 257 263 $_menu['System']->title = __('System settings'); 258 264 $_menu['Blog']->title = __('Blog'); … … 275 281 addMenuItem('Blog',__('New entry'),'admin.post','images/menu/edit.png', 276 282 $core->auth->check('usage,contentadmin',$core->blog->id)); 277 283 278 284 addMenuItem('System',__('Update'),'admin.update','images/menu/update.png', 279 285 $core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)); … … 293 299 } 294 300 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 300 302 301 303 # --BEHAVIOR-- adminPrepend -
plugins/aboutConfig/_admin.php
r2911 r2914 11 11 # -- END LICENSE BLOCK ----------------------------------------- 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 14 13 $_menu['System']->addItem('about:config', 15 14 $core->adminurl->get('admin.plugin.aboutConfig'), … … 18 17 $core->auth->isSuperAdmin()); 19 18 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.