Changeset 28834 for extensions/BatchDownloader
- Timestamp:
- Jun 29, 2014, 4:17:09 PM (10 years ago)
- Location:
- extensions/BatchDownloader
- Files:
-
- 1 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/admin/config.php
r25932 r28834 21 21 'last_clean' => $conf['batch_download']['last_clean'], 22 22 ); 23 $conf['batch_download_comment'] = trim($_POST['archive_comment']);24 23 25 conf_update_param('batch_download', serialize($conf['batch_download']));26 conf_update_param('batch_download_comment', $conf['batch_download_comment']);24 conf_update_param('batch_download', $conf['batch_download']); 25 conf_update_param('batch_download_comment', trim($_POST['archive_comment']), true); 27 26 28 27 $page['infos'][] = l10n('Information data registered in database'); -
extensions/BatchDownloader/include/BatchDownloader.class.php
r28627 r28834 524 524 else 525 525 { 526 $src_image = new SrcImage($row); // don't give represent ive_ext526 $src_image = new SrcImage($row); // don't give representative_ext 527 527 528 528 // no-image files … … 536 536 { 537 537 $derivative = new DerivativeImage($this->data['size'], $src_image); 538 539 if (!file_exists($derivative->get_path())) 540 { 541 // we shouldn't be here 542 // TODO : generate missing derivative (if generation where not performed) or remove 543 } 538 544 539 545 $zip->addFile($derivative->get_path(), $this->getFilename($row, $filesizes[ $row['id'] ])); … … 577 583 { 578 584 if ($this->conf['one_archive']) $this->updateParam('status', 'done'); 579 $done = true;580 585 581 586 // over estimed 582 587 $this->updateParam('nb_zip', $this->data['last_zip']); 583 588 } 584 585 589 // under estimed 586 if (!isset($done) &&$this->data['status'] != 'done' && $this->data['last_zip'] == $this->data['nb_zip'])590 else if ($this->data['status'] != 'done' && $this->data['last_zip'] == $this->data['nb_zip']) 587 591 { 588 592 $this->updateParam('nb_zip', $this->data['last_zip']+1); -
extensions/BatchDownloader/include/events.inc.php
r25932 r28834 252 252 253 253 $conf['batch_download']['last_clean'] = $time; 254 conf_update_param('batch_download', serialize($conf['batch_download']));254 conf_update_param('batch_download', $conf['batch_download']); 255 255 256 256 // set old sets as done and clean images table -
extensions/BatchDownloader/main.inc.php
r25932 r28834 13 13 global $conf, $prefixeTable; 14 14 15 define d('BATCH_DOWNLOAD_ID') or define('BATCH_DOWNLOAD_ID',basename(dirname(__FILE__)));15 define('BATCH_DOWNLOAD_ID', basename(dirname(__FILE__))); 16 16 define('BATCH_DOWNLOAD_PATH', PHPWG_PLUGINS_PATH . BATCH_DOWNLOAD_ID . '/'); 17 17 define('BATCH_DOWNLOAD_TSETS', $prefixeTable . 'download_sets'); … … 21 21 define('BATCH_DOWNLOAD_ADMIN', get_root_url() . 'admin.php?page=plugin-' . BATCH_DOWNLOAD_ID); 22 22 define('BATCH_DOWNLOAD_PUBLIC', get_absolute_root_url() . make_index_url(array('section' => 'download')) . '/'); 23 define('BATCH_DOWNLOAD_VERSION', 'auto');24 23 25 24 … … 59 58 global $conf; 60 59 61 include_once(BATCH_DOWNLOAD_PATH . 'maintain.inc.php'); 62 $maintain = new BatchDownloader_maintain(BATCH_DOWNLOAD_ID); 63 $maintain->autoUpdate(BATCH_DOWNLOAD_VERSION, 'install'); 64 65 $conf['batch_download'] = unserialize($conf['batch_download']); 60 $conf['batch_download'] = safe_unserialize($conf['batch_download']); 66 61 $conf['batch_download']['file_pattern'] = isset($conf['batch_download_file_pattern']) ? $conf['batch_download_file_pattern'] : '%id%_%filename%_%dimensions%'; 67 62 $conf['batch_download']['allowed_ext'] = $conf['picture_ext'];
Note: See TracChangeset
for help on using the changeset viewer.