Commit graph

597 commits

Author SHA1 Message Date
Chad Horohoe
4f2748c36c Some unused $wgStyleVersions. 2009-08-11 12:25:07 +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
Brion Vibber
b14f1b2ec7 Reverting r54695 'Remove extraneous type="" for CSS/JS in HTML 5'
This creates massive code duplication, checking a var and either including or not including the type attribute. Instead, this should be consolidated into functions in the Xml class for building <style>, <script>, or <link rel="stylesheet"> elements.
2009-08-10 19:23:21 +00:00
Aryeh Gregor
74519a7f56 Remove extraneous type="" for CSS/JS in HTML 5
Removed in a bunch of places, but of course there are zillions left!
This is one of the things that would be a lot easier if we could just
drop support for non-HTML 5 output.
2009-08-10 02:06:19 +00:00
Michael Dale
b995a665b5 fixed bug in addClass append 2009-08-07 00:16:54 +00:00
Alexandre Emsenhuber
9d26980c8b * use wfScript() in OutputPage to build the url for mwScriptLoader.php so that $wgScriptExtension is used
* use $wgScriptExtension when matching the path in mwScriptLoader.php
* some more typos in mwScriptLoader.php
2009-08-05 14:37:00 +00:00
Trevor Parscal
fc359e16f1 Added evil hack for Opera projection css media mode compatibility. 2009-07-31 17:18:49 +00:00
Niklas Laxström
8c8b9ef777 PHP Fatal error: Call to a member function exists() on a non-object in /var/www/w/includes/OutputPage.php on line 146 2009-07-31 10:21:02 +00:00
Chad Horohoe
ed1a0dc3d2 Per bug 19943, improve docs on addExtensionStyle(). It behaves differently depending on what you pass it :) 2009-07-26 16:57:45 +00:00
Brion Vibber
c45cfc9233 * (bug 19849) Custom X-Vary-Options header now disabled unless $wgUseXVO is set 2009-07-24 20:01:23 +00:00
Brion Vibber
7d5be9e428 * (bug 19761) Removed autogenerated <meta keywords> tag with link data.
Keyword set was not useful, and is ignored by modern search engines anway.
2009-07-19 17:07:03 +00:00
Trevor Parscal
84e9dfc434 Fixed bug that caused the last parameter of the generated users scripts (see Skin:generateUserJs) to become corrupted from a ? being always used to append an additional parameter (which if there are already paramters breaks stuff). 2009-07-16 19:27:06 +00:00
Aryeh Gregor
49107f11c0 Remove some XML cruft from HTML 5 2009-07-15 22:55:30 +00:00
Alexandre Emsenhuber
b659f9d170 fix for r53282: split() -> explode() the former is part of POSIX regex and is deprecated since PHP 5.3 2009-07-15 10:35:25 +00:00
Niklas Laxström
3cf4ba377a Couple of issues in r53270: use accessor method and keep the function signature bc 2009-07-15 06:43:42 +00:00
Jack Phoenix
de7fa9061b follow-up to r53282:
*coding style tweaks
*added __METHOD__ to some wfDebug calls
*removed php ending tag from mwScriptLoader.php
*some doxygen docs added
2009-07-15 00:55:58 +00:00
Michael Dale
aefc40d749 here it is ... the upload-api, script-server, js2 (javascript phase2) branch merge 1st attempt.
Here is a short overview of changes and associated default configuration variables (most everything is off by default) also see ~soon to be updated~: http://www.mediawiki.org/wiki/Media_Projects_Overview

= Upload Improvements =
==Upload API ==
* Based on the early work of Bryan Tong and others it adds the upload option to the api.
* We rewrite Special:Upload page to include use the new refactoring
* Added in token checks in both the SpecialUpload.php page so avoids DOS / xss copy-by-url JavaScript based cross site POST file submissions

== Copy by URL==
$wgAllowCopyUploads = false;
* http class rewrite includes a new http background download see: includes/HttpFunctions.php

* spins off a php process that calls: maintenance/http_session_download.php
* pushes updates to the session and gives the user a progress bar on http copy uploads from other server progress (using js2 upload interface) (if not using the js2 upload interface it does the request in-place but the download is limited to the php ini timeout time)

== Firefogg ==
* Firefogg enables resumable upload by chunks
* progress indicators and conditional invokation (js2 system)
* and of-course client side transcoding.

= Script Server =
$wgEnableScriptLoader = false;
* off by default if $wgEnableScriptLoader is turned on script files are grouped, gziped, cached etc.
for more info see: http://www.mediawiki.org/wiki/Extension:ScriptLoader

* Includes some early skin js include fixes (skin/script system still lots of love)
* Includes a "javascript class autoloader" this is packaged into mwEmbed so that the mwEmbed library can work in stand alone mode (while retaining localization and script serving) (one such application is the make page for firefogg.org : http://www.firefogg.org/make/index.html  )
* The file that contains the autojavascript loading classes is: js2/php/jsAutoloadLocalClasses.php
* One can use this auto class loading dependency system with extensions and add-ons but I need to better document that.

= js2 system  / mwEmbed=
$wgEnableJS2system = false

* includes initial rewrite towards more jquery based javascript code
* especially for the Special:Upload page.
* Also the edit page include support for the "add-media-wizard"
* includes dependency loader for javascript that optionally takes advantage of the script-loader
* remote embedding of javascript interfaces (like embedding video, or commons media searching)

* $wgDebugJavaScript = false; .. .this variable lets you always get "always fresh javascript". When used with the script-loader it does not minify the script-loader output.

= mwEmbed =
* Will commit a separate patch to oggHandler that conditionally outputs  <video tag> to use the new javascript video player.
** mv_embed player includes: play-head, volume control, remote embedding, oggz-chop support across plugins.
* add-media-wizard adds easy inserts of media to pages (with import)

== jQuery==
* we include a base install of jQuery, jQuery ui and some plugins.
* all the javascript classes are in the scriptloader so its easy to load any set of jquery ui components that you may need using the script-server. You get a callback so you can then execute js with dependencies loaded.

== other stuff ==
there is a bit more code in js2 that pertains to sequence editing, timed text display and basic image editing. We include a base import of pixastic-lib & pixastic-editor... will work with the pixastic developer to try and ensure upstream compatibility on our usage of the library for in-browser photo and sequence manipulation.
2009-07-14 23:52:14 +00:00
Roan Kattouw
7a7cf1a2f9 Add returntoquery= parameter to Special:Userlogin which adds a query string to the "Return to" link. Also using this parameter in the Log in and Log out links on top of the screen, so that people who click Log in from e.g. an edit page will be taken back to the edit page rather than to the page view. 2009-07-14 21:25:33 +00:00
Aryeh Gregor
af2b7c7889 Fix for r53034: left off \n on doctype
I knew it had to be impossible to change two lines without breaking
something.  :)
2009-07-12 16:58:33 +00:00
Aryeh Gregor
d2bf30bbdd Experimentally enable HTML 5 doctype
Per wikitech-l discussion.  This also removes a <meta> tag that was
completely pointless, but theoretically required by XHTML 1, yet causes
the HTML 5 validator to complain.

Together with a few other recent commits, this should cause at least
Special:BlankPage to validate as HTML 5.  Real pages may still have some
invalid markup that should be fixed -- in a large majority of cases,
markup that was poor practice in XHTML as well.  (The Wikimedia
copyright icon needs to have border="0" removed for everything to
validate 100% on Wikipedia.)

By Brion's request, this is still behind a config option, and can be
disabled with $wgHtml5 = false;.  I expect we'll be able to remove that
option in the near future, once everyone is satisfied that changing two
lines of HTML output that all browsers have demonstrably ignored since
the Paleolithic won't cause all Wikipedia users' computers to undergo a
spontaneous uncontrolled fission reaction or something.
2009-07-10 04:19:51 +00:00
Tim Starling
1353a8ba29 Implemented the PoolCounter feature and did some general refactoring in the areas that it touched.
* Renamed Article::outputFromWikitext() to Article::getOutputFromWikitext()
* Factored out cascade protection updates
* Removed recently-added Article::tryParserCache(): misnamed, can be done in one line of code in the caller. Deprecated OutputPage::tryParserCache().
* Made some functions public instead of protected when they could be useful from hooks.
* In ParserCache, removed PHP 4-style ampersands

In Article::view():
* Factored out robot policy logic, "redirected from" header, patrol footer, diff page, revdelete header, CSS/JS formatting, footer, namespace header, missing article error
* Removed some variables, renamed some others, fixed incorrect use of empty()
* Used the refactored footer section to do a couple of early returns and unindent a massive if(!$outputDone) block
* Removed fantasy interpretation of $this->getContent()===false in comment
* Don't try the parser cache when ArticleViewHeader specified $outputDone=true
* Move timing hack to getOutputFromWikitext()
* Stop using $wgOut->parserOptions() with save/restore nonsense every time you want to change something in it. This is meant to be OOP.
* Don't overwrite the article text with an error message and then pretend to write it to the cache, that's confusing
2009-07-08 08:12:35 +00:00
Aryeh Gregor
c4012b03bc Unify MonoBook <head> generation with legacy skins
This was less work than I thought it would be.  The only possible
practical difference in MonoBook should be that some IE fixes are moved
down; at a glance, I don't see how this would hurt anything, but if it
does then some more hacks can be added to move them back up.

A bunch of whitespace was changed in both MonoBook and legacy skins.
Legacy skins had some stuff moved around in the <head>, but mainly to
better match MonoBook, so they should work better if anything, not
worse.  dir= was added to the <body> in legacy skins, matching MonoBook.
There should be no other practical differences.

I would strongly encourage people to port the Modern and Vector skins to
at least share the <head>-generation code like this.  I'd even more
strongly encourage people to totally rewrite the skin system, but that's
a bigger job.  :)
2009-07-07 21:49:45 +00:00
Andrew Garrett
480741ce4b Core changes for r52307 2009-06-23 21:52:39 +00:00
Siebrand Mazeland
6f9d6cbcf9 Fix double escaping issues. Related to r51559 and friends. 2009-06-15 12:32:59 +00:00
Siebrand Mazeland
33e4039aec Follow-up to r50822. Add id="mw-returnto" to allow styling. 2009-06-15 11:11:17 +00:00
Alexandre Emsenhuber
804d0b7d74 added tabs and new lines for better source readability 2009-06-09 12:34:09 +00:00
Siebrand Mazeland
38ca12aa82 * replace some use of deprecated makeKnownLinkObj() by link() in core
* use array type parameter instead of string to escapeLocalUrl(), getFullURL() and getFullUrl() for readability
* add FIXME in Parser.php and LogEventsList.php where I didn't know how to replace makeKnownLinkObj by link()
* return type for private method Skin::editUrlOptions() changed from string to array
* some code readability improvements

Linking this to r51559 for CodeReview as there is some discussion there, and these changes are very similar.

Todo: core special pages
2009-06-07 15:02:12 +00:00
Philip Tzou
8a2d96a4b3 Follow up on r51177. Need use is_array(). 2009-05-30 05:14:24 +00:00
Philip Tzou
5336b9ba6f 1. Follow up on r49157, r50902 and r50938. According RFC 2616 section 14.4, language code name should always use '-' but not '_'.
2. metadata 'keywords' should have all variant forms of keyword.
2009-05-30 05:07:46 +00:00
Niklas Laxström
281c378ee7 Work around parser madness, because I have no idea what is going on. The following renders each line as a paragraph:
<div>a
b
c/div>
2009-05-25 13:49:01 +00:00
Niklas Laxström
d3b61fea7c Escaping fixes 2009-05-22 09:35:48 +00:00
Siebrand Mazeland
545ecfa121 Fix typo in comment 2009-05-19 23:27:53 +00:00
Siebrand Mazeland
547858b7fe Use link() instead of deprecated makeLinkObj() where possible. 2009-05-08 23:24:31 +00:00
Robert Leverington
2aa0c02088 * Strict Standards: Cannot assign by reference.
Fix for previous commit.
2009-04-09 18:54:15 +00:00
Robert Leverington
4cf686c22c * Strict Standards: Only variables may be passed by reference.
Reference title object to variable before passing as a parameter.
2009-04-09 18:51:45 +00:00
Alexandre Emsenhuber
894650c3f7 * removed useless $wgUser and $wgOut globalisation
* fix for r49324: work arround E_STRICT: only variables should be passed by reference (OutputPage::getTitle() doesn't return a reference but OutputPage::addWikiTextTitle() want one)
2009-04-09 08:53:15 +00:00
Remember the dot
e4d211703c (bug 12998) Allow <sup>, <sub>, etc. in DISPLAYTITLE 2009-04-09 05:15:43 +00:00
Chad Horohoe
d5dd4044e5 Stage 2 of war on $wgTitle!! Make OutputPage, Skin and children rely on mTitle rather than $wgTitle. In theory, you could have an OutputPage/Skin that was referring to some title other than $wgTitle, unlikely though. In any case, make getTitle() return $wgTitle for now, just in case. 2009-04-09 02:22:36 +00:00
Chad Horohoe
2438e56741 Document OutputPage::out() 2009-04-07 18:21:07 +00:00
Tim Starling
43f0ff4469 In OutputPage::addScriptFile(): escape attributes for HTML. No XSS, just good practice. 2009-04-01 08:50:57 +00:00
Arash Boostani
c32a1ef480 Fixed bug #11213 - [edit] section links in printable version interfere with cut-and-paste of article text 2009-03-18 23:27:48 +00:00
Brion Vibber
ae98c49213 * (bug 17537) Disable bad zlib.output_compression output on HTTP 304 responses
Patch by ezyang - http://bug-attachment.wikimedia.org/attachment.cgi?id=5829
2009-03-18 21:26:57 +00:00
Aryeh Gregor
c6be9caca9 Remove more "?>" 2009-03-16 00:36:17 +00:00
Aryeh Gregor
cd99068dbe Avoid "?>", messes up some syntax highlighters 2009-03-16 00:34:46 +00:00
Aaron Schulz
6cd1a1b1d9 * Avoid double output on filecache failover
* XHTML fixes to error html
* Added isDisabled() to OutputPage
* Make sure filecache marks output done
2009-03-13 20:15:16 +00:00
Siebrand Mazeland
f66a0b97b0 * Use $wgLang->commaList( array ) instead of implode( ', ', array ) where possible
* remove a piece of commented out code in SpecialSearch.php
2009-03-08 19:40:09 +00:00
Roan Kattouw
ee408f0789 (bug 17538) Use local URLs in <link>s 2009-02-20 20:49:47 +00:00
Brion Vibber
92079d3b1c * (bug 16335) __NONEWSECTIONLINK__ magic word to suppress new section link.
Patch by Carlin: https://bugzilla.wikimedia.org/attachment.cgi?id=5680
With slight whitespace tweaks.
2009-02-19 22:14:59 +00:00
Alexandre Emsenhuber
f04183b0da Removed check for empty( $action ), seems to be old register_globals code, but since $action is set in index.php with
$action = $wgRequest->getVal( 'action', 'view' );
it can't match empty() in "normal" conditions
2009-02-04 19:43:30 +00:00
Philip Tzou
205ef1ba8b 1. Use param $ignoreOtherCond instead of $forTemplate and $ignoreSubmitCond in findVariantLink().
2. Drop some duplicate categories produced by findVariantLink().
2009-02-02 07:54:43 +00:00