+ WikiDocument.prototype.checkRevision = function(params) {
+ /* this doesn't modify anything, so no locks */
+ var self = this;
+ $.ajax({
+ method: "GET",
+ url: reverse("ajax_document_rev", self.id),
+ dataType: 'text',
+ success: function(data) {
+ if (data == '') {
+ if (params.error)
+ params.error();
+ }
+ else if (data != self.revision)
+ params.outdated();
+ }
+ });
+ };
+