. * */ // Init owncloud require_once('../../../lib/base.php'); // Check if we are a user OC_JSON::checkLoggedIn(); // Set the session key for the file we are about to edit. $path = isset($_GET['path']) ? $_GET['path'] : false; if($path){ $sessionname = md5('oc_file_hash_'.$path); $filecontents = OC_Filesystem::file_get_contents($path); OC_Filesystem::update_session_file_hash($sessionname,sha1(htmlspecialchars($filecontents))); OC_JSON::success(); } else { OC_JSON::error(); }