Commit graph

96 commits

Author SHA1 Message Date
Mark A. Hershberger
b4cee86beb w/s fixups 2011-02-12 04:06:22 +00:00
Roan Kattouw
3ba0d70b06 Treat interwiki titles as known-bad in LinkCache, prevents useless queries for interwiki titles with possibly misleading results 2010-12-22 15:54:27 +00:00
Sam Reed
04f68827d0 Removal of unused globals
Removal of one setting of a variable to '', then not using further
2010-07-24 19:11:52 +00:00
Alexandre Emsenhuber
c74eba6e48 * Fixed some doxygen warnings
* removed $len and $redirect parameters from addLink() and addLinkObj() since they're not used
2010-07-17 20:13:49 +00:00
Platonides
b81bae03d0 Add page_latest to the LinkCache. 2010-06-15 12:14:54 +00:00
Alexandre Emsenhuber
85af847c20 Fixed some doxygen warnings 2010-03-15 21:51:12 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Brion Vibber
7269b2e2b3 Fix for wgArticleId being exported to JavaScript as a string instead of integer. :P
Throw around some intval()s on page id, length data coming out of database into Title and Article objects and the link cache... blast PHP's soft typing!
2009-08-21 18:11:13 +00:00
Aaron Schulz
761a0e2c61 Fix link cache use with FOR_UPDATE 2008-09-07 08:24:06 +00:00
Aaron Schulz
41110a0638 clean up addLinkObj() 2008-08-29 19:12:56 +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
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
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Alexandre Emsenhuber
4c9a4b75d3 Tweaks: remove call to empty function LinkCache::clearLink() and don't check if $id is an integer as it is set to null just before that. 2008-04-14 16:41:54 +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
Aaron Schulz
c6f76329ac Remove old-fashioned $wgLinkCacheMemcached stuff 2008-04-09 20:21:07 +00:00
Aaron Schulz
7e8dc6b102 * Select len,is_redirect too
* Make visibility of linkcache stuff clearer
2008-04-09 13:02:34 +00:00
Aaron Schulz
da24ff6b5a Allow $len/$redir to be passed in from other points 2008-04-09 12:43:48 +00:00
Aaron Schulz
aed9d4b912 ...really get rid of link color query spam 2008-04-09 05:21:00 +00:00
Alexandre Emsenhuber
2f41e3c98b Removed usage of deprecated settings 2008-04-06 16:14:04 +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
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
Antoine Musso
b144fcb85d Rename constructors to __constructor 2007-01-20 13:34:31 +00:00
Tim Starling
e174a4ddfb Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction.
Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop.
2006-10-04 09:06:18 +00:00
Antoine Musso
fd912a148b A lot more of static issues when using E_STRICT from the commandline. 2006-07-10 15:41:30 +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
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
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Tim Starling
f2a59db33f Removed $wgLinkCache, converted to a singleton. Removed obsolete cruft from LinkCache.php. 2006-01-05 02:05:53 +00:00
Tim Starling
d2adf83131 gave LinkBatch its own file 2006-01-04 23:53:51 +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
85cd400ca4 Fix fatal error when $wgProfiling = false; 2005-12-26 22:35:47 +00:00
Brion Vibber
219094eb01 Committing various live hacks from Wikimedia servers 2005-10-22 20:52:30 +00:00
Tim Starling
eec6c4b5ce sanity check 2005-09-11 12:31:59 +00:00
Tim Starling
9578059ce1 removed some debugging statements, I think they were all added by kate in the oracle merge 2005-08-20 03:11:05 +00:00
Tim Starling
8d89041927 fixed missing branch 2005-08-20 01:30:22 +00:00
Tim Starling
28b2b4b2f5 Always use reference assignment when taking the return value of wfGetDB(), or else annoying bugs which are difficult to track down will result. Example of correct usage:
$dbr =& wfGetDB( DB_SLAVE );
2005-08-15 13:06:33 +00:00
River Tarnell
b817c0c15f merge ORACLE_WORK. sorry, this may break some parts of MySQL, i did not test extensively. 2005-08-02 13:35:19 +00:00
Tim Starling
3c804d861c respect ALF_NO_LINK_LOCK 2005-06-26 08:25:18 +00:00
Ævar Arnfjörð Bjarmason
e6851ce43b * Typo: MediaWikki => MediaWiki 2005-06-25 23:28:15 +00:00
Brion Vibber
b852bd954c * (bug 2515) Fix incremental link table update 2005-06-25 20:54:49 +00:00
Brion Vibber
cb45389b9c * Remove linkscc table code, no longer used. 2005-05-31 07:21:31 +00:00
Tim Starling
a495c45fdd forward-ported the changes made in 1.40.2.1 2005-05-29 10:17:44 +00:00
Tim Starling
a7c938d0c3 ported $wgAntiLockFlags from REL1_4 2005-05-29 05:54:04 +00:00