r61377 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61376‎ | r61377 | r61378 >
Date:18:43, 22 January 2010
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* Fix E_STRICT errors about functions not having same signature
* Added missing functions that are in Title but not FakeTitle
Modified paths:
  • /trunk/phase3/includes/FakeTitle.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/FakeTitle.php
@@ -17,17 +17,25 @@
1818 function getDBkey() { $this->error(); }
1919 function getNamespace() { $this->error(); }
2020 function getNsText() { $this->error(); }
 21+ function getUserCaseDBKey() { $this->error(); }
2122 function getSubjectNsText() { $this->error(); }
 23+ function getTalkNsText() { $this->error(); }
 24+ function canTalk() { $this->error(); }
2225 function getInterwiki() { $this->error(); }
2326 function getFragment() { $this->error(); }
 27+ function getFragmentForURL() { $this->error(); }
2428 function getDefaultNamespace() { $this->error(); }
2529 function getIndexTitle() { $this->error(); }
2630 function getPrefixedDBkey() { $this->error(); }
2731 function getPrefixedText() { $this->error(); }
2832 function getFullText() { $this->error(); }
 33+ function getBaseText() { $this->error(); }
 34+ function getSubpageText() { $this->error(); }
 35+ function getSubpageUrlForm() { $this->error(); }
2936 function getPrefixedURL() { $this->error(); }
3037 function getFullURL( $query = '', $variant = false ) {$this->error(); }
3138 function getLocalURL( $query = '', $variant = false ) { $this->error(); }
 39+ function getLinkUrl( $query = array(), $variant = false ) { $this->error(); }
3240 function escapeLocalURL( $query = '' ) { $this->error(); }
3341 function escapeFullURL( $query = '' ) { $this->error(); }
3442 function getInternalURL( $query = '', $variant = false ) { $this->error(); }
@@ -36,46 +44,88 @@
3745 function isExternal() { $this->error(); }
3846 function isSemiProtected( $action = 'edit' ) { $this->error(); }
3947 function isProtected( $action = '' ) { $this->error(); }
 48+ function isConversionTable() { $this->error(); }
4049 function userIsWatching() { $this->error(); }
 50+ function quickUserCan( $action ) { $this->error(); }
 51+ function isNamespaceProtected() { $this->error(); }
4152 function userCan( $action, $doExpensiveQueries = true ) { $this->error(); }
 53+ function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) { $this->error(); }
 54+ function updateTitleProtection( $create_perm, $reason, $expiry ) { $this->error(); }
 55+ function deleteTitleProtection() { $this->error(); }
4256 function isMovable() { $this->error(); }
4357 function userCanRead() { $this->error(); }
4458 function isTalkPage() { $this->error(); }
 59+ function isSubpage() { $this->error(); }
 60+ function hasSubpages() { $this->error(); }
 61+ function getSubpages( $limit = -1 ) { $this->error(); }
4562 function isCssJsSubpage() { $this->error(); }
 63+ function isCssOrJsPage() { $this->error(); }
4664 function isValidCssJsSubpage() { $this->error(); }
4765 function getSkinFromCssJsSubpage() { $this->error(); }
4866 function isCssSubpage() { $this->error(); }
4967 function isJsSubpage() { $this->error(); }
5068 function userCanEditCssJsSubpage() { $this->error(); }
51 - function loadRestrictions( $res ) { $this->error(); }
52 - function getRestrictions($action) { $this->error(); }
 69+ function userCanEditCssSubpage() { $this->error(); }
 70+ function userCanEditJsSubpage() { $this->error(); }
 71+ function isCascadeProtected() { $this->error(); }
 72+ function getCascadeProtectionSources( $get_pages = true ) { $this->error(); }
 73+ function areRestrictionsCascading() { $this->error(); }
 74+ function loadRestrictionsFromRows( $rows, $oldFashionedRestrictions = null ) { $this->error(); }
 75+ function loadRestrictions( $res = null ) { $this->error(); }
 76+ function getRestrictions( $action ) { $this->error(); }
 77+ function getRestrictionExpiry( $action ) { $this->error(); }
5378 function isDeleted() { $this->error(); }
 79+ function isDeletedQuick() { $this->error(); }
5480 function getArticleID( $flags = 0 ) { $this->error(); }
55 - function getLatestRevID() { $this->error(); }
 81+ function isRedirect( $flags = 0 ) { $this->error(); }
 82+ function getLength( $flags = 0 ) { $this->error(); }
 83+ function getLatestRevID( $flags = 0 ) { $this->error(); }
5684 function resetArticleID( $newid ) { $this->error(); }
5785 function invalidateCache() { $this->error(); }
5886 function getTalkPage() { $this->error(); }
 87+ function setFragment( $fragment ) { $this->error(); }
5988 function getSubjectPage() { $this->error(); }
60 - function getLinksTo() { $this->error(); }
61 - function getTemplateLinksTo() { $this->error(); }
 89+ function getLinksTo( $options = array(), $table = 'pagelinks', $prefix = 'pl' ) { $this->error(); }
 90+ function getTemplateLinksTo( $options = array() ) { $this->error(); }
6291 function getBrokenLinksFrom() { $this->error(); }
6392 function getSquidURLs() { $this->error(); }
64 - function moveNoAuth() { $this->error(); }
65 - function isValidMoveOperation() { $this->error(); }
66 - function moveTo() { $this->error(); }
67 - function moveOverExistingRedirect() { $this->error(); }
68 - function moveToNewTitle() { $this->error(); }
69 - function isValidMoveTarget() { $this->error(); }
 93+ function purgeSquid() { $this->error(); }
 94+ function moveNoAuth( &$nt ) { $this->error(); }
 95+ function isValidMoveOperation( &$nt, $auth = true, $reason = '' ) { $this->error(); }
 96+ function moveTo( &$nt, $auth = true, $reason = '', $createRedirect = true ) { $this->error(); }
 97+ function moveOverExistingRedirect( &$nt, $reason = '', $createRedirect = true ) { $this->error(); }
 98+ function moveToNewTitle( &$nt, $reason = '', $createRedirect = true ) { $this->error(); }
 99+ function moveSubpages( $nt, $auth = true, $reason = '', $createRedirect = true ) { $this->error(); }
 100+ function isSingleRevRedirect() { $this->error(); }
 101+ function isValidMoveTarget( $nt ) { $this->error(); }
 102+ function isWatchable() { $this->error(); }
70103 function getParentCategories() { $this->error(); }
71 - function getParentCategoryTree() { $this->error(); }
 104+ function getParentCategoryTree( $children = array() ) { $this->error(); }
72105 function pageCond() { $this->error(); }
73 - function getPreviousRevisionID() { $this->error(); }
74 - function getNextRevisionID() { $this->error(); }
75 - function equals() { $this->error(); }
 106+ function getPreviousRevisionID( $revId, $flags=0 ) { $this->error(); }
 107+ function getNextRevisionID( $revId, $flags=0 ) { $this->error(); }
 108+ function getFirstRevision( $flags=0 ) { $this->error(); }
 109+ function isNewPage() { $this->error(); }
 110+ function getEarliestRevTime() { $this->error(); }
 111+ function countRevisionsBetween( $old, $new ) { $this->error(); }
 112+ function equals( Title $title ) { $this->error(); }
76113 function exists() { $this->error(); }
77114 function isAlwaysKnown() { $this->error(); }
78115 function isKnown() { $this->error(); }
 116+ function canExist() { $this->error(); }
79117 function touchLinks() { $this->error(); }
 118+ function getTouched( $db = null ) { $this->error(); }
 119+ function getNotificationTimestamp( $user = null ) { $this->error(); }
80120 function trackbackURL() { $this->error(); }
81121 function trackbackRDF() { $this->error(); }
 122+ function getNamespaceKey( $prepend = 'nstab-' ) { $this->error(); }
 123+ function isSpecialPage() { $this->error(); }
 124+ function isSpecial( $name ) { $this->error(); }
 125+ function fixSpecialName() { $this->error(); }
 126+ function isContentPage() { $this->error(); }
 127+ function getRedirectsHere( $ns = null ) { $this->error(); }
 128+ function isValidRedirectTarget() { $this->error(); }
 129+ function getBacklinkCache() { $this->error(); }
 130+ function canUseNoindex() { $this->error(); }
 131+ function getRestrictionTypes() { $this->error(); }
82132 }

Comments

#Comment by Tim Starling (talk | contribs)   23:37, 28 January 2010

This was a PHP 4 hack, you know. Now that we use PHP 5 you can just delete all these and use __call().

#Comment by IAlex (talk | contribs)   08:07, 29 January 2010

I'm not sure about that because FakeTitle extends Title since r40146, so a little test I ran result in the fact that __call() isn't called.

Status & tagging log