Merge "(bug 40610) Prevent editing textarea from overflowing out of bodyContent"
[lhc/web/wiklou.git] / includes / filebackend / filejournal / FileJournal.php
index ce029bb..d99384d 100644 (file)
@@ -85,7 +85,7 @@ abstract class FileJournal {
        /**
         * Log changes made by a batch file operation.
         * $entries is an array of log entries, each of which contains:
-        *     op      : Basic operation name (create, store, copy, delete)
+        *     op      : Basic operation name (create, update, delete)
         *     path    : The storage path of the file
         *     newSha1 : The final base 36 SHA-1 of the file
         * Note that 'false' should be used as the SHA-1 for non-existing files.
@@ -110,6 +110,21 @@ abstract class FileJournal {
         */
        abstract protected function doLogChangeBatch( array $entries, $batchId );
 
+       /**
+        * Get the position ID of the latest journal entry
+        *
+        * @return integer|false
+        */
+       final public function getCurrentPosition() {
+               return $this->doGetCurrentPosition();
+       }
+
+       /**
+        * @see FileJournal::getCurrentPosition()
+        * @return integer|false
+        */
+       abstract protected function doGetCurrentPosition();
+
        /**
         * Get an array of file change log entries.
         * A starting change ID and/or limit can be specified.
@@ -169,7 +184,7 @@ abstract class FileJournal {
  */
 class NullFileJournal extends FileJournal {
        /**
-        * @see FileJournal::logChangeBatch()
+        * @see FileJournal::doLogChangeBatch()
         * @param $entries array
         * @param $batchId string
         * @return Status
@@ -178,6 +193,14 @@ class NullFileJournal extends FileJournal {
                return Status::newGood();
        }
 
+       /**
+        * @see FileJournal::doGetCurrentPosition()
+        * @return integer|false
+        */
+       protected function doGetCurrentPosition() {
+               return false;
+       }
+
        /**
         * @see FileJournal::doGetChangeEntries()
         * @return Array
@@ -187,7 +210,7 @@ class NullFileJournal extends FileJournal {
        }
 
        /**
-        * @see FileJournal::purgeOldLogs()
+        * @see FileJournal::doPurgeOldLogs()
         * @return Status
         */
        protected function doPurgeOldLogs() {