r5281 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5280‎ | r5281 | r5282 >
Date:22:50, 17 September 2004
Author:hashar
Status:old
Tags:
Comment:
some comments
Modified paths:
  • /trunk/phase3/includes/LinksUpdate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LinksUpdate.php
@@ -10,23 +10,32 @@
1111 */
1212 class LinksUpdate {
1313
14 - /* private */ var $mId, $mTitle;
 14+ /**#@+
 15+ * @access private
 16+ */
 17+ var $mId, $mTitle;
 18+ /**#@- */
1519
16 - function LinksUpdate( $id, $title )
17 - {
 20+ /**
 21+ * Constructor
 22+ * Initialize private variables
 23+ * @param integer $id
 24+ * @param string $title
 25+ */
 26+ function LinksUpdate( $id, $title ) {
1827 $this->mId = $id;
1928 $this->mTitle = $title;
2029 }
2130
 31+ /**
 32+ * Update link tables with outgoing links from an updated article
 33+ * Relies on the 'link cache' to be filled out.
 34+ */
2235
23 - function doUpdate()
24 - {
 36+ function doUpdate() {
2537 global $wgUseBetterLinksUpdate, $wgLinkCache, $wgDBtransactions;
2638 global $wgEnablePersistentLC, $wgUseCategoryMagic;
2739
28 - /* Update link tables with outgoing links from an updated article */
29 - /* Relies on the 'link cache' to be filled out */
30 -
3140 $fname = 'LinksUpdate::doUpdate';
3241 wfProfileIn( $fname );
3342
@@ -165,11 +174,14 @@
166175
167176 wfProfileOut( $fname );
168177 }
169 -
170 - function doDumbUpdate()
171 - {
172 - # Old inefficient update function
173 - # Used for rebuilding the link table
 178+
 179+ /**
 180+ * Old inefficient update function
 181+ * Used for rebuilding the link table
 182+ * @todo Only used by ./maintenance/refreshLinks.inc probably need to be replaced
 183+ * @deprecated
 184+ */
 185+ function doDumbUpdate() {
174186 global $wgLinkCache, $wgDBtransactions, $wgUseCategoryMagic;
175187 $fname = 'LinksUpdate::doDumbUpdate';
176188 wfProfileIn( $fname );
@@ -251,10 +263,12 @@
252264 $this->fixBrokenLinks();
253265 wfProfileOut( $fname );
254266 }
255 -
 267+
 268+ /**
 269+ * Update any brokenlinks *to* this page
 270+ * Call for a newly created page, or just to make sure state is consistent
 271+ */
256272 function fixBrokenLinks() {
257 - /* Update any brokenlinks *to* this page */
258 - /* Call for a newly created page, or just to make sure state is consistent */
259273 $fname = 'LinksUpdate::fixBrokenLinks';
260274
261275 $dbw =& wfGetDB( DB_MASTER );

Status & tagging log