Source for file edit_storage_inc.php
Documentation is available at edit_storage_inc.php
* @author spider <spider@steelsun.com>
global $gBitSmarty, $gContent, $gBitUser, $gBitSystem, $gBitThemes, $gLibertySystem;
// if we have active plugins with an upload function, we call them:
foreach( $gLibertySystem->getPluginFunctions( 'upload_function' ) as $guid => $func ) {
$getArgs = explode( '&', $_SERVER['QUERY_STRING'] );
$attachmentBaseArgs = '';
foreach( $getArgs as $arg ) {
if( $parts[0] != 'deleteAttachment' ) {
$attachmentBaseArgs .= $arg. "&";
$gBitSmarty->assign( 'attachmentBaseArgs', $attachmentBaseArgs );
// delete attachment if requested
if( !empty( $_REQUEST['deleteAttachment'] )) {
// $gContent is empty when we're editing our personal webpage
// this is a brutish hack but it seems to work without adverse effeects
if( empty( $gContent )) {
$attachmentId = $_REQUEST['deleteAttachment'];
// the second part of this check seems odd (never used?) to me, but I'll leave it in for now - spiderr 10/17/2007
if( $gContent->hasAdminPermission() || ( $gContent->isOwner( $attachmentInfo ) && $gBitUser->hasPermission( 'p_liberty_delete_attachment' ))) {
// in case we have deleted attachments
// seems like there should be a better way to do this -- maybe original assign should have been by reference?
$gBitSmarty->clear_assign( 'gContent' );
$gBitSmarty->assign( 'gContent', $gContent );
// make sure js is being loaded
if( $gBitSystem->getConfig( 'liberty_attachment_style' ) == 'ajax' ) {
$gBitThemes->loadJavascript( LIBERTY_PKG_PATH. 'scripts/LibertyAttachment.js', TRUE );
|