Ignore:
Timestamp:
Jul 4, 2013, 7:29:34 PM (11 years ago)
Author:
mistic100
Message:

add two triggers batchdownload_get_set_info and batchdownload_init_zip

Location:
extensions/BatchDownloader/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/BatchDownloader/include/BatchDownloader.class.php

    r23591 r23771  
    457457     
    458458      $this->updateParam('date_creation', date('Y-m-d H:i:s'));
     459     
     460      trigger_action('batchdownload_init_zip', $this->data, $this->images);
    459461    }
    460462   
  • extensions/BatchDownloader/include/events.inc.php

    r23760 r23771  
    8989    $set = get_set_info_from_page();
    9090   
    91     if ($set !== false)
    92     {
    93       $BatchDownloader = new BatchDownloader('new', $page['items'], $set['type'], $set['id'], $set['size']);
     91    if ($set !== false && count($set['items']))
     92    {
     93      $BatchDownloader = new BatchDownloader('new', $set['items'], $set['type'], $set['id'], $set['size']);
    9494     
    9595      if ($BatchDownloader->getParam('nb_images') != 0)
  • extensions/BatchDownloader/include/functions.inc.php

    r23321 r23771  
    6363  }
    6464 
    65   return array(
     65  $set = array(
    6666    'type' => $batch_type,
    6767    'id' => $batch_id,
    6868    'size' => !empty($_GET['down_size']) ? $_GET['down_size'] : 'original',
     69    'items' => $page['items'],
    6970    );
     71   
     72  return trigger_event('batchdownload_get_set_info', $set);
    7073}
    7174
Note: See TracChangeset for help on using the changeset viewer.