Commit 8cbc839f authored by speedprogs_de's avatar speedprogs_de
Browse files

added condition to enable download counter

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/terfe/branches/ter_fe2@52075 735d13b6-9817-0410-8766-e36946ffe9aa
parent 637a4b04
......@@ -268,6 +268,7 @@
}
// Check session if user has already downloaded this file today
if (!empty($this->settings['enableDownloadCounter'])) {
$extensionKey = $version->getExtension()->getExtKey();
$downloads = $this->session->get('downloads');
if (empty($downloads) || !in_array($extensionKey, $downloads)) {
......@@ -279,6 +280,7 @@
$downloads[] = $extensionKey;
$this->session->add('downloads', $downloads);
}
}
// Send file to browser
if (!Tx_TerFe2_Utility_File::transferFile($fileUrl)) {
......
......@@ -21,6 +21,9 @@ plugin.tx_terfe2 {
# cat=TER Frontend/settings/150; type=string; label=Media root path: Media root path for zip files and images
mediaRootPath = fileadmin/extensionFiles/
# cat=TER Frontend/settings/155; type=string; label=Count downloads: Count extension downloads via download action
countDownloads = 0
terConnection {
# cat=TER Frontend/settings/160; type=string; label=TER WSDL URI: WSDL URI to connect TER server
wsdl = http://typo3.org/wsdl/tx_ter_wsdl.php
......
......@@ -10,6 +10,7 @@ plugin.tx_terfe2 {
descriptionLength = {$plugin.tx_terfe2.settings.descriptionLength}
dateFormat = {$plugin.tx_terfe2.settings.dateFormat}
mediaRootPath = {$plugin.tx_terfe2.settings.mediaRootPath}
countDownloads = {$plugin.tx_terfe2.settings.countDownloads}
terConnection {
wsdl = {$plugin.tx_terfe2.settings.terConnection.wsdl}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment