Commit graph

313 commits

Author SHA1 Message Date
Brion Vibber
6ebba897f1 * (bug 17714) Limited TIFF upload support now built in if 'tif' extension is
enabled. Image width and height are now recognized, and when using ImageMagick,
  optional flattening to PNG or JPEG for inline display can be enabled by setting
  $wgTiffThumbnailType

By default no thumbnailing will occur; only difference from previous will be that the image width/height is detected and displayed.

Not yet implemented:
* Multi-page support
* Cleverer thumbnailing for giant files
* Thumbnailing of any sort if not using ImageMagick
2009-03-16 22:03:20 +00:00
Aaron Schulz
07aabee46f * Refactored revisiondelete to use subclassing
* Removed $action usage
* Check edit token
2009-03-09 18:09:55 +00:00
Tim Starling
abbf76b7b1 * Refactored the forking code from runJobs.php to a new class called ForkController. Implemented the same sort of forking in gearmanWorker.php.
* Fixed debugging code left in in gearmanRefreshLinks.php
2009-02-26 06:02:32 +00:00
Tim Starling
4b66381cbf * Mostly reverted r41081 and related. Although the motivation (to save a query) is noble, it's a complex special case relying on subtle inter-module effects, making the code quite unclear and the performance advantage hard to reproduce in new code.
* r41081 was causing the job queue to be flooded with tiny htmlCacheUpdate jobs which were less than the batch size and so, according to the original logic, should have been done immediately. This was causing template updates to be delayed even when the template has few backlinks. This is fixed.
* Introduced a shared cache called BacklinkCache with the main purpose of sharing data from these backlink queries, thus recovering the performance of r41081.
* Refactored backlink partitioning code, which in r40741 was copied from HTMLCacheUpdate to LinksUpdate with a bug intact. The bug caused every htmlCacheUpdate or refreshLinks2 job to be split into at least two pieces even when number of rows is less than the batch size.
* Fixed a bug from r40741 causing refreshLinks2 jobs with end=false to be ignored.
* Made SquidUpdate::newFromTitles() accept a TitleArray
2009-02-16 14:26:34 +00:00
Roan Kattouw
8fc08c1869 API: (bug 16740) Adding list=protectedtitles to list create-protected titles 2009-02-13 21:34:46 +00:00
Chad Horohoe
cca4438f1d Rewrite Special:Export to subclass SpecialPage. 2009-02-06 23:36:12 +00:00
Roan Kattouw
bb3980dd8d * API: (bug 17007) Add action=import
* Add intoken=import to prop=info
* Store message key and arguments in WikiErrorMsg
2009-02-04 20:11:27 +00:00
Roan Kattouw
5e5684ec77 * API: (bug 17007) Add export functionality to the API
* Accessed through the export and exportnowrap parameters added to action=query
* To facilitate &exportnowrap, add ApiFormatRaw, a formatter that just spits out its input without any formatting (not accessible through &format= of course)
* Fix up the action=query description message to reflect the deprecation of query.php
2009-02-02 20:07:33 +00:00
Bryan Tong Minh
ff78c9382b Removing the new upload code from trunk so that patches do not accidentilly get applied here. 2009-01-30 22:08:23 +00:00
Andrew Garrett
9a3c1fcede Branch merge of change-tagging branch with trunk
-- Introduce tagging of individual changes (revisions, logs, and on recentchanges). The tags are customisable, and currently settable by the Abuse Filter and by the TorBlock extension. The tags can be styled on the various pages on which they appear.
-- Introduces a schema change, three new tables (valid_tag, change_tag, and tag_summary).
2009-01-28 19:08:18 +00:00
Alexandre Emsenhuber
f3f9e58d36 Don't use AutoLoader in class_exists() and interface_exists() in AutoLoader::loadAllExtensions() since we'll require() it if it doesn't exist 2009-01-27 20:29:20 +00:00
Alexandre Emsenhuber
1f23e8d0fc STAB STAB STAB
forgot to commit this file
2009-01-27 15:16:43 +00:00
Leons Petrazickis
5c7431a08e (bug 17028) Added support for IBM DB2 database. config/index.php has new interface elements that only show up if PHP has ibm_db2 module enabled. AutoLoader knows about the new DB2 classes. GlobalFunctions has a new constant for DB2 time format. Revision class fixed slightly. Also includes new PHP files containing the Database and Search API implementations for IBM DB2. 2009-01-14 22:20:15 +00:00
Alex Z
6779a2cc13 adding newline to end of wfDebug calls where it was missing. 2009-01-13 20:28:54 +00:00
Brion Vibber
2190984466 Revert r45231, r45235 "* (bug 674) Allow users to be blocked from editing a specific article"
Unexpected schema changes in the middle of code review and run-up to 1.14 freeze
2008-12-31 18:56:16 +00:00
Siebrand Mazeland
75c7147abb * Revert r45062 and related (Merge Interwiki extension to core) per brion.
* Merge changes made to Special:Interwiki after merge to core back into extension (messages will follow within 24 hours)
2008-12-31 18:44:54 +00:00
Victor Vasiliev
1f67478d1f * (bug 674) Allow users to be blocked from editing a specific article
** Also supports blocking user from editing whole namespace
** Fixed most issues which were found before
2008-12-31 17:25:47 +00:00
X!
6561a9e370 Add Interwiki extension to core. 2008-12-27 05:00:33 +00:00
Brion Vibber
97f77b9b1a Revert r44702, r44703, r44704 (wfInvoke and UserMailer refactor based on it) and r44715, r44721 (cleanup thereof)
As Tim notes, the weird callback setup in $wgHooks isn't really something we want to replicate or ever rely on ever again, as PHP's native callback syntax already handles things fine and is more consistent (and used extensively in the rest of MediaWiki).
May be other remaining issues with the refactor on top of bugs already discovered, but if it's going to be refactored to use callbacks it should be done using regular callbacks.
2008-12-23 18:08:43 +00:00
David McCabe
43c9235283 UserMailer bigtime refactor. Please test. 2008-12-17 07:08:16 +00:00
Ilmari Karonen
8b30615423 Add a new FileCache class to wrap RepoGroup::findFile() and findFiles(), and make wfFindFile() use it by default. This should improve performance for pages that refer to the same image several times, but the real benefit is that it allows batch file existence checks, à la LinkBatch, by collecting a set of titles (or DB keys) and calling FileCache::findFiles() on them to prefill the cache.
XXX: The code seems to more or less work, but it obviously needs more testing, regarding both stability and memory usage.  In particular, I have not tested file uploads yet -- there may be consistency issues there.
2008-12-14 05:47:48 +00:00
Chad Horohoe
18f85ab4a9 Complete rewrite of Special:Statistics:
* Now subclasses SpecialPage like it should
* All of the individual sections were split off into their own methods for readability
* Fixed Brion's comments on code review (r44509): not using <small> in the message, breaking to a new line, and keeping the description message separate
* Since -tooltip is a misleading name for the message, I renamed them to -desc, all message files and messages.inc have been updated
2008-12-13 01:45:49 +00:00
Brion Vibber
90e66d66d1 remove no longer needed line for Parser_OldPP (now banished!) 2008-12-12 23:57:18 +00:00
Tim Starling
ea471f0d79 Moved the IE content type checks to their own class. Disassembled IE 5 and 6 and added the results to the class. The entry points now return an array giving MIME types for all versions. The most important version difference is the introduction of an early check for PNG headers in IE 7. Added application/x-msdownload to disallowed types, haven't been able to reproduce any vulnerability, but it's better to be on the safe side. 2008-12-12 15:06:35 +00:00
Alexandre Emsenhuber
e7d8aeb7ed Fix for r44383: profiling error on unexisting class 2008-12-10 11:42:35 +00:00
David McCabe
64d53b6569 Revert r44386; depends on wfInvoke, also reverted. 2008-12-10 06:40:05 +00:00
David McCabe
cbafadf8d6 Refactored UserMailer.php. Please let me know if this breaks anything. 2008-12-10 06:02:14 +00:00
Aaron Schulz
dce4ab07e8 Reduce profile overhead here 2008-12-10 05:12:54 +00:00
Alexandre Emsenhuber
4b160a4d84 Check if wfDebug() is defined before calling it since AutoLoader.php is loaded before GlobalFunctions.php and may result in fatal error 2008-12-08 15:35:06 +00:00
Aaron Schulz
2f584f68a9 *Skip autoloading of skin, always does inefficient strtolower() stuff and fails (returns false) anyway
*Add wfDebug() call on class load failure
2008-12-08 00:35:59 +00:00
Alexandre Emsenhuber
1c83ed1db3 Renamed PasswordReset class to SpecialResetpass and fixed an entry in SpecialUserlogin.php that was not renamed in r43971.
This also caused a regression with PasswordReset extension (renaming PasswordResetForm to PasswordReset) since this extension also have a PasswordReset class
2008-11-29 19:42:08 +00:00
Aaron Schulz
c851c28f76 Cleanup for r43841:
* Fix odd invocation to use the normal extend method for pages
* Add passwordaudit hooks
* Fix specialpage member variable collision
2008-11-26 03:37:11 +00:00
Chad Horohoe
e899407d48 Refactor Special:Import to extend SpecialPage instead of wfSpecialImport() stuff. 2008-11-26 02:10:56 +00:00
Andrew Garrett
6ef3fc4a2f Revert "Starter for a re-jig of hit counting (in a per-day table)."
That was supposed to be in a branch.
2008-11-19 12:05:33 +00:00
Andrew Garrett
1c2f4514f8 Starter for a re-jig of hit counting (in a per-day table).
Needs configurability, purty graphs, and some cleanup in the back-end.
2008-11-19 12:01:43 +00:00
Aaron Schulz
915af4890f * Re-commit new search UI code, disabled by default. Old form messages still used and thus kept.
* Update old-fashioned profile calls
2008-11-17 04:56:14 +00:00
Tim Starling
583127021b * Added the BitmapHandler_ClientOnly media handler, which allows server-side image scaling to be completely disabled for specific media types, via the $wgMediaHandlers configuration variable. 2008-11-06 20:59:34 +00:00
Tim Starling
c5bd0fae09 Removed scary YAML parsing code, the function of which is to load from a user input string, except if the string has no line breaks in it, in which case an arbitrary local file/URL is loaded and handed to the attacker on a nicely encapsulated silver platter. Doesn't appear to be used either by core or extensions, but you never know when someone might try. 2008-10-25 14:01:35 +00:00
Brion Vibber
90e12d48c7 Back out r42182 for now "Move UDP stuff to new UDP class"
UDP isn't a very clear name for this, especially since we use UDP protocols for multiple different things!

This class should probably be genericized a bit for _change notifications_, which there might be multiple backend implementations for, including the UDP->IRC bot gateway.
2008-10-19 23:59:39 +00:00
Danny B
7602d92d29 * back the UDP class accidentaly removed in r42201 2008-10-18 17:58:51 +00:00
Danny B
f6db98925c * A new special page to list wanted templates 2008-10-18 17:32:40 +00:00
Aaron Schulz
46a4a8bb7e Move UDP stuff to new UDP class 2008-10-17 23:46:21 +00:00
Tim Starling
e48a9beb8e Revert revert r41578 of r41531 and fix compressOld.php. 2008-10-17 09:11:43 +00:00
Aaron Schulz
155e856963 Refactor contribs to use the newer class extension method (about to do bug 6955) 2008-10-17 01:35:54 +00:00
Brion Vibber
3b38584b2f Back out r41630 -- merging of Nuke extension to core
Nuke started as a crappy hack, and it's still pretty crappy. ;) Needs better reversibility tools etc before we consider merging to core.
2008-10-15 21:35:19 +00:00
Chad Horohoe
36a67e1cf7 Revert r41603, r41751 (splitting Preferences validation into its own class). Breaks a lot of things per comments on Code Review by Tim. 2008-10-11 16:38:43 +00:00
Aaron Schulz
5e326c34b5 Partial revert of r41527. Do this in a cleaner way. 2008-10-05 02:45:12 +00:00
Roan Kattouw
5c4efbf944 (bug 15768) Add list=watchlistraw to the API 2008-10-04 13:33:44 +00:00
Siebrand Mazeland
c6e24f0a42 * Add functionality of extension Nuke to core. Messages for other languages will be added in a next commit.
* Update Translate
2008-10-04 00:33:07 +00:00
Chad Horohoe
c76d2ee33c Split off some of these validation methods into their own class called Validate so they can be useful elsewhere :) 2008-10-03 13:32:55 +00:00
Brion Vibber
2946cdcaaa Backing r41531 out for now ("Concept for diff-based compression using the new xdiff beta")
Looks cool, but this changes the return type of ConcatenatedGzipHistoryBlob::addItem() from a stub object to a hash value, which will break its usages in ConcatenatedGzipHistoryBlob::setText() and maintenance/storage/compressOld.inc.
2008-10-03 00:00:24 +00:00
Tim Starling
30ea5f2d8b * Concept for diff-based compression using the new xdiff beta. Acheives massively better compression ratio compared to CGZ for articles which are larger than the deflate 32 KB sliding window. Works within the HistoryBlob architecture.
* Fixed documentation in HistoryBlob.php, removed "todo document" for methods that are adequately documented in the interface.
* Added testCompression.php for testing concatenated object compression ratio
2008-10-02 06:32:14 +00:00
Brion Vibber
5127e19626 Revert r41352-41355, r41362-41363: unauthorized schema change breaks parser tests 2008-09-30 00:07:04 +00:00
Matt Johnston
904c84d8d4 New format for accessing Interwiki data. Replaced all old ways within core I could find, but should be backwards compatible wherever needed.
Also fix the notes in RELEASE-NOTES to state PHP 5.2 recommended as certain classes require it (e.g. ForeignAPIRepo, which uses json_decode)
2008-09-29 10:08:46 +00:00
Victor Vasiliev
bec6903108 * (bug 674) Allow users to be blocked from editing a specific article
** Also supports blocking user from editing whole namespace
* Replace ugly ipboptions parsing code in Title.php with a simple message

Requires schema change (I showed it to Tim Starling).
2008-09-28 16:08:18 +00:00
Roan Kattouw
f7748d570b (bug 15653) Add prop=duplicatefiles to the API 2008-09-27 11:42:28 +00:00
Roan Kattouw
008b4f7d0f API: Add ApiDisabled and ApiQueryDisabled classes so individual modules can be disabled by putting $wgAPIModules['foo'] = 'ApiDisabled'; in LocalSettings.php 2008-09-25 20:50:50 +00:00
Siebrand Mazeland
72cdb9da5b Add extension DeletedContributions to core 2008-09-23 08:41:55 +00:00
Aaron Schulz
46ff00f486 * Add support for log importing
* Improve accuracy of revision duplicate check
* Some minor cleanup and re-organizing
2008-09-18 20:52:34 +00:00
Aaron Schulz
5b2f7a71f6 * Move Import stuff to it's own file like Export
* Force logging index
* Some code style tweaks
* Set visibility in some places
2008-09-18 16:41:43 +00:00
Chad Horohoe
762199e69b Remove two useless classes from HTMLDiff. One was entirely unused and useless, and the other was a wrapper for a more simple solution. 2008-09-16 19:19:12 +00:00
Siebrand Mazeland
7f1b7554b9 * Add functionality of extension LinkSearch to core
* Update release notes for adding of Special:Log/newusers
2008-09-14 19:51:25 +00:00
Aaron Schulz
2f4c8be5db Redo RefreshLinksJob2 commit with trivial notice fix. 2008-09-12 09:37:31 +00:00
Siebrand Mazeland
a3b1485c47 Revert 40741. Causes "Division by zero in includes/LinksUpdate.php on line 210" 2008-09-12 08:06:00 +00:00
Aaron Schulz
892a21961d job-queue insert should no longer fail for highly used templates (bug 5527) 2008-09-12 04:26:33 +00:00
X!
fe3e7524dc Add new special page Wantedfiles. 2008-09-11 22:30:27 +00:00
Roan Kattouw
b624df0d43 (bug 15466) Added action=purge to the API. Modified patch by ^demon 2008-09-04 21:53:43 +00:00
Roan Kattouw
bd3bf5d2a7 * Split patrol code
** Backend code moved to RecentChange::reallyMarkPatrolled() and doMarkPatrolled()
** Adapted Article::markpatrolled()
* (bug 15466) Added action=patrol to the API. Modified patch by Soxred93
* Added rctoken=patrol to list=recentchanges
* Detect duplicate warnings in ApiBase::setWarning()
2008-09-04 15:17:51 +00:00
Tim Starling
c39da5210a Rename UploadFromBase to UploadBase. It's best to use English rather than inventing our own language. 2008-09-01 08:09:16 +00:00
Bryan Tong Minh
bce3733c01 Splitting backend upload code from SpecialUpload.
* All common upload code resides in UploadFromBase. Then depending on the upload source, one of its derived classes is initiated by Special:Upload.
* SpecialUpload::ajaxGetExistsWarning now only returns warnings that are related to existence.
* Allow LocalFile::upload to attribute the upload to another user than $wgUser

This introduces breaking changes for upload extensions.
2008-08-27 17:38:33 +00:00
Chad Horohoe
0524aef5b6 * Add all HTMLDiff-related classes to the autoloader.
* Move all stuff @ingroup DifferenceEngine to /diff
* Split off Node and friends to Nodes.php to make HTMLDiff.php shorter.
2008-08-25 20:19:00 +00:00
Roan Kattouw
44475e0314 Adding action=watch to the API 2008-08-21 15:44:13 +00:00
Alexandre Emsenhuber
33e195da5e *stab* forgot to commit that file 2008-08-18 19:37:44 +00:00
Daniel Friesen
5a43da4025 Committing today's work the LinkHooks' new parser.
Don't expect this to work completely yet, there is likely going to be a lot of refactoring before a final version is complete.
2008-08-18 14:44:51 +00:00
Daniel Friesen
22c1e38461 Create a placeholder for the LinkHook experimentation.
This will allow us to develop a new method of parsing links (non-hacky), without breaking current syntax, and also allow us to make sure new methods don't break syntax.

Currently this class merely inherits from the Parser class. Constants and static functions are coppied so that use of self:: won't break when we modify things.
2008-08-18 03:56:38 +00:00
Guy Van den Broeck
3712ab270d Performance improvements to diff algorithms 2008-08-18 00:16:32 +00:00
Fran Rogers
3ad5bfb749 Fix for problems with r39414; LinkHolderArray::replaceInterwiki() was badly broken 2008-08-16 10:13:35 +00:00
Siebrand Mazeland
2dedbbdfa1 Revert r39414. Breaks processing links like [[:wikipedia:nl:User:Siebrand|Dutch language Wikipedia]]. It will add a comment like "<!--IWLINK 0-->" in the HTML output. Happens even if there is one such link on a page. 2008-08-16 09:33:11 +00:00
Alexandre Emsenhuber
e8aadacc7d Fixes for r39406:
* Set missing properties svn:eol-style and svn:mime-type
* Use auto loader if possible
* Added $wgEnableHtmlDiff to DefaultSettings.php (todo: fix description of this setting)
2008-08-15 16:51:46 +00:00
Tim Starling
c45292ac40 * In the parser: do link existence tests in batches of 1000. Avoids using excessive memory to store Title objects.
* Split link placeholder/replacement handling into a separate object, LinkHolderArray.
* Remove Title objects from LinkCache, they apparently weren't being used at all. Same unconstrained memory usage as the former $parser->mLinkHolders.
* Introduced ExplodeIterator -- a workalike for explode() which doesn't use a significant amount of memory
* Introduced StringUtils::explode() -- select whether to use the simulated or native explode() depending on how many items there are
* Migrated most instances of explode() in Parser.php to StringUtils::explode()
* Renamed some variables in Parser::doBlockLevels()
* In Parser.php: $fname => __METHOD__, Parser => self/__CLASS__, to support Parser_DiffTest more easily
* Doc update in includes/MessageCache.php for r39412
* MW_TITLECACHE_MAX => Title::CACHE_MAX, nicer name, easier to access from another module
2008-08-15 16:35:03 +00:00
Aryeh Gregor
a42e23da22 Revert r38165 for now, breaks CentralAuth and I don't have that installed anywhere to debug. 2008-07-29 14:53:10 +00:00
Aryeh Gregor
c51f8ce69d Merge TitleArray and UserArray into one unified class, ObjectArray. Adding support for a new type of object will now just take a few lines. 2008-07-29 00:51:08 +00:00
Aryeh Gregor
38473966ea Add TitleArray, a straight rip-off of UserArray. I couldn't figure out how to make them both inherit from ObjectArray or anything, so code duplication works for now. 2008-07-25 19:03:53 +00:00
Tim Starling
aeadd21e02 Syntax error 2008-07-24 12:51:26 +00:00
Tim Starling
7e23342582 Workaround for APC bug. Not fully isolated, but AutoLoader::$localClasses is implicated by the C stack frame at the time of the crash. 2008-07-24 12:45:23 +00:00
Tim Starling
5ad5cb4f0a * (bug 4578) Automatically fix redirects broken by a page move. Works via the job queue, controllable by a checkbox on Special:Movepage.
* Renamed some excessively short variables in SpecialMovepage.php
* Allow $wgReservedUsernames to be localised using "msg:..." syntax
2008-07-22 22:44:34 +00:00
Tim Starling
d6f0a95465 * Split off DB load monitoring logic into a LoadMonitor class hierarchy, to allow for plugins in this area.
* Use an associative array to initialise LoadBalancer objects
* By default, use Preprocessor_DOM if available, otherwise use Preprocessor_Hash. Preprocessor_Hash has worse performance.
* Fix parserTests.php for replicated databases. Use CREATE TABLE instead of CREATE TEMPORARY TABLE if there is more than one server configured.
* Log exceptions even in command-line mode.
2008-07-07 03:31:00 +00:00
Chad Horohoe
7e627faec6 Return true on success, not just false on failure. A bit of documentation as well :-) 2008-07-02 19:41:58 +00:00
Brion Vibber
196060cf96 Revert r36776 -- this function doesn't return a value on success, why on failure? 2008-07-02 19:30:46 +00:00
Tim Starling
e74343ee4f Remove hack for old APC bug that's fixed now. Was causing problems for DumpHTML (and probably other command line scripts) because $IP was not the same as dirname(__FILE__), causing double-inclusion. 2008-06-29 20:02:42 +00:00
Chad Horohoe
a54a6796e2 (bug 14670) Return false if AutoLoader can't find a class. 2008-06-29 03:42:37 +00:00
Alexandre Emsenhuber
4611030ce9 Rewritten Special:Recentchangeslinked, now using a subclass of SpecialRecentchanges:
* (bugs 4832, 9481, 12890) Now has all options present in Special:Recentchanges (hide myself, bots, ...)
* Using "showlinkedto" on a template now uses the templatelinks table to fetch links instead of pagelinks
* [[Special:Recentchanges/0]] now works as expected, thanks to Nikerabbit for pointing this out
2008-06-26 19:12:52 +00:00
Niklas Laxström
7c6092b21e * Some classes from maintenance for autoloading 2008-06-24 12:38:17 +00:00
Brion Vibber
660a5eb7aa Rename all the special page class files back to their proper names.
1) This keeps the filename the same as the classname, which is always nice
2) This avoids duplicate filenames (such as includes/Export.php and includes/specials/Export.php)
So I've at least got a chance of figuring out what file is what still...
2008-06-19 21:12:45 +00:00
Brion Vibber
3afabc850d Revert r36413 -- renaming of search files into 'search' subdirectory
The loss of specific names would create a visible name conflict; when you've got "MySQL.php" open, what the hell is it? Is it the DatabaseMySQL class? Some other random MySQL-related thing? Update.php is also confusing -- we have an update.php which is a command-line script.
Don't do these confusing names; there's no pressing functional need to move the files at all, but if you must move them at least keep their distinct names so I can find my code.
2008-06-19 21:02:23 +00:00
Alexandre Emsenhuber
bed371083b Made NewpagesForm extends SpecialPage and renamed it to SpecialNewpages 2008-06-18 20:45:10 +00:00
Bryan Tong Minh
f0a89957f8 Recommit r36403 with working version history hopefully: Move Search*.php to search/*.php 2008-06-18 09:01:41 +00:00
Bryan Tong Minh
de73a13544 Revert r36403: Breaking SVN version history 2008-06-18 08:41:05 +00:00
Chad Horohoe
61b77c1b0b More ~/includes cleanup. Moving all the Search*.php files to ~/includes/search. 2008-06-17 20:58:32 +00:00
Niklas Laxström
58f7bb30a0 Refactored SpecialRecentchanges:
* Use a class and new frameworks
* Split into functions
* Two new hooks
* Split feed related items to new classes that are autoloaded
2008-06-17 08:24:00 +00:00