Changeset 2309:850b5f27bcad
- Timestamp:
- 10/08/13 00:15:04 (12 years ago)
- Branch:
- default
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/posts.php
r2305 r2309 76 76 ); 77 77 78 $attachment_combo = array( 79 '-' => '', 80 __('With attachments') => '1', 81 __('Without attachments') => '0' 82 ); 83 78 84 # Months array 79 85 $dt_m_combo = array_merge( … … 118 124 $status = isset($_GET['status']) ? $_GET['status'] : ''; 119 125 $selected = isset($_GET['selected']) ? $_GET['selected'] : ''; 126 $attachment = isset($_GET['attachment']) ? $_GET['attachment'] : ''; 120 127 $month = !empty($_GET['month']) ? $_GET['month'] : ''; 121 128 $lang = !empty($_GET['lang']) ? $_GET['lang'] : ''; … … 168 175 } else { 169 176 $selected=''; 177 } 178 179 # - Selected filter 180 if ($attachment !== '' && in_array($attachment,$attachment_combo)) { 181 $params['media'] = $attachment; 182 $show_filters = true; 183 } else { 184 $attachment=''; 170 185 } 171 186 … … 260 275 '<p><label for="selected" class="ib">'.__('Selected:').'</label> '. 261 276 form::combo('selected',$selected_combo,$selected).'</p>'. 277 '<p><label for="attachment" class="ib">'.__('Attachments:').'</label> '. 278 form::combo('attachment',$attachment_combo,$attachment).'</p>'. 262 279 '<p><label for="month" class="ib">'.__('Month:').'</label> '. 263 280 form::combo('month',$dt_m_combo,$month).'</p>'. … … 298 315 form::hidden(array('status'),$status). 299 316 form::hidden(array('selected'),$selected). 317 form::hidden(array('attachment'),$attachment). 300 318 form::hidden(array('month'),$month). 301 319 form::hidden(array('lang'),$lang). -
inc/admin/actions/class.dcactionposts.php
r2181 r2309 17 17 parent::__construct($core,$uri,$redirect_args); 18 18 $this->redirect_fields = array('user_id','cat_id','status', 19 'selected',' month','lang','sortby','order','page','nb');19 'selected','attachment','month','lang','sortby','order','page','nb'); 20 20 $this->loadDefaults(); 21 21 } -
inc/core/class.dc.blog.php
r2073 r2309 806 806 'INNER JOIN '.$this->prefix.'user U ON U.user_id = P.user_id '. 807 807 'LEFT OUTER JOIN '.$this->prefix.'category C ON P.cat_id = C.cat_id '; 808 809 if (isset($params['media'])) { 810 if ($params['media'] == '0') { 811 $strReq .= 'LEFT OUTER JOIN '.$this->prefix.'post_media M on P.post_id = M.post_id '; 812 } else { 813 $strReq .= 'INNER JOIN '.$this->prefix.'post_media M on P.post_id = M.post_id '; 814 } 815 } 808 816 809 817 if (!empty($params['from'])) { … … 937 945 } 938 946 947 if (isset($params['media'])) { 948 if ($params['media'] == '0') { 949 $strReq .= ' AND M.post_id IS NULL '; 950 } 951 } 952 939 953 if (!empty($params['sql'])) { 940 954 $strReq .= $params['sql'].' '; 941 955 } 942 956 957 if (!$count_only && isset($params['media'])) { 958 $strReq .= ' GROUP BY P.post_id '; 959 } 960 943 961 if (!$count_only) 944 962 { … … 957 975 return $strReq; 958 976 } 959 977 960 978 $rs = $this->con->select($strReq); 961 979 $rs->core = $this->core; -
locales/fr/main.po
r2307 r2309 4039 4039 msgid "Number of trackbacks" 4040 4040 msgstr "Nombre de rétroliens" 4041 4042 msgid "Attachments:" 4043 msgstr "Annexes :" 4044 4045 msgid "With attachments" 4046 msgstr "Avec annexe(s)" 4047 4048 msgid "Without attachments" 4049 msgstr "Sans annexes"
Note: See TracChangeset
for help on using the changeset viewer.