summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2008-12-08 09:02:34 +0000
committerMax Kremmel <xing@synapse.plus.com>2008-12-08 09:02:34 +0000
commit257822968236b494dfddce3fb1187bca76a1fe12 (patch)
tree292979b821e1bc37eb95a67c7870890904ac2b6b
parentadc7089ad92a24da99a0ab1ae3c67c5451837c00 (diff)
downloadliberty-257822968236b494dfddce3fb1187bca76a1fe12.tar.gz
liberty-257822968236b494dfddce3fb1187bca76a1fe12.tar.bz2
liberty-257822968236b494dfddce3fb1187bca76a1fe12.zip
use 'mime' instead of 'TRUE' and use more descriptive method name adding adding download hit count
-rw-r--r--LibertyMime.php4
-rw-r--r--download_file.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/LibertyMime.php b/LibertyMime.php
index dec8c4a..ff5cd4b 100644
--- a/LibertyMime.php
+++ b/LibertyMime.php
@@ -3,7 +3,7 @@
* Manages liberty Uploads
*
* @package liberty
- * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyMime.php,v 1.40 2008/12/02 15:47:35 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyMime.php,v 1.41 2008/12/08 09:02:34 squareing Exp $
*/
/**
@@ -310,7 +310,7 @@ class LibertyMime extends LibertyAttachable {
* @return adodb query result or FALSE
* @note we're abusing the hits column for download count.
*/
- function addDownload( $pAttachmentId = NULL ) {
+ function addDownloadHit( $pAttachmentId = NULL ) {
global $gBitUser, $gBitSystem;
if( @BitBase::verifyId( $pAttachmentId ) && $attachment = LibertyMime::getAttachment( $pAttachmentId )) {
if( !$gBitUser->isRegistered() || ( $gBitUser->isRegistered() && $gBitUser->mUserId != $attachment['user_id'] )) {
diff --git a/download_file.php b/download_file.php
index 87c49b6..99c8abf 100644
--- a/download_file.php
+++ b/download_file.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_liberty/download_file.php,v 1.5 2008/12/04 09:37:19 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_liberty/download_file.php,v 1.6 2008/12/08 09:02:34 squareing Exp $
*
* @author xing <xing@synapse.plus.com>
* @package treasury
@@ -23,9 +23,9 @@ $gContent = LibertyBase::getLibertyObject( $attachment['content_id'] );
$gContent->verifyViewPermission();
$gBitSmarty->assign( 'gContent', $gContent );
-if( $download_function = $gLibertySystem->getPluginFunction( $attachment['attachment_plugin_guid'], 'download_function', TRUE )) {
+if( $download_function = $gLibertySystem->getPluginFunction( $attachment['attachment_plugin_guid'], 'download_function', 'mime' )) {
if( $download_function( $attachment )) {
- LibertyMime::addDownload( $attachment['attachment_id'] );
+ LibertyMime::addDownloadHit( $attachment['attachment_id'] );
die;
} else {
if( !empty( $attachment['errors'] )) {