Change-Id: I52ae3c55044bc8c53698e356bad74969406670bf
18 files changed:
const TYPE_DO = 15; // keywords: case, var, finally, else, do, try
const TYPE_FUNC = 16; // keywords: function
const TYPE_LITERAL = 17; // all literals, identifiers and unrecognised tokens
const TYPE_DO = 15; // keywords: case, var, finally, else, do, try
const TYPE_FUNC = 16; // keywords: function
const TYPE_LITERAL = 17; // all literals, identifiers and unrecognised tokens
// Sanity limit to avoid excessive memory usage
const STACK_LIMIT = 1000;
// Sanity limit to avoid excessive memory usage
const STACK_LIMIT = 1000;
self::TYPE_LITERAL => true
)
);
self::TYPE_LITERAL => true
)
);
// Rules for when newlines should be inserted if
// $statementsOnOwnLine is enabled.
// $newlineBefore is checked before switching state,
// Rules for when newlines should be inserted if
// $statementsOnOwnLine is enabled.
// $newlineBefore is checked before switching state,
return self::parseError($s, $end, 'Number with several E' );
}
$end++;
return self::parseError($s, $end, 'Number with several E' );
}
$end++;
// + sign is optional; - sign is required.
$end += strspn( $s, '-+', $end );
$len = strspn( $s, '0123456789', $end );
// + sign is optional; - sign is required.
$end += strspn( $s, '-+', $end );
$len = strspn( $s, '0123456789', $end );
$out .= ' ';
$lineLength++;
}
$out .= ' ';
$lineLength++;
}
$out .= $token;
$lineLength += $end - $pos; // += strlen( $token )
$last = $s[$end - 1];
$pos = $end;
$newlineFound = false;
$out .= $token;
$lineLength += $end - $pos; // += strlen( $token )
$last = $s[$end - 1];
$pos = $end;
$newlineFound = false;
// Output a newline after the token if required
// This is checked before AND after switching state
$newlineAdded = false;
// Output a newline after the token if required
// This is checked before AND after switching state
$newlineAdded = false;
} elseif( isset( $goto[$state][$type] ) ) {
$state = $goto[$state][$type];
}
} elseif( isset( $goto[$state][$type] ) ) {
$state = $goto[$state][$type];
}
// Check for newline insertion again
if ( $statementsOnOwnLine && !$newlineAdded && isset( $newlineAfter[$state][$type] ) ) {
$out .= "\n";
// Check for newline insertion again
if ( $statementsOnOwnLine && !$newlineAdded && isset( $newlineAfter[$state][$type] ) ) {
$out .= "\n";
static function parseError($fullJavascript, $position, $errorMsg) {
// TODO: Handle the error: trigger_error, throw exception, return false...
return false;
static function parseError($fullJavascript, $position, $errorMsg) {
// TODO: Handle the error: trigger_error, throw exception, return false...
return false;
'helptext' => $helptext,
);
}
'helptext' => $helptext,
);
}
function execute() {
if( $this->data['message'] ) {
?>
function execute() {
if( $this->data['message'] ) {
?>
if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) {
foreach ( $this->data['extraInput'] as $inputItem ) { ?>
<tr>
if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) {
foreach ( $this->data['extraInput'] as $inputItem ) { ?>
<tr>
if ( !empty( $inputItem['msg'] ) && $inputItem['type'] != 'checkbox' ) {
if ( !empty( $inputItem['msg'] ) && $inputItem['type'] != 'checkbox' ) {
- ?><td class="mw-label"><label for="<?php
+ ?><td class="mw-label"><label for="<?php
echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
$this->msgWiki( $inputItem['msg'] ) ?></label><?php
} else {
echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
$this->msgWiki( $inputItem['msg'] ) ?></label><?php
} else {
<input type="<?php echo htmlspecialchars( $inputItem['type'] ) ?>" name="<?php
echo htmlspecialchars( $inputItem['name'] ); ?>"
tabindex="<?php echo $tabIndex++; ?>"
<input type="<?php echo htmlspecialchars( $inputItem['type'] ) ?>" name="<?php
echo htmlspecialchars( $inputItem['name'] ); ?>"
tabindex="<?php echo $tabIndex++; ?>"
if ( $inputItem['type'] != 'checkbox' ) {
echo htmlspecialchars( $inputItem['value'] );
} else {
echo '1';
if ( $inputItem['type'] != 'checkbox' ) {
echo htmlspecialchars( $inputItem['value'] );
} else {
echo '1';
?>" id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
?>" id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) )
if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) )
- echo 'checked="checked"';
- ?> /> <?php
+ echo 'checked="checked"';
+ ?> /> <?php
if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['msg'] ) ) {
?>
<label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['msg'] ) ) {
?>
<label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
importDump.php
XML dump importer
importDump.php
XML dump importer
importImages.php
Import images into the wiki
importImages.php
Import images into the wiki
importTextFile.php
Import the contents of a text file into a wiki page
moveBatch.php
importTextFile.php
Import the contents of a text file into a wiki page
moveBatch.php
namespaceDupes.php
Check articles name to see if they conflict with new/existing namespaces
namespaceDupes.php
Check articles name to see if they conflict with new/existing namespaces
CSSJanus is CSS parser utility designed to aid the conversion of a website's
layout from left-to-right(LTR) to right-to-left(RTL). The script was born out of
CSSJanus is CSS parser utility designed to aid the conversion of a website's
layout from left-to-right(LTR) to right-to-left(RTL). The script was born out of
-a need to convert CSS for RTL languages when tables are not being used for layout (since tables will automatically reorder TD's in RTL).
+a need to convert CSS for RTL languages when tables are not being used for layout (since tables will automatically reorder TD's in RTL).
CSSJanus will change most of the obvious CSS property names and their values as
CSSJanus will change most of the obvious CSS property names and their values as
-well as some not-so-obvious ones (cursor, background-position %, etc...).
-The script is designed to offer flexibility to account for cases when you do
+well as some not-so-obvious ones (cursor, background-position %, etc...).
+The script is designed to offer flexibility to account for cases when you do
not want to change certain rules which exist to account for bidirectional text
display bugs, as well as situations where you may or may not want to flip annotations inside of the background url string.
not want to change certain rules which exist to account for bidirectional text
display bugs, as well as situations where you may or may not want to flip annotations inside of the background url string.
-Note that you can disable CSSJanus from running on an entire class or any
+Note that you can disable CSSJanus from running on an entire class or any
rule within a class by prepending a /* @noflip */ comment before the rule(s)
you want CSSJanus to ignore.
CSSJanus itself is not always enough to make a website that works in a LTR
rule within a class by prepending a /* @noflip */ comment before the rule(s)
you want CSSJanus to ignore.
CSSJanus itself is not always enough to make a website that works in a LTR
-language context work in a RTL language all the way, but it is a start.
+language context work in a RTL language all the way, but it is a start.
{{{
$ svn checkout http://cssjanus.googlecode.com/svn/trunk/ cssjanus
{{{
$ svn checkout http://cssjanus.googlecode.com/svn/trunk/ cssjanus
--swap_left_right_in_url: Fixes "left"/"right" string within urls.
Ex: ./cssjanus.py --swap_left_right_in_url < file.css > file_rtl.css
--swap_ltr_rtl_in_url: Fixes "ltr"/"rtl" string within urls.
--swap_left_right_in_url: Fixes "left"/"right" string within urls.
Ex: ./cssjanus.py --swap_left_right_in_url < file.css > file_rtl.css
--swap_ltr_rtl_in_url: Fixes "ltr"/"rtl" string within urls.
- Ex: ./cssjanus.py --swap_ltr_rtl_in_url < file.css > file_rtl.css
-
+ Ex: ./cssjanus.py --swap_ltr_rtl_in_url < file.css > file_rtl.css
+
If you'd like to make use of the webapp version of cssjanus, you'll need to
download the Google App Engine SDK
http://code.google.com/appengine/downloads.html
and also drop a "django" directory into this directory, with the latest svn
If you'd like to make use of the webapp version of cssjanus, you'll need to
download the Google App Engine SDK
http://code.google.com/appengine/downloads.html
and also drop a "django" directory into this directory, with the latest svn
-from django. You should be good to go with that setup. Please let me know
+from django. You should be good to go with that setup. Please let me know
otherwise.
==Bugs, Patches==
otherwise.
==Bugs, Patches==
{{{
Copyright 2008 Google Inc. All Rights Reserved.
{{{
Copyright 2008 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an 'AS IS' BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an 'AS IS' BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<?php
define( 'MW_CONFIG_CALLBACK', 'MakeHipHop::noConfigNeeded' );
<?php
define( 'MW_CONFIG_CALLBACK', 'MakeHipHop::noConfigNeeded' );
unlink( "$buildDir/source" );
}
unlink( "$buildDir/source" );
}
- # With the CentOS RPMs, you just get g++44, no g++, so we have to
+ # With the CentOS RPMs, you just get g++44, no g++, so we have to
# use the environment
if ( isset( $_ENV['CXX'] ) ) {
$cxx = $_ENV['CXX'];
# use the environment
if ( isset( $_ENV['CXX'] ) ) {
$cxx = $_ENV['CXX'];
- # Create a function that provides the HipHop compiler version, and
+ # Create a function that provides the HipHop compiler version, and
# doesn't exist when MediaWiki is invoked in interpreter mode.
$version = str_replace( PHP_EOL, ' ', trim( `hphp --version` ) );
file_put_contents(
# doesn't exist when MediaWiki is invoked in interpreter mode.
$version = str_replace( PHP_EOL, ' ', trim( `hphp --version` ) );
file_put_contents(
$this->checkVolatileClasses( $outDir );
# Copy the generated C++ files into the source directory for cmake
$this->checkVolatileClasses( $outDir );
# Copy the generated C++ files into the source directory for cmake
- $iter = new RecursiveIteratorIterator(
+ $iter = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator( $outDir ),
RecursiveIteratorIterator::SELF_FIRST );
$sourceFiles = array();
new RecursiveDirectoryIterator( $outDir ),
RecursiveIteratorIterator::SELF_FIRST );
$sourceFiles = array();
}
# Do our own version of $HPHP_HOME/bin/run.sh, which isn't so broken.
}
# Do our own version of $HPHP_HOME/bin/run.sh, which isn't so broken.
- # HipHop's RELEASE mode seems to be stuck always on, so symbols get
- # stripped. Also we will try keeping the generated .o files instead of
+ # HipHop's RELEASE mode seems to be stuck always on, so symbols get
+ # stripped. Also we will try keeping the generated .o files instead of
# throwing away hours of CPU time every time you make a typo.
chdir( $persistentDir );
if ( $regenerateMakefile ) {
# throwing away hours of CPU time every time you make a typo.
chdir( $persistentDir );
if ( $regenerateMakefile ) {
- copy( $_ENV['HPHP_HOME'] . '/bin/CMakeLists.base.txt',
+ copy( $_ENV['HPHP_HOME'] . '/bin/CMakeLists.base.txt',
"$persistentDir/CMakeLists.txt" );
if ( file_exists( "$persistentDir/CMakeCache.txt" ) ) {
"$persistentDir/CMakeLists.txt" );
if ( file_exists( "$persistentDir/CMakeCache.txt" ) ) {
$cmd = 'cmake' .
" -D CMAKE_BUILD_TYPE:string=" . wfEscapeShellArg( $GLOBALS['wgHipHopBuildType'] ) .
' -D PROGRAM_NAME:string=mediawiki-hphp';
$cmd = 'cmake' .
" -D CMAKE_BUILD_TYPE:string=" . wfEscapeShellArg( $GLOBALS['wgHipHopBuildType'] ) .
' -D PROGRAM_NAME:string=mediawiki-hphp';
if ( file_exists( '/usr/bin/ccache' ) ) {
$cmd .= ' -D CMAKE_CXX_COMPILER:string=ccache' .
' -D CMAKE_CXX_COMPILER_ARG1:string=' . wfEscapeShellArg( $cxx );
if ( file_exists( '/usr/bin/ccache' ) ) {
$cmd .= ' -D CMAKE_CXX_COMPILER:string=ccache' .
' -D CMAKE_CXX_COMPILER_ARG1:string=' . wfEscapeShellArg( $cxx );
# Determine appropriate make concurrency
# Compilation can take a lot of memory, let's assume that that is limiting.
$procs = $this->getNumProcs();
# Determine appropriate make concurrency
# Compilation can take a lot of memory, let's assume that that is limiting.
$procs = $this->getNumProcs();
# Run make. This is the slow step.
passthru( 'make -j' . wfEscapeShellArg( $procs ) );
# Run make. This is the slow step.
passthru( 'make -j' . wfEscapeShellArg( $procs ) );
$sourceBase = realpath( "$IP/.." );
}
$sourceBase = realpath( "$IP/.." );
}
'cd ' . wfEscapeShellArg( $sourceBase ) . " && " .
'MW_INSTALL_PATH=' . wfEscapeShellArg( $IP ) . ' ' .
'cd ' . wfEscapeShellArg( $sourceBase ) . " && " .
'MW_INSTALL_PATH=' . wfEscapeShellArg( $IP ) . ' ' .
"$buildDir/persistent/mediawiki-hphp",
'-c', "$thisDir/server.conf",
'-v', "Server.SourceRoot=$sourceBase",
"$buildDir/persistent/mediawiki-hphp",
'-c', "$thisDir/server.conf",
'-v', "Server.SourceRoot=$sourceBase",
cl_from BIGINT NOT NULL DEFAULT 0,
-- REFERENCES page(page_id) ON DELETE CASCADE,
cl_to VARCHAR(255) NOT NULL,
cl_from BIGINT NOT NULL DEFAULT 0,
-- REFERENCES page(page_id) ON DELETE CASCADE,
cl_to VARCHAR(255) NOT NULL,
- -- cl_sortkey has to be at least 86 wide
+ -- cl_sortkey has to be at least 86 wide
-- in order to be compatible with the old MySQL schema from MW 1.10
--cl_sortkey VARCHAR(86),
cl_sortkey VARCHAR(230) FOR BIT DATA NOT NULL ,
-- in order to be compatible with the old MySQL schema from MW 1.10
--cl_sortkey VARCHAR(86),
cl_sortkey VARCHAR(230) FOR BIT DATA NOT NULL ,
CREATE TABLE user_properties (
-- Foreign key to user.user_id
up_user BIGINT NOT NULL,
CREATE TABLE user_properties (
-- Foreign key to user.user_id
up_user BIGINT NOT NULL,
-- Name of the option being saved. This is indexed for bulk lookup.
up_property VARCHAR(32) FOR BIT DATA NOT NULL,
-- Name of the option being saved. This is indexed for bulk lookup.
up_property VARCHAR(32) FOR BIT DATA NOT NULL,
-- Property value as a string.
up_value CLOB(64K) INLINE LENGTH 4096
);
-- Property value as a string.
up_value CLOB(64K) INLINE LENGTH 4096
);
-- This is read and executed by the install script; you should
-- not have to run it by itself unless doing a manual install.
-- This is read and executed by the install script; you should
-- not have to run it by itself unless doing a manual install.
-- * DB2 will convert all table and column names to all caps internally.
-- * DB2 has a 32k limit on SQL filesize, so it may be necessary
-- to split this into two files soon.
-- * DB2 will convert all table and column names to all caps internally.
-- * DB2 has a 32k limit on SQL filesize, so it may be necessary
-- to split this into two files soon.
-- REFERENCES page (page_id) ON DELETE CASCADE,
pp_propname VARCHAR(255) NOT NULL,
pp_value CLOB(64K) INLINE LENGTH 4096 NOT NULL,
-- REFERENCES page (page_id) ON DELETE CASCADE,
pp_propname VARCHAR(255) NOT NULL,
pp_value CLOB(64K) INLINE LENGTH 4096 NOT NULL,
- PRIMARY KEY (pp_page, pp_propname)
+ PRIMARY KEY (pp_page, pp_propname)
);
CREATE INDEX page_props_propname
ON page_props (pp_propname);
);
CREATE INDEX page_props_propname
ON page_props (pp_propname);
pl_namespace SMALLINT NOT NULL,
pl_title VARCHAR(255) NOT NULL
);
pl_namespace SMALLINT NOT NULL,
pl_title VARCHAR(255) NOT NULL
);
-CREATE UNIQUE INDEX pagelink_unique
+CREATE UNIQUE INDEX pagelink_unique
ON pagelinks (pl_from, pl_namespace, pl_title);
ON pagelinks (pl_from, pl_namespace, pl_title);
cl_from BIGINT NOT NULL DEFAULT 0,
-- REFERENCES page(page_id) ON DELETE CASCADE,
cl_to VARCHAR(255) NOT NULL,
cl_from BIGINT NOT NULL DEFAULT 0,
-- REFERENCES page(page_id) ON DELETE CASCADE,
cl_to VARCHAR(255) NOT NULL,
- -- cl_sortkey has to be at least 86 wide
+ -- cl_sortkey has to be at least 86 wide
-- in order to be compatible with the old MySQL schema from MW 1.10
--cl_sortkey VARCHAR(86),
cl_sortkey VARCHAR(230) FOR BIT DATA NOT NULL,
-- in order to be compatible with the old MySQL schema from MW 1.10
--cl_sortkey VARCHAR(86),
cl_sortkey VARCHAR(230) FOR BIT DATA NOT NULL,
);
CREATE INDEX ipb_address
ON ipblocks (ipb_address);
);
CREATE INDEX ipb_address
ON ipblocks (ipb_address);
ON ipblocks (ipb_user);
CREATE INDEX ipb_range
ON ipblocks (ipb_range_start, ipb_range_end);
ON ipblocks (ipb_user);
CREATE INDEX ipb_range
ON ipblocks (ipb_range_start, ipb_range_end);
rc_log_type VARCHAR(255),
rc_log_action VARCHAR(255),
rc_params CLOB(64K) INLINE LENGTH 4096
rc_log_type VARCHAR(255),
rc_log_action VARCHAR(255),
rc_params CLOB(64K) INLINE LENGTH 4096
);
CREATE INDEX rc_timestamp
ON recentchanges (rc_timestamp);
);
CREATE INDEX rc_timestamp
ON recentchanges (rc_timestamp);
--- Store information about newly uploaded files before they're
+-- Store information about newly uploaded files before they're
-- moved into the actual filestore
--
CREATE TABLE uploadstash (
-- moved into the actual filestore
--
CREATE TABLE uploadstash (
--- Stores the groups the user has once belonged to.
+-- Stores the groups the user has once belonged to.
-- The user may still belong these groups. Check user_groups.
CREATE TABLE user_former_groups (
ufg_user BIGINT NOT NULL DEFAULT 0,
-- The user may still belong these groups. Check user_groups.
CREATE TABLE user_former_groups (
ufg_user BIGINT NOT NULL DEFAULT 0,
CREATE INDEX /*$wgDBprefix*/user_group_id ON /*$wgDBprefix*/user_newtalk([user_id]);
CREATE INDEX /*$wgDBprefix*/user_ip ON /*$wgDBprefix*/user_newtalk(user_ip);
CREATE INDEX /*$wgDBprefix*/user_group_id ON /*$wgDBprefix*/user_newtalk([user_id]);
CREATE INDEX /*$wgDBprefix*/user_ip ON /*$wgDBprefix*/user_newtalk(user_ip);
-- User preferences and other fun stuff
-- replaces old user.user_options BLOB
-- User preferences and other fun stuff
-- replaces old user.user_options BLOB
CREATE TABLE /*$wgDBprefix*/user_properties (
up_user INT NOT NULL,
up_property NVARCHAR(32) NOT NULL,
CREATE TABLE /*$wgDBprefix*/user_properties (
up_user INT NOT NULL,
up_property NVARCHAR(32) NOT NULL,
-- The fields generally correspond to the page, revision, and text
-- fields, with several caveats.
-- Cannot reasonably create views on this table, due to the presence of TEXT
-- The fields generally correspond to the page, revision, and text
-- fields, with several caveats.
-- Cannot reasonably create views on this table, due to the presence of TEXT
CREATE TABLE /*$wgDBprefix*/archive (
ar_namespace SMALLINT NOT NULL DEFAULT 0,
ar_title NVARCHAR(255) NOT NULL DEFAULT '',
CREATE TABLE /*$wgDBprefix*/archive (
ar_namespace SMALLINT NOT NULL DEFAULT 0,
ar_title NVARCHAR(255) NOT NULL DEFAULT '',
CREATE INDEX /*$wgDBprefix*/cl_timestamp ON /*$wgDBprefix*/categorylinks(cl_to,cl_timestamp);
--;
CREATE INDEX /*$wgDBprefix*/cl_timestamp ON /*$wgDBprefix*/categorylinks(cl_to,cl_timestamp);
--;
-- Track all existing categories. Something is a category if 1) it has an en-
-- try somewhere in categorylinks, or 2) it once did. Categories might not
-- have corresponding pages, so they need to be tracked separately.
-- Track all existing categories. Something is a category if 1) it has an en-
-- try somewhere in categorylinks, or 2) it once did. Categories might not
-- have corresponding pages, so they need to be tracked separately.
vt_tag varchar(255) NOT NULL PRIMARY KEY
);
vt_tag varchar(255) NOT NULL PRIMARY KEY
);
-- Table for storing localisation data
-- Table for storing localisation data
CREATE TABLE /*$wgDBprefix*/l10n_cache (
-- language code
lc_lang NVARCHAR(32) NOT NULL,
CREATE TABLE /*$wgDBprefix*/l10n_cache (
-- language code
lc_lang NVARCHAR(32) NOT NULL,
-- cache key
lc_key NVARCHAR(255) NOT NULL,
-- cache key
lc_key NVARCHAR(255) NOT NULL,
-- Value
lc_value TEXT NOT NULL DEFAULT '',
);
-- Value
lc_value TEXT NOT NULL DEFAULT '',
);
-- Maximum key length ON SQL Server is 900 bytes
CREATE INDEX /*$wgDBprefix*/externallinks_index ON /*$wgDBprefix*/externallinks(el_index);
-- Maximum key length ON SQL Server is 900 bytes
CREATE INDEX /*$wgDBprefix*/externallinks_index ON /*$wgDBprefix*/externallinks(el_index);
-- Track external user accounts, if ExternalAuth is used
-- Track external user accounts, if ExternalAuth is used
CREATE TABLE /*$wgDBprefix*/external_user (
-- Foreign key to user_id
eu_local_id INT NOT NULL PRIMARY KEY,
CREATE TABLE /*$wgDBprefix*/external_user (
-- Foreign key to user_id
eu_local_id INT NOT NULL PRIMARY KEY,
);
CREATE UNIQUE INDEX /*$wgDBprefix*/langlinks_reverse_key ON /*$wgDBprefix*/langlinks(ll_lang,ll_title);
);
CREATE UNIQUE INDEX /*$wgDBprefix*/langlinks_reverse_key ON /*$wgDBprefix*/langlinks(ll_lang,ll_title);
-- Track inline interwiki links
-- Track inline interwiki links
CREATE TABLE /*$wgDBprefix*/iwlinks (
-- page_id of the referring page
iwl_from INT NOT NULL DEFAULT 0,
CREATE TABLE /*$wgDBprefix*/iwlinks (
-- page_id of the referring page
iwl_from INT NOT NULL DEFAULT 0,
-- Interwiki prefix code of the target
iwl_prefix NVARCHAR(20) NOT NULL DEFAULT '',
-- Interwiki prefix code of the target
iwl_prefix NVARCHAR(20) NOT NULL DEFAULT '',
-- Title of the target, including namespace
iwl_title NVARCHAR(255) NOT NULL DEFAULT '',
);
-- Title of the target, including namespace
iwl_title NVARCHAR(255) NOT NULL DEFAULT '',
);
--- NOTE To enable full text indexing on SQL 2008 you need to create an account FDH$MSSQLSERVER
+-- NOTE To enable full text indexing on SQL 2008 you need to create an account FDH$MSSQLSERVER
-- AND assign a password for the FDHOST process to run under
-- Once you have assigned a password to that account, you need to run the following stored procedure
-- replacing XXXXX with the password you used.
-- AND assign a password for the FDHOST process to run under
-- Once you have assigned a password to that account, you need to run the following stored procedure
-- replacing XXXXX with the password you used.
ON &mw_prefix.testrun
BEGIN
SELECT testrun_tr_id_seq.NEXTVAL into :NEW.tr_id FROM dual;
ON &mw_prefix.testrun
BEGIN
SELECT testrun_tr_id_seq.NEXTVAL into :NEW.tr_id FROM dual;
CREATE TABLE /*$wgDBprefix*/testitem (
ti_run NUMBER NOT NULL REFERENCES &mw_prefix.testrun (tr_id) ON DELETE CASCADE,
CREATE TABLE /*$wgDBprefix*/testitem (
ti_run NUMBER NOT NULL REFERENCES &mw_prefix.testrun (tr_id) ON DELETE CASCADE,
ti_run INTEGER NOT NULL REFERENCES testrun(tr_id) ON DELETE CASCADE,
ti_name TEXT NOT NULL,
ti_success SMALLINT NOT NULL
ti_run INTEGER NOT NULL REFERENCES testrun(tr_id) ON DELETE CASCADE,
ti_name TEXT NOT NULL,
ti_success SMALLINT NOT NULL
CREATE UNIQUE INDEX testitem_uniq ON testitem(ti_run, ti_name);
CREATE UNIQUE INDEX testitem_uniq ON testitem(ti_run, ti_name);
-- Recreates the iwl_prefix for the iwlinks table
--
DROP INDEX IF EXISTS /*i*/iwl_prefix;
-- Recreates the iwl_prefix for the iwlinks table
--
DROP INDEX IF EXISTS /*i*/iwl_prefix;
-- Patch that introduces fulltext search capabilities to SQLite schema
-- Requires that SQLite must be compiled with FTS3 module (comes with core amalgamation).
-- See http://sqlite.org/fts3.html for details of syntax.
-- Patch that introduces fulltext search capabilities to SQLite schema
-- Requires that SQLite must be compiled with FTS3 module (comes with core amalgamation).
-- See http://sqlite.org/fts3.html for details of syntax.
--- Will fail if FTS3 is not present,
+-- Will fail if FTS3 is not present,
DROP TABLE IF EXISTS /*_*/searchindex;
CREATE VIRTUAL TABLE /*_*/searchindex USING FTS3(
-- Key to page_id
DROP TABLE IF EXISTS /*_*/searchindex;
CREATE VIRTUAL TABLE /*_*/searchindex USING FTS3(
-- Key to page_id
-- Munged version of title
si_title,
-- Munged version of title
si_title,
-- Munged version of body text
si_text
);
-- Munged version of body text
si_text
);
-- Munged version of title
si_title TEXT,
-- Munged version of title
si_title TEXT,
-- Munged version of body text
si_text TEXT
);
-- Munged version of body text
si_text TEXT
);
fi
if [ -z $3 ]; then
table=blobs
fi
if [ -z $3 ]; then
table=blobs
table=$3
fi
echo "CREATE DATABASE $2" | mysql -u wikiadmin -p`wikiadmin_pass` -h $1 && \
sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin -p`wikiadmin_pass` -h $1 $2
table=$3
fi
echo "CREATE DATABASE $2" | mysql -u wikiadmin -p`wikiadmin_pass` -h $1 && \
sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin -p`wikiadmin_pass` -h $1 $2
$out->addModuleStyles( 'mediawiki.legacy.oldshared' );
$out->addModuleStyles( 'skins.cologneblue' );
}
$out->addModuleStyles( 'mediawiki.legacy.oldshared' );
$out->addModuleStyles( 'skins.cologneblue' );
}
/**
* Override langlink formatting behavior not to uppercase the language names.
* See otherLanguages() in CologneBlueTemplate.
/**
* Override langlink formatting behavior not to uppercase the language names.
* See otherLanguages() in CologneBlueTemplate.
$this->printTrail();
echo "\n</body></html>";
}
$this->printTrail();
echo "\n</body></html>";
}
/**
* Language/charset variant links for classic-style skins
/**
* Language/charset variant links for classic-style skins
return $this->getSkin()->getLanguage()->pipeList( $s );
}
return $this->getSkin()->getLanguage()->pipeList( $s );
}
// @fixed
function otherLanguages() {
global $wgHideInterlanguageLinks;
// @fixed
function otherLanguages() {
global $wgHideInterlanguageLinks;
function pageTitleLinks() {
$s = array();
$footlinks = $this->getFooterLinks();
function pageTitleLinks() {
$s = array();
$footlinks = $this->getFooterLinks();
foreach ( $footlinks['places'] as $item ) {
$s[] = $this->data[$item];
}
foreach ( $footlinks['places'] as $item ) {
$s[] = $this->data[$item];
}
return $this->getSkin()->getLanguage()->pipeList( $s );
}
return $this->getSkin()->getLanguage()->pipeList( $s );
}
* @fixed
*/
function beforeContent() {
* @fixed
*/
function beforeContent() {
</a>
</p>
<p id="sitesub"><?php echo wfMessage( 'sitesubtitle' )->escaped() ?></p>
</a>
</p>
<p id="sitesub"><?php echo wfMessage( 'sitesubtitle' )->escaped() ?></p>
<div id="toplinks">
<p id="syslinks"><?php echo $this->sysLinks() ?></p>
<p id="variantlinks"><?php echo $this->variantLinks() ?></p>
<div id="toplinks">
<p id="syslinks"><?php echo $this->sysLinks() ?></p>
<p id="variantlinks"><?php echo $this->variantLinks() ?></p>
<?php
$s = ob_get_contents();
ob_end_clean();
<?php
$s = ob_get_contents();
ob_end_clean();
return $s;
}
/**
* @return string
return $s;
}
/**
* @return string
* @fixed
*/
function afterContent() {
* @fixed
*/
function afterContent() {
// Page-related links
echo $this->bottomLinks();
echo "\n<br />";
// Page-related links
echo $this->bottomLinks();
echo "\n<br />";
// Footer and second searchbox
echo $this->getSkin()->getLanguage()->pipeList( array(
$this->getSkin()->mainPageLink(),
// Footer and second searchbox
echo $this->getSkin()->getLanguage()->pipeList( array(
$this->getSkin()->mainPageLink(),
$this->searchForm( 'footer' )
) );
echo "\n<br />";
$this->searchForm( 'footer' )
) );
echo "\n<br />";
// Standard footer info
$footlinks = $this->getFooterLinks();
if ( $footlinks['info'] ) {
// Standard footer info
$footlinks = $this->getFooterLinks();
if ( $footlinks['info'] ) {
* @fixed
*/
function sysLinks() {
* @fixed
*/
function sysLinks() {
return $this->getSkin()->getLanguage()->pipeList( $s );
}
return $this->getSkin()->getLanguage()->pipeList( $s );
}
/**
* @param $heading string
* @return string
/**
* @param $heading string
* @return string
* @fixed
*/
function menuHead( $heading ) {
* @fixed
*/
function menuHead( $heading ) {
* @access private
*
* @return string
* @access private
*
* @return string
* @fixed
*/
function quickBar(){
$s = "\n<div id='quickbar'>";
$sep = "<br />\n";
* @fixed
*/
function quickBar(){
$s = "\n<div id='quickbar'>";
$sep = "<br />\n";
$plain_bar = $this->data['sidebar'];
$bar = array();
$plain_bar = $this->data['sidebar'];
$bar = array();
// Massage the sidebar
// We want to place SEARCH at the beginning and a lot of stuff before TOOLBOX (or at the end, if it's missing)
$additions_done = false;
while ( !$additions_done ) {
$bar = array(); // Empty it out
// Massage the sidebar
// We want to place SEARCH at the beginning and a lot of stuff before TOOLBOX (or at the end, if it's missing)
$additions_done = false;
while ( !$additions_done ) {
$bar = array(); // Empty it out
// Always display search on top
$bar['SEARCH'] = true;
// Always display search on top
$bar['SEARCH'] = true;
foreach ( $plain_bar as $heading => $links ) {
if ( $heading == 'TOOLBOX' ) {
if( $links !== NULL ) {
// If this is not a toolbox prosthetic we inserted outselves, fill it out
$plain_bar['TOOLBOX'] = $this->getToolbox();
}
foreach ( $plain_bar as $heading => $links ) {
if ( $heading == 'TOOLBOX' ) {
if( $links !== NULL ) {
// If this is not a toolbox prosthetic we inserted outselves, fill it out
$plain_bar['TOOLBOX'] = $this->getToolbox();
}
// "This page" and "Edit" menus
// We need to do some massaging here... we reuse all of the items, except for $...['views']['view'],
// as $...['namespaces']['main'] and $...['namespaces']['talk'] together serve the same purpose.
// "This page" and "Edit" menus
// We need to do some massaging here... we reuse all of the items, except for $...['views']['view'],
// as $...['namespaces']['main'] and $...['namespaces']['talk'] together serve the same purpose.
);
$bar['qbedit'] = $qbedit;
$bar['qbpageoptions'] = $qbpageoptions;
);
$bar['qbedit'] = $qbedit;
$bar['qbpageoptions'] = $qbpageoptions;
// Personal tools ("My pages")
$bar['qbmyoptions'] = $this->getPersonalTools();
foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
$bar['qbmyoptions'][$key] = false;
}
// Personal tools ("My pages")
$bar['qbmyoptions'] = $this->getPersonalTools();
foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
$bar['qbmyoptions'][$key] = false;
}
$additions_done = true;
}
$additions_done = true;
}
// Re-insert current heading, unless it's SEARCH
if ( $heading != 'SEARCH' ) {
$bar[$heading] = $plain_bar[$heading];
}
}
// Re-insert current heading, unless it's SEARCH
if ( $heading != 'SEARCH' ) {
$bar[$heading] = $plain_bar[$heading];
}
}
// If TOOLBOX is missing, $additions_done is still false
if ( !$additions_done ) {
$plain_bar['TOOLBOX'] = false;
}
}
// If TOOLBOX is missing, $additions_done is still false
if ( !$additions_done ) {
$plain_bar['TOOLBOX'] = false;
}
}
foreach ( $bar as $heading => $links ) {
if ( $heading == 'SEARCH' ) {
$s .= $this->menuHead( wfMessage( 'qbfind' )->text() );
foreach ( $bar as $heading => $links ) {
if ( $heading == 'SEARCH' ) {
$s .= $this->menuHead( wfMessage( 'qbfind' )->text() );
if ( $heading == 'TOOLBOX' ) {
$heading = 'toolbox';
}
if ( $heading == 'TOOLBOX' ) {
$heading = 'toolbox';
}
$headingMsg = wfMessage( $heading );
$any_link = false;
$t = $this->menuHead( $headingMsg->exists() ? $headingMsg->text() : $heading );
$headingMsg = wfMessage( $heading );
$any_link = false;
$t = $this->menuHead( $headingMsg->exists() ? $headingMsg->text() : $heading );
foreach ( $links as $key => $link ) {
// Can be empty due to rampant sidebar massaging we're doing above
if ( $link ) {
foreach ( $links as $key => $link ) {
// Can be empty due to rampant sidebar massaging we're doing above
if ( $link ) {
$t .= $this->makeListItem( $key, $link, array( 'tag' => 'span' ) ) . $sep;
}
}
$t .= $this->makeListItem( $key, $link, array( 'tag' => 'span' ) ) . $sep;
}
}
if ( $any_link ) {
$s .= $t;
}
if ( $any_link ) {
$s .= $t;
}
/**
* @param $label string
* @return string
/**
* @param $label string
* @return string
* @fixed
*/
function searchForm( $which ) {
* @fixed
*/
function searchForm( $which ) {
/**
* Adds classes to the body element.
/**
* Adds classes to the body element.
* @param $out OutputPage object
* @param &$bodyAttrs Array of attributes that will be set on the body element
*/
* @param $out OutputPage object
* @param &$bodyAttrs Array of attributes that will be set on the body element
*/