Commit graph

87 commits

Author SHA1 Message Date
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
Brion Vibber
16adeaf2b6 whitespace fixes to r13575 2006-04-11 22:16:10 +00:00
Tim Starling
fb97cc3078 langlinks table 2006-04-11 14:56:04 +00:00
Lupin
c7408b9223 trailing whitespace removal 2006-03-11 17:13:49 +00:00
Tim Starling
ad005d57ad Put something sensible in cl_timestamp, with oracle compatibility 2006-03-01 13:22:22 +00:00
Tim Starling
6aebe1799e Fixed bug 2861. cl_timestamp isn't used for anything, but it's got no default so strictly speaking we have to insert something there. Inserting 0 which the MySQL manual says is valid for timestamp columns. This is easier than adding yet another SQL patch file to define a default. 2006-03-01 11:09:18 +00:00
Tim Starling
bfc45cd804 Invalidate image description page cache when the list of links changes 2006-03-01 03:53:33 +00:00
Tim Starling
8d7d6e92bc documentation 2006-02-28 05:16:31 +00:00
Tim Starling
5bed313c7f Avoid circular links updates 2006-02-25 01:31:07 +00:00
Tim Starling
eeb84cce20 Added job table, for deferred processing of jobs. The immediate application is to complete the link table refresh operation when templates are changed. 2006-02-24 01:56:31 +00:00
Tim Starling
eb53cc0856 * Added externallinks table, to track links to arbitrary URLs
* Convert unnecessary URL escape codes in external links to their equivalent
  character before doing anything with them. This prevents certain kinds of
  spam filter evasion. (Parser.php only)
2006-01-26 13:29:14 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
7bbe971aec * s~ +$~~ 2006-01-07 13:09:30 +00:00
Ævar Arnfjörð Bjarmason
d8e90514ab * Documentation: @private => @access private 2006-01-07 12:48:44 +00:00
Tim Starling
81217f55a0 * Added templatelinks table. The table currently represents a literal list of templates included from each article. That is, the table contains pages which were actually loaded during parsing, not the markup which went into resolving their names.
* Ended the role of $wgLinkCache in link updates. Instead, links (and related entities) are registered in the ParserOutput object during a parse. The LinksUpdate constructor now takes a ParserOutput object as a parameter. $wgLinkCache is still used, but only as a cache of article IDs.
* Because the link list is now saved and restored in the parser cache, meta tag keywords now work on parser cache hits. Some refactoring took place in this area.
* Rendering of the HTML for category links has moved from Parser to OutputPage.
* Did some general pottering around in Article.php, such as allowing an Article object to be created with a specified revision ID, thereby optionally removing the dependence on $wgRequest. Not used at the current time.
* A few documentation tweaks.
2005-12-30 09:33:11 +00:00
Antoine Musso
2ca68a256d Clean up unused globals! 2005-12-04 18:27:59 +00:00
Brion Vibber
72872bbfb7 Fix typo from pagelinks update -> crashing bug on undelete 2005-05-31 09:08:19 +00:00
Brion Vibber
cb45389b9c * Remove linkscc table code, no longer used. 2005-05-31 07:21:31 +00:00
Tim Starling
7fb4f4d58e Completed reversion of removal of non-incremental link updates. Reasons previously explained. 2005-05-29 05:31:29 +00:00
Tim Starling
b0317d50fb fixed pagelinks bug 2005-05-28 10:08:08 +00:00
Brion Vibber
e0ce5a322e * links and brokenlinks tables merged to pagelinks; this will reduce pain
dealing with moves and deletes of widely-linked pages.

The updaters should be fixed up to understand future versions without the
tables there without breaking upgrades.
2005-05-26 10:23:36 +00:00
Brion Vibber
505c2a0447 * (bug 2166) Fix partial categorylinks update so sortkeys are updated. 2005-05-26 00:24:03 +00:00
Domas Mituzas
2683341096 remove all db->query() invocations from LinksUpdaters 2005-05-15 17:19:55 +00:00
Domas Mituzas
52862f60cd yay, use high level Database:: methods! :) 2005-05-14 16:00:33 +00:00
Gabriel Wicke
d5d80ecd01 Incremental categorylink updates, mainly to keep the old timestamp.
Timestamp saved in memcached, to allow checking for updates without contacting the db.
Might be possible to improve further using the linkscache, i tried but didn't succeed.
As-is it should still be faster than the unconditional full deletion/re-addition cycle.
2005-05-13 21:18:45 +00:00
Ævar Arnfjörð Bjarmason
76bb2dbc40 * Some clown with CVS access deleted our MS Word files and replaced them with
textfiles, changing all references to them.
2005-04-12 02:07:16 +00:00
Tim Starling
34422ce086 note to self: think before commit 2005-03-26 14:49:14 +00:00
Tim Starling
64252d3f66 doDumbUpdate() not deprecated 2005-03-26 14:47:56 +00:00
Brion Vibber
388d95d7b8 De-cruftification continues.
* Replacing Namespace:: functions with NS_ constants
* Replacing make*Link() on strings with make*LinkObj() on Title objects
* Using more legible convenience methods on User and Title
* Start using a common Linker::commentBlock() to wrap the formatComment() bits in the surrounding formatting
2005-02-21 12:23:52 +00:00