Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
Sioweb committed Dec 7, 2017
1 parent 6921cfe commit be29aae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ContaoManager/Plugin.php
Expand Up @@ -22,7 +22,7 @@ public function getBundles(ParserInterface $parser)
return [
BundleConfig::create('Sioweb\DownloadFolderBundle\SiowebDownloadFolderBundle')
->setLoadAfter(['Contao\CoreBundle\ContaoCoreBundle'])
->setReplace(['siowebDownloadFolder']),
->setReplace(['downloadfolder']),
];
}
}
8 changes: 6 additions & 2 deletions src/Resources/contao/elements/DownloadFolder.php
Expand Up @@ -7,6 +7,7 @@

namespace Sioweb;
use Contao;
use Contao\System;

/**
* @file DownloadFolder.php
Expand Down Expand Up @@ -100,13 +101,16 @@ protected function compile() {
$allowedDownload = trimsplit(',', strtolower($GLOBALS['TL_CONFIG']['allowedDownload']));

if(!is_dir($downloadPath)) {
$this->log('Try to Zip files, can\'t find folder \'dowloads\' in '.TL_ROOT.'/assets/downloads/',false,false);
System::log('Try to Zip files, can\'t find folder \'dowloads\' in '.TL_ROOT.'/assets/downloads/','compile ZIP-Download',false);
return false;
}
if(!$this->downloadFileTitle) {
$this->log('No downloadfile-title found, please add a filename.',false,false);
System::log('No downloadfile-title found, please add a filename.','compile ZIP-Download',false);
return false;
}
echo rand(1,10000);
die();


// Get all files
while($objFiles->next()) {
Expand Down

0 comments on commit be29aae

Please sign in to comment.