Changeset 23774 for extensions/download_counter
- Timestamp:
- Jul 4, 2013, 9:45:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/download_counter/main.inc.php
r23743 r23774 116 116 return $content; 117 117 } 118 119 /** 120 * increase counter of each photo inside a batch download 121 */ 122 add_event_handler('batchdownload_end_zip', 'dlcount_batchdownload', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 123 function dlcount_batchdownload($data, $images) 124 { 125 if (count($images) > 0) 126 { 127 $query = ' 128 UPDATE '.IMAGES_TABLE.' 129 SET download_counter = download_counter + 1 130 WHERE id IN ('.implode(',', $images).') 131 ;'; 132 pwg_query($query); 133 } 134 } 118 135 ?>
Note: See TracChangeset
for help on using the changeset viewer.