MediaWiki
REL1_22
|
Class for the core installer web interface. More...
Public Member Functions | |
__construct (WebRequest $request) | |
Constructor. | |
docLink ($linkText, $attribs, $parser) | |
Extension tag hook for a documentation link. | |
downloadLinkHook ($text, $attribs, $parser) | |
Helper for "Download LocalSettings" link on WebInstall_Complete. | |
envCheckPath () | |
errorHandler ($errno, $errstr) | |
Temporary error handler for session start debugging. | |
execute (array $session) | |
Main entry point. | |
finish () | |
Clean up from execute() | |
getAcceptLanguage () | |
Retrieves MediaWiki language from Accept-Language HTTP header. | |
getCheckBox ($params) | |
Get a labelled checkbox to configure a boolean variable. | |
getErrorBox ($text) | |
Get HTML for an error box with an icon. | |
getFingerprint () | |
Get a hash of data identifying this MW installation. | |
getHelpBox ($msg) | |
Get small text indented help for a preceding form field. | |
getInfoBox ($text, $icon=false, $class=false) | |
Get HTML for an info box with an icon. | |
getLowestUnhappy () | |
Find the next page in sequence that hasn't been completed. | |
getPageByName ($pageName) | |
Get a WebInstallerPage by name. | |
getPasswordBox ($params) | |
Get a labelled password box to configure a variable. | |
getRadioSet ($params) | |
Get a set of labelled radio buttons. | |
getSession ($name, $default=null) | |
Get a session variable. | |
getTextArea ($params) | |
Get a labelled textarea to configure a variable. | |
getTextBox ($params) | |
Get a labelled text box to configure a variable. | |
getUrl ($query=array()) | |
Get a URL for submission back to the same script. | |
getWarningBox ($text) | |
Get HTML for a warning box with an icon. | |
label ($msg, $forId, $contents, $helpData="") | |
Label a control by wrapping a config-input div around it and putting a label before it. | |
nextTabIndex () | |
Get the next tabindex attribute value. | |
reset () | |
We're restarting the installation, reset the session, happyPages, etc. | |
setSession ($name, $value) | |
Set a session variable. | |
setupLanguage () | |
Initializes language-related variables. | |
setVarsFromRequest ($varNames, $prefix= 'config_') | |
Convenience function to set variables based on form data. | |
showError ($msg) | |
Show an error message in a box. | |
showHelpBox ($msg) | |
Output a help box. | |
showMessage ($msg) | |
Show a short informational message. | |
showStatusBox ($status) | |
Output an error or warning box using a Status object. | |
showStatusMessage (Status $status) | |
startSession () | |
Start the PHP session. | |
Public Attributes | |
WebInstallerOutput | $output |
array | $pageSequence |
The main sequence of page names. | |
WebRequest | $request |
WebRequest object. | |
bool | $showSessionWarning = false |
Flag indicating that session data may have been lost. | |
Protected Member Functions | |
envGetDefaultServer () | |
Helper function to be called from envCheckServer() | |
getDocUrl ($page) | |
Helper for Installer::docLink() | |
Protected Attributes | |
string | $currentPageName |
Name of the page we're on. | |
array | $happyPages |
Array of pages which have declared that they have been submitted, have validated their input, and need no further processing. | |
array | $otherPages |
Out of sequence pages, selectable by the user at any time. | |
array | $phpErrors |
Captured PHP error text. | |
array | $session |
Cached session array. | |
array | $skippedPages |
List of "skipped" pages. | |
int | $tabIndex = 1 |
Numeric index of the page we're on. | |
Private Member Functions | |
endPageWrapper () | |
Output some stuff after a page is finished. | |
getPageListItem ($pageName, $enabled, $currentPageName) | |
Get a list item for the page list. | |
startPageWrapper ($currentPageName) | |
Called by execute() before page output starts, to show a page list. |
Class for the core installer web interface.
Definition at line 30 of file WebInstaller.php.
WebInstaller::__construct | ( | WebRequest $ | request | ) |
WebInstaller::docLink | ( | $ | linkText, |
$ | attribs, | ||
$ | parser | ||
) |
Extension tag hook for a documentation link.
$linkText | |
$attribs | |
$parser |
Definition at line 1072 of file WebInstaller.php.
WebInstaller::downloadLinkHook | ( | $ | text, |
$ | attribs, | ||
$ | parser | ||
) |
Helper for "Download LocalSettings" link on WebInstall_Complete.
$text | |
$attribs | |
$parser |
Definition at line 1088 of file WebInstaller.php.
WebInstaller::endPageWrapper | ( | ) | [private] |
Output some stuff after a page is finished.
Definition at line 611 of file WebInstaller.php.
WebInstaller::envGetDefaultServer | ( | ) | [protected] |
Helper function to be called from envCheckServer()
Reimplemented from Installer.
Definition at line 1126 of file WebInstaller.php.
WebInstaller::errorHandler | ( | $ | errno, |
$ | errstr | ||
) |
Temporary error handler for session start debugging.
$errno | |
$errstr | string |
Definition at line 385 of file WebInstaller.php.
WebInstaller::execute | ( | array $ | session | ) |
Main entry point.
array | $session | initial session array |
Definition at line 136 of file WebInstaller.php.
Retrieves MediaWiki language from Accept-Language HTTP header.
Definition at line 497 of file WebInstaller.php.
WebInstaller::getCheckBox | ( | $ | params | ) |
Get a labelled checkbox to configure a boolean variable.
$params | Array Parameters are: var: The variable to be configured (required) label: The message name for the label (required) attribs: Additional attributes for the input element (optional) controlName: The name for the input element (optional) value: The current value of the variable (optional) help: The html for the help text (optional) |
Definition at line 892 of file WebInstaller.php.
WebInstaller::getDocUrl | ( | $ | page | ) | [protected] |
Helper for Installer::docLink()
$page |
Reimplemented from Installer.
Definition at line 1054 of file WebInstaller.php.
WebInstaller::getErrorBox | ( | $ | text | ) |
Get HTML for an error box with an icon.
string | $text | wikitext, get this with wfMessage()->plain() |
Definition at line 626 of file WebInstaller.php.
Get a hash of data identifying this MW installation.
This is used by mw-config/index.php to prevent multiple installations of MW on the same cookie domain from interfering with each other.
Definition at line 348 of file WebInstaller.php.
WebInstaller::getHelpBox | ( | $ | msg | ) |
Get small text indented help for a preceding form field.
Parameters like wfMessage().
$msg |
Definition at line 667 of file WebInstaller.php.
WebInstaller::getInfoBox | ( | $ | text, |
$ | icon = false , |
||
$ | class = false |
||
) |
Get HTML for an info box with an icon.
string | $text | wikitext, get this with wfMessage()->plain() |
string | $icon | icon name, file in skins/common/images |
string | $class | additional class name to add to the wrapper div |
Definition at line 650 of file WebInstaller.php.
Referenced by getWarningBox().
Find the next page in sequence that hasn't been completed.
Definition at line 307 of file WebInstaller.php.
WebInstaller::getPageByName | ( | $ | pageName | ) |
Get a WebInstallerPage by name.
$pageName | String |
Definition at line 437 of file WebInstaller.php.
WebInstaller::getPageListItem | ( | $ | pageName, |
$ | enabled, | ||
$ | currentPageName | ||
) | [private] |
Get a list item for the page list.
$pageName | string |
$enabled | boolean |
$currentPageName | string |
Definition at line 561 of file WebInstaller.php.
WebInstaller::getPasswordBox | ( | $ | params | ) |
Get a labelled password box to configure a variable.
Implements password hiding
$params | Array Parameters are: var: The variable to be configured (required) label: The message name for the label (required) attribs: Additional attributes for the input element (optional) controlName: The name for the input element (optional) value: The current value of the variable (optional) help: The html for the help text (optional) |
Definition at line 863 of file WebInstaller.php.
WebInstaller::getRadioSet | ( | $ | params | ) |
Get a set of labelled radio buttons.
$params | Array Parameters are: var: The variable to be configured (required) label: The message name for the label (required) itemLabelPrefix: The message name prefix for the item labels (required) values: List of allowed values (required) itemAttribs: Array of attribute arrays, outer key is the value name (optional) commonAttribs: Attribute array applied to all items controlName: The name for the input element (optional) value: The current value of the variable (optional) help: The html for the help text (optional) |
Definition at line 948 of file WebInstaller.php.
WebInstaller::getSession | ( | $ | name, |
$ | default = null |
||
) |
Get a session variable.
$name | String |
$default |
Definition at line 450 of file WebInstaller.php.
WebInstaller::getTextArea | ( | $ | params | ) |
Get a labelled textarea to configure a variable.
$params | Array Parameters are: var: The variable to be configured (required) label: The message name for the label (required) attribs: Additional attributes for the input element (optional) controlName: The name for the input element (optional) value: The current value of the variable (optional) help: The html for the help text (optional) |
Definition at line 814 of file WebInstaller.php.
WebInstaller::getTextBox | ( | $ | params | ) |
Get a labelled text box to configure a variable.
$params | Array Parameters are: var: The variable to be configured (required) label: The message name for the label (required) attribs: Additional attributes for the input element (optional) controlName: The name for the input element (optional) value: The current value of the variable (optional) help: The html for the help text (optional) |
Definition at line 767 of file WebInstaller.php.
WebInstaller::getUrl | ( | $ | query = array() | ) |
Get a URL for submission back to the same script.
$query | array |
Definition at line 419 of file WebInstaller.php.
WebInstaller::getWarningBox | ( | $ | text | ) |
Get HTML for a warning box with an icon.
string | $text | wikitext, get this with wfMessage()->plain() |
Definition at line 637 of file WebInstaller.php.
References getInfoBox().
WebInstaller::label | ( | $ | msg, |
$ | forId, | ||
$ | contents, | ||
$ | helpData = "" |
||
) |
Label a control by wrapping a config-input div around it and putting a label before it.
$msg | |
$forId | |
$contents | |
$helpData | string |
Definition at line 726 of file WebInstaller.php.
References array(), tags(), and wfMessage().
We're restarting the installation, reset the session, happyPages, etc.
Definition at line 407 of file WebInstaller.php.
WebInstaller::setSession | ( | $ | name, |
$ | value | ||
) |
Set a session variable.
string | $name | key for the variable |
$value | Mixed |
Definition at line 463 of file WebInstaller.php.
Initializes language-related variables.
Definition at line 478 of file WebInstaller.php.
WebInstaller::setVarsFromRequest | ( | $ | varNames, |
$ | prefix = 'config_' |
||
) |
Convenience function to set variables based on form data.
Assumes that variables containing "password" in the name are (potentially fake) passwords.
$varNames | Array | |
string | $prefix | the prefix added to variables to obtain form names |
Definition at line 1026 of file WebInstaller.php.
References $name, $value, array(), as, request, Installer\setPassword(), and Installer\setVar().
WebInstaller::showError | ( | $ | msg | ) |
Show an error message in a box.
Parameters are like wfMessage().
$msg |
Reimplemented from Installer.
Definition at line 372 of file WebInstaller.php.
WebInstaller::showHelpBox | ( | $ | msg | ) |
Output a help box.
string | $msg | key for wfMessage() |
Definition at line 685 of file WebInstaller.php.
WebInstaller::showMessage | ( | $ | msg | ) |
Show a short informational message.
Output looks like a list.
$msg | string |
Reimplemented from Installer.
Definition at line 697 of file WebInstaller.php.
WebInstaller::showStatusBox | ( | $ | status | ) |
Output an error or warning box using a Status object.
$status | Status |
Definition at line 1002 of file WebInstaller.php.
WebInstaller::showStatusMessage | ( | Status $ | status | ) |
$status | Status |
Reimplemented from Installer.
Definition at line 709 of file WebInstaller.php.
WebInstaller::startPageWrapper | ( | $ | currentPageName | ) | [private] |
Called by execute() before page output starts, to show a page list.
$currentPageName | string |
Definition at line 517 of file WebInstaller.php.
Start the PHP session.
This may be called before execute() to start the PHP session.
Definition at line 320 of file WebInstaller.php.
string WebInstaller::$currentPageName [protected] |
Name of the page we're on.
Definition at line 111 of file WebInstaller.php.
array WebInstaller::$happyPages [protected] |
Array of pages which have declared that they have been submitted, have validated their input, and need no further processing.
Definition at line 89 of file WebInstaller.php.
array WebInstaller::$otherPages [protected] |
array( 'Restart', 'Readme', 'ReleaseNotes', 'Copying', 'UpgradeDoc', )
Out of sequence pages, selectable by the user at any time.
Definition at line 77 of file WebInstaller.php.
WebInstallerOutput WebInstaller::$output |
Definition at line 34 of file WebInstaller.php.
array WebInstaller::$pageSequence |
array( 'Language', 'ExistingWiki', 'Welcome', 'DBConnect', 'Upgrade', 'DBSettings', 'Name', 'Options', 'Install', 'Complete', )
The main sequence of page names.
These will be displayed in turn.
To add a new installer page: * Add it to this WebInstaller::$pageSequence property * Add a "config-page-<name>" message * Add a "WebInstaller_<name>" class
Definition at line 61 of file WebInstaller.php.
array WebInstaller::$phpErrors [protected] |
WebRequest WebInstaller::$request |
WebRequest object.
Definition at line 40 of file WebInstaller.php.
array WebInstaller::$session [protected] |
Cached session array.
Definition at line 46 of file WebInstaller.php.
bool WebInstaller::$showSessionWarning = false |
Flag indicating that session data may have been lost.
Definition at line 101 of file WebInstaller.php.
array WebInstaller::$skippedPages [protected] |
List of "skipped" pages.
These are pages that will automatically continue to the next page on any GET request. To avoid breaking the "back" button, they need to be skipped during a back operation.
Definition at line 96 of file WebInstaller.php.
int WebInstaller::$tabIndex = 1 [protected] |
Numeric index of the page we're on.
Definition at line 106 of file WebInstaller.php.