MediaWiki
REL1_24
|
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. | |
getPhpErrors () | |
getRadioElements ($params) | |
Get a set of labelled radio buttons. | |
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. | |
outputCss () | |
Output stylesheet for web installer pages. | |
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 |
string[] | $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 () | |
getDocUrl ($page) | |
Helper for Installer::docLink() | |
Protected Attributes | |
string | $currentPageName |
Name of the page we're on. | |
bool[] | $happyPages |
Array of pages which have declared that they have been submitted, have validated their input, and need no further processing. | |
string[] | $otherPages |
Out of sequence pages, selectable by the user at any time. | |
string[] | $phpErrors |
Captured PHP error text. | |
array[] | $session |
Cached session array. | |
bool[] | $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.
string | $linkText | |
string[] | $attribs | |
Parser | $parser | Unused |
Definition at line 1116 of file WebInstaller.php.
WebInstaller::downloadLinkHook | ( | $ | text, |
$ | attribs, | ||
$ | parser | ||
) |
Helper for "Download LocalSettings" link on WebInstall_Complete.
string | $text | Unused |
string[] | $attribs Unused | |
Parser | $parser | Unused |
Definition at line 1133 of file WebInstaller.php.
WebInstaller::endPageWrapper | ( | ) | [private] |
Output some stuff after a page is finished.
Definition at line 625 of file WebInstaller.php.
WebInstaller::envGetDefaultServer | ( | ) | [protected] |
WebInstaller::errorHandler | ( | $ | errno, |
$ | errstr | ||
) |
Temporary error handler for session start debugging.
int | $errno | Unused |
string | $errstr |
Definition at line 395 of file WebInstaller.php.
WebInstaller::execute | ( | array $ | session | ) |
Main entry point.
array[] | $session Initial session array |
Definition at line 144 of file WebInstaller.php.
Retrieves MediaWiki language from Accept-Language HTTP header.
Definition at line 511 of file WebInstaller.php.
WebInstaller::getCheckBox | ( | $ | params | ) |
Get a labelled checkbox to configure a boolean variable.
mixed[] | $params 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 907 of file WebInstaller.php.
WebInstaller::getDocUrl | ( | $ | page | ) | [protected] |
Helper for Installer::docLink()
string | $page |
Reimplemented from Installer.
Definition at line 1097 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 640 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 357 of file WebInstaller.php.
WebInstaller::getHelpBox | ( | $ | msg | ) |
Get small text indented help for a preceding form field.
Parameters like wfMessage().
string | $msg |
Definition at line 681 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 | bool | $icon | Icon name, file in mw-config/images. Default: false |
string | bool | $class | Additional class name to add to the wrapper div. Default: false. |
Definition at line 664 of file WebInstaller.php.
Referenced by getWarningBox().
Find the next page in sequence that hasn't been completed.
Definition at line 312 of file WebInstaller.php.
WebInstaller::getPageByName | ( | $ | pageName | ) |
Get a WebInstallerPage by name.
string | $pageName |
Definition at line 448 of file WebInstaller.php.
WebInstaller::getPageListItem | ( | $ | pageName, |
$ | enabled, | ||
$ | currentPageName | ||
) | [private] |
Get a list item for the page list.
string | $pageName | |
bool | $enabled | |
string | $currentPageName |
Definition at line 575 of file WebInstaller.php.
WebInstaller::getPasswordBox | ( | $ | params | ) |
Get a labelled password box to configure a variable.
Implements password hiding
mixed[] | $params 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 878 of file WebInstaller.php.
Definition at line 1195 of file WebInstaller.php.
WebInstaller::getRadioElements | ( | $ | params | ) |
Get a set of labelled radio buttons.
You probably want to use getRadioSet(), not this.
Definition at line 995 of file WebInstaller.php.
WebInstaller::getRadioSet | ( | $ | params | ) |
Get a set of labelled radio buttons.
mixed[] | $params 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) itemLabels: List of message names to use for the item labels instead of itemLabelPrefix, keyed by values 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 962 of file WebInstaller.php.
WebInstaller::getSession | ( | $ | name, |
$ | default = null |
||
) |
Get a session variable.
string | $name | |
array | $default |
Definition at line 462 of file WebInstaller.php.
WebInstaller::getTextArea | ( | $ | params | ) |
Get a labelled textarea to configure a variable.
mixed[] | $params 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 829 of file WebInstaller.php.
WebInstaller::getTextBox | ( | $ | params | ) |
Get a labelled text box to configure a variable.
mixed[] | $params 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 782 of file WebInstaller.php.
WebInstaller::getUrl | ( | $ | query = array() | ) |
Get a URL for submission back to the same script.
string[] | $query |
Definition at line 430 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 651 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.
string | $msg | |
string | $forId | |
string | $contents | |
string | $helpData |
Definition at line 741 of file WebInstaller.php.
References array(), Xml\tags(), and wfMessage().
Output stylesheet for web installer pages.
Definition at line 1187 of file WebInstaller.php.
References WebRequest\detectServer().
We're restarting the installation, reset the session, happyPages, etc.
Definition at line 417 of file WebInstaller.php.
WebInstaller::setSession | ( | $ | name, |
$ | value | ||
) |
Set a session variable.
string | $name | Key for the variable |
mixed | $value |
Definition at line 476 of file WebInstaller.php.
Initializes language-related variables.
Definition at line 492 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.
string[] | $varNames | |
string | $prefix | The prefix added to variables to obtain form names |
Definition at line 1064 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().
string | $msg |
Reimplemented from Installer.
Definition at line 381 of file WebInstaller.php.
WebInstaller::showHelpBox | ( | $ | msg | ) |
Output a help box.
string | $msg | Key for wfMessage() |
Definition at line 700 of file WebInstaller.php.
WebInstaller::showMessage | ( | $ | msg | ) |
Show a short informational message.
Output looks like a list.
string | $msg |
Reimplemented from Installer.
Definition at line 712 of file WebInstaller.php.
WebInstaller::showStatusBox | ( | $ | status | ) |
Output an error or warning box using a Status object.
Status | $status |
Definition at line 1040 of file WebInstaller.php.
WebInstaller::showStatusMessage | ( | Status $ | status | ) |
Status | $status |
Reimplemented from Installer.
Definition at line 724 of file WebInstaller.php.
WebInstaller::startPageWrapper | ( | $ | currentPageName | ) | [private] |
Called by execute() before page output starts, to show a page list.
string | $currentPageName |
Definition at line 531 of file WebInstaller.php.
Start the PHP session.
This may be called before execute() to start the PHP session.
Exception |
Definition at line 326 of file WebInstaller.php.
string WebInstaller::$currentPageName [protected] |
Name of the page we're on.
Definition at line 119 of file WebInstaller.php.
bool [] 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 93 of file WebInstaller.php.
string [] WebInstaller::$otherPages [protected] |
array( 'Restart', 'Readme', 'ReleaseNotes', 'Copying', 'UpgradeDoc', )
Out of sequence pages, selectable by the user at any time.
Definition at line 80 of file WebInstaller.php.
WebInstallerOutput WebInstaller::$output |
Definition at line 34 of file WebInstaller.php.
string [] 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 63 of file WebInstaller.php.
string [] 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 107 of file WebInstaller.php.
bool [] 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 101 of file WebInstaller.php.
int WebInstaller::$tabIndex = 1 [protected] |
Numeric index of the page we're on.
Definition at line 113 of file WebInstaller.php.