Public Member Functions | |
| __construct () | |
| Constructor. | |
| setVal ($key, &$value) | |
| Stores key/value pairs to circumvent global variables Note that keys are case-insensitive! | |
| getVal ($key, $default= '') | |
| Retrieves key/value pairs to circumvent global variables Note that keys are case-insensitive! | |
| initialize (&$title, &$article, &$output, &$user, $request) | |
| Initialization of . | |
| checkMaxLag ($maxLag) | |
| Check if the maximum lag of database slaves is higher that $maxLag, and if it's the case, output an error message. | |
| checkInitialQueries ($title, $action) | |
| Checks some initial queries Note that $title here is *not* a Title object, but a string! | |
| preliminaryChecks (&$title, &$output, $request) | |
| Checks for search query and anon-cannot-read case. | |
| initializeSpecialCases (&$title, &$output, $request) | |
Initialize some special cases:
| |
| initializeArticle (&$title, $request) | |
| Initialize the object to be known as $wgArticle for "standard" actions Create an Article object for the page, following redirects if needed. | |
| finalCleanup (&$deferredUpdates, &$output) | |
| Cleaning up by doing deferred updates, calling LBFactory and doing the output. | |
| doUpdates (&$updates) | |
| Deferred updates aren't really deferred anymore. | |
| doJobs () | |
| Do a job from the job queue. | |
| restInPeace () | |
| Ends this task peacefully. | |
| performAction (&$output, &$article, &$title, &$user, &$request) | |
| Perform one of the "standard" actions. | |
Static Public Member Functions | |
| static | articleFromTitle (&$title) |
| Create an Article object of the appropriate class for the given page. | |
Public Attributes | |
| $GET | |
| $params = array() | |
Definition at line 5 of file Wiki.php.
| MediaWiki::__construct | ( | ) |
| static MediaWiki::articleFromTitle | ( | &$ | title | ) | [static] |
Create an Article object of the appropriate class for the given page.
| $title | Title |
Definition at line 246 of file Wiki.php.
References $title, Title::makeTitle(), and wfRunHooks().
Referenced by SearchEngine::getNearMatch(), and initializeArticle().
| MediaWiki::checkInitialQueries | ( | $ | title, | |
| $ | action | |||
| ) |
Checks some initial queries Note that $title here is *not* a Title object, but a string!
| $title | String | |
| $action | String |
Definition at line 100 of file Wiki.php.
References $action, $title, $wgContLang, $wgOut, $wgRequest, Revision::newFromId(), Title::newFromID(), Title::newFromURL(), and Title::newMainPage().
| MediaWiki::checkMaxLag | ( | $ | maxLag | ) |
Check if the maximum lag of database slaves is higher that $maxLag, and if it's the case, output an error message.
| $maxLag | int: maximum lag allowed for the request, as supplied by the client |
Definition at line 82 of file Wiki.php.
References $maxLag, wfGetLB(), and wfMaxlagError().
| MediaWiki::doJobs | ( | ) |
Do a job from the job queue.
Definition at line 385 of file Wiki.php.
References $job, $n, $output, $success, $t, getVal(), Job::pop(), wfDebugLog(), wfReadOnly(), and wfTime().
Referenced by finalCleanup().
| MediaWiki::doUpdates | ( | &$ | updates | ) |
Deferred updates aren't really deferred anymore.
It's important to report errors to the user, and that means doing this before OutputPage::output(). Note that for page saves, the client will wait until the script exits anyway before following the redirect.
| $updates | array of objects that hold an update to do |
Definition at line 362 of file Wiki.php.
References $dbw, $updates, wfGetDB(), wfProfileIn(), and wfProfileOut().
Referenced by finalCleanup().
| MediaWiki::finalCleanup | ( | &$ | deferredUpdates, | |
| &$ | output | |||
| ) |
Cleaning up by doing deferred updates, calling LBFactory and doing the output.
| $deferredUpdates | array of updates to do | |
| $output | OutputPage |
Definition at line 339 of file Wiki.php.
References $output, doJobs(), doUpdates(), wfGetLBFactory(), wfProfileIn(), and wfProfileOut().
| MediaWiki::getVal | ( | $ | key, | |
| $ | default = '' | |||
| ) |
Retrieves key/value pairs to circumvent global variables Note that keys are case-insensitive!
| $key | String: key to get | |
| $default | Mixed: default value if if the key doesn't exist |
Definition at line 34 of file Wiki.php.
References $key.
Referenced by doJobs(), initializeArticle(), initializeSpecialCases(), and performAction().
| MediaWiki::initialize | ( | &$ | title, | |
| &$ | article, | |||
| &$ | output, | |||
| &$ | user, | |||
| $ | request | |||
| ) |
Initialization of .
.. everything Performs the request too FIXME: why is this crap called "initialize" when it performs everything?
| $title | Title ($wgTitle) | |
| $article | Article | |
| $output | OutputPage | |
| $user | User | |
| $request | WebRequest |
Definition at line 53 of file Wiki.php.
References $output, $title, $user, initializeArticle(), initializeSpecialCases(), performAction(), preliminaryChecks(), wfProfileIn(), and wfProfileOut().
| MediaWiki::initializeArticle | ( | &$ | title, | |
| $ | request | |||
| ) |
Initialize the object to be known as $wgArticle for "standard" actions Create an Article object for the page, following redirects if needed.
| $title | Title ($wgTitle) | |
| $request | WebRequest |
Definition at line 276 of file Wiki.php.
References $action, $dbr, $file, $title, articleFromTitle(), getVal(), wfGetDB(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by initialize().
| MediaWiki::initializeSpecialCases | ( | &$ | title, | |
| &$ | output, | |||
| $ | request | |||
| ) |
Initialize some special cases:
FIXME: why is this crap called "initialize" when it performs everything?
| $title | Title | |
| $output | OutputPage | |
| $request | WebRequest |
Definition at line 174 of file Wiki.php.
References $action, $output, $title, $url, SpecialPage::executePath(), SpecialPage::getTitleFor(), getVal(), wfHttpError(), wfProfileIn(), and wfProfileOut().
Referenced by initialize().
| MediaWiki::performAction | ( | &$ | output, | |
| &$ | article, | |||
| &$ | title, | |||
| &$ | user, | |||
| &$ | request | |||
| ) |
Perform one of the "standard" actions.
| $output | OutputPage | |
| $article | Article | |
| $title | Title | |
| $user | User | |
| $request | WebRequest |
Definition at line 433 of file Wiki.php.
References $action, $mode, $output, $section, $title, $user, getVal(), Credits::showPage(), wfHttpError(), wfMsg(), wfProfileIn(), wfProfileOut(), wfRunHooks(), and wfSetupSession().
Referenced by initialize().
| MediaWiki::preliminaryChecks | ( | &$ | title, | |
| &$ | output, | |||
| $ | request | |||
| ) |
Checks for search query and anon-cannot-read case.
| $title | Title | |
| $output | OutputPage | |
| $request | WebRequest |
Definition at line 139 of file Wiki.php.
References $output, $title, and SpecialPage::getTitleFor().
Referenced by initialize().
| MediaWiki::restInPeace | ( | ) |
Ends this task peacefully.
Definition at line 419 of file Wiki.php.
References wfDebug(), and wfLogProfilingData().
| MediaWiki::setVal | ( | $ | key, | |
| &$ | value | |||
| ) |
1.5.9