Commit graph

958 commits

Author SHA1 Message Date
umherirrender
0dba8923e9 "Show Changes" on default messages shows now diff against default
message text

This is useful, because the textbox is already preloaded with the
default message text and than it is nice to get the diff against that
text.

Change-Id: Icbfb0090c32ea09e34ec3ccba26863189854f8a6
2012-04-05 21:58:00 +02:00
umherirrender
84b10a3fb5 (bug 17615) nosummary option should be reassigned on preview/captcha
Change-Id: I12f1cf37b7a093ca9f5b949e41fc482c6b7fb5fc
2012-04-03 10:46:53 -07:00
umherirrender
903b3c47ef (bug 22870) Separate interface message when creating a page
Add new message 'creating' and use it for the page title of the edit
page.

Change-Id: I8435d21a3674b48ec5a14481cdacf0a52662fa1f
2012-04-01 09:40:54 +02:00
umherirrender
55d592bc2b (bug 18062) new message when edit or create the local page of a shared
file

Change-Id: I2b7f76bd759b815a87b306fd97a97097b4731f8d
2012-03-31 16:17:10 +02:00
jarry1250
bec4460373 First half of fix for bug #30332 ("API spamblocklist error should provide *all* blocked URLs, not just one").
Allow spamPageWithContent() to accept an array of matches, rather than just one.

Not dependent on other half of fix.

Change-Id: I75faac51f24bbb2569b36bc2e44f3cd5c43b1bd7
2012-03-26 22:50:34 +01:00
Max Semenik
632c6281c7 Bug 35051 - [Regression] If heading has a trailing space after == then its name is not preloaded into edit summary on section edit. Regression from r105380. 2012-03-15 15:21:46 +00:00
Sam Reed
2d25a902e3 More of r113580 2012-03-11 22:05:54 +00:00
Tim Starling
4565aac9f0 (bug 34929) Show the correct diff when a section edit is rejected by the spam filter. Use EditPage::showDiff() so that the same kind of diff is shown as when you click the "show changes" button. I considered changing the source text to be the original section text, but if you do that, the line numbers are wrong and section=new doesn't show you the headline which may have matched the spam filter. 2012-03-08 00:49:50 +00:00
Alexandre Emsenhuber
c2a85328bc Per happy-melon, fix for r107653: don't add the error class on success message 2012-03-02 19:35:06 +00:00
Alexandre Emsenhuber
79ce8812b6 * (bug 34849) Diff when editing an old version show the comparison with the current text again 2012-03-01 17:29:12 +00:00
Alexandre Emsenhuber
aeff260154 Pass __METHOD__ to DatabaseBase::begin() and DatabaseBase::commit() 2012-02-20 21:36:54 +00:00
Alexandre Emsenhuber
95a8a35643 Whitespaces fixes 2012-02-16 16:09:08 +00:00
Sam Reed
c8eb4467f1 Fix user related direct member variable access 2012-02-16 00:54:34 +00:00
mrbluesky
0a0bfb8aa5 (bug 33442) Dont prompt for summary on page creation. 2012-02-15 21:20:05 +00:00
Daniel Friesen
14b524c118 Add an OutputPage to the EditPage::showEditForm:initial to match the EditPage::showEditForm:fields hook so that people will stop global'ing $wgOut. e.g.: In WikiEditor. 2012-02-15 19:32:36 +00:00
Mark A. Hershberger
0f897b070b revert r111225 and r111201 2012-02-13 12:40:21 +00:00
Mark A. Hershberger
c975b53a7e ugh, missed this global var 2012-02-11 01:43:34 +00:00
mrbluesky
68cad93a44 Follow-up to r111091. Dont paste md5 in the code. 2012-02-11 01:11:07 +00:00
Aaron Schulz
16647dd966 Reverted r111188: backport conflict fodder 2012-02-11 00:41:07 +00:00
Mark A. Hershberger
3ba3f15e8d part 1 of fix for Bug 30332 - API spamblocklist error should provide *all* blocked URLs, not just one
Patch from Jarry1250
2012-02-10 21:13:42 +00:00
Mark A. Hershberger
35b68b1102 Fixes Bug 18775 - Redirect preview rendering stops prematurely, hides categories
Patch from Brad Jorsch.
2012-02-10 19:46:38 +00:00
Mark A. Hershberger
fd27d3a040 w/s 2012-02-10 19:34:03 +00:00
mrbluesky
af38b9bf09 (bug 17416) Don't prompt for summary when summary is preset using &summary= 2012-02-09 21:06:19 +00:00
Sam Reed
7b25f8231f Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 19:30:01 +00:00
Sam Reed
e1d83d5721 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 18:01:54 +00:00
Benny Situ
978f299e03 Revert from 107187 to 107186 for bug24430 patch, it causes layout issue 2012-01-25 18:26:46 +00:00
mrbluesky
905925716a Update comment 2012-01-19 02:04:30 +00:00
mrbluesky
e5c09d90d2 Comments on status codes 2012-01-19 01:51:27 +00:00
Alexandre Emsenhuber
e26f8459d8 Moved RessourceLoader modules and stylesheet related stuff from EditPage::edit() to EditPage::setHeaders() and header messages to EditPage::showHeader(); there's no point running all that code when the edit form is not displayed (e.g. page save). 2012-01-11 10:33:31 +00:00
Brion Vibber
749ebf4316 Fix a race condition in classic edit toolbar setup
mediawiki.action.edit used to call mw.toolbar.init on its own during DOMReady -- this required that the module already be loaded *before* DOMReady, *and* that it be fully loaded before the immedate-execution code that sets up the default toolbar items (output from EditPage.php).
This failed since we've gone fully async in the bottom-loading items, and could result in failed calls to mw.toolbar.addButton.

Wrapped those immediate calls in a mediawiki.loader.using call to ensure they're run after the module is loaded, and moved the mw.toolbar.init call into that section so we guarantee it gets run first.
2012-01-06 01:38:26 +00:00
Niklas Laxström
84b12ed815 * Add typehint to debug Call to a member function getTitle() on a non-object in /www/w/includes/EditPage.php on line 121
* Remove @todo from constructor, because it's a constructor
* Some typos and code style
2012-01-04 06:52:59 +00:00
Sam Reed
1c64a0cce0 Cleanup a few unused variables
Mainly indexes in foreach loops
2012-01-01 23:35:08 +00:00
Alexandre Emsenhuber
a35d0c6d18 Per Nikerabbit, fix for r107653: don't show the "missing revision" warning on non-existing page (obviously) 2011-12-31 11:54:06 +00:00
Alexandre Emsenhuber
925c0c61c9 Per Raymond, fix for r107653: missed two changes from $section to $this->section 2011-12-30 21:34:19 +00:00
Alexandre Emsenhuber
899abee7b9 * Style fixes in EditPage::showEditForm() to more readable
* Use style="display:none;" instead of non-existing type="hidden" for the textarea when asking user for confirmation to save the edit if the page was deleted during edition; also drop other attributes since they are useless in that case
2011-12-30 21:30:04 +00:00
Alexandre Emsenhuber
0107859d41 * Inverted the precedence between section edition and revision undoing, now undo and undoafter will be ignored if the section (or even wpSection) is provided to be consistent the remaining of the interface
* Modified EditPage::getContent() to load the original content only when really needed
* Don't put the 'missing-article' in the textbox when a non-existing revision is provided, instead display it above the form
* Always diff to the current version when showing a conflict or a spam filter match
* Factorised code to get the current text on edit conflict
* Compare the correct text in EditPage::internalAttemptSave()
* Some little coding style fixes
2011-12-30 20:43:08 +00:00
Alexandre Emsenhuber
dd2cfee331 * Removed usage of Article where possible in EditPage
* Added Article::getRevisionFetched() and use it in EditPage instead of accessing the member directly
2011-12-30 16:12:46 +00:00
Alexandre Emsenhuber
1b655a802a * Added Title::getLinksFrom() and Title::getTemplateLinksFrom() for consistency with Title::getLinksTo() and Title::getTemplateLinksTo()
* Deprecated WikiPage::getUsedTemplates() in favour of Title::getTemplateLinksFrom() and updated to it in core
2011-12-29 15:12:00 +00:00
Alexandre Emsenhuber
286d7be039 In EditPage::showDiff():
* Group global declarations
* Only get 'currentrev' and 'yourtext' messages if needed
2011-12-26 15:54:10 +00:00
Alexandre Emsenhuber
6d10567e62 * (bug 30711) WikiPage::replaceSection() now always the current text when adding a new section
* Made WikiPage::replaceSection() use getRawText() to get the current text
* Made EditPage::showDiff() also use the current text when diffing for adding a new section
* Removed the "You are editing an old version" when section=new since the oldid parameter has no effect new due to the above
2011-12-26 14:45:58 +00:00
Alexandre Emsenhuber
631847513c Use 'newsectionheaderdefaultlevel' message when previewing a new section so that it renders the same as when saving the page 2011-12-25 20:23:54 +00:00
Alexandre Emsenhuber
abd005d4fd Per Nikerabbit, follow-up r102024: removed uneeded variable 2011-12-24 15:32:35 +00:00
Benny Situ
937563b444 bug24430 - patch from Chinchin, remove number of column for edit field in preference 2011-12-23 22:47:10 +00:00
Ryan Kaldari
9f5877af5c follow-up to r106754 - using strict comparison, adding logic for editing existing pages, changing parameter name in WikiPage::replaceSection from $summary to $sectionTitle as it only used for section titling 2011-12-20 23:50:15 +00:00
Sam Reed
86b50cafed Fix for r104684
Using "$result['sectionanchor'] == ''; rather than "$result['sectionanchor'] = '';"...
2011-12-20 12:36:34 +00:00
Ryan Kaldari
ac64223568 adding sectiontitle/wgSectionTitle as a new parameter for page editing (so that it can be set separately from the edit summary). For right now, this is just for API use, and thus isnt used in the form. As soon as 1.19 is out the door, we should change the form to use this as well. The current implementation is designed to be completely backward-compatible and non-disruptive 2011-12-20 04:15:21 +00:00
Robin Pepermans
be2de16942 update all core usage of deprecated Title::userCanRead() 2011-12-13 11:05:30 +00:00
Jeroen De Dauw
49cdca93be add missing deprecation notices and added deprecation version to existing ones 2011-12-13 05:19:05 +00:00
Brion Vibber
fb81bd376a * (bug 32617) Fix for edit summary on section 0 containing a bogus section heading
Based on patch posted by Dan Collins: https://bugzilla.wikimedia.org/attachment.cgi?id=9552
with a tweak to avoid breaking a similar case in other sections. Follows up on function extraction & test cases added in r105379.
2011-12-06 23:40:44 +00:00
Brion Vibber
0f78700c55 For bug 32617: lift some code out to a function - EditPage::extractSectionTitle - so it can be tested and fixed.
Added test cases, including one that fails thus demonstrating bug 32617.
2011-12-06 23:35:42 +00:00