r47064 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47063‎ | r47064 | r47065 >
Date:23:07, 9 February 2009
Author:tparscal
Status:deferred
Tags:
Comment:
Testing things out.
Modified paths:
  • /trunk/tools/WikipediaStatistics/LocalSettings.php (added) (history)
  • /trunk/tools/WikipediaStatistics/index.php (modified) (history)

Diff [purge]

Index: trunk/tools/WikipediaStatistics/LocalSettings.php
@@ -0,0 +1,8 @@
 2+<?php
 3+
 4+$localSettings = array(
 5+ 'host' => null,
 6+ 'dbname' => null,
 7+ 'username' => null,
 8+ 'password' => null,
 9+);
\ No newline at end of file
Index: trunk/tools/WikipediaStatistics/index.php
@@ -5,9 +5,19 @@
66 <body>
77 <h1>Wikipedia Statistics</h1>
88 <?php
9 - /*
10 - * Wikipedia Statistics
11 - */
129
 10+ require_once 'LocalSettings.php';
 11+
 12+ $dbh = new PDO(
 13+ 'mysql:host=' . $localSettings['host'] . ';' .
 14+ 'dbname=' . $localSettings['dbname'],
 15+ $localSettings['username'],
 16+ $localSettings['password']
 17+ );
 18+ foreach( $dbh->query( 'SELECT * FROM user_groups' ) as $row ){
 19+ echo implode( ' / ', $row ) . '<br />';
 20+ }
 21+ $dbh = null;
 22+
1323 ?>
1424 </body>
\ No newline at end of file

Status & tagging log