public static function removeETagHook($params, $root = false) { if (isset($params['path'])) { $path = $params['path']; } else { $path = $params['oldpath']; } if ($root) { // reduce path to the required part of it (no 'username/files') $fakeRootView = new OC_FilesystemView($root); $count = 1; $path = str_replace(OC_App::getStorage("files")->getAbsolutePath($path), "", $fakeRootView->getAbsolutePath($path), $count); } $path = self::normalizePath($path); OC_Connector_Sabre_Node::removeETagPropertyForPath($path); }
/** * @param string appid * @param $app app * @return \OC\Files\View */ public static function getStorage($app) { return \OC_App::getStorage($app); }
$zip->addFile($file, $local); } //debug //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status; //close the zip -- done! $zip->close(); //check to make sure the file exists return file_exists($destination); } else { return false; } } $files_to_zip = array(\OCP\Util::linkToAbsolute('impressionist', 'css/mappingstyle.css') => '/css/mappingstyle.css', \OCP\Util::linkToAbsolute('impressionist', 'css/player.css') => '/css/style.css', \OCP\Util::linkToAbsolute('', 'js/jquery-1.7.2.min.js') => '/js/jquery.js', \OCP\Util::linkToAbsolute('impressionist', "output/'.{$filename}.'.html") => $filename . '.html'); //if true, good; if false, zip creation failed $result = create_zip($files_to_zip, $filename . '.zip'); $save_file = OC_App::getStorage('impressionist'); $save_file->file_put_contents($result . '.zip', $files_to_zip . '.zip'); ?> <html lang="en"> <head> <meta charset="utf-8" /> <title>Impressionist for ownCloud</title> <link rel="stylesheet" type="text/css" src="<?php echo \OCP\Util::linkToAbsolute('impressionist', 'css/bootstrap.css'); ?> "></script> <link rel="stylesheet" type="text/css" href="<?php echo \OCP\Util::linkToAbsolute('impressionist', 'css/mainstyle.css'); ?> " /> <script type="text/javascript" src="<?php