Exemplo n.º 1
0
function mg_batch_session_rebuilddisplay($row)
{
    global $_CONF;
    require_once $_CONF['path'] . 'plugins/mediagallery/include/lib-upload.php';
    $srcImage = $row['data'];
    $imageDisplay = $row['data2'];
    $mimeExt = $row['data3'];
    $mimeType = $row['mid'];
    $aid = $row['aid'];
    list($rc, $msg) = MG_createDisplayImage($srcImage, $imageDisplay, $mimeExt, $mimeType, $aid);
    return;
}
Exemplo n.º 2
0
function MG_convertImage($srcImage, $imageThumb, $imageDisplay, $mimeExt, $mimeType, $aid, $baseFilename, $dnc)
{
    global $_CONF, $_TABLES, $_MG_CONF;
    if ($_MG_CONF['verbose']) {
        COM_errorLog("MG Upload: Entering MG_convertImage()");
    }
    // create the thumbnail image
    list($rc, $msg) = MG_createThumbnail($srcImage, $imageThumb, $mimeType, $aid);
    if ($rc == false) {
        return array(false, $msg);
    }
    // create the display image
    list($rc, $msg) = MG_createDisplayImage($srcImage, $imageDisplay, $mimeExt, $mimeType, $aid, $dnc);
    if ($rc == false) {
        return array(false, $msg);
    }
    @chmod($imageThumb, 0644);
    @chmod($imageDisplay, 0644);
    return array(true, '');
}