Changeset 2210:591007da831e
- Timestamp:
- 10/02/13 16:33:49 (12 years ago)
- Branch:
- default
- Children:
- 2211:dd80020754f1, 2212:f26730fd9f07
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/search.php
r2166 r2210 15 15 dcPage::check('usage,contentadmin'); 16 16 17 $q = !empty($_ GET['q']) ? $_GET['q'] : (!empty($_GET['qx']) ? $_GET['qx'] : null);18 $qtype = !empty($_ GET['qtype']) ? $_GET['qtype'] : 'p';17 $q = !empty($_REQUEST['q']) ? $_REQUEST['q'] : (!empty($_REQUEST['qx']) ? $_REQUEST['qx'] : null); 18 $qtype = !empty($_REQUEST['qtype']) ? $_REQUEST['qtype'] : 'p'; 19 19 if ($qtype != 'c' && $qtype != 'p') { 20 20 $qtype = 'p'; … … 69 69 } 70 70 71 if ($qtype == 'p') { 72 $posts_actions_page = new dcPostsActionsPage($core,'search.php',array('q'=>$q,'qtype'=>$qtype)); 73 74 if ($posts_actions_page->process()) { 75 return; 76 } 77 } else { 78 $comments_actions_page = new dcCommentsActionsPage($core,'search.php',array('q'=>$q,'qtype'=>$qtype)); 79 80 if ($comments_actions_page->process()) { 81 return; 82 } 83 } 71 84 72 85 dcPage::open(__('Search'),$starting_scripts, … … 95 108 if ($qtype == 'p') 96 109 { 97 # Actions combo box 98 $combo_action = array(); 99 if ($core->auth->check('publish,contentadmin',$core->blog->id)) 100 { 101 $combo_action[__('publish')] = 'publish'; 102 $combo_action[__('unpublish')] = 'unpublish'; 103 $combo_action[__('schedule')] = 'schedule'; 104 $combo_action[__('mark as pending')] = 'pending'; 105 } 106 $combo_action[__('change category')] = 'category'; 107 if ($core->auth->check('admin',$core->blog->id)) { 108 $combo_action[__('change author')] = 'author'; 109 } 110 if ($core->auth->check('delete,contentadmin',$core->blog->id)) 111 { 112 $combo_action[__('Delete')] = 'delete'; 113 } 114 115 # --BEHAVIOR-- adminPostsActionsCombo 116 $core->callBehavior('adminPostsActionsCombo',array(&$combo_action)); 117 110 118 111 if ($counter->f(0) > 0) { 119 112 printf('<h3>'. … … 123 116 124 117 $post_list->display($page,$nb_per_page, 125 '<form action=" posts_actions.php" method="post" id="form-entries">'.118 '<form action="search.php" method="post" id="form-entries">'. 126 119 127 120 '%s'. … … 131 124 132 125 '<p class="col right"><label for="action1" class="classic">'.__('Selected entries action:').'</label> '. 133 form::combo(array('action','action1'),$ combo_action).126 form::combo(array('action','action1'),$posts_actions_page->getCombo()). 134 127 '<input type="submit" value="'.__('ok').'" /></p>'. 135 form::hidden('redir',preg_replace('/%/','%%',$redir)).136 128 $core->formNonce(). 129 $posts_actions_page->getHiddenFields(). 137 130 '</div>'. 138 131 '</form>' … … 143 136 { 144 137 # Actions combo box 145 $combo_action = array();146 if ($core->auth->check('publish,contentadmin',$core->blog->id))147 {148 $combo_action[__('publish')] = 'publish';149 $combo_action[__('unpublish')] = 'unpublish';150 $combo_action[__('mark as pending')] = 'pending';151 $combo_action[__('mark as junk')] = 'junk';152 }153 if ($core->auth->check('delete,contentadmin',$core->blog->id))154 {155 $combo_action[__('Delete')] = 'delete';156 }157 138 158 139 if ($counter->f(0) > 0) { … … 163 144 164 145 $comment_list->display($page,$nb_per_page, 165 '<form action=" comments_actions.php" method="post" id="form-comments">'.146 '<form action="search.php" method="post" id="form-comments">'. 166 147 167 148 '%s'. … … 171 152 172 153 '<p class="col right"><label for="action2" class="classic">'.__('Selected comments action:').'</label> '. 173 form::combo(array('action','action2'),$com bo_action).154 form::combo(array('action','action2'),$comments_actions_page->getCombo()). 174 155 '<input type="submit" value="'.__('ok').'" /></p>'. 175 form::hidden('redir',preg_replace('/%/','%%',$redir)).176 156 $core->formNonce(). 157 $comments_actions_page->getHiddenFields(). 177 158 '</div>'. 178 159 '</form>'
Note: See TracChangeset
for help on using the changeset viewer.