Dotclear

Changeset 2655 for plugins/dcLog


Ignore:
Timestamp:
09/21/10 12:32:47 (13 years ago)
Author:
Tomtom33
Message:

dcLog 1.0.1:

  • Handled dcLog changes (revision 3273 of Dotclear dev)
  • Added Support of multiple criteria filter
  • Added component filter
Location:
plugins/dcLog
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcLog/_define.php

    r2229 r2655  
    1616          /* Description*/         "Displays Dotclear logs", 
    1717          /* Author */             "Tomtom (http://blog.zenstyle.fr)", 
    18           /* Version */            '1.0' 
     18          /* Version */            '1.0.1' 
    1919); 
    2020 
  • plugins/dcLog/index.php

    r2229 r2655  
    2020$status        = isset($_GET['status']) ? $_GET['status'] : null; 
    2121# filter initialisation 
    22 $blog_id       = isset($_GET['blog_id']) ? $_GET['blog_id'] : 'all'; 
    23 $user_id       = isset($_GET['user_id']) ? $_GET['user_id'] : ''; 
    24 $table         = isset($_GET['table']) ? $_GET['table'] : ''; 
    25 $ip            = isset($_GET['ip']) ? $_GET['ip'] : ''; 
     22$blog_id       = isset($_GET['blog_id']) ? $_GET['blog_id'] : null; 
     23$user_id       = isset($_GET['user_id']) ? $_GET['user_id'] : null; 
     24$table         = isset($_GET['table']) ? $_GET['table'] : null; 
     25$ip            = isset($_GET['ip']) ? $_GET['ip'] : null; 
    2626$nb            = isset($_GET['nb']) ? $_GET['nb'] : 20; 
    2727# form initialisation 
     
    4343 
    4444# Gets logs & prepares display object 
    45 $params = array('blog_id' => $blog_id,'user_id' => $user_id,'log_table' => $table,'log_ip' => $ip); 
     45$params = array( 
     46     'blog_id' => $blog_id, 
     47     'user_id' => !is_null($user_id) && $user_id !== '' ? explode(',',$user_id) : $user_id, 
     48     'log_table' => !is_null($table) && $table !== '' ? explode(',',$table) : $table, 
     49     'log_ip' => !is_null($ip) && $ip !== '' ? explode(',',$ip) : $ip 
     50); 
    4651$l_rs = $core->log->getLogs($params); 
    4752$l_nb = $l_rs->count(); 
     
    8287$blogs = $core->getBlogs(); 
    8388while ($blogs->fetch()) { 
    84      $combo_blog[$blogs->blog_name] = $blogs->blog_id; 
     89     $combo_blog[sprintf('%s (%s)',$blogs->blog_name,$blogs->blog_id)] = $blogs->blog_id; 
    8590} 
    8691 
     
    97102     '<p><label>'.__('User:'). 
    98103     form::field('user_id',20,50,$user_id).'</label></p>'. 
     104     '<p><label class="classic">'. form::field('nb',3,3,$nb).' '. 
     105     __('Logs per page').'</label>&nbsp;'. 
     106     '<input type="submit" value="'.__('filter').'" /></p>'. 
    99107     '</div><div class="col">'. 
    100108     '<p><label>'.__('IP:'). 
    101109     form::field('ip',20,50,$ip).'</label></p>'. 
    102      '<p><label class="classic">'. form::field('nb',3,3,$nb).' '. 
    103      __('Logs per page').'</label><p>'. 
    104      '<p><input type="submit" value="'.__('filter').'" /></p>'. 
     110     '<p><label>'.__('Component:'). 
     111     form::field('table',20,50,$table).'</label></p>'. 
    105112     '</div></div>'. 
    106113     '<br class="clear" />'. //Opera sucks 
Note: See TracChangeset for help on using the changeset viewer.

Sites map