code/controllers/ExternalContentAdmin.php
public function deleteprovider() {
		$script = '';
		$ids = split(' *, *', $_REQUEST['csvIDs']);
		$script = '';

		if (!$ids)
			return false;

		foreach ($ids as $id) {
			if (is_numeric($id)) {
				$record = ExternalContent::getDataObjectFor($id);
				if ($record) {
					$script .= $this->deleteTreeNodeJS($record);
					$record->delete();
					$record->destroy();
				}
			}
		}

		$size = sizeof($ids);
		if ($size > 1) {
			$message = $size . ' ' . _t('AssetAdmin.FOLDERSDELETED', 'folders deleted.');
		} else {
			$message = $size . ' ' . _t('AssetAdmin.FOLDERDELETED', 'folder deleted.');
		}

		$script .= "statusMessage('$message');";
		echo $script;
	}
public function deleteprovider() {
		$script = '';
		$ids = split(' *, *', $_REQUEST['csvIDs']);
		$script = '';

		if (!$ids)
			return false;

		foreach ($ids as $id) {
			if (is_numeric($id)) {
				$record = ExternalContent::getDataObjectFor($id);
				if ($record) {
					$script .= $this->deleteTreeNodeJS($record);
					$record->delete();
					$record->destroy();
				}
			}
		}

		$size = sizeof($ids);
		if ($size > 1) {
			$message = $size . ' ' . _t('AssetAdmin.FOLDERSDELETED', 'folders deleted.');
		} else {
			$message = $size . ' ' . _t('AssetAdmin.FOLDERDELETED', 'folder deleted.');
		}

		$script .= "statusMessage('$message');";
		echo $script;
	}
public function deleteprovider ( ) { $ script = '' ; $ ids = split ( ' *, *' , $ _REQUEST [ 'csvIDs' ] ) ; $ script = '' ; if ( ! $ ids ) return false ; foreach ( $ ids as $ id ) { if ( is_numeric ( $ id ) ) { $ record = ExternalContent :: getDataObjectFor ( $ id ) ; if ( $ record ) { $ script .= $ this -> deleteTreeNodeJS ( $ record ) ; $ record -> delete ( ) ; $ record -> destroy ( ) ; } } } $ size = sizeof ( $ ids ) ; if ( $ size > 1 ) { $ message = $ size . ' ' . _t ( 'AssetAdmin.FOLDERSDELETED' , 'folders deleted.' ) ; } else { $ message = $ size . ' ' . _t ( 'AssetAdmin.FOLDERDELETED' , 'folder deleted.' ) ; } $ script .= "statusMessage('$message');" ; echo $ script ; }
Delete a folder
Delete a folder