Commit graph

1126 commits

Author SHA1 Message Date
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
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
jenkins-bot
32df25652d Merge "Trim spaces on user supplied comments" 2013-01-21 17:00:28 +00:00
daniel
703752db95 (bug 43008) Show error to user if content type doesn't support sections.
When trying to edit a page that does not support sections (like a JS or CSS page)
with section=new or so, show an informative error page instead of dying with
a fatal error.

Change-Id: I3d2901b715c10b52fab4fdc6b5e9ab5d887610bd
2013-01-21 14:37:05 +00:00
umherirrender
7d2bf6aac1 Trim spaces on user supplied comments
This helps on bug 29575

Change-Id: Ic05e5898f8a7c93a95188c9342d22c70d7413b09
2013-01-20 14:08:38 +00:00
Platonides
5d064a7433 Reorganise the functions doing wfProfileOut and returning on all if branches.
Makes life easier for static analysis, since they don't need to
handle if the end of a function where a wfProfileOut was not called
was reachable or not.

It is recommended to review this change ignoring whitespaces
(specially for includes/parser/Tidy.php)

Also documented the rationale for the elseif chain in UploadBase::detectVirus()

Change-Id: Ic4f65937fa9e6f926d8fcfd670e3b0e99e06eefc
2013-01-13 17:53:05 +01:00
jenkins-bot
5e2eb7f385 Merge "Miscellaneous profiling fixes" 2013-01-09 08:24:16 +00:00
daniel
9a0e7bb6b7 (bug 42064) Make EditFilterMergedContent more generic.
This is part a the solution to bug 42064: it modifies the EditFilterMergedContent hook
to allow it to be triggered by code outside the EditPage. This is useful when extensions
such as Wikibase implement their own editing mechanism for non-textual content.

Allowing EditFilterMergedContent to be used on non-textual content ensures that
any filters will also be applied to that content.

Note that EditFilterMergedContent was introduced in 1.21 which hasn't been released yet,
so modifying the hooks definition should not be a problem. The only extension that appears
to use the EditFilterMergedContent hook is Translate. I'll supply a patch.

To completely fix bug 42064, I will soon submit two changes to two extensions:

* In the Wikibase extension, trigger the EditFilterMergedContent when changing data
entities.

* In AbuseFilter, make use of the EditFilterMergedContent hook, so filters will also be
applied to non-textual content.

The the dicsussion on bugzilla for the rationale of this architecture.

Change-Id: I99a19c93e99860a91d7f898b0a3fbb72b69baab8
2013-01-07 14:01:07 +01:00
Platonides
fb0966908b Miscellaneous profiling fixes
Change-Id: I8d8ce0bc0383e4feb4ed38fd96b2dd516dcb742e
2013-01-06 22:35:11 +01:00
Alexandre Emsenhuber
ca4489c3e3 Don't use isset() to check whether an existing variable is null
Change-Id: I7b4207e91b6fa33ba31b1308f5e71f923def687e
2013-01-01 22:13:30 +01:00
aude
d659a81604 fix and provide more documentation in EditPage for mergeContentInto functions
Change-Id: I2a5aed29a6e8ff05ddea5d46f854740b9f3b03b1
2012-12-20 09:25:56 +01:00
IAlex
b3e457400b Merge "(bug 37755) Set robot meta tags for 'view source' pages" 2012-12-02 09:02:12 +00:00
Oren Held
863f6f1e84 (bug 37755) Set robot meta tags for 'view source' pages
Apply the same robot behavior of the edit & history pages (noindex,nofollow), on view source pages
(case of ?action=edit when having no edit permissios).

Change-Id: Ifc162332798a3dea93db4096d26e928545fbf4b6
2012-12-02 09:36:32 +02:00
Trevor Parscal
7288e70f47 Refactor edit notice rendering so that it's not baked into EditPage
* Move edit notice rendering to Title class
* Use new getEditNotices method in EditPage

This opens the door for alternative editors (such as the VisualEditor) to use the same notice systems already in use.

Change-Id: Ib0e40714f5433f4d75c54a3c3d60b1590fded7f1
2012-11-30 12:18:43 -08:00
Brad Jorsch
8d198333d3 Add EditPage hooks AlternateEditPreview, EditPage::showStandardInputs:options
Adds two new hooks:
* AlternateEditPreview allows an extension to override the standard
  page preview display.
* EditPage::showStandardInputs:options allows an extension to add
  additional HTML to the end of the editOptions area of the edit form.

Change-Id: Ic5d35c8e9ff71282b5ebccc87c64894a385e5836
2012-11-22 01:13:33 +00:00
daniel
bcea63957d (Bug 41706) preload to convert content as needed.
Use the new Content::convert function to convert preloaded content
if the page being edited uses a different content model. This allows
e.g. a page like User:Foo/bar to be preloaded when creating
User:Foo/common.css. This currently fails, because it is not possible
to use wikitext to pre-fill a CSS page.

Change-Id: I70656b41bd203e5722528e889a242fa54cbfbf62
2012-11-12 17:45:29 +01:00
daniel
e74f70d634 (Bug 41352) Proper fix for vanishing content.
This reverts the temporary fix in I4c2055be and instead fixes the
resolution of merge conflicts using Contenthandler::merge3.

Change-Id: I0b1db6d76c0678d0ce795720e513e16e28e907d4
2012-11-08 19:09:33 +01:00
Siebrand
9dbca59099 Revert "Deglobalization in EditPage.php"
Reverts I2c600915. Regular UI edits seem to go through fine, but things go
horribly wrong for reasons unknown to me in for example LiquidThreads.
That's of course not acceptable, so reverting. Also see bug 41497.

Change-Id: Id95e279c0ec0fbcc162983a12434282f55e8489e
2012-10-29 21:33:56 +01:00
Siebrand Mazeland
9d474f73d2 OutputPage::addWikiTextTitleTidy() requires variable as second para
Was trowing PHP Strict Standards: Only variables should be passed by
reference.

Change-Id: I97ede1c61636c9758408b66b84694c2a5825a259
2012-10-29 17:26:13 +01:00
Siebrand Mazeland
179e97e98d Fix typo in method
Change-Id: I023a5417e62a56125b9e59197ac33f6f48094e2b
2012-10-29 17:03:27 +01:00
Siebrand Mazeland
85acf1f499 Deglobalization in EditPage.php
Some details:
* Using context as much as possible.
* Changed mTitle/mArticle to getTitle()/getArticle().
* Tweaked some comments.
* Broke some long lines.

Change-Id: I2c600915d8a4af98215de9bf9d2d60abdc675fab
2012-10-29 11:29:31 +01:00
aude
eaca7a01cf (bug 41298) re-apply I9a56b7c6, Don't parse the section's name in the summary
Change-Id: I11492200ed8cd199dbbde737a28e8acb07403096
2012-10-26 13:58:26 +00:00
Brad Jorsch
4c737011dc (bug 41409) Fix regression in diffs while editing old revisions
Until the ContentHandler merge, when editing an old revision the "Show
changes" button would show the diff between the current version and the
text in the edit field. It appears that the ContentHandler merge somehow
unfixed bug 34849.

The same fix that was applied for that bug in r112819 translated into
ContentHandler terms seems to fix the bug again here.

Change-Id: I1eee25c530ef87ff2ecd61f0fd5c01de94eccb98
2012-10-25 22:09:50 -04:00
TheDJ
939789e61c Merge "(Bug 41298) partial fix: re-apply Id4d5504a" 2012-10-25 12:17:50 +00:00
TheDJ
869ff1db92 Merge "(Bug 41298) partial fix: re-applying Id7b331e1b" 2012-10-25 12:16:28 +00:00
aude
f9093954b0 follow up for edit conflicts
Change-Id: I511b78664fd2c14d63a1d399cb5ddefa2d125a22
2012-10-24 21:04:10 +00:00
aude
fdeeaf043d (bug 41352) restore pre-ContentHandler version of mergeChangesInto()
New implementation using ContentHandler is buggy and needs repair

Change-Id: I4c2055bed3e660be255621e4d476d7c489f4c371
2012-10-24 16:34:39 -04:00
daniel
b683113a63 (Bug 41298) partial fix: re-apply Id4d5504a
The changes in EditPage were apparently lost during merge.

Change-Id: I2628d73a35eaab45336986959a585c7381b78471
2012-10-24 16:31:42 +02:00
daniel
691a1d3d5b (Bug 41298) partial fix: re-applying Id7b331e1b
Changes to EditPage.php apparently got lost during merge.
Wonder how that happened, there are no conflicts.

Change-Id: I5449d0331f5d60ed0296b69888e10272f47f9d42
2012-10-24 15:53:06 +02:00
daniel
0fcd7a6778 (Bug 41298) partial fix: re-apply I9441a277
Apparently, this change got lost during merge. Oops.

Change-Id: I75ddf1d9f2abfa97fb76d47da6fadd63658c0d46
2012-10-24 15:19:44 +02:00
Reedy
f39292c10b Merge "fix bug 41280, show correct content when displaying edit conflicts" 2012-10-23 20:31:33 +00:00