Commit graph

1155 commits

Author SHA1 Message Date
Kunal Mehta
0988d1200d Merge SimpleAntiSpam extension into core
Adds an empty, hidden input field to the edit interface, and will
reject any edit if that field is filled in. This will protect
against the simplest form of spambots.

Localized messages will be imported separately.

Bug: 52063
Change-Id: I185b6a1e232299f496244a23f4bf0dc6ea22b6c9
2013-10-24 20:56:11 +02:00
jenkins-bot
203ff497bb Merge "Make it possible for EditPage::getCopyrightWarning to return HTML" 2013-10-21 01:19:27 +00:00
Kevin Israel
d7b953c25c Remove proxy check in EditPage.php
$wgBlockOpenProxies, $wgProxyPorts, $wgProxyScriptPath, and
$wgProxyMemcExpiry have been removed, along with the open proxy
scanner	script they were added for.

Bug: 54597
Change-Id: Id4c7521443f04995df3d8762d23629c18ada76f8
2013-10-21 01:12:47 +00:00
Kunal Mehta
5655514978 Make it possible for EditPage::getCopyrightWarning to return HTML
Adds a $format option to let it return various output formats
so code that needs HTML doesn't have to do hacky stuff.

Change-Id: Ie4ff9738773399f9f00994c6cc587703ce99a681
2013-10-20 03:04:25 -07:00
Aaron Schulz
bc69502492 Support rate limiting backlink purges, including null edits
Change-Id: I86e45b7d0eba7d87f65150b34e190e04d8342b3e
2013-09-27 05:37:39 +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
jenkins-bot
59ea520aee Merge "wpUndidRevision should be passed along during 'preview' and 'diff'" 2013-08-26 15:32:43 +00:00
umherirrender
24bfde2710 Fix spacing and break some lines
Change-Id: Ia57685d8858e02e399ad5c75ce64d12609d340ac
2013-08-24 17:06:25 +02:00
bsitu
c38a042a81 wpUndidRevision should be passed along during 'preview' and 'diff'
bug: 53176
Change-Id: Ie0b71b0cd8a3e94d92f9b275cdc623cfde154de2
2013-08-23 16:00:03 -07:00
umherirrender
305dbc23a5 Do not parse param of newsectionsummary on new section preview
Summary preview of section=new shows expand templates.
Using the summary text as raw param avoids this.
Other usages of 'newsectionsummary' do it the same way.

Bug: 40453
Change-Id: I1fd3adfc64c664dfd490c11bfe60924fa215875c
2013-08-18 09:37:45 +00:00
Matthew Flaschen
efe86f6f12 Commenting and doc fixes around the spam regexes
Follow-up to clarify 6e83874748 , fix an
older inaccurate comment, and fix a docblock copy-and-paste error.

Change-Id: I14e4ff2a5c3e61d7a9a27428953f1579d9d8436b
2013-08-18 09:26:53 +00:00
shirayuki
b2e2b2e016 Give grep a chance to find the usages
Change-Id: I18846326539b814fa7fa93ca54117dac3572e4b0
2013-08-16 22:07:38 +09:00
TheDJ
6006a8895b Merge "EditPage: Wrap the pipe between "Cancel" and "Editing help" links in a <span>" 2013-08-15 18:31:43 +00:00
TheDJ
59dc5b3f89 Merge "mediawiki.action.edit: Add styles for edit form's footer" 2013-08-15 18:31:26 +00:00
MatmaRex
49fbff1882 EditPage: Wrap the pipe between "Cancel" and "Editing help" links in a <span>
This will make it possible to hide or style it without nasty hacks
like the one Vector extension's ext.vector.footerCleanup module uses.

Bug: 43689
Change-Id: Id9269876939d3453c53473f7e3650c375f6fdd22
2013-08-13 12:39:51 +00:00
Brad Jorsch
2b20038ce7 Add limit report data on preview pages
While we've long had the "NewPP limit report" hidden in an HTML comment,
it is hard for users to find this as they're not likely to look for
profiling information hidden in an HTML comment. Even for those aware of
it, it's not particularly convenient to find.

This changeset adds a table showing this information at the bottom of
the page preview. It also adds the ability for this information to be
added to the ParserOutput object in a structured manner, and various
messages so the report can be localized for the end user.

Note that, for backwards compatability, the default English messages are
used for the "NewPP limit report" comment rather than the localized
messages.

Change-Id: Ie065c7b5a17bbf1aa484d0ae1f3ee0f5d41f8495
2013-08-13 05:54:03 +00:00
MatmaRex
35c3f63cc1 mediawiki.action.edit: Add styles for edit form's footer
Copied verbatim from Vector extension's ext.vector.footerCleanup module.

Bug: 43689
Change-Id: I1b92499961b7ea1949e1d1e48ced6f562822d1cd
2013-08-09 20:44:51 +02:00
jenkins-bot
8734fe02b8 Merge "(bug 46463) Mark edit preview as in page view language" 2013-08-08 07:16:04 +00:00
Brad Jorsch
54bf87d346 Improve WebResponse::setcookie
Various bits of code are not using this because it doesn't support
various use cases, e.g. session cookies, httpOnly, custom paths, etc.

Refactor it to add all those options. Also add a hook so extensions can
override the setting of the cookie.

Change-Id: Ia0c424a48d9455a8574d91631cde0f00c9882288
2013-08-07 17:43:06 -04:00
Alexandre Emsenhuber
6e83874748 (bug 49694) Apply $wgSpamRegex to the new section name in action=edit&section=new
Either on $this->sectiontitle or $this->summary depending on which will be used.

bug: 49694
Change-Id: Ie35c6bfe5cc66313930b0dc4d8f9e618657b3aea
2013-07-26 16:53:42 +02:00
MatmaRex
82452b2b7c Make the templates/category lists on edit page collapsible
This is a total rewrite of Vector extension's functionality, to fix
various accessibility and internationalization issues with the
original one. Both the JavaScript and the CSS have been redone from
scratch.

Still, the look&feel is almost the same as in the original version,
save for the mentioned messaging changes and minor UI differences (the
toggles are no longer <a> elements). The same cookie names have been
used to avoid any issues when migrating.

Used standard arrow icons from the mediawiki.icon module.

Bug: 43689
Change-Id: I91a3704cb09b9e17dd8baa516ab6f8ee441b7467
2013-07-26 05:20:32 +00:00
Roan Kattouw
6bf642d80a Add a hook to Title::getEditNotices() so extensions can add them
FlaggedRevs will have to use this to expose its edit notices to
VisualEditor.

Also add an $oldid parameter so edit notices can be generated based
on the revision ID being edited.

Change-Id: Ie44a01ebfa7002fa3a89f081e0f831442666ac03
2013-07-23 17:31:27 -07:00
MatmaRex
83cbdc6f36 Allow creation of empty MediaWiki: pages
This is useful now since it's possible to disable messages by blanking
them (see bug 14176).

Instead disallow creation of page contents equivalent to the default
message to serve the same purpose as disallowing blanking did (prevent
edits which wouldn't change anything anyway; the edit form is even
prefilled with the default contents).

Bug: 50124
Change-Id: I070036f341b866cda67eb928c5b74ad2ce6c527c
2013-07-02 18:40:02 +02:00
jenkins-bot
71c0d39d12 Merge "Fix undo edit summary when the user who made the old revision is hidden" 2013-06-30 17:25:01 +00:00
Brad Jorsch
18062eb3b0 Add user rights 'viewmywatchlist', 'editmywatchlist'
These are needed for OAuth grants.

Note that, even if 'editmywatchlist' is not granted, various actions
will still allow for adding but not removing of pages.

Change-Id: Ie33446a228dd6ed0114730935c1bf65667f5ce01
2013-06-26 10:20:40 -04:00
Alex Monk
3d104f3fd0 Fix undo edit summary when the user who made the old revision is hidden
Bug: 48571
Change-Id: I01b034b25032dbbfb67c7f578b501bda746d5335
2013-05-18 13:53:45 +01:00
Timo Tijhof
4bd5471ca3 docs: Remove odd colons after @todo
Most were this way already:
https://doc.wikimedia.org/mediawiki-core/master/php/html/todo.html

Ran a find/replace on the odd ones. Also made them all
lower case.

Change-Id: I70c6a69344ddebc603e9a1c1d87e3cc4f4f4c560
2013-05-15 06:23:40 +00:00
umherirrender
da39005596 Removed space after isset
While at it, added/removed some other spaces in the same files

Change-Id: Iabb23a448f6f53eb6020155f9c744f74f8b11786
2013-04-26 14:18:06 +02:00
umherirrender
dbd0b590e9 else if -> elseif
Also fixed some spacing while at it
Added some braces for one line statements

Change-Id: Iebfa2b17091509daabc76248121c7763e2295d20
2013-04-17 16:52:47 +02:00
umherirrender
97234cc884 Added spaces before and removed spaces after 'array'
Fix some other spacing while at it

Change-Id: I13f81533eaf40e06c13cf377c0f08ef5cef01d00
2013-04-14 21:57:46 +02:00
rahul21
721ea54c7e Vector: Move 'editwarning' feature from Vector extension
* Created a new Resource Loader module
* Created an entry for the RL module in the Resources.php
* Added messages to languages/MessagesEn.php and languages/MessagesQqq.php
* Called the new RL module from the EditPage.php
* Added required entries in the messages.inc, DefaultSettings.php

Corresponding change in the Vector extension: I164f17255bc927

Bug: 46514
Change-Id: I7bdbd09f4083ccb316156307400ccfacdfec79e1
2013-04-10 20:40:08 +02:00
umherirrender
978bb31c5e Add missing wfProfileOut before throwing an exception
Change-Id: I1d830da0597f19efd0b2ae48642389975e736e23
2013-04-08 18:37:24 +00:00
Alexandre Emsenhuber
f4b1735753 Fix case of some Title methods (final round)
Change-Id: I41afed9c1d19aaca62685a51f881cf04a10998d8
2013-03-28 11:30:06 +01:00
Alexandre Emsenhuber
df5265e14d Fix case of some Title methods
Change-Id: I37ce7fe392f4941c500fa0a88007664501d7e338
2013-03-27 14:36:05 +01:00
Liangent
ccf8a19e47 (bug 46463) Mark edit preview as in page view language
Bug: 46463
Change-Id: Ib393f930eea967abc4b8fdc2f52d85d204b5a7ba
2013-03-23 15:31:36 +08:00
Yuri Astrakhan
9506e3d812 Spellchecked /includes directory
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls

Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"

Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
2013-03-13 03:42:41 -04: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
d63121016d fix some spacing
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments

Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
2013-03-07 17:53:21 +01:00
Matthew Flaschen
c67a95176b Don't set wgPostEdit for null edits.
Bug: 45781

Change-Id: Ia2c3e02304fad07425af520850fe30ca5eab0c8e
2013-03-06 12:33:27 -08:00
Siebrand Mazeland
9b7889b84b Use American English spelling for behavior
Spotted in ipbreason-dropdown by Shirayuki.

Change-Id: I576ed4bc0abe5ab980aaee3fb9f9e4b43087311f
2013-03-04 10:24:57 +01:00
Platonides
81c42c811f Several minor fixes.
- Add missing wfProfileOut( __METHOD__ ); in FSFile.php [13ae6bfb]
- Remove unused $IP globals in ApiUpload.php [fbf34d84]
- Remove empty statement in EditPage.php [375687ed]

Change-Id: I3b0506e3c8fc89b352a0d72f18e51a1223af0e9b
2013-02-28 21:09:29 +01:00
jenkins-bot
f758ec0d1a Merge "(bug 43270) Add wgPostEdit to show if user just saved this page" 2013-02-26 20:50:58 +00:00
Matthew Flaschen
375687eddb (bug 43270) Add wgPostEdit to show if user just saved this page
* Sets short-lived cookie in EditPage
* Adds JS module, 'mediawiki.action.view.postEdit', to all views to
  convert cookie to wgPostEdit.  This avoids caching the variable in the
  HTML.
* Based in part on PostEdit extension

Change-Id: Ie89507f8e98c365df9d93a7633223103b9025790
2013-02-25 16:32:21 -05:00
Alexandre Emsenhuber
71b257c66d Put the check for empty comment outside of the section anchor section of EditPage::internalAttemptSave()
Also reorganise checks for better clarity

Change-Id: Ib75b2c0b0c240459d58618eed283b547aaefd7f6
2013-02-21 14:44:53 +01:00
umherirrender
5a6ff4865b [Regression] Do not trim spaces on edit preview or show changes
Since Ic05e5898 spaces are also trimmed on preview/show changes, which
is bad, because the autosummary "/* Header */ " gets trimmed and the
user text is direct written behind the slash. That is confusing and was
not so, before this change.

Force the trim on summary preview to have the right preview, because the
spaces are trimmed on save.

Change-Id: I0058ce31197f3ea8ffc5520f3f0f9e1bf6105066
2013-02-18 07:28:59 +00:00
IAlex
3f92a5672e Merge "remove space before semicolon" 2013-02-10 12:51:02 +00:00
umherirrender
ca31ebad3f fix some spacing
Added/removed spaces after opening/before closing parentheses

Added a space after a comma

Removed unneeded parentheses in condition

Change-Id: I306091347ccaaf11dee0cdfda3019cb0c12be51b
2013-02-09 23:03:53 +01:00
umherirrender
f3cf109e62 remove space before semicolon
Change-Id: Ic0d890f5e27cec017c7f7910a67d53b2edf82079
2013-02-09 22:44:24 +01:00
umherirrender
1044b0b8df fix some spacing
Change-Id: I8f976013f33c5818e4402604fe8610aa3f43b0c6
2013-02-04 20:18:33 +00:00
umherirrender
6fbbbd17ca fix some spacing
Change-Id: Ie7bb35871cc99237f3a655f7db22ca1f0646df5e
2013-01-27 14:21:50 +01:00