diff options
-rw-r--r-- | img_auth.php | 173 | ||||
-rw-r--r-- | includes/DatabasePostgreSQL.php | 547 | ||||
-rw-r--r-- | languages/LanguageLatin1.php | 252 | ||||
-rw-r--r-- | languages/Names.php | 204 | ||||
-rw-r--r-- | maintenance/postgresql/pg_tables.sql | 587 | ||||
-rw-r--r-- | stylesheets/myskin/main.css | 1 |
6 files changed, 1764 insertions, 0 deletions
diff --git a/img_auth.php b/img_auth.php new file mode 100644 index 000000000000..02240ceea9e1 --- /dev/null +++ b/img_auth.php @@ -0,0 +1,173 @@ +<?php +# Image download authorisation script +# To use, in LocalSettings.php set $wgUploadDirectory to point to a non-public directory, and +# $wgUploadPath to point to this file. Also set $wgWhitelistRead to an array of pages you want +# everyone to be able to access. Your server must support PATH_INFO, CGI-based configurations +# generally don't. + +define( "MEDIAWIKI", true ); +require_once( "./LocalSettings.php" ); +require_once( "includes/Setup.php" ); + +# Get filenames/directories +$filename = realpath( $wgUploadDirectory . $_SERVER['PATH_INFO'] ); +$realUploadDirectory = realpath( $wgUploadDirectory ); +$imageName = $wgLang->getNsText( NS_IMAGE ) . ":" . basename( $_SERVER['PATH_INFO'] ); + +# Check if the filename is in the correct directory +if ( substr( $filename, 0, strlen( $realUploadDirectory ) ) != $realUploadDirectory ) { + wfForbidden(); +} + +if ( is_array( $wgWhitelistRead ) && !in_array( $imageName, $wgWhitelistRead ) && !$wgUser->getID() ) { + wfForbidden(); +} + +# Write file +$type = wfGetType( $filename ); +if ( $type ) { + header("Content-type: $type"); +} + +readfile( $filename ); + +function wfGetType( $filename ) { + # There's probably a better way to do this + $types = <<<END_STRING +application/andrew-inset ez +application/mac-binhex40 hqx +application/mac-compactpro cpt +application/mathml+xml mathml +application/msword doc +application/octet-stream bin dms lha lzh exe class so dll +application/oda oda +application/ogg ogg +application/pdf pdf +application/postscript ai eps ps +application/rdf+xml rdf +application/smil smi smil +application/srgs gram +application/srgs+xml grxml +application/vnd.mif mif +application/vnd.ms-excel xls +application/vnd.ms-powerpoint ppt +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/voicexml+xml vxml +application/x-bcpio bcpio +application/x-cdlink vcd +application/x-chess-pgn pgn +application/x-cpio cpio +application/x-csh csh +application/x-director dcr dir dxr +application/x-dvi dvi +application/x-futuresplash spl +application/x-gtar gtar +application/x-hdf hdf +application/x-javascript js +application/x-koan skp skd skt skm +application/x-latex latex +application/x-netcdf nc cdf +application/x-sh sh +application/x-shar shar +application/x-shockwave-flash swf +application/x-stuffit sit +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl tcl +application/x-tex tex +application/x-texinfo texinfo texi +application/x-troff t tr roff +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-wais-source src +application/xhtml+xml xhtml xht +application/xslt+xml xslt +application/xml xml xsl +application/xml-dtd dtd +application/zip zip +audio/basic au snd +audio/midi mid midi kar +audio/mpeg mpga mp2 mp3 +audio/x-aiff aif aiff aifc +audio/x-mpegurl m3u +audio/x-pn-realaudio ram rm +audio/x-pn-realaudio-plugin rpm +audio/x-realaudio ra +audio/x-wav wav +chemical/x-pdb pdb +chemical/x-xyz xyz +image/bmp bmp +image/cgm cgm +image/gif gif +image/ief ief +image/jpeg jpeg jpg jpe +image/png png +image/svg+xml svg +image/tiff tiff tif +image/vnd.djvu djvu djv +image/vnd.wap.wbmp wbmp +image/x-cmu-raster ras +image/x-icon ico +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd +model/iges igs iges +model/mesh msh mesh silo +model/vrml wrl vrml +text/calendar ics ifb +text/css css +text/html html htm +text/plain asc txt +text/richtext rtx +text/rtf rtf +text/sgml sgml sgm +text/tab-separated-values tsv +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/x-setext etx +video/mpeg mpeg mpg mpe +video/quicktime qt mov +video/vnd.mpegurl mxu +video/x-msvideo avi +video/x-sgi-movie movie +x-conference/x-cooltalk ice"; +END_STRING; + $endl = " +"; + $types = explode( $endl, $types ); + if ( !preg_match( "/\.(.*?)$/", $filename, $matches ) ) { + return false; + } + + foreach( $types as $type ) { + $extensions = explode( " ", $type ); + for ( $i=1; $i<count( $extensions ); $i++ ) { + if ( $extensions[$i] == $matches[1] ) { + return $extensions[0]; + } + } + } + return false; +} + +function wfForbidden() { + header( "HTTP/1.0 403 Forbidden" ); + print +"<html><body> +<h1>Access denied</h1> +<p>You need to log in to access files on this server</p> +</body></html>"; + exit; +} + +?> diff --git a/includes/DatabasePostgreSQL.php b/includes/DatabasePostgreSQL.php new file mode 100644 index 000000000000..80c762ad3cb3 --- /dev/null +++ b/includes/DatabasePostgreSQL.php @@ -0,0 +1,547 @@ +<?php +# $Id$ +# +# DO NOT USE !!! Unless you want to help developping it. +# +# This file is an attempt to port the mysql database layer to postgreSQL. The +# only thing done so far is s/mysql/pg/ and dieing if function haven't been +# ported. +# +# As said brion 07/06/2004 : +# "table definitions need to be changed. fulltext index needs to work differently +# things that use the last insert id need to be changed. Probably other things +# need to be changed. various semantics may be different." +# +# Hashar + +require_once( "FulltextStoplist.php" ); +require_once( "CacheManager.php" ); + +define( "DB_READ", -1 ); +define( "DB_WRITE", -2 ); +define( "DB_LAST", -3 ); + +define( "LIST_COMMA", 0 ); +define( "LIST_AND", 1 ); +define( "LIST_SET", 2 ); + +class Database { + +#------------------------------------------------------------------------------ +# Variables +#------------------------------------------------------------------------------ + /* private */ var $mLastQuery = ""; + /* private */ var $mBufferResults = true; + /* private */ var $mIgnoreErrors = false; + + /* private */ var $mServer, $mUser, $mPassword, $mConn, $mDBname; + /* private */ var $mOut, $mDebug, $mOpened = false; + + /* private */ var $mFailFunction; + /* private */ var $mLastResult; + +#------------------------------------------------------------------------------ +# Accessors +#------------------------------------------------------------------------------ + # Set functions + # These set a variable and return the previous state + + # Fail function, takes a Database as a parameter + # Set to false for default, 1 for ignore errors + function setFailFunction( $function ) { return wfSetVar( $this->mFailFunction, $function ); } + + # Output page, used for reporting errors + # FALSE means discard output + function &setOutputPage( &$out ) { $this->mOut =& $out; } + + # Boolean, controls output of large amounts of debug information + function setDebug( $debug ) { return wfSetVar( $this->mDebug, $debug ); } + + # Turns buffering of SQL result sets on (true) or off (false). Default is + # "on" and it should not be changed without good reasons. + function setBufferResults( $buffer ) { return wfSetVar( $this->mBufferResults, $buffer ); } + + # Turns on (false) or off (true) the automatic generation and sending + # of a "we're sorry, but there has been a database error" page on + # database errors. Default is on (false). When turned off, the + # code should use wfLastErrno() and wfLastError() to handle the + # situation as appropriate. + function setIgnoreErrors( $ignoreErrors ) { return wfSetVar( $this->mIgnoreErrors, $ignoreErrors ); } + + # Get functions + + function lastQuery() { return $this->mLastQuery; } + function isOpen() { return $this->mOpened; } + +#------------------------------------------------------------------------------ +# Other functions +#------------------------------------------------------------------------------ + + function Database() + { + global $wgOut; + # Can't get a reference if it hasn't been set yet + if ( !isset( $wgOut ) ) { + $wgOut = NULL; + } + $this->mOut =& $wgOut; + + } + + /* static */ function newFromParams( $server, $user, $password, $dbName, + $failFunction = false, $debug = false, $bufferResults = true, $ignoreErrors = false ) + { + $db = new Database; + $db->mFailFunction = $failFunction; + $db->mIgnoreErrors = $ignoreErrors; + $db->mDebug = $debug; + $db->mBufferResults = $bufferResults; + $db->open( $server, $user, $password, $dbName ); + return $db; + } + + # Usually aborts on failure + # If the failFunction is set to a non-zero integer, returns success + function open( $server, $user, $password, $dbName ) + { + global $wgEmergencyContact; + + $this->close(); + $this->mServer = $server; + $this->mUser = $user; + $this->mPassword = $password; + $this->mDBname = $dbName; + + $success = false; + + + if ( "" != $dbName ) { + # start a database connection + @$this->mConn = pg_connect("host=$server dbname=$dbName user=$user password=$password"); + if ( $this->mConn == false ) { + wfDebug( "DB connection error\n" ); + wfDebug( "Server: $server, Database: $dbName, User: $user, Password: " . substr( $password, 0, 3 ) . "...\n" ); + wfDebug( $this->lastError()."\n" ); + } + } + return $this->mConn; + } + + # Closes a database connection, if it is open + # Returns success, true if already closed + function close() + { + $this->mOpened = false; + if ( $this->mConn ) { + return pg_close( $this->mConn ); + } else { + return true; + } + } + + /* private */ function reportConnectionError( $msg = "") + { + if ( $this->mFailFunction ) { + if ( !is_int( $this->mFailFunction ) ) { + $this->$mFailFunction( $this ); + } + } else { + wfEmergencyAbort( $this ); + } + } + + # Usually aborts on failure + # If errors are explicitly ignored, returns success + function query( $sql, $fname = "" ) + { + global $wgProfiling; + + if ( $wgProfiling ) { + # generalizeSQL will probably cut down the query to reasonable + # logging size most of the time. The substr is really just a sanity check. + $profName = "query: " . substr( Database::generalizeSQL( $sql ), 0, 255 ); + wfProfileIn( $profName ); + } + + $this->mLastQuery = $sql; + + if ( $this->mDebug ) { + $sqlx = substr( $sql, 0, 500 ); + $sqlx = wordwrap(strtr($sqlx,"\t\n"," ")); + wfDebug( "SQL: $sqlx\n" ); + } + + $ret = pg_query( $this->mConn , $sql); + $this->mLastResult = $ret; + if ( false == $ret ) { + $error = pg_last_error( $this->mConn ); + // TODO FIXME : no error number function in postgre + // $errno = mysql_errno( $this->mConn ); + if( $this->mIgnoreErrors ) { + wfDebug("SQL ERROR (ignored): " . $error . "\n"); + } else { + wfDebug("SQL ERROR: " . $error . "\n"); + if ( $this->mOut ) { + // this calls wfAbruptExit() + $this->mOut->databaseError( $fname, $sql, $error, 0 ); + } + } + } + + if ( $wgProfiling ) { + wfProfileOut( $profName ); + } + return $ret; + } + + function freeResult( $res ) { + if ( !@pg_free_result( $res ) ) { + wfDebugDieBacktrace( "Unable to free PostgreSQL result\n" ); + } + } + function fetchObject( $res ) { + @$row = pg_fetch_object( $res ); + # FIXME: HACK HACK HACK HACK debug + + # TODO: + # hashar : not sure if the following test really trigger if the object + # fetching failled. + if( pg_last_error($this->mConn) ) { + wfDebugDieBacktrace( "SQL error: " . htmlspecialchars( pg_last_error($this->mConn) ) ); + } + return $row; + } + + function fetchRow( $res ) { + @$row = pg_fetch_array( $res ); + if( pg_last_error($this->mConn) ) { + wfDebugDieBacktrace( "SQL error: " . htmlspecialchars( pg_last_error($this->mConn) ) ); + } + return $row; + } + + function numRows( $res ) { + @$n = pg_num_rows( $res ); + if( pg_last_error($this->mConn) ) { + wfDebugDieBacktrace( "SQL error: " . htmlspecialchars( pg_last_error($this->mConn) ) ); + } + return $n; + } + function numFields( $res ) { return pg_num_fields( $res ); } + function fieldName( $res, $n ) { return pg_field_name( $res, $n ); } + // TODO FIXME: need to implement something here + function insertId() { + //return mysql_insert_id( $this->mConn ); + wfDebugDieBacktrace( "Database::insertId() error : not implemented for postgre, use sequences" ); + } + function dataSeek( $res, $row ) { return pg_result_seek( $res, $row ); } + function lastErrno() { return $this->lastError(); } + function lastError() { return pg_last_error(); } + function affectedRows() { + return pg_affected_rows( $this->mLastResult ); + } + + # Simple UPDATE wrapper + # Usually aborts on failure + # If errors are explicitly ignored, returns success + function set( $table, $var, $value, $cond, $fname = "Database::set" ) + { + $sql = "UPDATE \"$table\" SET \"$var\" = '" . + wfStrencode( $value ) . "' WHERE ($cond)"; + return !!$this->query( $sql, DB_WRITE, $fname ); + } + + # Simple SELECT wrapper, returns a single field, input must be encoded + # Usually aborts on failure + # If errors are explicitly ignored, returns FALSE on failure + function get( $table, $var, $cond, $fname = "Database::get" ) + { + $from=$table?" FROM \"$table\" ":""; + $where=$cond?" WHERE ($cond)":""; + + $sql = "SELECT $var $from $where"; + + $result = $this->query( $sql, DB_READ, $fname ); + + $ret = ""; + if ( pg_num_rows( $result ) > 0 ) { + $s = pg_fetch_array( $result ); + $ret = $s[0]; + pg_free_result( $result ); + } + return $ret; + } + + # More complex SELECT wrapper, single row only + # Aborts or returns FALSE on error + # Takes an array of selected variables, and a condition map, which is ANDed + # e.g. getArray( "cur", array( "cur_id" ), array( "cur_namespace" => 0, "cur_title" => "Astronomy" ) ) + # would return an object where $obj->cur_id is the ID of the Astronomy article + function getArray( $table, $vars, $conds, $fname = "Database::getArray" ) + { + $vars = implode( ",", $vars ); + $where = Database::makeList( $conds, LIST_AND ); + $sql = "SELECT \"$vars\" FROM \"$table\" WHERE $where LIMIT 1"; + $res = $this->query( $sql, $fname ); + if ( $res === false || !$this->numRows( $res ) ) { + return false; + } + $obj = $this->fetchObject( $res ); + $this->freeResult( $res ); + return $obj; + } + + # Removes most variables from an SQL query and replaces them with X or N for numbers. + # It's only slightly flawed. Don't use for anything important. + /* static */ function generalizeSQL( $sql ) + { + # This does the same as the regexp below would do, but in such a way + # as to avoid crashing php on some large strings. + # $sql = preg_replace ( "/'([^\\\\']|\\\\.)*'|\"([^\\\\\"]|\\\\.)*\"/", "'X'", $sql); + + $sql = str_replace ( "\\\\", "", $sql); + $sql = str_replace ( "\\'", "", $sql); + $sql = str_replace ( "\\\"", "", $sql); + $sql = preg_replace ("/'.*'/s", "'X'", $sql); + $sql = preg_replace ('/".*"/s', "'X'", $sql); + + # All newlines, tabs, etc replaced by single space + $sql = preg_replace ( "/\s+/", " ", $sql); + + # All numbers => N + $sql = preg_replace ('/-?[0-9]+/s', "N", $sql); + + return $sql; + } + + # Determines whether a field exists in a table + # Usually aborts on failure + # If errors are explicitly ignored, returns NULL on failure + function fieldExists( $table, $field, $fname = "Database::fieldExists" ) + { + $res = $this->query( "DESCRIBE '$table'", DB_READ, $fname ); + if ( !$res ) { + return NULL; + } + + $found = false; + + while ( $row = $this->fetchObject( $res ) ) { + if ( $row->Field == $field ) { + $found = true; + break; + } + } + return $found; + } + + # Determines whether an index exists + # Usually aborts on failure + # If errors are explicitly ignored, returns NULL on failure + function indexExists( $table, $index, $fname = "Database::indexExists" ) + { + $sql = "SELECT indexname FROM pg_indexes WHERE tablename='$table'"; + $res = $this->query( $sql, DB_READ, $fname ); + if ( !$res ) { + return NULL; + } + + $found = false; + + while ( $row = $this->fetchObject( $res ) ) { + if ( $row->Key_name == $index ) { + $found = true; + break; + } + } + return $found; + } + + function tableExists( $table ) + { + $old = $this->mIgnoreErrors; + $this->mIgnoreErrors = true; + $res = $this->query( "SELECT 1 FROM '$table' LIMIT 1" ); + $this->mIgnoreErrors = $old; + if( $res ) { + $this->freeResult( $res ); + return true; + } else { + return false; + } + } + + function fieldInfo( $table, $field ) + { + $res = $this->query( "SELECT * FROM '$table' LIMIT 1" ); + $n = pg_num_fields( $res ); + for( $i = 0; $i < $n; $i++ ) { + // FIXME + wfDebugDieBacktrace( "Database::fieldInfo() error : mysql_fetch_field() not implemented for postgre" ); + $meta = mysql_fetch_field( $res, $i ); + if( $field == $meta->name ) { + return $meta; + } + } + return false; + } + + # INSERT wrapper, inserts an array into a table + # Keys are field names, values are values + # Usually aborts on failure + # If errors are explicitly ignored, returns success + function insertArray( $table, $a, $fname = "Database::insertArray" ) + { + $sql1 = "INSERT INTO \"$table\" ("; + $sql2 = "VALUES (" . Database::makeList( $a ); + $first = true; + foreach ( $a as $field => $value ) { + if ( !$first ) { + $sql1 .= ","; + } + $first = false; + $sql1 .= $field; + } + $sql = "$sql1) $sql2)"; + return !!$this->query( $sql, $fname ); + } + + # A cross between insertArray and getArray, takes a condition array and a SET array + function updateArray( $table, $values, $conds, $fname = "Database::updateArray" ) + { + $sql = "UPDATE '$table' SET " . $this->makeList( $values, LIST_SET ); + $sql .= " WHERE " . $this->makeList( $conds, LIST_AND ); + $this->query( $sql, $fname ); + } + + # Makes a wfStrencoded list from an array + # $mode: LIST_COMMA - comma separated, no field names + # LIST_AND - ANDed WHERE clause (without the WHERE) + # LIST_SET - comma separated with field names, like a SET clause + /* static */ function makeList( $a, $mode = LIST_COMMA ) + { + $first = true; + $list = ""; + foreach ( $a as $field => $value ) { + if ( !$first ) { + if ( $mode == LIST_AND ) { + $list .= " AND "; + } else { + $list .= ","; + } + } else { + $first = false; + } + if ( $mode == LIST_AND || $mode == LIST_SET ) { + $list .= "$field="; + } + if ( !is_numeric( $value ) ) { + $list .= "'" . wfStrencode( $value ) . "'"; + } else { + $list .= $value; + } + } + return $list; + } + + function startTimer( $timeout ) + { + global $IP; + wfDebugDieBacktrace( "Database::startTimer() error : mysql_thread_id() not implemented for postgre" ); + $tid = mysql_thread_id( $this->mConn ); + exec( "php $IP/killthread.php $timeout $tid &>/dev/null &" ); + } + + function stopTimer() + { + } + +} + +#------------------------------------------------------------------------------ +# Global functions +#------------------------------------------------------------------------------ + +/* Standard fail function, called by default when a connection cannot be established + Displays the file cache if possible */ +function wfEmergencyAbort( &$conn ) { + global $wgTitle, $wgUseFileCache, $title, $wgInputEncoding, $wgSiteNotice, $wgOutputEncoding; + + header( "Content-type: text/html; charset=$wgOutputEncoding" ); + $msg = $wgSiteNotice; + if($msg == "") $msg = wfMsgNoDB( "noconnect" ); + $text = $msg; + + if($wgUseFileCache) { + if($wgTitle) { + $t =& $wgTitle; + } else { + if($title) { + $t = Title::newFromURL( $title ); + } elseif (@$_REQUEST['search']) { + $search = $_REQUEST['search']; + echo wfMsgNoDB( "searchdisabled" ); + echo wfMsgNoDB( "googlesearch", htmlspecialchars( $search ), $wgInputEncoding ); + wfAbruptExit(); + } else { + $t = Title::newFromText( wfMsgNoDB( "mainpage" ) ); + } + } + + $cache = new CacheManager( $t ); + if( $cache->isFileCached() ) { + $msg = "<p style='color: red'><b>$msg<br />\n" . + wfMsgNoDB( "cachederror" ) . "</b></p>\n"; + + $tag = "<div id='article'>"; + $text = str_replace( + $tag, + $tag . $msg, + $cache->fetchPageText() ); + } + } + + /* Don't cache error pages! They cause no end of trouble... */ + header( "Cache-control: none" ); + header( "Pragma: nocache" ); + echo $text; + wfAbruptExit(); +} + +function wfStrencode( $s ) +{ + return pg_escape_string( $s ); +} + +# Use PostgreSQL timestamp without timezone data type +function wfTimestamp2Unix( $ts ) { + return gmmktime( ( (int)substr( $ts, 11, 2) ), + (int)substr( $ts, 14, 2 ), (int)substr( $ts, 17, 2 ), + (int)substr( $ts, 5, 2 ), (int)substr( $ts, 8, 2 ), + (int)substr( $ts, 0, 4 ) ); +} + +function wfUnix2Timestamp( $unixtime ) { + return gmdate( "Y-m-d H:i:s", $unixtime ); +} + +function wfTimestampNow() { + # return NOW + return gmdate( "Y-m-d H:i:s" ); +} + +# Sorting hack for MySQL 3, which doesn't use index sorts for DESC +function wfInvertTimestamp( $ts ) { + $ts=preg_replace("/\D/","",$ts); + return strtr( + $ts, + "0123456789", + "9876543210" + ); +} + +function wfLimitResult( $limit, $offset ) { + return " LIMIT $limit ".(is_numeric($offset)?" OFFSET {$offset} ":""); +} + +?> diff --git a/languages/LanguageLatin1.php b/languages/LanguageLatin1.php new file mode 100644 index 000000000000..a03de9111aec --- /dev/null +++ b/languages/LanguageLatin1.php @@ -0,0 +1,252 @@ +<?php +# Copyright (C) 2004 Brion Vibber <brion@pobox.com> +# http://www.mediawiki.org/ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# http://www.gnu.org/copyleft/gpl.html + +# +# Latin-1 compatibility layer hack. +# +# Enable by setting "$wgUseLatin1 = true;" in LocalSettings.php +# (Preferably at install time so you get the messages right!) +# +# This will replace anything that can't be described in Latin-1 with +# an ugly question mark (?) so don't use this mode on languages that +# aren't suited to it! +# + +$wgInputEncoding = "iso-8859-1"; +$wgOutputEncoding = "iso-8859-1"; + +function utf8_decode_array( $arr ) { + if( !is_array( $arr ) ) { + wfDebugDieBacktrace( "utf8_decode_array given non-array" ); + } + return array_map( "utf8_decode", $arr ); +} + +# +# This is a proxy object; the Language instance handed to us speaks +# UTF-8, while the wiki outside speaks Latin-1. We translate as +# necessary so neither knows the other is in the wrong charset. +# +class LanguageLatin1 { + var $lang; + + function LanguageLatin1( &$language ) { + $this->lang =& $language; + } + + function getDefaultUserOptions() { + return $this->lang->getDefaultUserOptions(); + } + + function getBookstoreList() { + return utf8_decode_array( $this->lang->getBookstoreList() ); + } + + function getNamespaces() { + return utf8_decode_array( $this->lang->getNamespaces() ); + } + + function getNsText( $index ) { + return utf8_decode( $this->lang->getNsText( $index ) ); + } + + function getNsIndex( $text ) { + return $this->lang->getNsIndex( utf8_encode( $text ) ); + } + + function specialPage( $name ) { + # At least one function calls this with Special:Undelete/Article_title, so it needs encoding + return utf8_decode( $this->lang->specialPage( utf8_encode( $name ) ) ); + } + + function getQuickbarSettings() { + return utf8_decode_array( $this->lang->getQuickbarSettings() ); + } + + function getSkinNames() { + return utf8_decode_array( $this->lang->getSkinNames() ); + } + + function getMathNames() { + return utf8_decode_array( $this->lang->getMathNames() ); + } + + function getDateFormats() { + return utf8_decode_array( $this->lang->getDateFormats() ); + } + + function getUserToggles() { + return utf8_decode_array( $this->lang->getUserToggles() ); + } + + function getUserToggle( $tog ) { + return utf8_decode( $this->lang->getUserToggle( $tog ) ); + } + + function getLanguageNames() { + return utf8_decode_array( $this->lang->getLanguageNames() ); + } + + function getLanguageName( $code ) { + return utf8_decode( $this->lang->getLanguageName( $code ) ); + } + + function getMonthName( $key ) { + return utf8_decode( $this->lang->getMonthName( $key ) ); + } + + function getMonthNameGen( $key ) { + return utf8_decode( $this->lang->getMonthNameGen( $key ) ); + } + + function getMonthAbbreviation( $key ) { + return utf8_decode( $this->lang->getMonthAbbreviation( $key ) ); + } + + function getWeekdayName( $key ) { + return utf8_decode( $this->lang->getWeekdayName( $key ) ); + } + + function userAdjust( $ts ) { + return $this->lang->userAdjust( $ts ); + } + + function date( $ts, $adj = false ) { + return utf8_decode( $this->lang->date( $ts, $adj ) ); + } + + function time( $ts, $adj = false, $seconds = false ) { + return utf8_decode( $this->lang->time( $ts, $adj ) ); + } + + function timeanddate( $ts, $adj = false ) { + return utf8_decode( $this->lang->timeanddate( $ts, $adj ) ); + } + + function rfc1123( $ts ) { + # ASCII by definition + return $this->lang->rfc1123( $ts ); + } + + function getValidSpecialPages() { + return utf8_decode_array( $this->lang->getValidSpecialPages() ); + } + + function getSysopSpecialPages() { + return utf8_decode_array( $this->lang->getSysopSpecialPages() ); + } + + function getDeveloperSpecialPages() { + return utf8_decode_array( $this->lang->getDeveloperSpecialPages() ); + } + + function getMessage( $key ) { + return utf8_decode( $this->lang->getMessage( $key ) ); + } + + function getAllMessages() { + return utf8_decode_array( $this->lang->getAllMessages() ); + } + + function iconv( $in, $out, $string ) { + # Use 8-bit version + return Language::iconv( $in, $out, $string ); + } + + function ucfirst( $string ) { + # Use 8-bit version + return Language::ucfirst( $string ); + } + + function lcfirst( $s ) { + # Use 8-bit version + return Language::lcfirst( $s ); + } + + function checkTitleEncoding( $s ) { + # Use 8-bit version + return Language::checkTitleEncoding( $s ); + } + + function stripForSearch( $in ) { + # Use 8-bit version + return Language::stripForSearch( $in ); + } + + function firstChar( $s ) { + # Use 8-bit version + return Language::firstChar( $s ); + } + + function setAltEncoding() { + # Not sure if this should be handled + $this->lang->setAltEncoding(); + } + + function recodeForEdit( $s ) { + # Use 8-bit version + return Language::recodeForEdit( $s ); + } + + function recodeInput( $s ) { + # Use 8-bit version + return Language::recodeInput( $s ); + } + + function isRTL() { + # boolean + return $this->lang->isRTL(); + } + + function linkPrefixExtension() { + # boolean + return $this->lang->linkPrefixExtension(); + } + + function &getMagicWords() { + return utf8_decode_array( $this->lang->getMagicWords() ); + } + + function getMagic( &$mw ) { + # Not sure how to handle this. + # A moot point perhaps as few language files currently + # assign localised magic words, and none of the ones we + # need backwards compatibility for. + return $this->lang->getMagic( $mw ); + } + + function emphasize( $text ) { + # It's unlikely that the emphasis markup itself will + # include any non-ASCII chars. + return $this->lang->emphasize( $text ); + } + + function formatNum( $number ) { + # Probably not necessary... + return utf8_decode( $this->lang->formatNum( $number ) ); + } + + function listToText( $l ) { + # It's unlikely that the list markup itself will + # include any non-ASCII chars. (?) + return $this->lang->listToText( $l ); + } +} + +?> diff --git a/languages/Names.php b/languages/Names.php new file mode 100644 index 000000000000..9dacdbaacf7c --- /dev/null +++ b/languages/Names.php @@ -0,0 +1,204 @@ +<?php +/* private */ $wgLanguageNames = array( + 'aa' => 'Afar', # Afar + 'ab' => 'Abkhazian', # Abkhazian - FIXME + 'af' => 'Afrikaans', # Afrikaans + 'ak' => 'Akana', # Akan + 'an' => 'Aragonés', # Aragonese + 'als' => 'Elsässisch', # Alsatian + 'am' => 'አማርኛ', # Amharic + 'ar' => 'العربية', # Arabic + 'arc' => 'ܕܥܒܪܸܝܛ', # Aramaic + 'as' => 'অসমীয়া', # Assamese + 'ast' => 'Asturleonés', # Asturian + 'av' => 'Авар', # Avar + 'ay' => 'Aymar', # Aymara + 'az' => 'Azərbaycan', # Azerbaijani + 'ba' => 'Башҡорт', # Bashkir + 'be' => 'Беларуская', # Belarusian ''or'' Byelarussian + 'bg' => 'Български', # Bulgarian + 'bh' => 'भोजपुरी', # Bihara + 'bi' => 'Bislama', # Bislama + 'bn' => 'বাংলা - (Bangla)', # Bengali + 'bm' => 'Bambara', + 'bo' => 'Bod skad', # Tibetan + 'br' => 'Brezhoneg', # Breton + 'bs' => 'Bosanski', # Bosnian + 'ca' => 'Català', # Catalan + 'ce' => 'Нохчийн', # Chechen + 'ch' => 'Chamoru', # Chamorro + 'chr' => 'ᏣᎳᎩ', # Cherokee + 'chy' => 'Tsetsêhestâhese', # Cheyenne + 'co' => 'Corsu', # Corsican + 'cr' => 'Nehiyaw', # Cree + 'cs' => 'Česky', # Czech + 'csb' => 'Kaszëbscziej', # Cassubian - FIXME + 'cv' => 'Чӑваш - (Ĉăvaŝ)', # Chuvash + 'cy' => 'Cymraeg', # Welsh + 'da' => 'Dansk', # Danish + 'de' => 'Deutsch', # German + 'dk' => 'Dansk', # 'da' is correct for the language. + 'dv' => 'Dhivehi', # Dhivehi + 'dz' => 'Dzongkha', # Bhutani + 'ee' => 'Eve', # Eve + 'el' => 'Ελληνικά', # Greek + 'en' => 'English', # English + 'eo' => 'Esperanto', # Esperanto + 'es' => 'Español', # Spanish + 'et' => 'Eesti', # Estonian + 'eu' => 'Euskara', # Basque + 'fa' => 'فارسی', # Persian + 'ff' => 'Fulfulde', # Fulfulde + 'fi' => 'Suomi', # Finnish + 'fj' => 'Na Vosa Vakaviti', # Fijian + 'fo' => 'Føroyskt', # Faroese + 'fr' => 'Français', # French + 'fy' => 'Frysk', # Frisian + 'ga' => 'Gaeilge', # Irish + 'gd' => 'Gàidhlig', # Scots Gaelic + 'gl' => 'Galego', # Gallegan + 'gn' => 'Avañe\'ẽ', # Guarani + 'gu' => 'ગુજરાતી', # Gujarati + 'gv' => 'Gaelg', # Manx + 'ha' => 'هَوُسَ', # Hausa + 'haw' => 'Hawai`i', # Hawaiian + 'he' => 'עברית', # Hebrew + 'hi' => 'हिन्दी', # Hindi + 'ho' => 'Hiri Motu', + 'hr' => 'Hrvatski', # Croatian + 'ht' => 'Haitian', # Haitian (FIXME!) + 'hu' => 'Magyar', # Hungarian + 'hy' => 'Հայերեն', # Armenian + 'hz' => 'Otsiherero', # Herero + 'ia' => 'Interlingua', # Interlingua (IALA) + 'id' => 'Bahasa Indonesia', # Indonesian + 'ie' => 'Interlingue', # Interlingue (Occidental) + 'ig' => 'Igbo', # Igbo + 'ii' => 'Yi', # Sichuan Yi (FIXME!) + 'ik' => 'Iñupiak', # Inupiak + 'io' => 'Ido', # Ido + 'is' => 'Íslensk', # Icelandic + 'it' => 'Italiano', # Italian + 'iu' => 'ᐃᓄᒃᑎᑐᑦ', # Inuktitut + 'ja' => '日本語', # Japanese + 'jv' => 'Bahasa Jawa', # Javanese + 'ka' => 'ქართული', # Georgian + 'kg' => 'Kongo', # Kongo (FIXME!) + 'ki' => 'Kikuyu', # Kikuyu (FIXME!) + 'kj' => 'Kuanyama', # Kuanyama (FIXME!) + 'kk' => 'қазақша', # Kazakh + 'kl' => 'Kalaallisut', # Greenlandic + 'km' => 'ភាសាខ្មែរ', # Cambodian + 'kn' => 'ಕನ್ನಡ', # Kannada + 'ko' => '한국어', # Korean + 'kr' => 'Kanuri', + 'ks' => 'कश्मीरी - (كشميري)', # Kashmiri + 'ku' => 'Kurdî', # Kurdish + 'kv' => 'Komi', + 'kw' => 'Kernewek', # Cornish + 'ky' => 'Kırgızca', # Kirghiz + 'la' => 'Latina', # Latin + 'lb' => 'Lëtzebuergesch', # Luxemburguish + 'lg' => 'Luganda', # Ganda + 'li' => 'Limburgs', # Limburgian + 'ln' => 'Lingala', # Lingala + 'lo' => 'Pha xa lao', # Laotian + 'lt' => 'Lietuvių', # Lithuanian + 'lv' => 'Latviešu', # Latvian + 'mg' => 'Malagasy', # Malagasy - FIXME + 'mh' => 'Ebon', # Marshallese + 'mi' => 'Māori', # Maori + 'mk' => 'Македонски', # Macedonian + 'ml' => 'മലയാളം', # Malayalam + 'mn' => 'Монгол', # Mongoloian + 'mo' => 'Moldoveana', # Moldovan + 'mr' => 'मराठी', # Marathi + 'ms' => 'Bahasa Melayu', # Malay + 'mt' => 'bil-Malti', # Maltese + 'my' => 'Myanmasa', # Burmese + 'na' => 'Nauru', # Nauruan + 'nb' => 'Bokmål', # Norwegian (Bokmal) + 'nah' => 'Nahuatl', + 'nds' => 'Platdüütsch', # Low German ''or'' Low Saxon + 'ne' => 'नेपाली', # Nepali + 'ng' => 'Ndonga', + 'nl' => 'Nederlands', # Dutch + 'nb' => 'Norsk', # Norwegian [currently using old '''no''' code] + 'ne' => 'नेपाली', # Nepali + 'nn' => 'Nynorsk' , # (Norwegian) Nynorsk + 'no' => 'Norsk', # Norwegian + 'nv' => 'Diné bizaad', # Navajo + 'ny' => 'Chi-Chewa', # Chichewa + 'oc' => 'Occitan', # Occitan + 'om' => 'Oromoo', # Oromo + 'or' => 'Oriya', # Oriya - FIXME + 'pa' => 'पंजाबी / ਪਜਾਬੀ / پنجابي', # Punjabi + 'pi' => 'पािऴ', # Pali + 'pl' => 'Polski', # Polish + 'ps' => 'پښتو', # Pashto + 'pt' => 'Português', # Portuguese + 'qu' => 'Runa Simi', # Quechua + 'rm' => 'Rumantsch', # Raeto-Romance + 'rn' => 'Kirundi', # Kirundi + 'ro' => 'Română', # Romanian + 'roa-rup' => 'Armâneashti', # Aromanian + 'ru' => 'Русский', # Russian + 'rw' => 'Kinyarwanda', + 'sa' => 'संस्कृत', # Sanskrit + 'sc' => 'Sardu', # Sardinian + 'sd' => 'सिनधि', # Sindhi + 'se' => 'Sámegiella', # (Northern) Sami + 'sg' => 'Sangro', +# 'sh' => 'Српскохрватски (Srbskohrvatski)', ## Serbocroatian -- Obsolete + 'si' => 'Simhala', # Sinhalese + 'simple' => 'Simple English', + 'sk' => 'Slovenčina', # Slovak + 'sl' => 'Slovenščina', # Slovenian + 'sm' => 'Gagana Samoa', # Samoan + 'sn' => 'chiShona', # Shona + 'so' => 'Soomaaliga', # Somali + 'sq' => 'Shqip', # Albanian + 'sr' => 'Српски / Srpski', # Serbian + 'ss' => 'SiSwati', # Swati + 'st' => 'seSotho', # (Southern) Sotho + 'su' => 'Bahasa Sunda', # Sundanese + 'sv' => 'Svenska', # Swedish + 'sw' => 'Kiswahili', # Swahili + 'ta' => 'தமிழ்', # Tamil + 'te' => 'తెలుగు', # Telugu + 'tg' => 'Тоҷикӣ', # Tajik + 'th' => 'ไทย', # Thai + 'ti' => 'Tigrinya', # Tigrinya - FIXME + 'tk' => 'تركمن / Туркмен', # Turkmen + 'tl' => 'Tagalog', # Tagalog (Filipino) + #'tlh' => 'tlhIngan-Hol', # Klingon - no interlanguage links allowed + 'tn' => 'Setswana', # Setswana + 'to' => 'Tonga', # Tonga - FIXME + 'tokipona' => 'Toki Pona', # Toki Pona + 'tp' => 'Toki Pona', # Toki Pona - non-standard language code + 'tpi' => 'Tok Pisin', # Tok Pisin + 'tr' => 'Türkçe', # Turkish + 'ts' => 'Xitsonga', # Tsonga + 'tt' => 'Tatar', # Tatar + 'tw' => 'Twi', # Twi -- FIXME + 'ty' => 'Reo Mā`ohi', # Tahitian + 'ug' => 'Oyghurque', # Uyghur + 'uk' => 'Українська', # Ukrainian + 'ur' => 'اردو', # Urdu + 'uz' => 'Ўзбек', # Uzbek + 've' => 'Venda', # Venda + 'vi' => 'Tiếng Việt', # Vietnamese + 'vo' => 'Volapük', # Volapük + 'wa' => 'Walon', # Walloon + 'wo' => 'Wollof', # Wolof + 'xh' => 'isiXhosa', # Xhosan + 'yi' => 'ייִדיש', # Yiddish + 'yo' => 'Yorùbá', # Yoruba + 'za' => '(Cuengh)', # Zhuang + 'zh' => '中文', # (Zhōng Wén) - Chinese + 'zh-cfr' => '閩南語', # Min-nan + 'zh-cn' => '中文(简体)', # Simplified + 'zh-tw' => '中文(繁体)', # Traditional + 'zu' => 'isiZulu', # Zulu +); +?> diff --git a/maintenance/postgresql/pg_tables.sql b/maintenance/postgresql/pg_tables.sql new file mode 100644 index 000000000000..b8265fb5914b --- /dev/null +++ b/maintenance/postgresql/pg_tables.sql @@ -0,0 +1,587 @@ +-- +-- Totally untested postgresql dump for the table "tables". +-- +-- +-- + +-- +-- PostgreSQL database dump +-- + +SET client_encoding = 'UNICODE'; +SET check_function_bodies = false; + +SET SESSION AUTHORIZATION 'postgres'; + +-- +-- TOC entry 4 (OID 2200) +-- Name: public; Type: ACL; Schema: -; Owner: postgres +-- + +REVOKE ALL ON SCHEMA public FROM PUBLIC; +GRANT ALL ON SCHEMA public TO PUBLIC; + +-- FIXME ! Either remove line or use the mediawiki database user there +SET SESSION AUTHORIZATION 'hashar'; + +SET search_path = public, pg_catalog; + +-- +-- TOC entry 5 (OID 17145) +-- Name: user_user_id_seq; Type: SEQUENCE; Schema: public; Owner: hashar +-- + +CREATE SEQUENCE user_user_id_seq + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + + +-- +-- TOC entry 9 (OID 17147) +-- Name: user; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE "user" ( + user_id integer DEFAULT nextval('user_user_id_seq'::text), + user_name character varying(255) DEFAULT ''::character varying NOT NULL, + user_real_name character varying(255) DEFAULT ''::character varying NOT NULL, + user_rights text DEFAULT ''::text NOT NULL, + user_password text DEFAULT ''::text NOT NULL, + user_newpassword text DEFAULT ''::text NOT NULL, + user_email text DEFAULT ''::text NOT NULL, + user_options text DEFAULT ''::text NOT NULL, + user_touched character(14) DEFAULT ''::bpchar NOT NULL +); + + +-- +-- TOC entry 10 (OID 17161) +-- Name: user_newtalk; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE user_newtalk ( + user_id integer DEFAULT 0 NOT NULL, + user_ip character varying(40) DEFAULT ''::character varying NOT NULL +); + + +-- +-- TOC entry 6 (OID 17167) +-- Name: cur_cur_id_seq; Type: SEQUENCE; Schema: public; Owner: hashar +-- + +CREATE SEQUENCE cur_cur_id_seq + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + + +-- +-- TOC entry 11 (OID 17169) +-- Name: cur; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE cur ( + cur_id integer DEFAULT nextval('cur_cur_id_seq'::text), + cur_namespace smallint DEFAULT 0::smallint NOT NULL, + cur_title character varying(255) DEFAULT ''::character varying NOT NULL, + cur_text text DEFAULT ''::text NOT NULL, + cur_comment text DEFAULT ''::text NOT NULL, + cur_user integer DEFAULT 0 NOT NULL, + cur_user_text character varying(255) DEFAULT ''::character varying NOT NULL, + cur_timestamp character(14) DEFAULT ''::bpchar NOT NULL, + cur_restrictions text DEFAULT ''::text NOT NULL, + cur_counter bigint DEFAULT 0::bigint NOT NULL, + cur_is_redirect smallint DEFAULT 0::smallint NOT NULL, + cur_minor_edit smallint DEFAULT 0::smallint NOT NULL, + cur_is_new smallint DEFAULT 0::smallint NOT NULL, + cur_random double precision NOT NULL, + cur_touched character(14) DEFAULT ''::bpchar NOT NULL, + inverse_timestamp character(14) DEFAULT ''::bpchar NOT NULL +); + + +-- +-- TOC entry 7 (OID 17191) +-- Name: old_old_id_seq; Type: SEQUENCE; Schema: public; Owner: hashar +-- + +CREATE SEQUENCE old_old_id_seq + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + + +-- +-- TOC entry 12 (OID 17193) +-- Name: old; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE "old" ( + old_id integer DEFAULT nextval('old_old_id_seq'::text), + old_namespace smallint DEFAULT 0::smallint NOT NULL, + old_title character varying(255) DEFAULT ''::character varying NOT NULL, + old_text text DEFAULT ''::text NOT NULL, + old_comment text DEFAULT ''::text NOT NULL, + old_user integer DEFAULT 0 NOT NULL, + old_user_text character varying(255) NOT NULL, + old_timestamp character(14) DEFAULT ''::bpchar NOT NULL, + old_minor_edit smallint DEFAULT 0::smallint NOT NULL, + old_flags text DEFAULT ''::text NOT NULL, + inverse_timestamp character(14) DEFAULT ''::bpchar NOT NULL +); + + +-- +-- TOC entry 13 (OID 17208) +-- Name: archive; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE archive ( + ar_namespace smallint DEFAULT 0::smallint NOT NULL, + ar_title character varying(255) DEFAULT ''::character varying NOT NULL, + ar_text text DEFAULT ''::text NOT NULL, + ar_comment text DEFAULT ''::text NOT NULL, + ar_user integer DEFAULT 0 NOT NULL, + ar_user_text character varying(255) NOT NULL, + ar_timestamp character(14) DEFAULT ''::bpchar NOT NULL, + ar_minor_edit smallint DEFAULT 0::smallint NOT NULL, + ar_flags text DEFAULT ''::text NOT NULL +); + + +-- +-- TOC entry 14 (OID 17221) +-- Name: links; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE links ( + l_from integer DEFAULT 0 NOT NULL, + l_to integer DEFAULT 0 NOT NULL +); + + +-- +-- TOC entry 15 (OID 17227) +-- Name: brokenlinks; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE brokenlinks ( + bl_from integer DEFAULT 0 NOT NULL, + bl_to character varying(255) DEFAULT ''::character varying NOT NULL +); + + +-- +-- TOC entry 16 (OID 17233) +-- Name: imagelinks; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE imagelinks ( + il_from integer DEFAULT 0 NOT NULL, + il_to character varying(255) DEFAULT ''::character varying NOT NULL +); + + +-- +-- TOC entry 17 (OID 17239) +-- Name: categorylinks; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE categorylinks ( + cl_from integer DEFAULT 0 NOT NULL, + cl_to character varying(255) DEFAULT ''::character varying NOT NULL, + cl_sortkey character varying(255) DEFAULT ''::character varying NOT NULL, + cl_timestamp timestamp without time zone NOT NULL +); + + +-- +-- TOC entry 18 (OID 17244) +-- Name: linkscc; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE linkscc ( + lcc_pageid integer NOT NULL, + lcc_cacheobj text DEFAULT ''::text NOT NULL +); + + +-- +-- TOC entry 19 (OID 17252) +-- Name: site_stats; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE site_stats ( + ss_row_id integer NOT NULL, + ss_total_views bigint DEFAULT 0::bigint, + ss_total_edits bigint DEFAULT 0::bigint, + ss_good_articles bigint DEFAULT 0::bigint +); + + +-- +-- TOC entry 20 (OID 17257) +-- Name: hitcounter; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE hitcounter ( + hc_id integer NOT NULL +); + + +-- +-- TOC entry 8 (OID 17259) +-- Name: ipblocks_ipb_id_seq; Type: SEQUENCE; Schema: public; Owner: hashar +-- + +CREATE SEQUENCE ipblocks_ipb_id_seq + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + + +-- +-- TOC entry 21 (OID 17261) +-- Name: ipblocks; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE ipblocks ( + ipb_id integer DEFAULT nextval('ipblocks_ipb_id_seq'::text), + ipb_address character varying(40) DEFAULT ''::character varying NOT NULL, + ipb_user integer DEFAULT 0 NOT NULL, + ipb_by integer DEFAULT 0 NOT NULL, + ipb_reason text DEFAULT ''::text NOT NULL, + ipb_timestamp character(14) DEFAULT ''::bpchar NOT NULL, + ipb_auto smallint DEFAULT 0::smallint NOT NULL, + ipb_expiry character(14) DEFAULT ''::bpchar NOT NULL +); + + +-- +-- TOC entry 22 (OID 17274) +-- Name: image; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE image ( + img_name character varying(255) DEFAULT ''::character varying NOT NULL, + img_size integer DEFAULT 0 NOT NULL, + img_description text DEFAULT ''::text NOT NULL, + img_user integer DEFAULT 0 NOT NULL, + img_user_text character varying(255) DEFAULT ''::character varying NOT NULL, + img_timestamp character(14) DEFAULT ''::bpchar NOT NULL +); + + +-- +-- TOC entry 23 (OID 17285) +-- Name: oldimage; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE oldimage ( + oi_name character varying(255) DEFAULT ''::character varying NOT NULL, + oi_archive_name character varying(255) DEFAULT ''::character varying NOT NULL, + oi_size integer DEFAULT 0 NOT NULL, + oi_description text DEFAULT ''::text NOT NULL, + oi_user integer DEFAULT 0 NOT NULL, + oi_user_text character varying(255) DEFAULT ''::character varying NOT NULL, + oi_timestamp character(14) DEFAULT ''::bpchar NOT NULL +); + + +-- +-- TOC entry 24 (OID 17297) +-- Name: recentchanges; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE recentchanges ( + rc_timestamp character varying(14) DEFAULT ''::character varying NOT NULL, + rc_cur_time character varying(14) DEFAULT ''::character varying NOT NULL, + rc_user integer DEFAULT 0 NOT NULL, + rc_user_text character varying(255) DEFAULT ''::character varying NOT NULL, + rc_namespace smallint DEFAULT 0::smallint NOT NULL, + rc_title character varying(255) DEFAULT ''::character varying NOT NULL, + rc_comment character varying(255) DEFAULT ''::character varying NOT NULL, + rc_minor smallint DEFAULT 0::smallint NOT NULL, + rc_bot smallint DEFAULT 0::smallint NOT NULL, + rc_new smallint DEFAULT 0::smallint NOT NULL, + rc_cur_id integer DEFAULT 0 NOT NULL, + rc_this_oldid integer DEFAULT 0 NOT NULL, + rc_last_oldid integer DEFAULT 0 NOT NULL, + rc_type smallint DEFAULT 0::smallint NOT NULL, + rc_moved_to_ns smallint DEFAULT 0::smallint NOT NULL, + rc_moved_to_title character varying(255) DEFAULT ''::character varying NOT NULL +); + + +-- +-- TOC entry 25 (OID 17318) +-- Name: watchlist; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE watchlist ( + wl_user integer NOT NULL, + wl_namespace smallint DEFAULT 0::smallint NOT NULL, + wl_title character varying(255) DEFAULT ''::character varying NOT NULL +); + + +-- +-- TOC entry 26 (OID 17322) +-- Name: math; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE math ( + math_inputhash character varying(16) NOT NULL, + math_outputhash character varying(16) NOT NULL, + math_html_conservativeness smallint NOT NULL, + math_html text, + math_mathml text +); + + +-- +-- TOC entry 27 (OID 17327) +-- Name: searchindex; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE searchindex ( + si_page integer NOT NULL, + si_title character varying(255) DEFAULT ''::character varying NOT NULL, + si_text text DEFAULT ''::text NOT NULL +); + + +-- +-- TOC entry 28 (OID 17334) +-- Name: interwiki; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE interwiki ( + iw_prefix character(32) NOT NULL, + iw_url character(127) NOT NULL, + iw_local boolean NOT NULL +); + + +-- +-- TOC entry 29 (OID 17336) +-- Name: querycache; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE querycache ( + qc_type character(32) NOT NULL, + qc_value integer DEFAULT 0 NOT NULL, + qc_namespace smallint DEFAULT 0::smallint NOT NULL, + qc_title character(255) DEFAULT ''::bpchar NOT NULL +); + + +-- +-- TOC entry 30 (OID 17343) +-- Name: objectcache; Type: TABLE; Schema: public; Owner: hashar +-- + +CREATE TABLE objectcache ( + keyname character(255) DEFAULT ''::bpchar NOT NULL, + value text, + exptime timestamp without time zone NOT NULL +); + + +-- +-- TOC entry 47 (OID 17351) +-- Name: math_inputhash_math_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX math_inputhash_math_index ON math USING btree (math_inputhash); + + +-- +-- TOC entry 49 (OID 17352) +-- Name: iw_prefix_interwiki_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX iw_prefix_interwiki_index ON interwiki USING btree (iw_prefix); + + +-- +-- TOC entry 44 (OID 17353) +-- Name: ss_row_id_site_stats_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX ss_row_id_site_stats_index ON site_stats USING btree (ss_row_id); + + +-- +-- TOC entry 33 (OID 17354) +-- Name: old_id_old_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX old_id_old_index ON "old" USING btree (old_id); + + +-- +-- TOC entry 36 (OID 17355) +-- Name: bl_from_brokenlinks_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX bl_from_brokenlinks_index ON brokenlinks USING btree (bl_from, bl_to); + + +-- +-- TOC entry 45 (OID 17356) +-- Name: ipb_id_ipblocks_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX ipb_id_ipblocks_index ON ipblocks USING btree (ipb_id); + + +-- +-- TOC entry 32 (OID 17357) +-- Name: cur_id_cur_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX cur_id_cur_index ON cur USING btree (cur_id); + + +-- +-- TOC entry 38 (OID 17358) +-- Name: il_from_imagelinks_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX il_from_imagelinks_index ON imagelinks USING btree (il_from, il_to); + + +-- +-- TOC entry 31 (OID 17359) +-- Name: user_id_user_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX user_id_user_index ON "user" USING btree (user_id); + + +-- +-- TOC entry 48 (OID 17360) +-- Name: key_searchindex_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX key_searchindex_index ON searchindex USING btree (si_page); + + +-- +-- TOC entry 51 (OID 17361) +-- Name: key_objectcache_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX key_objectcache_index ON objectcache USING btree (keyname); + + +-- +-- TOC entry 46 (OID 17362) +-- Name: key_watchlist_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX key_watchlist_index ON watchlist USING btree (wl_user, wl_namespace, wl_title); + + +-- +-- TOC entry 34 (OID 17363) +-- Name: l_from_links_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX l_from_links_index ON links USING btree (l_from, l_to); + + +-- +-- TOC entry 40 (OID 17364) +-- Name: cl_from_categorylinks_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE UNIQUE INDEX cl_from_categorylinks_index ON categorylinks USING btree (cl_from, cl_to); + + +-- +-- TOC entry 41 (OID 17365) +-- Name: cl_sortkey_categorylinks_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE INDEX cl_sortkey_categorylinks_index ON categorylinks USING btree (cl_to, cl_sortkey); + + +-- +-- TOC entry 42 (OID 17366) +-- Name: cl_timestamp_categorylinks_index; Type: INDEX; Schema: public; Owner: hashar +-- + +CREATE INDEX cl_timestamp_categorylinks_index ON categorylinks USING btree (cl_to, cl_timestamp); + + +-- +-- TOC entry 35 (OID 17225) +-- Name: links_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar +-- + +ALTER TABLE ONLY links + ADD CONSTRAINT links_pkey PRIMARY KEY (l_from, l_to); + + +-- +-- TOC entry 37 (OID 17231) +-- Name: brokenlinks_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar +-- + +ALTER TABLE ONLY brokenlinks + ADD CONSTRAINT brokenlinks_pkey PRIMARY KEY (bl_to); + + +-- +-- TOC entry 39 (OID 17237) +-- Name: imagelinks_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar +-- + +ALTER TABLE ONLY imagelinks + ADD CONSTRAINT imagelinks_pkey PRIMARY KEY (il_to); + + +-- +-- TOC entry 43 (OID 17250) +-- Name: linkscc_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar +-- + +ALTER TABLE ONLY linkscc + ADD CONSTRAINT linkscc_pkey PRIMARY KEY (lcc_pageid); + + +-- +-- TOC entry 50 (OID 17341) +-- Name: querycache_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar +-- + +ALTER TABLE ONLY querycache + ADD CONSTRAINT querycache_pkey PRIMARY KEY (qc_type, qc_value); + + +-- +-- TOC entry 52 (OID 17349) +-- Name: objectcache_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar +-- + +ALTER TABLE ONLY objectcache + ADD CONSTRAINT objectcache_pkey PRIMARY KEY (exptime); + + +SET SESSION AUTHORIZATION 'postgres'; + +-- +-- TOC entry 3 (OID 2200) +-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres +-- + +COMMENT ON SCHEMA public IS 'Standard public schema'; + diff --git a/stylesheets/myskin/main.css b/stylesheets/myskin/main.css new file mode 100644 index 000000000000..f3ab020480a6 --- /dev/null +++ b/stylesheets/myskin/main.css @@ -0,0 +1 @@ +/* this file must be empty */ |