Changeset 29378 for extensions


Ignore:
Timestamp:
Sep 1, 2014, 8:46:53 PM (10 years ago)
Author:
plg
Message:

compatibility Piwigo 2.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/batch_manager_added_by/main.inc.php

    r26742 r29378  
    7474}
    7575
    76 add_event_handler('loc_begin_element_set_global', 'bmab_perform_filter', 50, 2);
    77 function bmab_perform_filter()
     76add_event_handler('batch_manager_register_filters', 'bmab_register_filter', 50, 2);
     77function bmab_register_filter()
    7878{
    7979  global $page;
     
    8484    $_SESSION['bulk_manager_filter']['added_by'] = $_POST['filter_added_by'];
    8585  }
     86}
    8687
     88add_event_handler('batch_manager_perform_filters', 'bmab_perform_filter');
     89function bmab_perform_filter($filter_sets)
     90{
    8791  if (isset($_SESSION['bulk_manager_filter']['added_by']))
    8892  {
     
    9397  WHERE added_by = '.$_SESSION['bulk_manager_filter']['added_by'].'
    9498;';
    95     if (empty($page['cat_elements_id']))
    96     {
    97       $page['cat_elements_id'] = array_from_query($query, 'id');
    98     }
    99     else
    100     {
    101       $page['cat_elements_id'] = array_intersect($page['cat_elements_id'], array_from_query($query, 'id'));
    102     }
     99    $filter_sets[] = array_from_query($query, 'id');
    103100  }
     101
     102  return $filter_sets;
    104103}
    105104?>
Note: See TracChangeset for help on using the changeset viewer.