Changeset 1088:476af9ff8aed for inc/admin
- Timestamp:
- 12/19/12 07:34:57 (13 years ago)
- Branch:
- twig
- Location:
- inc/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/class.dc.admincontext.php
r1087 r1088 145 145 $this->protected_globals['current_page'] = $p['base']; 146 146 $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 ); 147 154 148 155 # Keep protected globals safe … … 324 331 'id' => '', 325 332 '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 ) 328 339 ); 329 340 … … 337 348 'id' => $this->core->auth->userID(), 338 349 '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 ) 340 354 ); 341 355 -
inc/admin/default-templates/index.html.twig
r1087 r1088 31 31 <fieldset><legend>{{__('New entry')}}</legend> 32 32 <p class="col">{{ form_field('post_title',{'class':'maximal'}) }}</p> 33 <p class="area">{{ form_field('post_content',{'rows': edit_size,'cols':5}) }}</p>33 <p class="area">{{ form_field('post_content',{'rows':current_user.options.edit_size,'cols':5}) }}</p> 34 34 <p>{{ form_field('cat_id')}}</p> 35 35 <p>{{ form_field('save')}}</p> -
inc/admin/default-templates/js_helpers.html.twig
r1085 r1088 11 11 <script type="text/javascript"> 12 12 //<![CDATA[ 13 dotclear.nonce = '{{ Nonce}}';13 dotclear.nonce = '{{session.nonce}}'; 14 14 dotclear.img_plus_src = '{{theme_url}}images/expand.png'; 15 15 dotclear.img_plus_alt = '{{__('uncover')}}'; … … 143 143 <script type="text/javascript" src="{{theme_url}}js/jsToolBar/jsToolBar.js"></script> 144 144 145 {% if enable_wysiwyg %}145 {% if current_user.options.enable_wysiwyg %} 146 146 <script type="text/javascript" src="{{theme_url}}js/jsToolBar/jsToolBar.wysiwyg.js"></script> 147 147 {% endif %} … … 208 208 jsToolBar.prototype.elements.post_link.title = '{{__('Link to an entry')}}'; 209 209 210 {% if media_manage%}210 {% if current_user.rights.media %} 211 211 jsToolBar.prototype.elements.img_select.disabled = true; 212 212 {% endif %} … … 217 217 {% macro candy_upload(params) %} 218 218 {% if params is empty %}{% set params = {} %} {% endif %} 219 {% set params = params|merge(['sess_id={{sess _id}}','sess_uid={{sess_uid}}','xd_check={{Nonce}}']) %}219 {% set params = params|merge(['sess_id={{session.id}}','sess_uid={{session.uid}}','xd_check={{session.nonce}}']) %} 220 220 <!-- jsCandyUpload --> 221 221 <link rel="stylesheet" href="{{theme_url}}style/candyUpload/style.css" type="text/css" media="screen" /> -
inc/admin/default-templates/post.html.twig
r1075 r1088 22 22 <p class="col">{{ form_field('post_title',{'class':'maximal'}) }}</p> 23 23 <p class="area" id="excerpt-area">{{ form_field('post_excerpt',{'rows':5,'cols':50}) }}</p> 24 <p class="area" id="content-area">{{ form_field('post_content',{'rows': edit_size,'cols':5}) }}</p>24 <p class="area" id="content-area">{{ form_field('post_content',{'rows':current_user.options.edit_size,'cols':5}) }}</p> 25 25 <p class="area" id="notes-area">{{ form_field('post_notes',{'rows':5,'cols':50}) }}</p> 26 26 <p>{{ form_field('save')}} {{form_field('delete',{'class':'delete'})}}</p>
Note: See TracChangeset
for help on using the changeset viewer.