Commit graph

196 commits

Author SHA1 Message Date
John Du Hart
216d661d3b Bug 29524 - Rename RequestContext::getLang to getLanguage
I'll be amazed if this doens't break any tests.
2011-11-21 16:13:21 +00:00
Alexandre Emsenhuber
c19eee982e * Moved wfViewPrevNext() to Language::viewPrevNext() so that it can be used in the context and not always relying on $wgLang
* modified the parameters order in Language::viewPrevNext() in comparaison of wfViewPrevNext() and changed it to require a Title object and extra parameter to be passed as array
* Use more modern methods to genrate i18n and HTML
* Removed wfNumLink(), not used anymore, only referenced in a comment in MetavidWiki extension
* Inlinised wfShowingResults(); I don't see any reason why only this message should get its own function
* Replaced all calls to wfViewPrevNext() and wfShowingResults() in core
* Simply use OutputPage::addWikiMsg() to display 'specialpage-empty' message 
* Moved wfSpecialList() near wfViewPrevNext() in GlobalFunction.php
2011-10-14 14:57:06 +00:00
Alexandre Emsenhuber
82cc745a52 In WantedQueryPage:
* Call Linker methods statically
* Use $this->msg() to simplify parameter formatting and escaping
* Link to Special:Whatlinkshere/Page instead of Special:Whatlinkshere?target=Page for consistency
2011-10-14 14:20:02 +00:00
Alexandre Emsenhuber
4148b2512b Moved wfSpecialList() to Language::specialList() so that it can be used in the context of special pages instead of relying unconditionally of $wgLang. Updated all calls in core and added a @deprecated comment to wfSpecialList() but not a wfDeprecated() call since it's still used in SiteMatrix and StalePages extensions. 2011-10-13 11:46:21 +00:00
Sam Reed
4822df9467 More whitespace and comments 2011-10-03 22:51:38 +00:00
Brian Wolff
cb3a99fd8a Fix handling of qplimit/qpoffset and cachedtimestamp in QueryPage api module
Basically api was thinking qplimit was the offset, and qpoffset was the limit. Also remove an extra ! when checking for the cached timestamp which was stopping the display of cachedtimestamp property in the api output.

I'm going to tag this 1.18 since this module was introduced in 1.18, and I assume we'd want to fix the limit/offset parameter before the wrong behaviour gets released and people depend on it, etc.
2011-09-29 15:16:35 +00:00
Alexandre Emsenhuber
090f743683 Use local context instead of global variables 2011-08-08 21:07:17 +00:00
Sam Reed
bdc31bb9bc Change usages of $wgUser->getSkin() in special pages to use $this->getSkin()
Fix trailing whitespace
2011-07-01 02:25:19 +00:00
Alexandre Emsenhuber
6be87d9767 Call $wgRequest->getLimitOffset() directly instead of wfCheckLimits() 2011-04-23 15:51:21 +00:00
Sam Reed
517b6b6b59 Revert r86236 2011-04-18 19:00:48 +00:00
Sam Reed
9ffa645af8 Update all core calls of SpecialPage->getName(); 2011-04-18 17:39:07 +00:00
Happy-melon
4853c8a0d2 Tidy up some more uses of SpecialPage static methods 2011-04-17 10:44:44 +00:00
Sam Reed
f17cf7ef0e Followup r82641, set default for 2nd param
Fix caller in SpecialLinkSearch.php
2011-02-22 23:40:48 +00:00
Sam Reed
cd3250e3de Remove now redundant comment after r82641 2011-02-22 23:26:53 +00:00
Sam Reed
4c7cd9dd04 Followup r78786, per complaints on r82636, revert parameter ordering
Mark doQuery as deprecated/not the suggested run point

Add a couple of braces
2011-02-22 23:22:09 +00:00
Mark A. Hershberger
b4cee86beb w/s fixups 2011-02-12 04:06:22 +00:00
Sam Reed
064b5f2b2c Fixup fixme on r81198, explicitally ORDER BY qc_value ASC if not doing DESC 2011-02-02 14:26:12 +00:00
Sam Reed
936182e8be Per fixme on r78786, obey sortDescending in Cached mode (ie if sortDescending, force order by qc_value DESC) 2011-01-29 22:07:22 +00:00
Platonides
4cd08cba20 Follow up r78786. Do not mark as @deprecated yet, since it is called by getQueryInfo(). 2011-01-06 19:15:02 +00:00
Roan Kattouw
805b63b342 Followup r78786: pass $fname in the raw SQL case too 2010-12-31 16:47:57 +00:00
Sam Reed
2dc752fde3 Minor followup to r78822, locally cache the cachedTimestamp so we don't have to do duplicate db calls for the same information 2010-12-22 20:43:22 +00:00
Roan Kattouw
e479611a0a Refactor the retrieval of the cache timestamp into getCachedTimestamp() so the future API module can use it 2010-12-22 20:31:32 +00:00
Roan Kattouw
7feeb49ab5 Remove nonsense comment about order being relevant 2010-12-22 19:57:31 +00:00
Roan Kattouw
dd082a7ff4 Followup r78786: make back compat mode actually work by moving up $dbr assignment 2010-12-22 18:08:52 +00:00
Roan Kattouw
a591199468 Followup r78786: var->protected 2010-12-22 17:29:31 +00:00
Roan Kattouw
740ce3933b Fix reported database error in updateSpecialPages.php for SpecialMIMEsearch, by returning 0 rather than false from QueryPage::recache() for uncacheable pages 2010-12-22 16:18:24 +00:00
Niklas Laxström
5becbb47b4 Few @since annotations 2010-12-22 15:22:59 +00:00
Roan Kattouw
60a07ec166 Followup r78786: remove useless getTitle() override, was causing E_STRICT 2010-12-22 14:35:57 +00:00
Roan Kattouw
56b5aa18ed Merge querypage-work2 branch from trunk. The most relevant changes are:
* QueryPage now uses array-based query building instead of raw SQL
* Converted all QueryPage-based special pages that were using old-style wfSpecialFoo functions to new-style SpecialPage subclasses; this is possible because QueryPage is changed to extend SpecialPage
* Backward compatibility for extensions is partly preserved: getSQL() is fallen back on for QueryPage subclasses that don't implement getQueryInfo(), but getOrder() will be ignored (implement getOrderFields() instead). This also means that dual compatibility (1.18 compat and b/c with pre-1.18) is trivial

Extension changes will be merged after this commit.

These changes make it easier to write an API module for QueryPages (bug 14869); this wasn't done in the branch but will be done in trunk soon.
2010-12-22 14:16:25 +00:00
Ilmari Karonen
8ac72aa101 Partial workaround for bug 6220: at least make files on shared repositories show up as (struck-out) bluelinks instead of redlinks on Special:WantedFiles. Also change the query slightly to join on the image table instead of page, since that would seem to make more sense. 2010-12-04 16:10:51 +00:00
Sam Reed
a2589ff8c6 Assignment in loop conditions suck
while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in includes

Add some braces
2010-10-13 23:11:40 +00:00
Platonides
537826a674 Remove $wgContLanguageCode usage in core.
sed -i 's/$wgContLanguageCode/$wgLanguageCode/g'
These are now the same, always. Per and since r15827.

$wgLanguageCode wins due to being the one set by LocalSettings.

$wgContLanguageCode definition at includes/Setup.php kept for now.
2010-09-07 22:37:55 +00:00
Sam Reed
88403ed2c5 More unused.... 2010-08-19 11:42:06 +00:00
Chad Horohoe
4c74490bb8 Big commit: kill almost every freeResult() call as useless 2010-08-08 12:27:48 +00:00
Platonides
1af741ee27 Use the canonical names for classes. 2010-07-27 18:33:04 +00:00
Danny B
3aeb335d2d * replacing deprecated <s> with <del> 2010-07-23 16:59:29 +00:00
Alexandre Emsenhuber
85e870b711 * Document a bit
* Fix some doxygen warnings
* Use spaces instead of tabs in the middle of lines
2010-01-23 20:07:17 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Alexandre Emsenhuber
b4b89afea3 fix some doxygen warnings 2009-10-04 21:21:30 +00:00
Siebrand Mazeland
3a7c7624be Add optional separate date and time parameters for 'perfcachedts' in query pages
* update use in FlaggedRevs
* update check blacklist in Translate
2009-09-26 19:08:54 +00:00
Tim Starling
7b7f9f0d4d Comments and whitespace fixes only. 2009-09-10 06:43:01 +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
f6fcd73591 Revert r53147 properly; was supposed to be reverted in r53167, but I wasn't fully awake at the time. 2009-07-14 08:44:58 +00:00
Roan Kattouw
562dfb5de4 Revert r53147, r53149 and r53163 ("Add API module for QueryPage-based special pages"): this has already been worked on more extensively and cleanly in the querypage-work branch, if you wanna work on this please finalize the implementation there rather than reinventing the wheel. 2009-07-13 12:40:19 +00:00
Bryan Tong Minh
977be5f40d * Added ancientpages, deadendpages and disambiguations to ApiQueryQuerypage
* Added information about disabledness and cache to result
2009-07-13 10:40:29 +00:00
Bryan Tong Minh
cb7471a46e (bug 14869) Allow access to QueryPage-based special pages via API
Only brokenredirects for now, until I find out which other special pages are suitable.
2009-07-12 21:51:47 +00:00
Bryan Tong Minh
eb7d060fd6 Refactored the querying code out of the display code, to allow a future API module for query pages. No user visible changes. 2009-07-12 21:16:58 +00:00
Siebrand Mazeland
30ea75c648 * replace deprecated makeBrokenLinkObj() by LinkHolderArray.php()
* replace deprecated makeKnownLink() by linkKnown()
* add FIXME where I was not able to.

Linking to r51559 for code review
2009-06-13 12:39:00 +00:00
Niklas Laxström
d3b61fea7c Escaping fixes 2009-05-22 09:35:48 +00:00
Siebrand Mazeland
547858b7fe Use link() instead of deprecated makeLinkObj() where possible. 2009-05-08 23:24:31 +00:00