Dotclear


Ignore:
Timestamp:
02/08/12 23:10:39 (13 years ago)
Author:
Dsls <dsls@…>
Branch:
2.4
Message:

Far cleaner this way...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/comments.php

    r795 r796  
    4545/* Get comments 
    4646-------------------------------------------------------- */ 
    47 $author = isset($_GET['author']) ? html::escapeHTML($_GET['author']) : ''; 
    48 $status = isset($_GET['status']) ?      html::escapeHTML($_GET['status']) : ''; 
    49 $type = !empty($_GET['type']) ?         html::escapeHTML($_GET['type']) : ''; 
    50 $sortby = !empty($_GET['sortby']) ?     html::escapeHTML($_GET['sortby']) : 'comment_dt'; 
    51 $order = !empty($_GET['order']) ?       html::escapeHTML($_GET['order']) : 'desc'; 
    52 $ip = !empty($_GET['ip']) ?             html::escapeHTML($_GET['ip']) : ''; 
     47$author = isset($_GET['author']) ? $_GET['author'] : ''; 
     48$status = isset($_GET['status']) ?      $_GET['status'] : ''; 
     49$type = !empty($_GET['type']) ?         $_GET['type'] : ''; 
     50$sortby = !empty($_GET['sortby']) ?     $_GET['sortby'] : 'comment_dt'; 
     51$order = !empty($_GET['order']) ?       $_GET['order'] : 'desc'; 
     52$ip = !empty($_GET['ip']) ?             $_GET['ip'] : ''; 
    5353 
    5454$with_spam = $author || $status || $type || $sortby != 'comment_dt' || $order != 'desc' || $ip; 
     
    7373     $params['q_author'] = $author; 
    7474     $show_filters = true; 
     75} else { 
     76     $author=''; 
    7577} 
    7678 
     
    7981     $params['comment_trackback'] = ($type == 'tb'); 
    8082     $show_filters = true; 
     83} else { 
     84     $type=''; 
    8185} 
    8286 
     
    8791} elseif (!$with_spam) { 
    8892     $params['comment_status_not'] = -2; 
     93     $status=''; 
     94} else { 
     95     $status=''; 
    8996} 
    9097 
     
    99106     if ($order !== '' && in_array($order,$order_combo)) { 
    100107          $params['order'] = $sortby.' '.$order; 
     108     } else { 
     109          $order = 'desc'; 
    101110     } 
    102111      
     
    104113          $show_filters = true; 
    105114     } 
     115} else { 
     116     $sortby = 'comment_dt'; 
     117     $order = 'desc'; 
    106118} 
    107119 
Note: See TracChangeset for help on using the changeset viewer.

Sites map