Commit graph

1221 commits

Author SHA1 Message Date
umherirrender
b409008ca5 Remove wrong @return from doc blocks
These functions actually does not return anything, so the @return is
wrong here. '@return void' is ignored.

Change-Id: I11495ee05b943c16c1c4715d617c8b50de22276c
2014-08-25 13:50:05 +00:00
umherirrender
7c6a25856c Add missing @return to function docs
Change-Id: I45b9d02f94ecc58372268ec5e6a0b572a0b7e2a9
2014-08-23 23:14:57 +02:00
Bartosz Dziewoński
f05788bac6 EditPage: Remove unused classic toolbar accesskeys data
Clearly this is not going to ever be used. Half of these conflict with
something else anyway.

Change-Id: I21ada83eba4638b3eb820b62c0c1eb90951e6f9b
2014-08-20 18:42:33 +02:00
jdlrobson
aa15d5287d Add blanket support for mediawiki ui via globals
This provides better mobile experiences on various pages
and a more consistent UI across both mobile and desktop.

It does this in two ways.

1) Forces HTMLForms to not use table based layouts so as
not to interfere with responsive nature of mediawiki ui elements

2) Applies MediaWiki.UI classes to most pages
If a page is created via Xml or Html classes it will use mediawiki ui
Where possible I've added classes unconditionally, but for cases of buttons
this is behind the $wgUseMediaWikiUIEverywhere global since button styling is
enabled on pages by default and for checkboxes since it is changes HTML markup.

3) Adds all MediaWiki.UI styles to pages which can use it
When enabled:
* Apply these styles to all pages which use HTMLForms
* Apply to EditPage
* Apply to anything that uses certain elements outputted by the
Xml or HTML helper classes
* Apply to History page
* Apply to protection page
* Apply to move page
* Apply to deletion page

Currently kept behind a global to allow us time to finetune
existing elements. After further testing we will look to kill the
globals and make mediawiki.ui the default

See: I430c0fbb79d2a33bb828b2427bda0ee01115d73f
Change-Id: I47db5eab4569514d039261d11b6dedb0eeae17b5
2014-08-15 14:48:00 -07:00
jenkins-bot
e173358375 Merge "EditPage::newSectionSummary should return a value in all code paths" 2014-08-13 16:41:49 +00:00
Bartosz Dziewoński
e0b331d16b Remove some silly references to skins/common/
Change-Id: I7676de39bf43ab01776198531e337b34405b941a
2014-08-07 02:05:42 +02:00
Brad Jorsch
b62f3428de EditPage::newSectionSummary should return a value in all code paths
Followup I72890c06.

Change-Id: Id63c3f3d2c180d193c37091dfe5f1c56e3edb45f
2014-08-04 10:48:00 -04:00
withoutaname
1ebad72b0b Remove functions deprecated since 1.21 from EditPage.php
Specifically functions getContent(), getPreloadedText(), mergeChangesInto()
and setPreloadedText().

Change-Id: I5a258b4f060b1a3ae1218b8a8f424f2c9e8f146e
2014-07-30 09:02:43 -07:00
jenkins-bot
6bb74d527e Merge "Remove functions deprecated since 1.19 from EditPage.php" 2014-07-30 15:59:26 +00:00
withoutaname
8a2c384d6f Remove functions deprecated since 1.19 from EditPage.php
Specifically functions blockedPage(), noCreatePermission(), readOnlyPage()
and userNotLoggedInPage().

Change-Id: I3f8b16037d15a8b743dff975a8d7fe2b531a40d9
2014-07-29 11:42:47 -07:00
Mwalker
b88d4628dc Merge "Toolbar: Only show on WikiText pages" 2014-07-29 16:52:51 +00:00
Étienne Beaulé
c3fcaba02f Enable the creation of empty pages
This change enables the direct creation of empty pages without needing
to use a work-around (such as "{{subst:ns:0}}"). A warning is added as
the message "blankarticle" to request confirmation that the empty page
was meant to be blank. A automatic edit summary has been added when
creating a blank page. The message is: "autosumm-newblank."

The API has been updated to permit the creation of empty pages, when
"text" is null, but not non-existant.

Unit tests have also been added to test these features.

Bug: 57238
Bug: 65206
Change-Id: I3457c36a909d1dbfaeed04a1f0568c69e0ef3386
2014-07-25 23:26:18 -04:00
umherirrender
1c68a1ee86 Cleanup some docs (includes/*.php)
- 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: I783e4dbfe5f6f98b32b9a03ccf6439e13e132bcc
2014-07-24 19:42:24 +02:00
withoutaname
da5090774f Remove two unused constants from EditPage.php
Specifically constants AS_USER_CANNOT_EDIT and AS_OK

Change-Id: I96b20962b7d4cab5c026a0f03abf9da066fbd9af
2014-07-21 17:50:47 -07:00
umherirrender
53c420e278 Fixed spacing
- use tab as indent instead of spaces
- Added space after closures "function"
- Added spaces around string_concat
- Added newline inside empty blocks
- Removed four spaces after comma

Change-Id: I4425b0c6a69b36f40acfea6511b8950cf09ce2b2
2014-07-20 21:41:41 +02:00
Brad Jorsch
355cbd2e3e Actually detect duplicate section=new submissions
The current check will basically never pass, since it's looking for the
submitted section title to match the section title inserted into the
'newsectionsummary' message.

So let's factor out the code for applying 'newsectionsummary' and use
that for the conflict check. We can't just update $this->summary
earlier, since later checks depend on looking at the submitted summary
rather than the mangled one.

Bug: 67634
Change-Id: I72890c0641f991696ec98b50a6a42b2be7f46f63
2014-07-07 18:49:04 -04:00
Fomafix
f74890b891 Replace hardcoded square brackets by message brackets
* Rename $temp into $attribs

Change-Id: Id8792f9e6d0de6460a5c6a4ae34b8a745fe2409e
2014-06-29 11:56:52 +00:00
PiRSquared17
2b438eb5c1 Show block notice on contribs for range-blocked IP
Also on deleted contribs, user, user talk pages.

Bug: 20790
Change-Id: I3ed9cb56f91b52fdb0ba452422f9d0723e9abe41
2014-06-26 15:52:21 -07:00
jenkins-bot
e94cf7a345 Merge "Check for $wgAllowUserCss and $wgAllowUserJs in EditPage.php" 2014-06-25 22:44:02 +00:00
Kevin Israel
1402236c4b Remove use of OutputPage::addParserOutputNoText()
Simply clicking "Show preview" on the edit page triggered a deprecation
warning.

Also removed the wfDeprecated() call from the method, which is still used
in a few WMF-deployed extensions without a corresponding open change.

Follows-up e8f1fede77.

Change-Id: I2cfdc84b92cf13478b9f462028d525e4ec14fdf2
2014-06-24 04:53:44 -04:00
Derk-Jan Hartman
7263ef1e00 Toolbar: Only show on WikiText pages
The toolbar is highly specific to Wikitext anyway. It was already not
added to JS and CSS subpages, but still visible on site css/js pages
and on Lua pages. This was inconsistent.

Ideally at some point, we might want a 'toolbar api' where you can
configure a 'toolbar' per content model, but let's first make it
consistent and then iterate from there when required.

Bug: 29908
Change-Id: If0853e9faf640f93b7030c4937137149d3f08cf5
2014-06-22 22:15:38 +02:00
withoutaname
100936881a Check for $wgAllowUserCss and $wgAllowUserJs in EditPage.php
This change checks for the truth values of $wgAllowUserCss and
$wgAllowUserJs before displaying the system/preview messages
userjsyoucanpreview, usercssyoucanpreview, userjspreview and
usercsspreview; if false, it will simply display the standard
messages used by other wiki pages.

Change-Id: I6a5fa8b29010f26435125479e72c423b5e4290f8
2014-06-20 18:16:11 +00:00
withoutaname
7607f02da6 Reword typo in file header for EditPage.php
Change-Id: Iefad919e09632b11bb06abcab390a756455c2ddd
2014-06-15 22:58:34 -07:00
Adam Roses Wight
05a19c5ba7 Soften test for incomplete edit POST
Do not reject POSTs from forms that were rendered before
wpUltimateParam was added.

There is also an open question about whether we should respect
kludgey scripts which have hardcoded form params.

See Umherirrender's comment on
change I78f1bbcc9bb092568fbfbec19c08d697c9ae75f8

Change-Id: I28bd6d45442bc3ba352f0de7a50709adb98b1c50
2014-06-05 00:20:24 +00:00
jenkins-bot
74fd9fbb8a Merge "editintro given a css class of its own" 2014-06-04 19:49:18 +00:00
Adam Roses Wight
262a7e2d58 Correct field used to detect incomplete POST
We were using something other than the last parameter to check for an
incomplete request.  That is not guaranteed to work.

TODO:
* Is it worthwhile to take a checksum of the params as well?

Change-Id: I78f1bbcc9bb092568fbfbec19c08d697c9ae75f8
2014-05-24 05:22:37 +00:00
PiRSquared17
287ba2bbdb editintro given a css class of its own
The template added using the editintro url parameter is
contained within a div tag with a unique class 'mw-editintro'

Bug: 30959
Change-Id: I9afa41a01a2318fba27df04054871cd593be7e92
2014-05-23 23:45:41 +00:00
Adam Roses Wight
729f3039de whitespace fixup
Change-Id: Id3164f1a36d3b36f2e7404af5dd0545049e2b778
2014-05-21 01:00:45 -07:00
jenkins-bot
49952a4050 Merge "Make phpcs-strict pass on includes/ (7/7)" 2014-05-19 19:38:53 +00:00
Siebrand Mazeland
a7fbdd6503 Make phpcs-strict pass on includes/ (7/7)
Change-Id: Ia9baaf0b3cdbe1a3c6b50ef8c4fe86fead88f909
2014-05-15 20:07:09 +02:00
Sam Smith
61129f8cdc Delete the post-edit cookie using the correct domain
Use the mediawiki.cookie#set to delete the post-edit cookie so that the
correct domain is used.

Bug: 61979
Change-Id: I0cba8d1421f359ff78f3f994af358e9997f27041
2014-05-15 02:41:33 -04:00
jenkins-bot
82b8b57893 Merge "Expand core post edit functionality to match VE" 2014-05-01 20:29:02 +00:00
Alex Monk
e86f68c978 Expand core post edit functionality to match VE
Then VE can just use the core messages

Bug: 52871
Change-Id: I2cd9defecd47321a30461a4d9ddd627c5018a891
2014-04-29 01:59:41 +01:00
umherirrender
a3983418d5 Fixed some @params documentation (includes/*)
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: I0056b4a8df243cfc0c5f25378de48f7a35170aca
2014-04-22 13:07:02 +02:00
Bartosz Dziewoński
59002d8935 Consistently use '@deprecated since <version>'
Variants included 'in <version>', 'as of <version>' and just the
version number.

Some @deprecated annotations do not have the version number at all,
I want to hunt them down separately.

Change-Id: I8208c6097098f4735d4f51bc42254675f1f27f6d
2014-04-15 22:18:19 +02:00
Mwalker
c45d497eda Merge "New hook for readonly editpages" 2014-04-15 18:15:59 +00:00
Derk-Jan Hartman
61c9dcf696 New hook for readonly editpages
EditPage::showReadOnlyForm:initial which is analogous to
EditPage::showEditForm:initial

Bug: 45258
Change-Id: I6885d617e18562acf0331e8db5790b53b489dbc2
2014-04-15 08:46:01 +02:00
umherirrender
725d9d125d Removed unneeded spaces and colons in @param and friends
Also 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.

Change-Id: Ic36c8c7820a6c2d603f1138130670c6bf6a1ca59
2014-04-08 16:02:49 +00:00
jenkins-bot
d48bd95a47 Merge "Allow access to revision deleted wikitext on action=edit" 2014-04-07 13:19:51 +00:00
jenkins-bot
08be87a99b Merge "Remove button-math" 2014-04-07 09:38:35 +00:00
Moritz Schubotz (Physikerwelt)
422efd5dcc Remove button-math
The button-math is now created by the Extension:Math
see I3d126c1c252c27fa65ab8fb42ffab66a2d99cfa8

Bug: 60471
Change-Id: Ib17aa47c7d647e1ed293541adbdd1aa77e25e59e
2014-04-07 09:34:08 +00:00
Jackmcbarn
730c2c01a8 Allow passing parameters to preload
When pages are loaded in the edit box via preload, allow parameter
substitution. The interface-style $1 is used rather than the
template-style {{{1}}} to avoid conflicts with preloads that add template
parameters. Syntax is:
action=edit&preload=Foo&preloadparams[]=first&preloadparams[]=second

Bug: 12853
Change-Id: If02cf4b3dba9f9d22a956d8bfff224677cbce00d
2014-04-06 21:03:02 -04:00
umherirrender
46172a8433 Allow access to revision deleted wikitext on action=edit
EditPage.php has a Revision::getContent() without specifiy the
visiblity, that will give a empty textbox for revision deleted revisions
of a page, when editing this with the unhide=1 param.
Adding Revision::FOR_THIS_USER to allow admins or oversighter to see the
wikitext of such a revision.

Change-Id: Ie010346b613d96eacee6e33be0ed141f7061b709
2014-04-04 05:09:27 +00:00
jenkins-bot
66277f58aa Merge "Set visibility for some methods and remove unused ones" 2014-03-26 15:49:30 +00:00
Siebrand Mazeland
98de764c60 Set visibility for some methods and remove unused ones
* private: checkUnicodeCompliantBrowser(), makesafe(), unmakesafe().
* protected: safeUnicodeInput(), safeUnicodeOutput().
* unused and deleted: safeUnicodeText(), sectionAnchor().

Also updated documentation for touched methods.

Change-Id: I1a46113a6380505aeea71150b6d106ec68423002
2014-03-26 09:43:32 +01:00
Matthew Flaschen
dbede6aad3 Fix custom local MediaWiki:Helppage values
Followup to 3a6ea89d4a

Change-Id: I7effec352d263f536d1d1763e9cd56d2f5154f13
2014-03-25 23:15:59 -04:00
jenkins-bot
28b4096a23 Merge "Remove some unneeded local vars from EditPage.php" 2014-03-22 21:26:07 +00:00
umherirrender
c2d4763f6f Remove some unneeded local vars from EditPage.php
Looks like a left over from refactoring in r31475

Change-Id: I6ffd2e1db8a842bebc37ce67e6265714258e79f9
2014-03-20 21:06:18 +00:00
Federico Leva
3a6ea89d4a Add link to PD help translatable pages from sidebar
Reuses the existing helppage default message and
adds it to ignored messages as Special:MyLanguage
is used and translations have to be removed:
this does not bother customised local links.

Now using HTTPS URL to mediawiki.org per Brion
on bug 54835. This slightly increases the footprint
of the change but should keep everything functionally
equivalent. The sidebar is not bothered by full URLs,
except in self-defeating tests which are also fixed here.

Bug: 53887
Change-Id: I999b97729536dbab4a3a5efd8d6f86527f031948
2014-03-19 23:01:09 +01:00
Alexandre Emsenhuber
c29d513deb Put the "else" (or "elseif") on the same line as the previous closing brace
Per https://www.mediawiki.org/wiki/Manual:Coding_conventions#Indenting_and_alignment

Change-Id: I208981db0a866524156bad18cb687f010afeac2c
2014-03-15 13:54:53 +01:00