Changeset 3874:ab8368569446 for admin/comments.php
- Timestamp:
- 09/14/18 12:16:17 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/comments.php
r3731 r3874 25 25 # Filter form we'll put in html_block 26 26 $status_combo = array_merge( 27 array('-' => ''),27 ['-' => ''], 28 28 dcAdminCombos::getCommentStatusescombo() 29 29 ); 30 30 31 $type_combo = array(31 $type_combo = [ 32 32 '-' => '', 33 33 __('Comment') => 'co', 34 34 __('Trackback') => 'tb' 35 );36 37 $sortby_combo = array(35 ]; 36 37 $sortby_combo = [ 38 38 __('Date') => 'comment_dt', 39 39 __('Entry title') => 'post_title', … … 41 41 __('Author') => 'comment_author', 42 42 __('Status') => 'comment_status' 43 );44 45 $sortby_lex = array(43 ]; 44 45 $sortby_lex = [ 46 46 // key in sorty_combo (see above) => field in SQL request 47 47 'post_title' => 'post_title', 48 48 'comment_author' => 'comment_author', 49 'comment_spam_filter' => 'comment_spam_filter' );50 51 $order_combo = array(49 'comment_spam_filter' => 'comment_spam_filter']; 50 51 $order_combo = [ 52 52 __('Descending') => 'desc', 53 53 __('Ascending') => 'asc' 54 );54 ]; 55 55 56 56 /* Get comments … … 79 79 } 80 80 81 $params['limit'] = array((($page - 1) * $nb_per_page), $nb_per_page);81 $params['limit'] = [(($page - 1) * $nb_per_page), $nb_per_page]; 82 82 $params['no_content'] = true; 83 83 … … 155 155 156 156 # Actions combo box 157 $combo_action = array();157 $combo_action = []; 158 158 $default = ''; 159 159 if ($core->auth->check('delete,contentadmin', $core->blog->id) && $status == -2) { … … 183 183 dcPage::jsLoad('js/_comments.js') . dcPage::jsFilterControl($show_filters), 184 184 dcPage::breadcrumb( 185 array(185 [ 186 186 html::escapeHTML($core->blog->name) => '', 187 187 __('Comments and trackbacks') => '' 188 ))188 ]) 189 189 ); 190 190 if (!empty($_GET['upd'])) { … … 200 200 } 201 201 202 $spam_count = $core->blog->getComments( array('comment_status' => -2), true)->f(0);202 $spam_count = $core->blog->getComments(['comment_status' => -2], true)->f(0); 203 203 if ($spam_count > 0) { 204 204 … … 209 209 if ($spam_count == 1) { 210 210 echo '<p>' . sprintf(__('You have one spam comment.'), '<strong>' . $spam_count . '</strong>') . ' ' . 211 '<a href="' . $core->adminurl->get("admin.comments", array('status' => -2)) . '">' . __('Show it.') . '</a></p>';211 '<a href="' . $core->adminurl->get("admin.comments", ['status' => -2]) . '">' . __('Show it.') . '</a></p>'; 212 212 } elseif ($spam_count > 1) { 213 213 echo '<p>' . sprintf(__('You have %s spam comments.'), '<strong>' . $spam_count . '</strong>') . ' ' . 214 '<a href="' . $core->adminurl->get("admin.comments", array('status' => -2)) . '">' . __('Show them.') . '</a></p>';214 '<a href="' . $core->adminurl->get("admin.comments", ['status' => -2]) . '">' . __('Show them.') . '</a></p>'; 215 215 } 216 216 } … … 278 278 '<p class="col right"><label for="action" class="classic">' . __('Selected comments action:') . '</label> ' . 279 279 form::combo('action', $comments_actions_page->getCombo(), 280 array('default' => $default, 'extra_html' => 'title="' . __('Actions') . '"')) .280 ['default' => $default, 'extra_html' => 'title="' . __('Actions') . '"']) . 281 281 $core->formNonce() . 282 282 '<input id="do-action" type="submit" value="' . __('ok') . '" /></p>' . 283 form::hidden( array('type'), $type) .284 form::hidden( array('sortby'), $sortby) .285 form::hidden( array('order'), $order) .286 form::hidden( array('author'), html::escapeHTML(preg_replace('/%/', '%%', $author))) .287 form::hidden( array('status'), $status) .288 form::hidden( array('ip'), preg_replace('/%/', '%%', $ip)) .289 form::hidden( array('page'), $page) .290 form::hidden( array('nb'), $nb_per_page) .291 form::hidden( array('email'), html::escapeHTML(preg_replace('/%/', '%%', $email))) .292 form::hidden( array('site'), html::escapeHTML(preg_replace('/%/', '%%', $site))) .283 form::hidden(['type'], $type) . 284 form::hidden(['sortby'], $sortby) . 285 form::hidden(['order'], $order) . 286 form::hidden(['author'], html::escapeHTML(preg_replace('/%/', '%%', $author))) . 287 form::hidden(['status'], $status) . 288 form::hidden(['ip'], preg_replace('/%/', '%%', $ip)) . 289 form::hidden(['page'], $page) . 290 form::hidden(['nb'], $nb_per_page) . 291 form::hidden(['email'], html::escapeHTML(preg_replace('/%/', '%%', $email))) . 292 form::hidden(['site'], html::escapeHTML(preg_replace('/%/', '%%', $site))) . 293 293 '</div>' . 294 294
Note: See TracChangeset
for help on using the changeset viewer.