Commit graph

722 commits

Author SHA1 Message Date
Aaron Schulz
244dd9b4de * EditPageNoSuchSection hook
* Added message to bad section error for reviewed pages
* A few tiny cleanups
2010-01-18 00:58:22 +00:00
Tobias
001b4fe211 provided option for showLogExtract to wrap result. Added log for create protected page 2010-01-16 11:24:23 +00:00
Aaron Schulz
9b973bf9d2 Made noSuchSectionPage() use mTitle 2010-01-16 07:18:16 +00:00
Aryeh Gregor
2f0d048cc6 Remove OutputPage::{get,set}OnloadHandler()
Didn't work at all in Monobook, Modern, Vector, or any derived skin, for
who knows how long.  Only one caller, which was using it to autofocus,
which is a bad idea anyway because it will cause the focus to happen too
late, often after the user has already interacted with the page.  Any
legitimate callers may as well just add the onload in pure JS without
adding an attribute to the body.
2010-01-15 00:55:51 +00:00
Platonides
60c0474ca8 (bug 19226) First line renders differently on many UI messages
Added newlines before $1 to wrapWikiMsgs of <div>s

Also fixes r61052 utf-8 screw-up on RELEASE-NOTES.
2010-01-14 17:14:49 +00:00
Bryan Tong Minh
b024a2be35 Followup r58980: Moved logic for addsection-editintro/preload from SkinTemplate to EditPage.
Message names changed from talk-addsection-* to addsection-*.
Messages now contain the preload/editnotice themselves instead of the title of the page that contains them.
2010-01-11 11:47:50 +00:00
Sam Reed
b6e0df246f Attempt at normalistion of comparison styles - empty string on left and right hand side normalised to it being on the rhs
Before this change, there were (? being regex 0 or 1)

"" ===? 1
'' ===? 24
"" !==? 8
'' !==? 32

== "" 14
== '' 344
!= "" 9
!== "" 4
!= '' 151
!== '' 85


Rhs was the much more common, and the preferred style by many developers.. (Was a similar discussion in #mediawiki recently.. After that lolbugreport i think)

Where there is a string (non empty) on the lhs, and variable/method call on the rhs still need normalising
2010-01-06 19:59:42 +00:00
Alexandre Emsenhuber
2413e64a7c Missing global; was throwing Fatal error: Call to a member function getSkinFromCssJsSubpage() on a non-object in includes/EditPage.php on line 1467 2009-12-12 18:04:13 +00:00
Daniel Friesen
71fc5a0ffc Fixes for comments on r59655
- Look for any textbox since just creating one doesn't work
- editFormHeadInit -> showHeader
- code style
- moved checkbox initialization into relevant locations
- dropped hardcoded use of currentFocused in favor of catching event delegated focus events within the edit form

Also:
- Removed more direct uses of $wgRequest in favor of properties
- add $wgPreviewOnOpenNamespaces for extensions like SMW that have category like namespaces.
2009-12-08 17:17:24 +00:00
Tim Starling
c5fc589257 Replaced all instances of <<<END (which breaks vim syntax highlighting), with a type-specific end token. For HTML and SQL, this causes vim to highlight the embedded text with the HTML or SQL file type plugins respectively, which is very neat. 2009-12-07 08:51:52 +00:00
Chad Horohoe
0a64d2421f Use spaces so these line up nicely for everybody 2009-12-04 15:45:02 +00:00
Daniel Friesen
03f8f9a7ee Expand a few comments. One as per Nikerabbit's comment on r59695. 2009-12-03 10:29:34 +00:00
Daniel Friesen
09867504e2 Missing $wgRequest in showSummaryInput 2009-12-03 08:22:56 +00:00
Daniel Friesen
a5fc1cd8a5 Fix notices 2009-12-03 08:15:55 +00:00
Daniel Friesen
5833ddcfc5 Fixes for fixme comments on my r59655 2009-12-02 18:51:19 +00:00
Roan Kattouw
2cef989e7d Revert unintended change in r59666 2009-12-02 16:29:40 +00:00
Roan Kattouw
e6e58fe450 Fix jQuery bug filed upstream as http://dev.jquery.com/ticket/5583 . Also fixes bug 21709 (dialogs freeze in raw/combined mode but not in minified mode). The fact that this worked in minified mode is due to a bug in JSmin, contacted the author about that. 2009-12-02 16:28:29 +00:00
Daniel Friesen
fa3aa9653e EditPage refactor and improvements.
- EditPage::showEditForm broken up into task specific methods
- Subclasses can indicate they can't support section mode
- Standard inputs should all be now in methods they can be grabbed from by subclasses that want to re-arange things
- Many more places to override and hook into to change behavior
- showTextbox1 parameters changed from $classes to $customAttribs and $textoverride
- showContentForm and importContentFormData added; New workflow to override the wpTextbox1 behavior to use an alternate edit form ui or handle wpTextbox1 content in an alternate way.
- getActionURL added for EditPage subclasses used in places where $this->action isn't enough (ie: EditPage on special pages)
Html::textarea added
2009-12-02 07:22:29 +00:00
Tim Starling
7688101426 Removed JS2 work (has been moved to the js2-work branch). Has been lightly tested, should mostly work. Some of the more complicated associated changes are listed below.
* Reverted HttpFunctions.php to r45549 and renamed wgSyncHTTPTimeout back to wgHTTPTimeout
* Edited out the asynchronous features from UploadFromUrl. Made fetchFile() use the curlCopy() function from new-upload r47811 instead of Http::doDownload(). Wrote my own URL validity check to avoid having to use either of the two buggy precedents.
* Removed UploadFromChunk
* Removed chunk upload and background status from ApiUpload.php
* Reverted r54669, use of addScriptClass()
* Left getHeadScripts() in its current location (OutputPage) instead of moving it back to SkinTemplate, just added wikibits.js to it to replace the removed addCoreScripts2Top()
2009-11-26 12:00:36 +00:00
Raimond Spekking
efdbf8eb1f Followup r59363: Fix wrong syntax for Html::input. It accept other parameters then Xml::input. 2009-11-24 17:31:06 +00:00
Sam Reed
258009f383 Further followup to r59360
Add spellcheck to html5attribs for blacklisting

Switch from xml to html input
2009-11-23 19:16:43 +00:00
Sam Reed
3792b24803 Minor followup for r59360
Should really read the proper source/html validate

http://www.w3.org/TR/html5/editing.html

Replace yes for true
2009-11-23 18:52:35 +00:00
Sam Reed
bea33dfc16 bug 21604 Spellcheck attribute for editsummary 2009-11-23 18:38:57 +00:00
Andrew Garrett
383ac92910 Enabling change for r59356, allow programmatic control over whether or not the summary field is shown 2009-11-23 13:27:34 +00:00
Siebrand Mazeland
e8a65f9e25 Update break notation to self enclosed and properly spaced 2009-11-14 20:59:15 +00:00
Alexandre Emsenhuber
6096c81304 * (bug 21420) Fix for r27043: typo 2009-11-06 16:27:28 +00:00
Roan Kattouw
2bb3fd049d Remove section edit links in edit conflict form pointing nowhere useful and only confusing people. Apparently this is a regression from r8855 (!) that went unnoticed for nearly 4.5 years. Hereby nominated for the Most Hilarious Bugs of All Time contest 2009-10-30 14:30:51 +00:00
Alexandre Emsenhuber
7ae1707e6e * $fname -> __METHOD__
* whitespaces fixes
2009-10-25 15:02:33 +00:00
Alexandre Emsenhuber
95343e3b87 removed trailing spaces 2009-10-23 11:08:08 +00:00
Andrew Garrett
d83d148371 Add some hook HTML injection points to EditForm, between the Copyright warning and the content, and after the preview content. 2009-10-22 13:54:36 +00:00
Brion Vibber
c078fa82cd Pull back r56730 for now: "New configuration variable $wgShowPageOnRedlink that can be set to show the page instead of an edit interface when visiting a red link. The value can be specified for specific usergroups and namespaces."
The config var's formatting strikes me as kinda scary; might be better to implement this as a permission key, which can have fancy namespace variants handled by an extension or something pretty easily (it seems to me like that's a rarer use case).
2009-09-30 19:12:41 +00:00
Chad Horohoe
4aa6b6dd92 (bug 20836) Preload not working for MediaWiki namespace. Note this only works when the message doesnt exist, to emulate preload only working on non-existing pages 2009-09-29 13:34:59 +00:00
Alexandre Emsenhuber
d5fbf478a8 Fixes for live preview:
* (bug 3421) Live preview is now disabled on user CSS/JS subpages so that it doesn't break script/style previewing
* The "Live preview" button is now hidden by default rather than "Show preview", this will be switched by JavaScript to not confuse users with JavaScript disabled
* Pass wpEditToken, wpStarttime, wpEdittime in the request so that you don't get "Session lost" when $wgRawHtml is enabled
2009-09-26 08:57:18 +00:00
Tobias
d0f249e168 New configuration variable $wgShowPageOnRedlink that can be set to show the page instead of an edit interface when visiting a red link. The value can be specified for specific usergroups and namespaces. 2009-09-21 19:21:12 +00:00
Andrew Garrett
eedc51dcce Remove double catlinks on edit page.
Resolves bug 20718.
2009-09-18 14:05:07 +00:00
Aaron Schulz
acbe677d2c partial revert on r55573; livePreview() is still used 2009-09-17 01:14:00 +00:00
Alexandre Emsenhuber
0e710418a0 * (bug 20517) Cancel link from edit page now returns to the old version when editing an old version 2009-09-16 20:43:14 +00:00
Tobias
bebaf1325d Follow-up on r56284: LogEventsList::showLogExtract gets associative array for additional parameters. Adjusted all calls that use additional parameters. Also improved Special:Blockip, which now uses those new parameters instead of using own functions. Fixed HistoryPage which was broken with r56251. 2009-09-16 17:17:16 +00:00
Tobias
666a552694 Follow-up on r56251 - merging showLogs and showLogExtract 2009-09-13 22:21:11 +00:00
Tobias
1c676f6a63 Creating new function wgOutput->showLogs and including new information on viewing non-existant user pages. In detail:
Instead of copy&pasting the code in different files, there is now one function for showing logs.
This function is currently used for:
* Article and EditPage: Show deletion / move log
* Article: Show rename log on user(talk)pages (NEW in this revision)
* SpecialContributions: Show block log for blocked users
(Note: I removed the condition "log_action != 'revision'". AFAIK it isn't needed, log lists are checked for permission somewhere)

Additionally, on user (talk) pages a note is displayed, if the user does not exist.
2009-09-13 02:07:21 +00:00
Tim Starling
7b7f9f0d4d Comments and whitespace fixes only. 2009-09-10 06:43:01 +00:00
Nephele
5c75cef425 Fixed EditFilterMerged hook to use hookError param 2009-08-30 05:55:47 +00:00
Andrew Garrett
f0c8fd6e94 Fix live preview copying of existing category links 2009-08-25 15:09:40 +00:00
Brion Vibber
aa1740d88d Cleaning up some old PHP 4 object-reference usage in some edit filtering hooks.
There was a mix of uses of the reference and non-uses of the reference. :)
Reverts r53714 and fixes it from the other end by cleaning up the uses to not expect references.
2009-08-21 21:51:29 +00:00
Andrew Garrett
f9a3ab439c Rewrite JS-based Live Preview to use jQuery, was 200 lines, now less than 35. TODO: LiquidThreads support, some sort of progress indicator. 2009-08-18 17:27:19 +00:00
Tobias
37f2261696 Show summary preview also on diff - useful for editing and takes up almost no space 2009-08-17 14:04:06 +00:00
Andrew Garrett
8b98e4a61b Add an id to the cancel link 2009-08-14 22:10:45 +00:00
Aryeh Gregor
7aa4a8f90c For HTML 5, drop type="" attributes for CSS/JS
This time done in a nice, centralized fashion, reducing LOC for callers
even if HTML 5 is disabled.  The implementation is a new Html class,
similar to Xml but intended to be HTML-specific from the beginning
instead of half-heartedly attempting to provide generic XML services but
actually with lots of HTML-specific stuff tacked on.

As part of the new Html class, a global config option $wgWellFormedXml
is added.  It's set to true by default, but if set to false, the Html
class will drop some things that HTML 5 doesn't require, like
self-closing " />" syntax and attribute quotation marks (sometimes).
2009-08-11 00:09:24 +00:00
Alexandre Emsenhuber
cdf475e5ad * (bug 18699) Using the nosummary URL option no longer triggers the "You have not provided a summary" warning for those who activated it in their preferences 2009-08-02 13:37:41 +00:00
Shinjiman
e2bc5beda5 Show the preview tip for css/js when the page name is both valid or invalid (e.g. skin not in the code), they could be included with other css/js in a valid page name, thanks Splarka. 2009-08-01 08:19:53 +00:00