Beispiel #1
0
 if ($specManager->getProjectType() == 'iplant') {
     $imageProcessor = new ImageProcessor();
     echo '<ul>';
     $imageProcessor->setLogMode(3);
     $imageProcessor->setCollid($collid);
     $imageProcessor->setSpprid($spprid);
     $imageProcessor->processIPlantImages($specManager->getSpecKeyPattern(), $specManager->getLastRunDate());
     echo '</ul>';
 } else {
     echo '<div style="padding:15px;">' . "\n";
     $imageProcessor = new ImageBatchProcessor();
     $imageProcessor->setLogMode(1);
     $imageProcessor->initProcessor();
     $imageProcessor->setCollArr(array($collid => array('pmterm' => $specManager->getSpecKeyPattern())));
     $imageProcessor->setDbMetadata(1);
     $imageProcessor->setSourcePathBase($specManager->getSourcePath());
     $imageProcessor->setTargetPathBase($specManager->getTargetPath());
     $imageProcessor->setImgUrlBase($specManager->getImgUrlBase());
     $imageProcessor->setServerRoot($serverRoot);
     if ($specManager->getWebPixWidth()) {
         $imageProcessor->setWebPixWidth($specManager->getWebPixWidth());
     }
     if ($specManager->getTnPixWidth()) {
         $imageProcessor->setTnPixWidth($specManager->getTnPixWidth());
     }
     if ($specManager->getLgPixWidth()) {
         $imageProcessor->setLgPixWidth($specManager->getLgPixWidth());
     }
     if ($specManager->getWebMaxFileSize()) {
         $imageProcessor->setWebFileSizeLimit($specManager->getWebMaxFileSize());
     }
//-------------------------------------------------------------------------------------------//
$imageProcessor = new ImageBatchProcessor();
//Initiate log file
if (isset($silent) && $silent) {
    $logMode = 2;
}
$imageProcessor->setLogMode($logMode);
if (!$logProcessorPath && $logPath) {
    $logProcessorPath = $logPath;
}
$imageProcessor->setLogPath($logProcessorPath);
$imageProcessor->initProcessor($logTitle);
//Set remaining variables
$imageProcessor->setCollArr($collArr);
$imageProcessor->setDbMetadata($dbMetadata);
$imageProcessor->setSourcePathBase($sourcePathBase);
$imageProcessor->setTargetPathBase($targetPathBase);
$imageProcessor->setImgUrlBase($imgUrlBase);
$imageProcessor->setServerRoot($serverRoot);
if ($webPixWidth) {
    $imageProcessor->setWebPixWidth($webPixWidth);
}
if ($tnPixWidth) {
    $imageProcessor->setTnPixWidth($tnPixWidth);
}
if ($lgPixWidth) {
    $imageProcessor->setLgPixWidth($lgPixWidth);
}
if ($webFileSizeLimit) {
    $imageProcessor->setWebFileSizeLimit($webFileSizeLimit);
}