Index: trunk/phase3/includes/LinksUpdate.php |
— | — | @@ -10,23 +10,32 @@ |
11 | 11 | */ |
12 | 12 | class LinksUpdate { |
13 | 13 | |
14 | | - /* private */ var $mId, $mTitle; |
| 14 | + /**#@+ |
| 15 | + * @access private |
| 16 | + */ |
| 17 | + var $mId, $mTitle; |
| 18 | + /**#@- */ |
15 | 19 | |
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 ) { |
18 | 27 | $this->mId = $id; |
19 | 28 | $this->mTitle = $title; |
20 | 29 | } |
21 | 30 | |
| 31 | + /** |
| 32 | + * Update link tables with outgoing links from an updated article |
| 33 | + * Relies on the 'link cache' to be filled out. |
| 34 | + */ |
22 | 35 | |
23 | | - function doUpdate() |
24 | | - { |
| 36 | + function doUpdate() { |
25 | 37 | global $wgUseBetterLinksUpdate, $wgLinkCache, $wgDBtransactions; |
26 | 38 | global $wgEnablePersistentLC, $wgUseCategoryMagic; |
27 | 39 | |
28 | | - /* Update link tables with outgoing links from an updated article */ |
29 | | - /* Relies on the 'link cache' to be filled out */ |
30 | | - |
31 | 40 | $fname = 'LinksUpdate::doUpdate'; |
32 | 41 | wfProfileIn( $fname ); |
33 | 42 | |
— | — | @@ -165,11 +174,14 @@ |
166 | 175 | |
167 | 176 | wfProfileOut( $fname ); |
168 | 177 | } |
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() { |
174 | 186 | global $wgLinkCache, $wgDBtransactions, $wgUseCategoryMagic; |
175 | 187 | $fname = 'LinksUpdate::doDumbUpdate'; |
176 | 188 | wfProfileIn( $fname ); |
— | — | @@ -251,10 +263,12 @@ |
252 | 264 | $this->fixBrokenLinks(); |
253 | 265 | wfProfileOut( $fname ); |
254 | 266 | } |
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 | + */ |
256 | 272 | function fixBrokenLinks() { |
257 | | - /* Update any brokenlinks *to* this page */ |
258 | | - /* Call for a newly created page, or just to make sure state is consistent */ |
259 | 273 | $fname = 'LinksUpdate::fixBrokenLinks'; |
260 | 274 | |
261 | 275 | $dbw =& wfGetDB( DB_MASTER ); |