Dotclear

Changeset 3117:6f7f1a16d59a


Ignore:
Timestamp:
10/18/15 17:01:05 (10 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add Opened/Closed? comments and Opened/Closed? trackbacks filters for posts management, closes #2140

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/posts.php

    r3105 r3117  
    7878     ); 
    7979 
     80     $comment_combo = array( 
     81     '-' => '', 
     82     __('Opened') => '1', 
     83     __('Closed') => '0' 
     84     ); 
     85 
     86     $trackback_combo = array( 
     87     '-' => '', 
     88     __('Opened') => '1', 
     89     __('Closed') => '0' 
     90     ); 
     91 
    8092     $attachment_combo = array( 
    8193     '-' => '', 
     
    146158$password = isset($_GET['password']) ? $_GET['password'] : ''; 
    147159$selected = isset($_GET['selected']) ? $_GET['selected'] : ''; 
     160$comment = isset($_GET['comment']) ? $_GET['comment'] : ''; 
     161$trackback = isset($_GET['trackback']) ? $_GET['trackback'] : ''; 
    148162$attachment = isset($_GET['attachment']) ? $_GET['attachment'] : ''; 
    149163$month = !empty($_GET['month']) ? $_GET['month'] : ''; 
     
    207221} else { 
    208222     $selected=''; 
     223} 
     224 
     225# - Comment filter 
     226if ($comment !== '' && in_array($comment,$comment_combo)) { 
     227     $params['where'] .= " AND post_open_comment = '".$comment."' "; 
     228     $show_filters = true; 
     229} else { 
     230     $comment=''; 
     231} 
     232 
     233# - Comment filter 
     234if ($trackback !== '' && in_array($trackback,$trackback_combo)) { 
     235     $params['where'] .= " AND post_open_tb = '".$trackback."' "; 
     236     $show_filters = true; 
     237} else { 
     238     $trackback=''; 
    209239} 
    210240 
     
    326356     '<p><label for="lang" class="ib">'.__('Lang:').'</label> '. 
    327357     form::combo('lang',$lang_combo,$lang).'</p> '. 
     358     '<p><label for="comment" class="ib">'.__('Comments:').'</label> '. 
     359     form::combo('comment',$comment_combo,$comment).'</p>'. 
     360     '<p><label for="trackback" class="ib">'.__('Trackbacks:').'</label> '. 
     361     form::combo('trackback',$trackback_combo,$trackback).'</p>'. 
    328362     '</div>'. 
    329363 
     
    361395     form::hidden(array('password'),$password). 
    362396     form::hidden(array('selected'),$selected). 
     397     form::hidden(array('comment'),$comment). 
     398     form::hidden(array('trackback'),$trackback). 
    363399     form::hidden(array('attachment'),$attachment). 
    364400     form::hidden(array('month'),$month). 
  • locales/fr/main.po

    r3112 r3117  
    19741974msgstr "Non sélectionné" 
    19751975 
     1976msgid "Comments:" 
     1977msgstr "Comentaires :" 
     1978 
     1979msgid "Trackbacks:" 
     1980msgstr "Rétroliens :" 
     1981 
     1982msgid "Opened" 
     1983msgstr "Ouverts" 
     1984 
     1985msgid "Closed" 
     1986msgstr "Fermés" 
     1987 
    19761988msgid "With attachments" 
    19771989msgstr "Avec annexe(s)" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map