summaryrefslogtreecommitdiffstats
path: root/apps/files_versioning/ajax/gethead.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versioning/ajax/gethead.php')
-rw-r--r--apps/files_versioning/ajax/gethead.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_versioning/ajax/gethead.php b/apps/files_versioning/ajax/gethead.php
new file mode 100644
index 00000000000..cc93b7a1d17
--- /dev/null
+++ b/apps/files_versioning/ajax/gethead.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Copyright (c) 2011 Craig Roberts craig0990@googlemail.com
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ */
+require_once('../../../lib/base.php');
+
+OC_JSON::checkLoggedIn();
+// Fetch current commit (or HEAD if not yet set)
+$head = OC_Preferences::getValue(OC_User::getUser(), 'files_versioning', 'head', 'HEAD');
+OC_JSON::encodedPrint(array("head" => $head));