Commit graph

464 commits

Author SHA1 Message Date
X!
cbff3fe980 Followup to r79463: Move fallback functions to new Fallback class 2011-01-02 15:54:18 +00:00
X!
3589532db4 Per my comment on r68760: Make MWfunction class, complete with call_user_func helper functions that automatically
make the callback PHP 5.1 compatible with the Class::Method syntax. Add Unit tests to supplement it.
2011-01-02 06:48:07 +00:00
Alexandre Emsenhuber
8d3285fee1 Made the page_count update defered, as for the site_stats update. I just removed Article::incViewCount() since nothing else was calling this function. 2011-01-01 16:58:00 +00:00
Chad Horohoe
4a5e562591 Refactor table cloning code into its own class so it can maybe be used by things other than the parser tests 2010-12-28 00:44:16 +00:00
Chad Horohoe
c491085fd8 Revert r78903, r78904, r78905, r78906 (changing opendir() to use sfFinder class) per CR and wikitech-l objections.
It's arguable whether the code is cleaner either way, and adding all this code for the (relatively few) places we do file listings just isn't worth it.
2010-12-23 21:49:01 +00:00
X!
c4bdc6f4a1 Per discussion on mailing list, modifying some uses of opendir()/readdir()/closedir() to use new sfFinder class. 2010-12-23 18:20:13 +00:00
Roan Kattouw
1e6add8882 (bug 14869) Add API module for accessing QueryPage-based special pages. Took 2.5 years and a flight to England to get this done, but there you go :) 2010-12-22 20:35:37 +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
Happy-melon
e0bec9555e Merge in Token class from my branch; would like some second opinions on the concept. This seeks to replace the much-abused $wgUser->editToken() token generator, 90% of the uses of which are not for editing but rather general actions.
Implemented for rollback mainly as a proof-of-concept; obvious further targets are patrol links and HTMLForm.
2010-12-18 23:07:30 +00:00
Chad Horohoe
4fe592b1e0 Fix a few more paths from the tests move 2010-12-16 13:49:48 +00:00
Chad Horohoe
354cb9f51c Fix a few more paths, restore a few files lost in the move 2010-12-14 16:48:44 +00:00
Chad Horohoe
b7a3afbe7e Per r76225 CR: Get rid of Autoloader::loadAllExtensions() "Anything that needs it is badly written and needs to use the AutoLoader properly." 2010-12-14 12:59:17 +00:00
Jeroen De Dauw
2e5e2db491 Follow up to r77883 2010-12-09 09:31:59 +00:00
Daniel Friesen
6016f1f968 Follow up r77893, add BaseTemplate to autoloader. 2010-12-07 16:29:49 +00:00
Sam Reed
6bfb5ec4ae Followup r77679, 1 more for bug 23332 2010-12-04 00:13:56 +00:00
Sam Reed
6c4cea2376 Fixup 1 more autoloader from r77677
Add Abstract classes explicitally to the autoloader

Move abstract classes from RevisionDelete.php to RevisionDeleteAbstracts.php (svn copy and remove of redundant classes)
2010-12-03 20:30:21 +00:00
Sam Reed
0c915ff9fa Followup r77677, fix rest of autoloader entries 2010-12-03 20:25:19 +00:00
Sam Reed
f5e059bced Move includes/RevisionDelete.php to includes/revisiondelete/RevisionDelete.php 2010-12-03 19:56:59 +00:00
Andrew Garrett
cca10f71a8 Merge DisableAccount extension into core, disabled by default because the rights are unassigned 2010-12-02 04:17:11 +00:00
Roan Kattouw
5cf2ad2c16 Fixes for r77451 per CR: add UploadStashZeroLengthFileException to AutoLoader and add $wgUploadStashScalerBaseUrl to DefaultSettings.php 2010-11-30 18:37:08 +00:00
Max Semenik
4345c2c20e Refactoring of *Field classes:
* Made them all implement one common interface (might add more functions to it later)
* Moved MySQLField to DatabaseMysql.php
* Renamed nullable() to isNullable()
* Removed maxLength() from:
** SQLiteField: makes no sense
** MySQLField: doesn't do what people may think, useless for this class' purpose of assisting querying the DB schema
2010-11-21 19:56:51 +00:00
Platonides
6a4f016cb5 Add UploadStashFile 2010-11-21 15:20:04 +00:00
Platonides
c6263590c5 Add PhpHttpRequest, added in r60811 2010-11-21 14:35:39 +00:00
Neil Kandalgaonkar
59339ca723 Fixed bug#25784 (thumbnails of stashed files had wrong description URLs).
This fixes the more general problem that the imageinfo returned with stashed uploads was inaccurate, since it was relying on
code that only worked with non-stashed files.

So, I had to:
- move the ApiQueryStashImageInfo module into core. Which others had asked for anyway, and was anticipated sometime later.
  - add lines to AutoLoader and ApiQuery to accomodate the new module

- add an ugly if/then to UploadBase -- based on the type of uploaded file, it will use a different API module to simulate a getImageInfo call. 
  I left a TODO that this situation wasn't ideal, but the way things are now, imageInfo is constructed by the API modules, when it should probably
  really be the File modules. Then the API can wrap that info into various formats.

- add a few new lines to the tests to check imageinfo information in both regular and stashed upload files
2010-11-16 06:57:46 +00:00
Brian Wolff
8adc7befe5 (Bug 25872) Rename HttpRequest class to MWHttpRequest to avoid conflict with php extension.
This also keeps the old HttpRequest class name around, so it should not break backwards compatability.
2010-11-12 07:32:09 +00:00
Alexandre Emsenhuber
f8f6417965 * (bug 24833) Files name in includes/diff/ are now less confusing
Diff.php                -> WikiDiff3.php, more descriptive
DifferenceEngine.php    -> WikiDiff.php, for consistency with the above and to make way for the file below
DifferenceInterface.php -> DifferenceEngine.php, since it contains the DifferenceEngine class
2010-11-07 16:28:11 +00:00
Chad Horohoe
9b5e160b09 Rm back-compat (was moved to the class in r36353) wfLoadAllExtensions(). Not used anywhere in core since message cache rewrite in 1.16. Can't find any uses in extensions in recent history. 2010-11-07 00:32:35 +00:00
Chad Horohoe
670602f082 Trying to kill install-utils.inc/old install crap:
* Cripple the old installer (entry point is gone, supporting code immediately exits). Keeping the latter for reference still :)
* Move posix_isatty() wrapper to Maintenance.php, all CLI scripts include this
* Clarify docs on archive() deprecation and removal - hasn't been used going back thru 1.15
* Clarify docs on dbsource() deprecation and removal - was in wide use thru 1.15. 1.16 removed all extension usages
* Move the two PHP bug tests to a file with the other installer files, moved them to more logical places in new install/update sequence
* Remove mw_have_dl/mw_get_session_save_path, zero callers
* Move readconsole() and helpers to be a static method on Maintenance, no extensions have used it since 1.15 either
2010-11-06 22:16:19 +00:00
Roan Kattouw
ed02d5744f Revert r76177 and use AutoLoader 2010-11-06 11:52:14 +00:00
Tim Starling
82f274088a * Introduced Xml::encodeJsCall(), to replace the awkward repetitive code that was doing the same thing throughout the resource loader with varying degrees of security and correctness.
* Modified Xml::encodeJsVar() to allow it to pass through JS expressions without encoding, using a special object.
* In ResourceLoader::makeModuleResponse(), renamed $messages to $messagesBlob to make it clear that it's JSON-encoded, not an array.
* Fixed MessageBlobStore to store {} for an empty message array instead of [].
* In ResourceLoader::makeMessageSetScript(), fixed call to non-existent function mediaWiki.msg.set.
* For security, changed the calling convention of makeMessageSetScript() and makeLoaderImplementScript() to require explicit object construction of XmlJsCode() before interpreting their input as JS code.
* Documented several ResourceLoader static functions.
* In ResourceLoaderWikiModule, for readability, reduced the indenting level by flipping some if blocks and adding continue statements.
* In makeCustomLoaderScript(), allow non-numeric $version. The only caller I can find is already sending a non-numeric $version, presumably it was broken. Luckily there aren't any loader scripts in existence, I had to make one to test it.
* wfGetDb -> wfGetDB
* Added an extra line break in the startup module output, for readability.
* In ResourceLoaderStartUpModule::getModuleRegistrations(), fixed another assignment expression
2010-11-04 07:53:37 +00:00
Neil Kandalgaonkar
902995cb1d core changes for UploadWizard (merged from r73549 to HEAD in branches/uploadwizard/phase3) 2010-11-03 04:32:41 +00:00
Derk-Jan Hartman
d6f2e8e9e6 * Moving wfGetSVGSize() and wfScaleSVGUnit() into a seperate SVGMetadataExtractor.
* SVG metadata is now stored and versioned.

Chosing not to provide fallback for these functions as they seem unused outside of SVG.php (per Google) and grep.
2010-11-01 23:57:09 +00:00
Bryan Tong Minh
e9fd126b9a (bug 25648) API discovery information has been added as RSD link in page <head> and by providing an API module action=rsd. Added hook ApiRsdServiceApis for extensions to add their own service to the services list.
Patch by Brion Vibber and Bryan Tong Minh.
2010-10-28 19:20:21 +00:00
Antoine Musso
6a45ff534c Follow up r67073 : add curly to if statement 2010-10-21 18:26:17 +00:00
Trevor Parscal
70bae52c12 Part 2 of 2, moved ResourceLoader*Module classes to their own files - this commit removes the non file specific code. 2010-10-19 18:31:09 +00:00
Trevor Parscal
ef6baa91de Moved ResourceLoader classes to their own folder, preparing to also split ResourceLoaderModule.php into multiple files (it's getting a bit long now) 2010-10-19 18:21:38 +00:00
Sam Reed
035218f403 Revert r74913, caused many problems, and was only likely to cause more in the future 2010-10-17 21:18:04 +00:00
Sam Reed
47b13d184c Move profiler stuff to own folder, updater AutoLoader to match
ProfilerSimpleTrace isn't in AutoLoader. Neither is ProfilerStub

Profiler also says " * This file is only included if profiling is enabled"...
2010-10-17 19:04:05 +00:00
Chad Horohoe
002cdd47e1 Move parser test related stuff to tests directory
* Moved test record stuff to testHelpers.inc, could be useful for non-parser test stuff?
* Everything else in tests/parser
* parserTestsParserTime from r12533 doesn't seem used?
2010-09-28 12:24:56 +00:00
Priyanka Dhanda
c6c85df11b Followup to r73500. SeleniumTestConfig renamed to SeleniumConfig. Make sure SELENIUMTEST is defined to use it.
Fixed some indents and pass by reference warnings
2010-09-22 21:23:21 +00:00
Max Semenik
baa6b89458 Class doesn't exist anymore 2010-09-22 07:42:59 +00:00
Priyanka Dhanda
0de6d13f50 RunSeleniumTests.php: Cleaned up a few options that this script takes. Settings are now through a file passed into seleniumConfig or via a hook SeleniumSettings. Reasonable default values when some value is not found. 2010-09-22 00:16:43 +00:00
Trevor Parscal
1329158215 * Added exporting of user preferences
* Renamed user.preferences to user.options
* Fixed bug that caused anonomous usernames (such as IP addresses) to be used in user style and script requests
* Fixed user options styles not loading for anon users
2010-09-14 21:47:59 +00:00
Trevor Parscal
7f523d754f Broke part of ResourceLoaderSiteModule into ResourceLoaderWikiModule (abstract parent). This paves the way for ResourceLoaderUserModule which will come next. 2010-09-10 21:40:42 +00:00
Alexandre Emsenhuber
934e7e6df1 Use the AutoLoader instead of manually requiring these files 2010-09-10 16:53:35 +00:00
Trevor Parscal
c5aa835502 Moved stand-alone libraries to includes/libs. 2010-09-09 19:57:11 +00:00
Aryeh Gregor
9ac33a362f Move DatabaseType to Database.php
This way the required method names will show up when grepping
Database.php.  I thought we had no affectedRows() method for a minute
there, until G_SabinoMullane corrected me (good thing I think aloud
in #mediawiki).
2010-09-08 17:48:11 +00:00
Trevor Parscal
8c50f16c24 Merged reorganization work for PHPUnit from branches/phpunit-restructure/ 2010-09-07 23:02:56 +00:00
Roan Kattouw
32377424b9 Merging resourceloader branch into trunk. Full documentation is at http://www.mediawiki.org/wiki/ResourceLoader and a general overview has been posted on wikitech-li <http://lists.wikimedia.org/pipermail/wikitech-l/2010-September/049253.html>. One important change is that all JS is now loaded at the bottom, so any scripts assuming things from wikibits or whatever are present will fail. 2010-09-04 04:00:09 +00:00
Alexandre Emsenhuber
58814d9365 Moved OracleUpdater to its own file so that I can stop asking me why this file is missing 2010-09-03 18:53:19 +00:00