diff options
| author | Christian Fowler <spider@viovio.com> | 2009-03-30 03:26:08 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2009-03-30 03:26:08 +0000 |
| commit | ebf49a3eeaa6365b0933fc305f6a80a41b0b76ad (patch) | |
| tree | 61e913dbad986532e10a0f6429e83f7f819163aa | |
| parent | a1035cf2a9ad327effda13325b1a135dae016410 (diff) | |
| download | liberty-ebf49a3eeaa6365b0933fc305f6a80a41b0b76ad.tar.gz liberty-ebf49a3eeaa6365b0933fc305f6a80a41b0b76ad.tar.bz2 liberty-ebf49a3eeaa6365b0933fc305f6a80a41b0b76ad.zip | |
pass $this down to the mime plugins for $pStoreHash["this"] = $this; use $pStoreRow[this]->getStorageBranch so overridden methods are properly invoked
| -rw-r--r-- | LibertyMime.php | 4 | ||||
| -rw-r--r-- | plugins/mime.default.php | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/LibertyMime.php b/LibertyMime.php index 3e708ce..9ee4da9 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.43 2009/02/22 11:30:22 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyMime.php,v 1.44 2009/03/30 03:26:08 spiderr Exp $ */ /** @@ -176,6 +176,8 @@ class LibertyMime extends LibertyAttachable { function pluginStore( &$pStoreHash, $pGuid, $pUpdate = FALSE ) { global $gLibertySystem; if( !empty( $pStoreHash ) && $verify_function = $gLibertySystem->getPluginFunction( $pGuid, 'verify_function' )) { + // pass along a pointer to the content object + $pStoreHash['this'] = &$this; // verify the uploaded file using the plugin if( $verify_function( $pStoreHash )) { if( $process_function = $gLibertySystem->getPluginFunction( $pGuid, (( $pUpdate ) ? 'update_function' : 'store_function' ))) { diff --git a/plugins/mime.default.php b/plugins/mime.default.php index cd1f463..b852b3c 100644 --- a/plugins/mime.default.php +++ b/plugins/mime.default.php @@ -1,9 +1,9 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_liberty/plugins/mime.default.php,v 1.47 2009/03/25 23:38:21 tekimaki_admin Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_liberty/plugins/mime.default.php,v 1.48 2009/03/30 03:26:08 spiderr Exp $ * * @author xing <xing@synapse.plus.com> - * @version $Revision: 1.47 $ + * @version $Revision: 1.48 $ * created Thursday May 08, 2008 * @package liberty * @subpackage liberty_mime_handler @@ -112,7 +112,7 @@ if( !function_exists( 'mime_default_verify' )) { // Store all uploaded files in the users storage area if( empty( $pStoreRow['upload']['dest_path'] )) { - $pStoreRow['upload']['dest_path'] = LibertyMime::getStorageBranch( $pStoreRow['attachment_id'], $pStoreRow['user_id'], LibertyMime::getStorageSubDirName( $pStoreRow['upload'] )); + $pStoreRow['upload']['dest_path'] = $pStoreRow['this']->getStorageBranch( $pStoreRow['attachment_id'], $pStoreRow['user_id'], $pStoreRow['this']->getStorageSubDirName( $pStoreRow['upload'] )); } $ret = TRUE; |
