Commit graph

115 commits

Author SHA1 Message Date
Tim Starling
bb97e2e483 Reverted r46706, misses essential updates, the feature can easily be implemented another way (see CodeReview). For 1.15. 2009-05-19 08:01:36 +00:00
Brion Vibber
c70b23a6bb Revert r47530 "Fix bug 17571, now page1 would add to both cat1 and cat2."
Code is unclear; needs cleanup before adding more instances of this :D
2009-03-25 08:46:22 +00:00
Aaron Schulz
2a4d0dc583 fix profiling 2009-03-06 01:40:56 +00:00
Philip Tzou
50970f4230 Fix bug 17571, now page1 would add to both cat1 and cat2. 2009-02-20 06:47:03 +00:00
Tim Starling
4f3efbf406 Don't do any backlink batches if there are no backlinks. 2009-02-19 02:10:55 +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
Philip Tzou
c3152e2636 (bug 3311) Automatic category redirects 2009-02-02 14:15:21 +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
Philip Tzou
a31dceccc9 To find an available category name during update table 'categorylinks'. Just act on the language which enabled LanguageConverter. 2009-02-02 06:53:49 +00:00
Ilmari Karonen
34fb6297cd Step 2 in NS_IMAGE -> NS_FILE transition (bug 44) (WARNING: huge commit).
This is a global search and replace of NS_IMAGE and NS_IMAGE_TALK with NS_FILE and NS_FILE_TALK respectively in all core files, excluding those already updated in step 1 (r44004).
2008-12-01 17:14:30 +00:00
Aaron Schulz
27980cd92b * Avoid doing templatelinks query (which can get huge) twice by adding cachupdate jobs using the same query as refreshlinks jobs do
* Don't trigger recursive jobs for nulls edits
* Some whitespace tweaks
2008-09-20 22:48:55 +00:00
Aaron Schulz
5b307763e3 Add missing wfProfileOut( __METHOD__ ); 2008-09-20 07:31:44 +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
Aaron Schulz
788571dae6 flag as protected 2008-08-17 21:58:17 +00:00
Brion Vibber
a7af6c3b72 Hold back $wgTrackLinkChanges for a little bit; reverting r37322, 37430, 37432, 37435.
Even disabled, it's started interfering with regular tasks like running the parser tests.
2008-07-10 22:11:11 +00:00
Bryan Tong Minh
fe2e53ca93 (bug 13588) Experimentally track link changes if $wgTrackLinkChanges is set to true. Requires schema change. 2008-07-08 15:02:07 +00:00
Nicolas Dumazet
56a36cff30 mCategoties -> mCategories
Oops, that typo was surviving here since March :p
2008-07-04 11:01:02 +00:00
Nicolas Dumazet
bd2ab6be1a Correcting commit 37038 : only getXXXDeletions were simple array_diff_assoc. Sorry 2008-07-04 10:51:04 +00:00
Nicolas Dumazet
ae5d81b425 syntax fix 2008-07-04 10:30:48 +00:00
Nicolas Dumazet
da8cfb32cf 6 array_diff_* were computed twice. Compute once, and remember them instead. 2008-07-04 10:24:20 +00:00
Andrew Garrett
3e14f2b679 Save the parser output to a member variable of LinksUpdate, so that hooks can access it. 2008-04-28 12:48:41 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Aryeh Gregor
23552223bf Remove apparently pointless $dbw parameter to Article::updateCategoryCounts. 2008-03-19 13:36:33 +00:00
Aryeh Gregor
80a5874828 This is a schema change. It's only a table creation, but the table must be created on Wikimedia servers before this revision goes live. The maintenance script populateCategory.php should be run when convenient. If it's not run, there's only one substantial case where display will be harmed: the page of a category with more than 200 net pages added since the patch goes live will give an erroneously low count. In other cases category pages will just be better-worded, and it will recognize the count in the table is bogus.
* Adds Category and CategoryList classes to represent categories themselves.
* Adds a category table, giving each category a name, ID, and counts of all members, subcats only, and files.
* Adds a maintenance script to populate the category table efficiently.  This script is careful to wait for slaves and should be safe to run on a live database.  The maintenance script's includes file is called by update.php.
* Until the category table is populated, the patch handles weird category table rows gracefully.  It detects whether they're obviously impossible, and if so, it outputs appropriate messages.
2008-03-18 00:17:28 +00:00
Greg Sabino Mullane
6288ee6c0f Continue the pretty lining up from above. 2008-02-21 20:05:52 +00:00
Tim Starling
269a91037b * Added __HIDDENCAT__ feature, to hide categories from the box at the bottom of the member pages depending on special text on the category page.
* Added page_props backend, generic parser-driven page properties which, when changed, invalidate the cache of backlinked pages on any links table. Could be used to add overlays to images depending on their deletion status, or to add icons to articles based on category membership. 
* Refactored double-underscore handling in the parser. 
* Moved CoreParserFunctions registration to CoreParserFunctions.
2008-02-20 08:53:12 +00:00
Bryan Tong Minh
8599bbee84 New hooks: LinksUpdate, LinksUpdateComplete. Add function getTitle to LinksUpdate. 2008-02-09 12:32:32 +00:00
Brion Vibber
0baa4a7f0c Revert r25768, r25771
I really don't like inserting bogus entries into the link tables, that looks fragile and generally horrifying.
2007-09-11 15:03:54 +00:00
Andrew Garrett
11de3cf8b4 * Speed up Special:UncategorizedPages and Special:Deadendpages (no longer marked as slow queries). They now add blank ('','') entries for pages without ANY links or categories. Note that these entries are now what is checked by Special:Uncategorizedpages and Special:Deadendpages. Thus, refreshLinks.php needs to be run before either of these pages will work correctly. An update script will be forthcoming.
* RELEASE-NOTES comments forgotten in a previous commit.
2007-09-11 08:10:28 +00:00
Aaron Schulz
ba2e9b1f4f *Decrappify inefficient hook/link update scheme for this extension 2007-07-18 08:49:24 +00:00
Rob Church
0d5fccb1de Update comment 2007-07-17 00:22:57 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Rob Church
b6b52063ec Some job cleanup:
* Move Jobs left in JobQueue.php to their own file
* Ditch $wgCustomJobs in favour of $wgJobClasses, which acts as a dictionary and allows extensions to add custom jobs
* Standardise Job derivative constructors and update everywhere
* Make sure all overriding implementations of Job::run() return true to avoid bogus "Error" report in runJobs.php
2007-06-21 19:11:24 +00:00
Aaron Schulz
17551136ff *Add BeforeGalleryFindFile, TitleLinkUpdatesAfterCompletion, BeforeParserFetchTemplateAndtitle, BeforeParserMakeImageLinkObj, BeforeParserrenderImageGallery; make parser outputs and output page record images -> timestamps used and templates -> revision ids 2007-05-31 16:01:26 +00:00
Nick Jenkins
113bb1c772 Documentation tweaks to help documentation systems (Doxygen + PHPDocumentor)
pick up the appropriate tags, and documentation blobs for classes. This is 
the same as per r20769, but with the grouping changes (e.g. removing "@{{") omitted.
Please be advised that more related documentation tweaks may follow later - e.g. 
Doxygen generates a log file of warnings that is 574 Kb in size, when run over 
the just the trunk/phase3 code ... eek! Thankfully, much of that is just 
whining about functions without documentation   ;-)
2007-04-04 05:22:37 +00:00
Brion Vibber
3a6ac5a3c3 Revert r20769: we don't use PHPDocumentor anymore, we use doxygen.
If making mass changes to tweak to its preferences, probably better to do it for the tool we actually generate docs with. :)
2007-03-28 14:16:43 +00:00
Nick Jenkins
5fef2333d4 PHPDocumentor [http://en.wikipedia.org/wiki/PhpDocumentor] documentation tweaking stuff.
Minor doc tweaks to prevent some PHPDocumentor warnings or errors when run on the includes/ directory. PHPDocumentor uses a syntax very similar to javadoc - mostly we already use this, but there were a few scattered places that were adjusted to make them consistent with the rest of the code. In practical terms, these changes were made:
* @url becomes @link
* @fixme becomes @todo
* HTML tags in descriptions must be closed / balanced.
* @bug was removed (where the bug was long fixed), or changed into a @todo (in the few situations where the bug was still pending)
* @obsolete becomes @deprecated
* Things like "/**@{{" and "/**@}}*/" which cause "unknown tag" warnings were removed
* @access must be a valid access level.
* @desc tag not needed, removed.
* Doesn't seem to like @licence, will accept @license however.
* Use full comment block notation in a few places (i.e. open block with "/**", start each line with " *", and end block with " */")

Then additional to this, to get some class docs associated with their respective classes:
* Moved some docs to right above those classes (deleting blank lines, or moving descriptions from the file headers)
* Marked some classes without docs as "@todo document"
* (done up to "class MIMEsearchPage" on the "classtrees_MediaWiki.html" page for the includes/ directory)
2007-03-28 08:53:02 +00:00
Nick Jenkins
f88c771756 The war on redundant ampersand usage!
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"

For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.

Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
2007-01-22 23:50:42 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Tim Starling
0e2714b61d Added a new method to update the cache of all pages linking to a given page without using excessive time or memory. This turns out to be a common operation in MediaWiki, I needed to fix callers in a lot of files. Backwards compatibility is maintained (of course). Also did some cleanup in Article.php, another 3 years of that and it'll be looking pretty. New job type added to the job queue, some refactoring done in JobQueue.php to support it. 2006-06-18 12:42:16 +00:00
Tim Starling
02547dac72 Removed most exit() calls from the MediaWiki core, by replacing them with either a throw or by classic error checking. OutputPage::fatalError() and similar functions are deprecated, use either OutputPage::showFatalError() to return control or throw new FatalError() to relinquish it. Backwards compatibility of all interfaces has been maintained, thus extensions should continue to work and can be ported at a later date. 2006-06-07 06:40:24 +00:00
Domas Mituzas
3fdf040feb AutoLoad JobQueue 2006-06-06 11:48:05 +00:00
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Antoine Musso
7ebdb6de89 Revert to r14165 . Did too many changes, didnt even run parserTests (i am bad) 2006-05-11 22:40:38 +00:00
Antoine Musso
bc14eb8045 Replacing var keyword with private / public as we now require PHP5. 2006-05-11 19:10:41 +00:00
Tim Starling
2cf54927f4 Fix for concurrent image description page update problem. 2006-04-21 06:41:22 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00