Commit graph

153 commits

Author SHA1 Message Date
Fomafix
f253c0f07b WebInstaller: Use <div> instead of <span>
The parser output is enclosed by a <div> and must not enclosed into a
<span> because of an HTML validation error.

Bug: T171423
Change-Id: I034d54436a622803fe07d3c93483b9fe705bc925
2017-07-24 07:31:31 +02:00
Thiemo Mättig
d14faa6bed Remove auto-generated "Constructor" documentation on constructors
Having such comments is worse than not having them. They add zero
information. But you must read the text to understand there is
nothing you don't already know from the class and the method name.

Change-Id: I994d11e05f202b880390723e148d79c72cca29f0
2017-07-10 10:15:51 +00:00
James D. Forrester
9635dda73a includes: Replace implicit Bugzilla bug numbers with Phab ones
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.

Change-Id: I6f59febaf8fc96e80f8cfc11f4356283f461142a
2017-02-21 18:13:24 +00:00
Kunal Mehta
4dba618ae0 installer: Allow specifying where LocalSettings.php should be saved
This allows software packages to specify where the LocalSettings.php
file should be saved to when the user is downloading it from the web
installer.

Bug: T123151
Change-Id: I06ded602be9aac0a10773e9d85c4d1585a70933b
2016-06-21 07:53:15 -07:00
Reedy
b5656b6953 Many more function case mismatches
Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca
2016-03-19 00:20:58 +00:00
Timo Tijhof
f58eea9bbd installer: Update main RequestContext when updating $wgLang
Change-Id: I1e3b76b2358a90a551616dc84eb6f2be6bb41c0a
2016-03-03 01:40:01 +00:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
This, that and the other
da9696333a Installer: Validate password against sysop/bureaucrat policies
Previously, user-group-specific policies were not checked, because the
user hadn't been created yet, and so wasn't assigned to any groups. In his
overhaul of password policy, Chris wrote a function that was designed for
exactly this purpose (UserPasswordPolicy::checkUserPasswordForGroups) but
didn't put it into use.

Some changes to the error handling code are needed so the error messages
display correctly.

Bug: T115700
Change-Id: I1391c77c9667b646b29003bb0b2abcdc21d8c4d8
2015-10-29 23:24:40 +11:00
saper
a93aa28711 Web installer should not pollute global namespace with session variables
There is no need to store session variables
(that also include user-supplied arguments)
as $wgXXX global variables.

Bug: T116375
Change-Id: I880d4299566beaf99ed1fc21c690cdda64149b0e
2015-10-24 02:00:02 +02:00
Brad Jorsch
673c07656e Fix "installer started" detection
NoLocalSettings.php tries to detect whether the installer has been
started or not. But this detection has been broken since I4cf237d when a
change was made to stop setting the session name when NO_SESSION is
defined, causing NoLocalSettings.php to be looking at a different
session-cookie than is actually being used by the installer.

The complete fix is twofold:
* Have WebInstaller::startSession() call session_name()
* Have NoLocalSettings.php not call session_name() when PHP's
  session.auto_start configuration setting is set.

Change-Id: I618d11df902b5d1f70e175bc94137621e9195c2f
2015-10-09 17:34:48 -04:00
Siebrand Mazeland
2bdfbe629f Fix PHPCS warnings in includes/installer
8 uses of $IP remain, which trigger the global naming convention
check.

Change-Id: I1040782323ec7512fb7badd6052742ecd13d9dff
2015-09-28 13:40:27 +02:00
Ori Livneh
1e06a9f02f mediawiki.legacy.config: use own help-field styling
Instead of using .mw-help-field-container from mediawiki.legacy to style help
tooltips, use a class that is specific to the WebInstaller and which is styled
in its stylesheet. This allows us to stop embedding it in mediawiki.legacy
(which is loaded on every page).

The CSS is copied directly from the styles for mw-help-field-container et al.
in mediawiki.legacy.

Change-Id: I8e092e9d2c91b5f70499d93c1134f43f2e96348c
2015-08-14 21:28:37 -07:00
Chad Horohoe
785a8289d3 Do not support new installations via .php5 entrypoint any longer
Continues the path of deprecating $wgScriptExtension and all of
the related baggage.

You'll only end up with sadness when we rip out of the rest of
this later so don't let people shoot themselves in the foot.

Change-Id: I34cd1d2c266405ebc761a271e3740e972fb7cf2f
2015-06-02 08:38:57 -07:00
Chad Horohoe
3809b6a39b Installer: fix images in CSS
Paths are tricky and installer code is old and ugly. Somebody
should really clean this up. Prep the paths always, not just
on the environment checks page.

Co-Authored-By: Timo Tijhof <krinklemail@gmail.com>
Bug: T100145
Change-Id: I4e55c59c2bed0dc94e6bc3a8c59709ec80822235
2015-05-24 13:28:54 +00:00
Bartosz Dziewoński
6ff6ded2fc Html: Don't accept paths relative to skins/common/images/ in infoBox()
There are no files worth referencing there anymore.

No usages found in extensions, only one usage in core already didn't
depend on that behavior.

Change-Id: If1fd68a3a7355c8195fd2aad86e7584a5772bd4c
2014-09-08 21:03:23 +02:00
Bartosz Dziewoński
a8e474c1f2 Move installer files from skins/common/ to mw-config/
The CSS and JS files are definitely used only by the installer.

As for the images:
* mediawiki.png is still used directly by some error pages
  (includes/PHPVersionError.php, includes/templates/NoLocalSettings.php)
* ajax-loader.gif is still used by shared.css
* bullet.gif is mysteriously used by *something*, according to the
  logs at bug 69277 comment 11; I currently have no idea what, so
  let's keep it here for a while
* All other ones don't grep (outside of the installer itself) and
  don't appear in the logs on bug 69277.

Bug: 69277
Change-Id: I9146d9211a807911a5e0cfaa1dd3ab8170f333ca
2014-08-17 22:32:25 +00:00
jenkins-bot
e8c46feb78 Merge "Cleanup some docs (includes/[e-l])" 2014-07-25 17:05:35 +00:00
Legoktm
7458dc32d9 Revert "Generalize Installer::showStatusMessage()"
We probably want to put errors on top in the web installer
and warnings on top in the CLI installer due to differences
in scrolling.

This reverts commit 1c1e321af7.

Change-Id: I247030f0a3da6dff44884f4a282e52e92657fd91
2014-07-25 01:38:06 +00:00
umherirrender
b883e8c7c0 Cleanup some docs (includes/[e-l])
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: I41a84e8e1dec39170aa655250325ffc485eaeaef
2014-07-24 19:43:03 +02:00
jenkins-bot
086d879de2 Merge "WebInstaller::setVarsFromRequest() do not trim passwords" 2014-07-21 18:24:36 +00:00
Bartosz Dziewoński
a957836f4a Support for enabling skins in the installer
Let the user choose the skins to install (like extensions)
and decide which one will be the default for the new wiki.

Right now core skins are always enabled regardless of user
choices there, but I'm working on that.

Bug: 66440
Change-Id: I2e10720a6ac327e66c415bb91dc897885f952738
2014-07-20 19:54:39 +02:00
withoutaname
1c1e321af7 Generalize Installer::showStatusMessage()
Folds functionality from child classes back into a
concrete implementation in the parent class, reducing code duplication.

Change-Id: I697fe697dbd59d5db6fc77aba20af322e6011782
2014-07-13 01:52:49 +00:00
Sergio Santoro
e33dc0c17f WebInstaller::setVarsFromRequest() do not trim passwords
Bug: 30524
Change-Id: Ide30c9078ae8cbf97a6f86c4e230f44ce8382a1f
2014-07-13 00:12:21 +02:00
Timo Tijhof
2bd62bae99 installer: Recompute wgStylePath etc. after setting wgScriptPath
Bug: 67810
Change-Id: I95d02b41222d25fe216453c1d795475d4acdead5
2014-07-12 11:04:51 +00:00
Timo Tijhof
1a66438a06 installer: Move Server/Extension/Path preparations out of envChecks
These aren't checks but preparations, they should always run
even when the user is further in the installer process or when
the server is generating the WebInstaller stylesheet (which needs
wgScriptPath to be set in order to remap image paths correctly).

Bug: 67810
Change-Id: I98eb15096ff4ef3e464b9d00c58b036a608deb41
2014-07-12 13:04:38 +02:00
Timo Tijhof
81e74e8d69 Installer: Simplify css request
Instead of passing around the direction in the request, just set
'css=1'. We already have the language code and directionality
available and even rely on it between requests to set other
localisation-related things.

Change-Id: I717cb299b3639024e79880039e0d1f2ff273ab44
2014-06-04 21:25:55 +02:00
jenkins-bot
348a0bead1 Merge "Installer: output css correctly when session errors occur" 2014-05-27 18:15:37 +00:00
Siebrand Mazeland
a7fbdd6503 Make phpcs-strict pass on includes/ (7/7)
Change-Id: Ia9baaf0b3cdbe1a3c6b50ef8c4fe86fead88f909
2014-05-15 20:07:09 +02:00
jenkins-bot
894b5da4df Merge "Remove underscore from classes WebInstaller_*" 2014-05-15 15:07:47 +00:00
Waldir Pimenta
9674ebe42c Installer: Minor tweaks to UI
- add a tooltip to the "help" links to make it clear they'll expand in place
- don't use an IMG tag for the download link;
  instead, apply a css background to the A element, so that on hover
  there isn't an underlined space between the link text and the image;
- grammar fix to sqlite help message: replace a colon with a semicolon.

Change-Id: Iacf5ed57d983a21d87467c848823607032901cec
2014-05-13 18:59:33 +01:00
Siebrand Mazeland
5bc1cf4093 Remove underscore from classes WebInstaller_*
Part of program to remove underscores from class names. Checked core and
675 extensions for occurrences. All uses are in core in core are updated
in this patch. There are no uses in Gerrit extensions.

Change-Id: I6150c2d3f5a18496da5bcdcadc5d8982b70bec7a
2014-05-12 18:36:55 +02:00
Sergio Santoro
1e9064483d Installer: output css correctly when session errors occur
CSS was not showing correctly when session errors occurred.
This was caused because mw-config/index.php was not taking
into account the "css" parameter passed in the URL.

Change-Id: I500c7340ab6826d428e9e3be28bcfc7ca5ed8466
2014-05-04 12:43:28 +02:00
umherirrender
f5f1e38b9a Fixed some @params documentation (includes/[db|installer])
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: I3595e9aac69ac42fbb74b0783fae0ad9bcc831aa
2014-04-19 13:55:27 +02:00
Thiemo Mättig
6419dc7e26 WebInstaller inline documentation cleanup
This is a follow-up to Ide17d5af13c416c62a40029848ac17ba24eb5563.
However, I could not fix the "minor style" issue mentioned there
because this would make the line to long.

I fixed lots and lots of other issues instead, e.g.:

* "void" isn't a thing. Added "return null" instead.
* Removed documentation that said "a constructor is a constructor".
* Use "string[]" and such instead of "array" if possible.

Change-Id: I9658c2af58862f1d634cf1b2ba4c9d0f27ee7608
2014-04-08 12:22:43 +02:00
MaxSem
0998c41943 Revert "Include short descriptions for extensions bundled in the release"
Contains var_dump(), self-merged non-trivial code.

This reverts commit 96b2c66e24.

Change-Id: Ie630466ef50e6bcdabf01daff28c283c764aae35
2014-01-12 23:59:44 +00:00
Mark A. Hershberger
96b2c66e24 Include short descriptions for extensions bundled in the release
Also fix styling for the list of extensions.

Bug: 43817
Change-Id: I5335225683ec8f1c163bb67f478787ebc52ee3a9
2014-01-12 18:21:55 -05:00
Siebrand Mazeland
abd4247019 Remove unused local variables, update formatting and documentation
Change-Id: Ib17f5f05d6cc48ac448df0ea8515d570713df9b5
2013-11-25 14:42:34 +01:00
daniel
40f6d8546c Make sure we always restore the error handler.
Change-Id: I27f5d11ea27f783eda71c2bfdba7e70695f5d53c
2013-11-15 16:57:34 +00:00
Siebrand Mazeland
8a7d5c154b Update documentation
Change-Id: Ia8ca4f3ab49e8a437830a9d15d013e9ddb0ea3ab
2013-11-01 12:40:08 +01:00
Siebrand Mazeland
bb0044f638 Address PHP CodeSniffer errors and warnings
One class of errors left unaddressed: Class name "WebInstaller_Language"
is not in camel caps format. I think this can be changed, too, but I
wasn't able to quickly find out where class names are being created.

Change-Id: I920b0231db1b70b68c6c8907257c288a0e112668
2013-10-23 12:42:07 +00:00
Siebrand Mazeland
626addab9e Update formatting
With some manual corrections.

Change-Id: Icd947288c32fdb90a0f35388963ef5a17ffa58e7
2013-10-09 09:35:18 +00:00
Timo Tijhof
90749a261c doc: Remove repetitive "Give grep a chance" phrase from comments
* Follows-up b2e2b2e016.
* Minor clean up of surrounding documentation comments.
* Fixed missing keys for messages in WebInstallerPage

Change-Id: Iaa692064262f3c0e10cfa5e4b1ec8c86e5d02362
2013-08-29 10:46:46 -07:00
shirayuki
b2e2b2e016 Give grep a chance to find the usages
Change-Id: I18846326539b814fa7fa93ca54117dac3572e4b0
2013-08-16 22:07:38 +09:00
umherirrender
6f79eef473 Fixed spacing around parenthesis in includes
Change-Id: Ie8adc00f4ee8ecec4554e584c18d5d2073415397
2013-04-28 15:50:07 +00:00
umherirrender
ee31d37821 Fixed spacing in context/installer/media/templates/upload folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I9761be9fa47adc3554852a97b19792b4648466ad
2013-04-21 06:22:06 +00:00
umherirrender
15abcf71ca Added/Removed spaces around string concatenation
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !

Fixed windows newline style

Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
2013-04-13 13:36:24 +02:00
umherirrender
6c278b6d7e fix some spacing
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
  calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays

Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
2013-03-25 22:22:46 +00:00
umherirrender
926d2ee143 Remove spaces between parentheses in function calls
Change-Id: If8ec665a01b566fa5189dfcc810b2d9a17f371e1
2013-03-17 16:13:22 +01:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
umherirrender
48cd72819e fix some spacing
Change-Id: Ia9650be8b791fd2f0ccbc099436918a9d12d9968
2013-02-04 20:04:26 +00:00