Preparations for Oracle database abstraction update.
[lhc/web/wiklou.git] / includes / FakeTitle.php
index a6fd840..10bfa53 100644 (file)
@@ -3,18 +3,15 @@
 /**
  * Fake title class that triggers an error if any members are called
  */
-class FakeTitle {
-       function error() { wfDebugDieBacktrace( "Attempt to call member function of FakeTitle\n" ); }
+class FakeTitle extends Title {
+       function error() { throw new MWException( "Attempt to call member function of FakeTitle\n" ); }
 
        // PHP 5.1 method overload
        function __call( $name, $args ) { $this->error(); }
 
        // PHP <5.1 compatibility
-       function getInterwikiLink()  { $this->error(); }
-       function getInterwikiCached() { $this->error(); }
        function isLocal() { $this->error(); }
        function isTrans() { $this->error(); }
-       function touchArray( $titles, $timestamp = '' ) { $this->error(); }
        function getText() { $this->error(); }
        function getPartialURL() { $this->error(); }
        function getDBkey() { $this->error(); }
@@ -29,19 +26,20 @@ class FakeTitle {
        function getPrefixedText() { $this->error(); }
        function getFullText() { $this->error(); }
        function getPrefixedURL() { $this->error(); }
-       function getFullURL() {$this->error(); }
-       function getLocalURL() { $this->error(); }
-       function escapeLocalURL() { $this->error(); }
-       function escapeFullURL() { $this->error(); }
-       function getInternalURL() { $this->error(); }
+       function getFullURL( $query = '', $variant = false ) {$this->error(); }
+       function getLocalURL( $query = '', $variant = false ) { $this->error(); }
+       function escapeLocalURL( $query = '' ) { $this->error(); }
+       function escapeFullURL( $query = '' ) { $this->error(); }
+       function getInternalURL( $query = '', $variant = false ) { $this->error(); }
        function getEditURL() { $this->error(); }
        function getEscapedText() { $this->error(); }
        function isExternal() { $this->error(); }
-       function isSemiProtected() { $this->error(); }
-       function isProtected() { $this->error(); }
+       function isSemiProtected( $action = 'edit' ) { $this->error(); }
+       function isProtected( $action = '' ) { $this->error(); }
        function userIsWatching() { $this->error(); }
-       function userCan() { $this->error(); }
-       function userCanEdit() { $this->error(); }
+       function userCan( $action, $doExpensiveQueries = true ) { $this->error(); }
+       function userCanCreate() { $this->error(); }
+       function userCanEdit( $doExpensiveQueries = true ) { $this->error(); }
        function userCanMove() { $this->error(); }
        function isMovable() { $this->error(); }
        function userCanRead() { $this->error(); }
@@ -71,7 +69,6 @@ class FakeTitle {
        function moveOverExistingRedirect() { $this->error(); }
        function moveToNewTitle() { $this->error(); }
        function isValidMoveTarget() { $this->error(); }
-       function createRedirect() { $this->error(); }
        function getParentCategories() { $this->error(); }
        function getParentCategoryTree() { $this->error(); }
        function pageCond() { $this->error(); }
@@ -80,9 +77,8 @@ class FakeTitle {
        function equals() { $this->error(); }
        function exists() { $this->error(); }
        function isAlwaysKnown() { $this->error(); }
+       function isKnown() { $this->error(); }
        function touchLinks() { $this->error(); }
        function trackbackURL() { $this->error(); }
        function trackbackRDF() { $this->error(); }
 }
-
-?>