From e349b6723c9dc43f63cc2cda107bddc680119fde Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Fri, 17 Sep 2004 22:50:50 +0000 Subject: [PATCH] some comments --- includes/LinksUpdate.php | 46 ++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index aaf0495fc7..3db1577ae6 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -10,23 +10,32 @@ */ class LinksUpdate { - /* private */ var $mId, $mTitle; + /**#@+ + * @access private + */ + var $mId, $mTitle; + /**#@- */ - function LinksUpdate( $id, $title ) - { + /** + * Constructor + * Initialize private variables + * @param integer $id + * @param string $title + */ + function LinksUpdate( $id, $title ) { $this->mId = $id; $this->mTitle = $title; } + /** + * Update link tables with outgoing links from an updated article + * Relies on the 'link cache' to be filled out. + */ - function doUpdate() - { + function doUpdate() { global $wgUseBetterLinksUpdate, $wgLinkCache, $wgDBtransactions; global $wgEnablePersistentLC, $wgUseCategoryMagic; - /* Update link tables with outgoing links from an updated article */ - /* Relies on the 'link cache' to be filled out */ - $fname = 'LinksUpdate::doUpdate'; wfProfileIn( $fname ); @@ -165,11 +174,14 @@ class LinksUpdate { wfProfileOut( $fname ); } - - function doDumbUpdate() - { - # Old inefficient update function - # Used for rebuilding the link table + + /** + * Old inefficient update function + * Used for rebuilding the link table + * @todo Only used by ./maintenance/refreshLinks.inc probably need to be replaced + * @deprecated + */ + function doDumbUpdate() { global $wgLinkCache, $wgDBtransactions, $wgUseCategoryMagic; $fname = 'LinksUpdate::doDumbUpdate'; wfProfileIn( $fname ); @@ -251,10 +263,12 @@ class LinksUpdate { $this->fixBrokenLinks(); wfProfileOut( $fname ); } - + + /** + * Update any brokenlinks *to* this page + * Call for a newly created page, or just to make sure state is consistent + */ function fixBrokenLinks() { - /* Update any brokenlinks *to* this page */ - /* Call for a newly created page, or just to make sure state is consistent */ $fname = 'LinksUpdate::fixBrokenLinks'; $dbw =& wfGetDB( DB_MASTER ); -- 2.20.1