MediaWiki
REL1_19
|
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 | |
$output | |
$pageSequence | |
$request | |
$showSessionWarning = false | |
Protected Member Functions | |
envGetDefaultServer () | |
Helper function to be called from envCheckServer() | |
getDocUrl ($page) | |
Helper for Installer::docLink() | |
Protected Attributes | |
$currentPageName | |
$happyPages | |
$otherPages | |
$phpErrors | |
$session | |
$skippedPages | |
$tabIndex = 1 | |
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 15 of file WebInstaller.php.
WebInstaller::__construct | ( | WebRequest $ | request | ) |
Constructor.
$request | WebRequest |
Definition at line 113 of file WebInstaller.php.
References $request, $wgParser, and Installer\__construct().
WebInstaller::docLink | ( | $ | linkText, |
$ | attribs, | ||
$ | parser | ||
) |
Extension tag hook for a documentation link.
$linkText | |
$attribs | |
$parser |
Definition at line 1041 of file WebInstaller.php.
References $url, and getDocUrl().
WebInstaller::downloadLinkHook | ( | $ | text, |
$ | attribs, | ||
$ | parser | ||
) |
Helper for "Download LocalSettings" link on WebInstall_Complete.
$text | |
$attribs | |
$parser |
Definition at line 1056 of file WebInstaller.php.
References Html\element(), Html\rawElement(), and wfMsgHtml().
WebInstaller::endPageWrapper | ( | ) | [private] |
Output some stuff after a page is finished.
Definition at line 585 of file WebInstaller.php.
Referenced by execute().
Reimplemented from Installer.
Definition at line 1071 of file WebInstaller.php.
References $path, Installer\setVar(), and showError().
WebInstaller::envGetDefaultServer | ( | ) | [protected] |
Helper function to be called from envCheckServer()
Reimplemented from Installer.
Definition at line 1091 of file WebInstaller.php.
References WebRequest\detectServer().
WebInstaller::errorHandler | ( | $ | errno, |
$ | errstr | ||
) |
Temporary error handler for session start debugging.
$errno | |
$errstr | string |
Definition at line 373 of file WebInstaller.php.
WebInstaller::execute | ( | array $ | session | ) |
Main entry point.
$session | Array: initial session array |
Definition at line 131 of file WebInstaller.php.
References $page, $result, $session, Installer\disableTimeLimit(), echo, endPageWrapper(), Installer\exportVars(), finish(), getLowestUnhappy(), getPageByName(), getUrl(), Installer\getVar(), setupLanguage(), and startPageWrapper().
Clean up from execute()
Definition at line 382 of file WebInstaller.php.
Referenced by execute().
Retrieves MediaWiki language from Accept-Language HTTP header.
Definition at line 484 of file WebInstaller.php.
References $wgLanguageCode, and Language\getLanguageNames().
Referenced by setupLanguage().
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 862 of file WebInstaller.php.
References Xml\check(), Installer\getVar(), nextTabIndex(), Installer\parse(), and wfMsg().
WebInstaller::getDocUrl | ( | $ | page | ) | [protected] |
WebInstaller::getErrorBox | ( | $ | text | ) |
Get HTML for an error box with an icon.
$text | String: wikitext, get this with wfMsgNoTrans() |
Definition at line 600 of file WebInstaller.php.
References getInfoBox().
Referenced by showError(), and showStatusBox().
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 337 of file WebInstaller.php.
References $url.
WebInstaller::getHelpBox | ( | $ | msg | ) |
Get small text indented help for a preceding form field.
Parameters like wfMsg().
$msg |
Definition at line 638 of file WebInstaller.php.
References Installer\parse(), wfMsgHtml(), and wfMsgReal().
WebInstaller::getInfoBox | ( | $ | text, |
$ | icon = false , |
||
$ | class = false |
||
) |
Get HTML for an info box with an icon.
$text | String: wikitext, get this with wfMsgNoTrans() |
$icon | String: icon name, file in skins/common/images |
$class | String: additional class name to add to the wrapper div |
Definition at line 624 of file WebInstaller.php.
References false, Html\infoBox(), Installer\parse(), and wfMsg().
Referenced by getErrorBox(), and getWarningBox().
Find the next page in sequence that hasn't been completed.
Definition at line 297 of file WebInstaller.php.
Referenced by execute().
WebInstaller::getPageByName | ( | $ | pageName | ) |
Get a WebInstallerPage by name.
$pageName | String |
Definition at line 425 of file WebInstaller.php.
Referenced by execute().
WebInstaller::getPageListItem | ( | $ | pageName, |
$ | enabled, | ||
$ | currentPageName | ||
) | [private] |
Get a list item for the page list.
$pageName | String |
$enabled | Boolean |
$currentPageName | String |
Definition at line 541 of file WebInstaller.php.
References $currentPageName, Html\element(), getUrl(), and wfMsg().
Referenced by startPageWrapper().
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 833 of file WebInstaller.php.
References Installer\getFakePassword(), getTextBox(), and Installer\getVar().
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 917 of file WebInstaller.php.
References Installer\getVar(), label(), nextTabIndex(), Installer\parse(), Xml\radio(), Xml\tags(), and wfMsgNoTrans().
WebInstaller::getSession | ( | $ | name, |
$ | default = null |
||
) |
Get a session variable.
$name | String |
$default |
Definition at line 437 of file WebInstaller.php.
Referenced by setupLanguage().
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 784 of file WebInstaller.php.
References Installer\getVar(), label(), nextTabIndex(), and Xml\textarea().
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 737 of file WebInstaller.php.
References Installer\getVar(), Xml\input(), label(), and nextTabIndex().
Referenced by getPasswordBox().
WebInstaller::getUrl | ( | $ | query = array() | ) |
Get a URL for submission back to the same script.
$query | array |
Definition at line 407 of file WebInstaller.php.
References $url, and wfArrayToCGI().
Referenced by execute(), and getPageListItem().
WebInstaller::getWarningBox | ( | $ | text | ) |
Get HTML for a warning box with an icon.
$text | String: wikitext, get this with wfMsgNoTrans() |
Definition at line 611 of file WebInstaller.php.
References getInfoBox().
Referenced by showStatusBox().
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 696 of file WebInstaller.php.
References Xml\tags(), and wfMsgHtml().
Referenced by getRadioSet(), getTextArea(), and getTextBox().
Get the next tabindex attribute value.
Definition at line 458 of file WebInstaller.php.
Referenced by getCheckBox(), getRadioSet(), getTextArea(), and getTextBox().
We're restarting the installation, reset the session, happyPages, etc.
Definition at line 395 of file WebInstaller.php.
WebInstaller::setSession | ( | $ | name, |
$ | value | ||
) |
Set a session variable.
$name | String key for the variable |
$value | Mixed |
Definition at line 450 of file WebInstaller.php.
Initializes language-related variables.
Definition at line 465 of file WebInstaller.php.
References $wgContLang, $wgLang, $wgLanguageCode, Language\factory(), getAcceptLanguage(), getSession(), Installer\getVar(), and Installer\setVar().
Referenced by execute().
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 |
$prefix | String: the prefix added to variables to obtain form names |
Definition at line 995 of file WebInstaller.php.
References Installer\setPassword(), and Installer\setVar().
WebInstaller::showError | ( | $ | msg | ) |
Show an error message in a box.
Parameters are like wfMsg().
$msg |
Reimplemented from Installer.
Definition at line 360 of file WebInstaller.php.
References getErrorBox(), and wfMsgReal().
Referenced by envCheckPath(), and startSession().
WebInstaller::showHelpBox | ( | $ | msg | ) |
Output a help box.
$msg | String key for wfMsg() |
Definition at line 655 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 667 of file WebInstaller.php.
References Installer\parse(), and wfMsgReal().
WebInstaller::showStatusBox | ( | $ | status | ) |
Output an error or warning box using a Status object.
$status | Status |
Definition at line 971 of file WebInstaller.php.
References getErrorBox(), and getWarningBox().
WebInstaller::showStatusMessage | ( | Status $ | status | ) |
$status | Status |
Reimplemented from Installer.
Definition at line 679 of file WebInstaller.php.
References Status\getErrorsArray(), and Status\getWarningsArray().
WebInstaller::startPageWrapper | ( | $ | currentPageName | ) | [private] |
Called by execute() before page output starts, to show a page list.
$currentPageName | String |
Definition at line 504 of file WebInstaller.php.
References $currentPageName, Html\element(), getPageListItem(), and wfMsg().
Referenced by execute().
Start the PHP session.
This may be called before execute() to start the PHP session.
Definition at line 310 of file WebInstaller.php.
References showError(), and wfIniGetBool().
WebInstaller::$currentPageName [protected] |
Definition at line 106 of file WebInstaller.php.
Referenced by getPageListItem(), and startPageWrapper().
WebInstaller::$happyPages [protected] |
Definition at line 80 of file WebInstaller.php.
WebInstaller::$otherPages [protected] |
array( 'Restart', 'Readme', 'ReleaseNotes', 'Copying', 'UpgradeDoc', )
Definition at line 67 of file WebInstaller.php.
WebInstaller::$output |
Definition at line 20 of file WebInstaller.php.
WebInstaller::$pageSequence |
array( 'Language', 'ExistingWiki', 'Welcome', 'DBConnect', 'Upgrade', 'DBSettings', 'Name', 'Options', 'Install', 'Complete', )
Definition at line 50 of file WebInstaller.php.
WebInstaller::$phpErrors [protected] |
Definition at line 40 of file WebInstaller.php.
WebInstaller::$request |
Definition at line 27 of file WebInstaller.php.
Referenced by __construct().
WebInstaller::$session [protected] |
Definition at line 34 of file WebInstaller.php.
Referenced by execute().
WebInstaller::$showSessionWarning = false |
Definition at line 94 of file WebInstaller.php.
WebInstaller::$skippedPages [protected] |
Definition at line 88 of file WebInstaller.php.
WebInstaller::$tabIndex = 1 [protected] |
Definition at line 100 of file WebInstaller.php.