Dotclear


Ignore:
Timestamp:
02/27/13 11:48:32 (13 years ago)
Author:
JcDenis
Branch:
sexy
Parents:
880:02c78f56f430 (diff), 1105:ce855d61f9ce (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 branch in 2.5-RC

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/posts.php

    r873 r1107  
    108108); 
    109109$combo_action[__('Change')] = array(); 
     110 
    110111if ($core->auth->check('admin',$core->blog->id)) 
    111112{ 
  • admin/posts.php

    r1102 r1107  
    1515dcPage::check('usage,contentadmin'); 
    1616 
    17 # Getting categories 
    18 try { 
    19      $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    20 } catch (Exception $e) { 
    21      $core->error->add($e->getMessage()); 
    22 } 
    23  
    2417# Getting authors 
    2518try { 
     
    4740{ 
    4841     # Filter form we'll put in html_block 
    49      $users_combo = $categories_combo = array(); 
    50      $users_combo['-'] = $categories_combo['-'] = ''; 
    51      while ($users->fetch()) 
     42     $users_combo = array(); 
     43     $users_combo['-'] = ''; 
     44     foreach ($users as $user) 
    5245     { 
    53           $user_cn = dcUtils::getUserCN($users->user_id,$users->user_name, 
    54           $users->user_firstname,$users->user_displayname); 
     46          $user_cn = dcUtils::getUserCN($user->user_id,$user->user_name, 
     47          $user->user_firstname,$user->user_displayname); 
    5548           
    56           if ($user_cn != $users->user_id) { 
    57                $user_cn .= ' ('.$users->user_id.')'; 
     49          if ($user_cn != $user->user_id) { 
     50               $user_cn .= ' ('.$user->user_id.')'; 
    5851          } 
    5952           
    60           $users_combo[$user_cn] = $users->user_id;  
    61      } 
    62       
    63      $categories_combo[__('None')] = 'NULL'; 
    64      while ($categories->fetch()) { 
    65           $categories_combo[str_repeat('  ',$categories->level-1).($categories->level-1 == 0 ? '' : '• '). 
    66                html::escapeHTML($categories->cat_title). 
    67                ' ('.$categories->nb_post.')'] = $categories->cat_id; 
     53          $users_combo[$user_cn] = $user->user_id;  
    6854     } 
    6955      
     
    8369     # Months array 
    8470     $dt_m_combo['-'] = ''; 
    85      while ($dates->fetch()) { 
    86           $dt_m_combo[dt::str('%B %Y',$dates->ts())] = $dates->year().$dates->month(); 
     71     foreach($dates as $d) { 
     72          $dt_m_combo[dt::str('%B %Y',$d->ts())] = $d->year().$d->month(); 
    8773     } 
    8874      
    8975     $lang_combo['-'] = ''; 
    90      while ($langs->fetch()) { 
    91           $lang_combo[$langs->post_lang] = $langs->post_lang; 
     76     foreach($langs as $l) { 
     77          $lang_combo[$l->post_lang] = $l->post_lang; 
    9278     } 
    9379      
     
    9581     __('Date') => 'post_dt', 
    9682     __('Title') => 'post_title', 
    97      __('Category') => 'cat_title', 
    9883     __('Author') => 'user_id', 
    9984     __('Status') => 'post_status', 
     
    122107     __('Mark as unselected') => 'unselected' 
    123108); 
    124 $combo_action[__('Change')] = array( 
    125      __('Change category') => 'category', 
    126      __('Change language') => 'lang'); 
     109$combo_action[__('Change')] = array(); 
     110 
    127111if ($core->auth->check('admin',$core->blog->id)) 
    128112{ 
     
    141125-------------------------------------------------------- */ 
    142126$user_id = !empty($_GET['user_id']) ?   $_GET['user_id'] : ''; 
    143 $cat_id = !empty($_GET['cat_id']) ?     $_GET['cat_id'] : ''; 
    144127$status = isset($_GET['status']) ? $_GET['status'] : ''; 
    145128$selected = isset($_GET['selected']) ?  $_GET['selected'] : ''; 
     
    170153} else { 
    171154     $user_id=''; 
    172 } 
    173  
    174 # - Categories filter 
    175 if ($cat_id !== '' && in_array($cat_id,$categories_combo)) { 
    176      $params['cat_id'] = $cat_id; 
    177      $show_filters = true; 
    178 } else { 
    179      $cat_id=''; 
    180155} 
    181156 
     
    265240     '<label for="user_id">'.__('Author:'). 
    266241     form::combo('user_id',$users_combo,$user_id).'</label> '. 
    267      '<label for="cat_id">'.__('Category:'). 
    268      form::combo('cat_id',$categories_combo,$cat_id).'</label> '. 
    269242     '<label for="status">'.__('Status:'). 
    270243     form::combo('status',$status_combo,$status).'</label> '. 
     
    307280     '<input type="submit" value="'.__('ok').'" /></p>'. 
    308281     form::hidden(array('user_id'),$user_id). 
    309      form::hidden(array('cat_id'),$cat_id). 
    310282     form::hidden(array('status'),$status). 
    311283     form::hidden(array('selected'),$selected). 
Note: See TracChangeset for help on using the changeset viewer.

Sites map