Example #1
0
/**
 * Store file settings - taken over by mime_default_store appart from the width and height settings
 * 
 * @access public
 * @return TRUE on success, FALSE on failure - $pStoreRow['errors'] will contain reason
 */
function mime_flash_store(&$pStoreRow)
{
    global $gBitSystem;
    // this will set the correct pluign guid, even if we let default handle the store process
    $pStoreRow['attachment_plugin_guid'] = PLUGIN_MIME_GUID_FLASH;
    if ($ret = mime_default_store($pStoreRow)) {
        mime_flash_store_preferences($pStoreRow);
    }
    return $ret;
}
Example #2
0
/**
 * Store the data in the database
 * 
 * @param array $pStoreRow File data needed to store details in the database - sanitised and generated in the verify function
 * @access public
 * @return TRUE on success, FALSE on failure - $pStoreRow[errors] will contain reason
 */
function mime_application_store(&$pStoreRow)
{
    // this will set the correct pluign guid, even if we let default handle the store process
    $pStoreRow['attachment_plugin_guid'] = PLUGIN_MIME_GUID_APPLICATION;
    $pStoreRow['log'] = array();
    // if storing works, we process the image
    if ($ret = mime_default_store($pStoreRow)) {
        // Dummy for later
    }
    return $ret;
}
Example #3
0
/**
 * Store the data in the database
 *
 * @param array $pStoreRow File data needed to store details in the database - sanitised and generated in the verify function
 * @access public
 * @return TRUE on success, FALSE on failure - $pStoreRow['errors'] will contain reason
 */
function mime_video_store(&$pStoreRow)
{
    global $gBitSystem;
    // this will set the correct pluign guid, even if we let default handle the store process
    $pStoreRow['attachment_plugin_guid'] = PLUGIN_MIME_GUID_VIDEO;
    // if storing works, we process the video
    if ($ret = mime_default_store($pStoreRow)) {
        if (!mime_video_converter($pStoreRow)) {
            $pStoreRow['errors'] = $pStoreRow['log'];
            $ret = FALSE;
        }
    }
    return $ret;
}
Example #4
0
/**
 * Store the data in the database
 *
 * @param array $pStoreRow File data needed to store details in the database - sanitised and generated in the verify function
 * @access public
 * @return TRUE on success, FALSE on failure - $pStoreRow[errors] will contain reason
 */
function mime_image_store(&$pStoreRow)
{
    // this will set the correct pluign guid, even if we let default handle the store process
    $pStoreRow['attachment_plugin_guid'] = PLUGIN_MIME_GUID_IMAGE;
    $pStoreRow['log'] = array();
    // if storing works, we process the image
    if ($ret = mime_default_store($pStoreRow)) {
        if (!mime_image_store_exif_data($pStoreRow)) {
            // if it all goes t**s up, we'll know why
            $pStoreRow['errors'] = $pStoreRow['log'];
            $ret = FALSE;
        }
    }
    return $ret;
}
Example #5
0
/**
 * Store the data in the database
 *
 * @param array $pStoreRow File data needed to store details in the database - sanitised and generated in the verify function
 * @access public
 * @return TRUE on success, FALSE on failure - $pStoreRow[errors] will contain reason
 */
function mime_pdfx_store(&$pStoreRow)
{
    global $gBitSystem;
    // this will set the correct pluign guid, even if we let default handle the store process
    $pStoreRow['attachment_plugin_guid'] = PLUGIN_MIME_GUID_PDFX;
    $pStoreRow['log'] = array();
    // if storing works, we process the image
    if ($ret = mime_default_store($pStoreRow)) {
        if (!mime_pdfx_convert_pdf2swf($pStoreRow)) {
            // if it all goes t**s up, we'll know why
            $pStoreRow['errors'] = $pStoreRow['log'];
            $ret = FALSE;
        }
    }
    if ($gBitSystem->getConfig('pdf_thumbnails', 'y') == 'y') {
        if (!mime_pdfx_thumbnail($pStoreRow)) {
            // if it all goes t**s up, we'll know why
            $pStoreRow['errors'] = $pStoreRow['log'];
            $ret = FALSE;
        }
    }
    return $ret;
}