Changeset 3033:5691f5e1ccc6
- Timestamp:
- 07/03/15 13:14:05 (10 years ago)
- Branch:
- default
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/posts.php
r3031 r3033 82 82 ); 83 83 84 $password_combo = array( 85 '-' => '', 86 __('With password') => '1', 87 __('Without password') => '0' 88 ); 89 84 90 # Months array 85 91 $dt_m_combo = array_merge( … … 91 97 array('-' => ''), 92 98 dcAdminCombos::getLangsCombo($langs,false) 99 ); 100 101 # Post formats 102 $core_formaters = $core->getFormaters(); 103 $available_formats = array(); 104 foreach ($core_formaters as $editor => $formats) { 105 foreach ($formats as $format) { 106 $available_formats[$format] = $format; 107 } 108 } 109 $format_combo = array_merge( 110 array('-' => ''), 111 $available_formats 93 112 ); 94 113 … … 101 120 __('Selected') => 'post_selected', 102 121 __('Number of comments') => 'nb_comment', 103 __('Number of trackbacks') => 'nb_trackback', 104 __('Password') => 'post_password' 122 __('Number of trackbacks') => 'nb_trackback' 105 123 ); 106 124 … … 121 139 /* Get posts 122 140 -------------------------------------------------------- */ 123 $user_id = !empty($_GET['user_id']) ? $_GET['user_id'] : ''; 124 $cat_id = !empty($_GET['cat_id']) ? $_GET['cat_id'] : ''; 125 $status = isset($_GET['status']) ? $_GET['status'] : ''; 126 $selected = isset($_GET['selected']) ? $_GET['selected'] : ''; 127 $attachment = isset($_GET['attachment']) ? $_GET['attachment'] : ''; 128 $month = !empty($_GET['month']) ? $_GET['month'] : ''; 129 $lang = !empty($_GET['lang']) ? $_GET['lang'] : ''; 141 $user_id = !empty($_GET['user_id']) ? $_GET['user_id'] : ''; 142 $cat_id = !empty($_GET['cat_id']) ? $_GET['cat_id'] : ''; 143 $status = isset($_GET['status']) ? $_GET['status'] : ''; 144 $password = isset($_GET['password']) ? $_GET['password'] : ''; 145 $selected = isset($_GET['selected']) ? $_GET['selected'] : ''; 146 $attachment = isset($_GET['attachment']) ? $_GET['attachment'] : ''; 147 $month = !empty($_GET['month']) ? $_GET['month'] : ''; 148 $lang = !empty($_GET['lang']) ? $_GET['lang'] : ''; 149 $format = !empty($_GET['format']) ? $_GET['format'] : ''; 130 150 $sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'post_dt'; 131 $order = !empty($_GET['order']) ? 151 $order = !empty($_GET['order']) ? $_GET['order'] : 'desc'; 132 152 133 153 $show_filters = false; … … 145 165 $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page); 146 166 $params['no_content'] = true; 167 $params['where'] = ''; 147 168 148 169 # - User filter … … 170 191 } 171 192 193 # - Password filter 194 if ($password !== '' && in_array($password,$password_combo)) { 195 $params['where'] .= ' AND post_password IS '.($password ? 'NOT ' : '').'NULL '; 196 $show_filters = true; 197 } else { 198 $password=''; 199 } 200 172 201 # - Selected filter 173 202 if ($selected !== '' && in_array($selected,$selected_combo)) { … … 178 207 } 179 208 180 # - Selectedfilter209 # - Attachment filter 181 210 if ($attachment !== '' && in_array($attachment,$attachment_combo)) { 182 211 $params['media'] = $attachment; … … 202 231 } else { 203 232 $lang=''; 233 } 234 235 # - Format filter 236 if ($format !== '' && in_array($format,$format_combo)) { 237 $params['where'] .= " AND post_format = '".$format."' "; 238 $show_filters = true; 239 } else { 240 $format=''; 204 241 } 205 242 … … 272 309 '<p><label for="status" class="ib">'.__('Status:').'</label> ' . 273 310 form::combo('status',$status_combo,$status).'</p> '. 311 '<p><label for="format" class="ib">'.__('Format:').'</label> '. 312 form::combo('format',$format_combo,$format).'</p>'. 313 '<p><label for="password" class="ib">'.__('Password:').'</label> '. 314 form::combo('password',$password_combo,$password).'</p>'. 274 315 '</div>'. 275 316 … … 316 357 form::hidden(array('cat_id'),$cat_id). 317 358 form::hidden(array('status'),$status). 359 form::hidden(array('password'),$password). 318 360 form::hidden(array('selected'),$selected). 319 361 form::hidden(array('attachment'),$attachment). -
inc/core/class.dc.blog.php
r2800 r3033 964 964 } 965 965 966 if (!empty($params['where'])) { 967 $strReq .= $params['where'].' '; 968 } 969 966 970 if (!empty($params['sql'])) { 967 971 $strReq .= $params['sql'].' '; -
locales/fr/main.po
r3030 r3033 3651 3651 msgstr "L'erreur suivante a été rencontrée lors de la tentative d'accès à la base de données :" 3652 3652 3653 msgid "With password" 3654 msgstr "Avec mot de passe" 3655 3656 msgid "Without password" 3657 msgstr "Sans mot de passe" 3658 3659 msgid "Format:" 3660 msgstr "Format :" 3661 3653 3662 #~ msgid "visual" 3654 3663 #~ msgstr "visuel"
Note: See TracChangeset
for help on using the changeset viewer.