Index: trunk/wikistats/MetricsReporting/MetricsReporting.php |
— | — | @@ -64,23 +64,19 @@ |
65 | 65 | |
66 | 66 | ); |
67 | 67 | |
68 | | - |
| 68 | +$dir = dirname( __FILE__ ); |
69 | 69 | $wgAutoloadClasses['ApiAnalytics'] = $dir . '/api/ApiAnalytics.php'; |
70 | 70 | $wgAutoloadClasses['ApiAnalyticsMetric'] = $dir . '/api/ApiAnalyticsMetric.php'; |
71 | 71 | $wgAutoloadClasses['MetricsReportingQuery'] = $dir . '/MetricsReportingQuery.php'; |
72 | 72 | |
73 | | - |
74 | | -$dir = dirname( __FILE__ ); |
75 | | - |
76 | | - |
77 | 73 | $wgeAnalyticsMetricsList = array(); |
78 | 74 | $metricsdir = $dir."/metrics"; |
79 | 75 | $dh = opendir($metricsdir); |
80 | 76 | while( ($file = readdir($dh)) !== false){ |
81 | | - if(filetype($dir.$file) == "file" ){ |
82 | | - $file_path_parts = pathinfo($dir.$file); |
| 77 | + if(filetype($metricsdir."/".$file) == "file" ){ |
| 78 | + $file_path_parts = pathinfo($metricsdir."/".$file); |
83 | 79 | if($file_path_parts['extension'] == 'php'){ |
84 | | - $wgAutoloadClasses["ApiAnalyticsMetric{$file_path_parts['filename']}"] = $dir.$file; |
| 80 | + $wgAutoloadClasses["ApiAnalyticsMetric{$file_path_parts['filename']}"] = $metricsdir."/".$file; |
85 | 81 | $wgeAnalyticsMetricsList[] = $file_path_parts['filename']; |
86 | 82 | } |
87 | 83 | } |
— | — | @@ -108,6 +104,4 @@ |
109 | 105 | |
110 | 106 | return $db; |
111 | 107 | } |
112 | | - |
113 | | - |
114 | | -class |
\ No newline at end of file |
| 108 | + |