summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-06-16 07:34:46 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-06-16 07:34:46 +0000
commitea566642fec841655a25a39f3f82aa45eb35248a (patch)
tree697abc87acf764b30413c6d14b5950efad896b19
parentec5e9f826979167903edfd60e8ee56f04bb30312 (diff)
downloadliberty-ea566642fec841655a25a39f3f82aa45eb35248a.tar.gz
liberty-ea566642fec841655a25a39f3f82aa45eb35248a.tar.bz2
liberty-ea566642fec841655a25a39f3f82aa45eb35248a.zip
remove common_storage_plugin stuff completely. recent modificaions would have rendered plugin selection in LAtt non-functional - this hasn't been in use yet so we'll remove it. also change the order of plugins chosen in LibertyAttachmnt. when we upload a regular file, the fisheye plugin should NOT be the one we pick first due to its dependence on fisheye.
-rw-r--r--LibertyAttachable.php25
-rw-r--r--admin/schema_inc.php1
2 files changed, 12 insertions, 14 deletions
diff --git a/LibertyAttachable.php b/LibertyAttachable.php
index 6d4bbe3..c2a649e 100644
--- a/LibertyAttachable.php
+++ b/LibertyAttachable.php
@@ -3,7 +3,7 @@
* Management of Liberty Content
*
* @package liberty
- * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyAttachable.php,v 1.99 2007/06/16 00:06:00 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyAttachable.php,v 1.100 2007/06/16 07:34:46 squareing Exp $
* @author spider <spider@steelsun.com>
*/
// +----------------------------------------------------------------------+
@@ -169,22 +169,21 @@ Disable for now - instead fend off new uploads once quota is exceeded. Need a ni
*/
if( $save ) {
// - TODO: get common preferences page with this as an option
- if ( empty( $pParamHash['storage_guid'] ) ) {
- $storageGuid = $gBitSystem->getConfig( 'common_storage_plugin', '' );
- if ( empty( $storageGuid )) {
- // choose one of the available attachment plugins
- if( isset( $gLibertySystem->mPlugins['fisheye'] )) {
- $storageGuid = PLUGIN_GUID_FISHEYE_IMAGE;
- } else if( isset( $gLibertySystem->mPlugins['bitfile'] ) ) {
- $storageGuid = PLUGIN_GUID_BIT_FILES;
- } else {
- $this->mErrors[] = "There is no storage plugin available to store file";
- }
+ if( empty( $pParamHash['storage_guid'] )) {
+ // choose an attachment plugin
+ if( $gLibertySystem->isPluginActive( 'bitfile' )) {
+ // - bitfile is the one that should take care of liberty attachment uploads
+ $storageGuid = PLUGIN_GUID_BIT_FILES;
+ } elseif( $gLibertySystem->isPluginActive( 'fisheye' )) {
+ // - fisheye is a last resort since it is fisheye dependent
+ $storageGuid = PLUGIN_GUID_FISHEYE_IMAGE;
+ } else {
+ $this->mErrors[] = tra( "There is no storage plugin available to store the file" );
}
} else {
$storageGuid = $pParamHash['storage_guid'];
}
-
+
if( !empty( $pParamHash[$file]['size'] ) ) {
if ( !is_windows() ) {
list( $pParamHash[$file]['name'], $pParamHash[$file]['type'] ) = $gBitSystem->verifyFileExtension( $pParamHash[$file]['tmp_name'], $pParamHash[$file]['name'] );
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index c6e7ab8..cd22f5b 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -268,7 +268,6 @@ $gBitInstaller->registerPreferences( LIBERTY_PKG_NAME, array(
// array(LIBERTY_PKG_NAME, 'liberty_attachment_style', 'standard'),
// The default for new installs is htmlpurifier old stays simple
array(LIBERTY_PKG_NAME, 'liberty_html_purifier', 'htmlpurifier'),
- array(LIBERTY_PKG_NAME, 'common_storage_plugin', 'bitfile'),
) );
$gBitInstaller->registerSchemaDefault( LIBERTY_PKG_NAME, array(