Implement mediawiki.confirmCloseWindow module
[lhc/web/wiklou.git] / includes / cache / LinkCache.php
index e80dfb3..6925df9 100644 (file)
@@ -129,10 +129,10 @@ class LinkCache {
         * @param int $len Text's length
         * @param int $redir Whether the page is a redirect
         * @param int $revision Latest revision's ID
-        * @param int $model Latest revision's content model ID
+        * @param string|null $model Latest revision's content model ID
         */
        public function addGoodLinkObj( $id, $title, $len = -1, $redir = null,
-               $revision = 0, $model = 0
+               $revision = 0, $model = null
        ) {
                $dbkey = $title->getPrefixedDBkey();
                $this->mGoodLinks[$dbkey] = (int)$id;
@@ -140,7 +140,7 @@ class LinkCache {
                        'length' => (int)$len,
                        'redirect' => (int)$redir,
                        'revision' => (int)$revision,
-                       'model' => (int)$model
+                       'model' => $model ? (string)$model : null,
                );
        }