r91393 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91392‎ | r91393 | r91394 >
Date:06:48, 4 July 2011
Author:yuvipanda
Status:ok
Tags:
Comment:
Got rid of require_once. Use Autoloader
Modified paths:
  • /trunk/extensions/GPoC/GPoC.hooks.php (modified) (history)
  • /trunk/extensions/GPoC/GPoC.php (modified) (history)
  • /trunk/extensions/GPoC/models/Rating.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GPoC/GPoC.hooks.php
@@ -12,9 +12,6 @@
1313 exit( 1 );
1414 }
1515
16 -require_once "AssessmentsExtractor.php";
17 -require_once "models/Rating.php";
18 -
1916 class GPoCHooks {
2017
2118 private static function updateDatabase( $title, $assessments, $timestamp ) {
Index: trunk/extensions/GPoC/models/Rating.php
@@ -1,7 +1,5 @@
22 <?php
33
4 -require_once "Statistics.php";
5 -
64 /**
75 * Represents an article and associated rating
86 **/
Index: trunk/extensions/GPoC/GPoC.php
@@ -21,7 +21,9 @@
2222
2323 $wgAutoloadClasses['GPoCHooks'] = $dir . 'GPoC.hooks.php';
2424 $wgAutoloadClasses['Statistics'] = $dir . 'models/Statistics.php';
 25+$wgAutoloadClasses['Rating'] = $dir . 'models/Rating.php';
2526 $wgAutoloadClasses['TableDisplay'] = $dir . 'TableDisplay.php';
 27+$wgAutoloadClasses['AssessmentsExtractor'] = $dir . 'AssessmentsExtractor.php';
2628
2729 $wgHooks['ArticleSaveComplete'][] = 'GPoCHooks::ArticleSaveComplete';
2830 $wgHooks['LoadExtensionSchemaUpdates'][] = 'GPoCHooks::SetupSchema';

Status & tagging log