Dotclear

Changeset 2309:850b5f27bcad for admin


Ignore:
Timestamp:
10/08/13 00:15:04 (12 years ago)
Author:
Eve Le Cellier <linux@…>
Branch:
default
Message:

Add attachment filter for post list, see ticket #989 -- thanks Franck for the patch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/posts.php

    r2305 r2309  
    7676     ); 
    7777      
     78     $attachment_combo = array( 
     79     '-' => '', 
     80     __('With attachments') => '1', 
     81     __('Without attachments') => '0' 
     82     ); 
     83 
    7884     # Months array 
    7985     $dt_m_combo = array_merge( 
     
    118124$status = isset($_GET['status']) ? $_GET['status'] : ''; 
    119125$selected = isset($_GET['selected']) ?  $_GET['selected'] : ''; 
     126$attachment = isset($_GET['attachment']) ?   $_GET['attachment'] : ''; 
    120127$month = !empty($_GET['month']) ?       $_GET['month'] : ''; 
    121128$lang = !empty($_GET['lang']) ?         $_GET['lang'] : ''; 
     
    168175} else { 
    169176     $selected=''; 
     177} 
     178 
     179# - Selected filter 
     180if ($attachment !== '' && in_array($attachment,$attachment_combo)) { 
     181     $params['media'] = $attachment; 
     182     $show_filters = true; 
     183} else { 
     184     $attachment=''; 
    170185} 
    171186 
     
    260275     '<p><label for="selected" class="ib">'.__('Selected:').'</label> '. 
    261276     form::combo('selected',$selected_combo,$selected).'</p>'. 
     277     '<p><label for="attachment" class="ib">'.__('Attachments:').'</label> '. 
     278     form::combo('attachment',$attachment_combo,$attachment).'</p>'. 
    262279     '<p><label for="month" class="ib">'.__('Month:').'</label> '. 
    263280     form::combo('month',$dt_m_combo,$month).'</p>'. 
     
    298315     form::hidden(array('status'),$status). 
    299316     form::hidden(array('selected'),$selected). 
     317     form::hidden(array('attachment'),$attachment). 
    300318     form::hidden(array('month'),$month). 
    301319     form::hidden(array('lang'),$lang). 
Note: See TracChangeset for help on using the changeset viewer.

Sites map