Changeset 3400:765789715255
- Timestamp:
- 11/09/16 23:27:55 (9 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/blogs.php
r3397 r3400 16 16 17 17 # Filters 18 $status_combo = array_merge( 19 array('-' => ''), 20 dcAdminCombos::getBlogStatusesCombo() 21 ); 22 18 23 $sortby_combo = array( 19 24 __('Last update') => 'blog_upddt', 20 25 __('Blog name') => 'UPPER(blog_name)', 21 __('Blog ID') => 'B.blog_id' 26 __('Blog ID') => 'B.blog_id', 27 __('Status') => 'blog_status' 22 28 ); 23 29 … … 28 34 29 35 $q = !empty($_GET['q']) ? $_GET['q'] : ''; 36 $status = isset($_GET['status']) ? $_GET['status'] : ''; 30 37 $sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'blog_upddt'; 31 38 $order = !empty($_GET['order']) ? $_GET['order'] : 'desc'; … … 47 54 $params['q'] = $q; 48 55 $show_filters = true; 56 } 57 58 # - Status filter 59 if ($status !== '' && in_array($status,$status_combo)) { 60 $params['blog_status'] = $status; 61 $show_filters = true; 62 } else { 63 $status=''; 49 64 } 50 65 … … 108 123 '<p><label for="q" class="ib">'.__('Search:').'</label> '. 109 124 form::field('q',20,255,html::escapeHTML($q)).'</p>'. 125 '<p><label for="status" class="ib">'.__('Status:').'</label> '. 126 form::combo('status',$status_combo,$status).'</p>'. 110 127 '</div>'. 111 128 -
inc/core/class.dc.core.php
r3269 r3400 1015 1015 } elseif (!$this->auth->userID()) { 1016 1016 $where = 'AND blog_status IN (1,0) '; 1017 } 1018 1019 if (!empty($params['blog_status']) && $this->auth->isSuperAdmin()) { 1020 $where = 'AND blog_status = '.(integer) $params['blog_status'].' '; 1017 1021 } 1018 1022
Note: See TracChangeset
for help on using the changeset viewer.