<?php
/**
+ * MediaWiki exception
* @addtogroup Exception
*/
class MWException extends Exception
return is_object( $wgLang );
}
+ /** Get a message from i18n */
function msg( $key, $fallback /*[, params...] */ ) {
$args = array_slice( func_get_args(), 2 );
if ( $this->useMessageCache() ) {
}
}
+ /* If wgShowExceptionDetails, return a HTML message with a backtrace to the error. */
function getHTML() {
global $wgShowExceptionDetails;
if( $wgShowExceptionDetails ) {
}
}
+ /* If wgShowExceptionDetails, return a text message with a backtrace to the error */
function getText() {
global $wgShowExceptionDetails;
if( $wgShowExceptionDetails ) {
"in LocalSettings.php to show detailed debugging information.</p>";
}
}
-
+
+ /* Return titles of this error page */
function getPageTitle() {
if ( $this->useMessageCache() ) {
return wfMsg( 'internalerror' );
return "$wgSitename error";
}
}
-
+
+ /** Return the requested URL and point to file and line number from which the
+ * exception occured
+ */
function getLogMessage() {
global $wgRequest;
$file = $this->getFile();
$message = $this->getMessage();
return $wgRequest->getRequestURL() . " Exception from line $line of $file: $message";
}
-
+
+ /** Output the exception report using HTML */
function reportHTML() {
global $wgOut;
if ( $this->useOutputPage() ) {
echo $this->htmlFooter();
}
}
-
+
+ /** Print the exception report using text */
function reportText() {
echo $this->getText();
}
+ /* Output a report about the exception and takes care of formatting.
+ * It will be either HTML or plain text based on $wgCommandLineMode.
+ */
function report() {
global $wgCommandLineMode;
if ( $wgCommandLineMode ) {
function wfExceptionHandler( $e ) {
global $wgFullyInitialised;
wfReportException( $e );
-
+
// Final cleanup, similar to wfErrorExit()
if ( $wgFullyInitialised ) {
try {
*/
/**
- *
+ * A special page listing redirects to non existent page. Those should be
+ * fixed to point to an existing page.
* @addtogroup SpecialPage
*/
class BrokenRedirectsPage extends PageQueryPage {
*/
/**
- *
+ * A special page listing redirects to redirecting page.
+ * The software will not procede double redirects automaticly to prevent loops.
* @addtogroup SpecialPage
*/
class DoubleRedirectsPage extends PageQueryPage {
}
/**
- * @todo document - e.g. a one-sentence top-level class description.
+ * A form to make the database readonly (eg for maintenance purposes).
* @addtogroup SpecialPage
*/
class DBLockForm {
*/
/**
- *
+ * A special page looking for articles with no article linking to them,
+ * thus being lonely.
* @addtogroup SpecialPage
*/
class LonelyPagesPage extends PageQueryPage {
}
/**
+ * Shortcut to construct a special page alias.
* @addtogroup SpecialPage
*/
class SpecialRedirectToSpecial extends UnlistedSpecialPage {
}
}
+/** SpecialMypage, SpecialMytalk and SpecialMycontributions special pages
+ * are used to get user independant links pointing to the user page, talk
+ * page and list of contributions.
+ * This can let us cache a single copy of any generated content for all
+ * users.
+ */
+
/**
+ * Shortcut to construct a special page pointing to current user user's page.
* @addtogroup SpecialPage
*/
class SpecialMypage extends UnlistedSpecialPage {
}
/**
+ * Shortcut to construct a special page pointing to current user talk page.
* @addtogroup SpecialPage
*/
class SpecialMytalk extends UnlistedSpecialPage {
}
/**
+ * Shortcut to construct a special page pointing to current user contributions.
* @addtogroup SpecialPage
*/
class SpecialMycontributions extends UnlistedSpecialPage {
<?php
+/** Constructor */
function wfSpecialResetpass( $par ) {
$form = new PasswordResetForm();
$form->execute( $par );
}
/**
+ * Let users recover their password.
* @addtogroup SpecialPage
*/
class PasswordResetForm extends SpecialPage {
*/
/**
- *
+ * A special page looking for page without any category.
* @addtogroup SpecialPage
*/
class UncategorizedPagesPage extends PageQueryPage {
*/
/**
- *
+ * Constructor
*/
function wfSpecialUndelete( $par ) {
global $wgRequest;
}
/**
- * @todo document (just needs one-sentence top-level class description)
+ * Used to show archived pages and eventually restore them.
* @addtogroup SpecialPage
*/
class PageArchive {
*/
/**
- *
+ * You will need the extension MogileClient to use this special page.
*/
require_once( 'MogileFS.php' );
}
/**
+ * Extends Special:Upload with MogileFS.
* @addtogroup SpecialPage
*/
class UploadFormMogile extends UploadForm {
<?php
-
+/**
+ * A collection of static methods to play with strings.
+ */
class StringUtils {
/**
* Perform an operation equivalent to
<?php
-
-/*
- * Allow programs to request this object from WebRequest::response() and handle all outputting (or lack of outputting) via it.
+/**
+ * Allow programs to request this object from WebRequest::response()
+ * and handle all outputting (or lack of outputting) via it.
*/
-
class WebResponse {
+
+ /** Output a HTTP header */
function header($string, $replace=true) {
header($string,$replace);
}
-
+
+ /** Set the browser cookie */
function setcookie($name, $value, $expire) {
global $wgCookiePath, $wgCookieDomain, $wgCookieSecure;
setcookie($name,$value,$expire, $wgCookiePath, $wgCookieDomain, $wgCookieSecure);
}
}
-?>
\ No newline at end of file
+?>