return new ResultWrapper( $this, $result );
}
}
+
+ /**
+ * @return string wikitext of a link to the server software's web site
+ */
+ function getSoftwareLink() {
+ return "[http://www.mysql.com/ MySQL]";
+ }
+
+ /**
+ * @return string Version information from the database
+ */
+ function getServerVersion() {
+ return mysql_get_server_info();
+ }
}
/**
return false;
}
- # Return DB-style timestamp used for MySQL schema
- function timestamp( $ts=0 ) {
- return wfTimestamp(TS_DB,$ts);
- }
-
- function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
- $message = "A database error has occurred\n" .
- "Query: $sql\n" .
- "Function: $fname\n" .
- "Error: $errno $error\n";
+ # Return DB-style timestamp used for MySQL schema
+ function timestamp( $ts=0 ) {
+ return wfTimestamp(TS_DB,$ts);
+ }
+
+ function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
+ $message = "A database error has occurred\n" .
+ "Query: $sql\n" .
+ "Function: $fname\n" .
+ "Error: $errno $error\n";
wfDebugDieBacktrace($message);
}
+
+ /**
+ * @return string wikitext of a link to the server software's web site
+ */
+ function getSoftwareLink() {
+ return "[http://www.postgresql.org/ PostgreSQL]";
+ }
+
+ /**
+ * @return string Version information from the database
+ */
+ function getServerVersion() {
+ $res = $this->query( "SELECT version()" );
+ $row = $this->fetchRow( $res );
+ $version = $row[0];
+ $this->freeResult( $res );
+ return $version;
+ }
}
/**
}
$versions = array(
"[http://wikipedia.sf.net/ MediaWiki]" => $wgVersion,
- "[http://www.php.net/ PHP]" => phpversion() . " (" . php_sapi_name() . ")",
- "[http://www.mysql.com/ MySQL]" => mysql_get_server_info()
+ "[http://www.php.net/ PHP]" => phpversion() . " (" . php_sapi_name() . ")"
);
+
+ $dbr =& wfGetDB( DB_SLAVE );
+ $dblink = $dbr->getSoftwareLink();
+ $versions[$dblink] = $dbr->getServerVersion();
$out = '';
foreach( $versions as $module => $ver ) {