BertaEditor::images_deleteDerivatives($options['MEDIA_ROOT'] . $e['mediafolder']['value'] . '/', $posterToDelete); } $returnUpdate = 'ok'; } else $returnError = 'delete failed! check permissions.'; } else $returnError = 'file does not exist! media cache updated.'; BertaEditor::updateImageCacheFor($blog, $decoded['entry']); } elseif($decoded['action'] != 'SAVE') { switch($decoded['action']) { case 'DELETE_ENTRY': if(!BertaEditor::deleteEntry($decoded['value'], $blog)) $returnError = 'entry cannot be deleted! check permissions.'; BertaEditor::updateImageCacheFor($blog); BertaEditor::updateSectionEntryCount($decoded['section'], $blog); BertaEditor::populateTags($decoded['section'], $blog); break; case 'SET_GALLERY_TYPE': if(empty($e['mediaCacheData']['@attributes'])) $e['mediaCacheData']['@attributes'] = array(); $e['mediaCacheData']['@attributes']['type'] = $decoded['params']; break; case 'SET_GALLERY_SIZE': if(empty($e['mediaCacheData']['@attributes'])) $e['mediaCacheData']['@attributes'] = array(); $e['mediaCacheData']['@attributes']['size'] = $decoded['params']; break; case 'SET_FULLSCREEN':