public function saveImages($config = array()) { parent::saveImages($config); $config = $this->_data['saveImages']; $imgExtIDs = $config['imgExtID']; $objJSNThumbnail = JSNISFactory::getObj('classes.jsn_is_imagethumbnail'); $objJSNExif = JSNISFactory::getObj('classes.jsn_is_exifinternalsource'); $imagesTable = JTable::getInstance('images', 'Table'); $memory = (int) ini_get('memory_limit'); if ($memory == 0) { $memory = 8; } if (count($imgExtIDs)) { $objJSNImages = JSNISFactory::getObj('classes.jsn_is_images'); $ordering = $objJSNImages->getMaxOrderingByShowlistID($config['showlistID']); if (count($ordering) < 0 || is_null($ordering)) { $ordering = 1; } else { $ordering = $ordering[0] + 1; } $result = false; foreach ($imgExtIDs as $imgExtID) { $realPath = str_replace('/', DS, @$config['imgBig'][$imgExtID]); $copiedRealPath = $realPath; $realPath = JPATH_ROOT . DS . $realPath; $imageSize = @filesize($realPath); /*if ($objJSNThumbnail->checkGraphicLibrary()) { $imageThumbPath = $this->_thumbFolder; $imageName = explode('/', @$imgExtID); $imageName = end($imageName); $imageName = uniqid('').rand(1, 99).'_'.$imageName; if (!$objJSNThumbnail->createThumbnail($realPath, $imageName)) { $imageThumbPath = @$config['imgBig'][$imgExtID]; } else { $imageThumbPath = $imageThumbPath.'/'.$imageName; } $imagesTable->showlist_id = $config['showlistID']; $imagesTable->image_extid = $imgExtID; $imagesTable->album_extid = $config['albumID'][$imgExtID]; $imagesTable->image_small = $imageThumbPath; $imagesTable->image_medium = $imageThumbPath; $imagesTable->image_big = $config['imgBig'][$imgExtID]; $imagesTable->image_title = $config['imgTitle'][$imgExtID]; $imagesTable->image_link = $config['imgLink'][$imgExtID]; $imagesTable->image_description = $config['imgDescription'][$imgExtID]; $imagesTable->ordering = $ordering; $imagesTable->custom_data = $config['customData'][$imgExtID]; $imagesTable->image_size = @$imageSize; } else {*/ $imagesTable->showlist_id = $config['showlistID']; $imagesTable->image_extid = $imgExtID; $imagesTable->album_extid = $config['albumID'][$imgExtID]; $imagesTable->image_small = $config['imgSmall'][$imgExtID]; $imagesTable->image_medium = $config['imgMedium'][$imgExtID]; $imagesTable->image_big = $config['imgBig'][$imgExtID]; $imagesTable->image_title = $config['imgTitle'][$imgExtID]; $imagesTable->image_alt_text = $config['imgAltText'][$imgExtID]; $imagesTable->image_description = $config['imgDescription'][$imgExtID]; $imagesTable->image_link = $config['imgLink'][$imgExtID]; $imagesTable->ordering = $ordering; $imagesTable->custom_data = $config['customData'][$imgExtID]; $imagesTable->image_size = @$imageSize; $imagesTable->exif_data = $objJSNExif->renderData($copiedRealPath); /*}*/ $result = $imagesTable->store(array('replaceSpace' => true)); $imagesTable->image_id = null; $ordering++; } $memoryString = $memory . 'M'; @ini_set('memory_limit', $memoryString); if ($result) { return true; } return false; } return false; }