- /*
- * Set document's text
- */
- WikiDocument.prototype.setText = function(text) {
- return this.setDocumentProperty('text', text);
- };
-
- /*
- * Set document's gallery link
- */
- WikiDocument.prototype.setGalleryLink = function(gallery) {
- return this.setDocumentProperty('galleryLink', gallery);
- };
+ /*
+ * Set document's text
+ */
+ WikiDocument.prototype.setText = function(text, setter) {
+ if (text == this.text) return;
+
+ this.text = text;
+ this.has_local_changes = true;