Ignore:
Timestamp:
Jun 18, 2014, 9:51:42 PM (10 years ago)
Author:
rvelices
Message:

since number of accepted args not required for add_event_handler, simplify calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_history.inc.php

    r28587 r28714  
    7272    $search['image_ids'] = array_from_query($query, 'id');
    7373  }
    74  
     74
    7575  // echo '<pre>'; print_r($search); echo '</pre>';
    76  
     76
    7777  $clauses = array();
    7878
     
    9090  {
    9191    $local_clauses = array();
    92    
     92
    9393    foreach ($types as $type) {
    9494      if (in_array($type, $search['fields']['types'])) {
     
    102102          $clause.= "= '".$type."'";
    103103        }
    104        
     104
    105105        $local_clauses[] = $clause;
    106106      }
    107107    }
    108    
     108
    109109    if (count($local_clauses) > 0)
    110110    {
     
    123123    $clauses[] = 'image_id = '.$search['fields']['image_id'];
    124124  }
    125  
     125
    126126  if (isset($search['fields']['filename']))
    127127  {
     
    141141    $clauses[] = 'IP LIKE "'.$search['fields']['ip'].'"';
    142142  }
    143  
     143
    144144  $clauses = prepend_append_array_items($clauses, '(', ')');
    145145
     
    149149      $clauses
    150150      );
    151  
     151
    152152  $query = '
    153153SELECT
     
    177177}
    178178
    179 add_event_handler('get_history', 'get_history', EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
     179add_event_handler('get_history', 'get_history');
    180180trigger_notify('functions_history_included');
    181181
Note: See TracChangeset for help on using the changeset viewer.