global $wgOut;
$oldid = $this->getOldID();
- $useParserCache = $this->useParserCache( $oldid );
$parserOptions = $this->getParserOptions();
# Render printable version, use printable version cache
# Extract fields from DB into the function scope (rc_xxxx variables)
// FIXME: Would be good to replace this extract() call with something
// that explicitly initializes variables.
- $classes = array(); // TODO implement
+ // TODO implement
extract( $rcObj->mAttribs );
$query['curid'] = $rc_cur_id;
switch ( $state ) {
case 'file':
- $token = $this->expect( T_OPEN_TAG );
+ $this->expect( T_OPEN_TAG );
$token = $this->skipSpace();
if ( $token->isEnd() ) {
break 2;
$nameWithTags = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $name ) );
$this->mPagetitle = $nameWithTags;
- $taction = $this->getPageTitleActionText();
- if( !empty( $taction ) ) {
- $name .= ' - '.$taction;
- }
-
# change "<i>foo&bar</i>" to "foo&bar"
$this->setHTMLTitle( wfMsg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) ) );
}
$join_conds );
// We must adjust for offset
- if ( isset( $options['LIMIT'] ) ) {
- if ( isset ( $options['OFFSET'] ) ) {
- $limit = $options['LIMIT'];
- $offset = $options['OFFSET'];
- }
+ if ( isset( $options['LIMIT'] ) && isset ( $options['OFFSET'] ) ) {
+ $limit = $options['LIMIT'];
+ $offset = $options['OFFSET'];
}
// DB2 does not have a proper num_rows() function yet, so we must emulate
*/
function nextSequenceValue( $seqName ) {
if ( !$this->tableExists( 'sequence_' . $seqName ) ) {
- $ret = sqlsrv_query( $this->mConn, "CREATE TABLE [sequence_$seqName] (id INT NOT NULL IDENTITY PRIMARY KEY, junk varchar(10) NULL)" );
+ sqlsrv_query( $this->mConn, "CREATE TABLE [sequence_$seqName] (id INT NOT NULL IDENTITY PRIMARY KEY, junk varchar(10) NULL)" );
}
- $ret = sqlsrv_query( $this->mConn, "INSERT INTO [sequence_$seqName] (junk) VALUES ('')" );
+ sqlsrv_query( $this->mConn, "INSERT INTO [sequence_$seqName] (junk) VALUES ('')" );
$ret = sqlsrv_query( $this->mConn, "SELECT TOP 1 id FROM [sequence_$seqName] ORDER BY id DESC" );
$row = sqlsrv_fetch_array( $ret, SQLSRV_FETCH_ASSOC );// KEEP ASSOC THERE, weird weird bug dealing with the return value if you don't
}
$matches = $ymatches[$line];
reset($matches);
- while ( list( $junk, $y ) = each( $matches ) ) {
+ while ( list( , $y ) = each( $matches ) ) {
if ( empty( $this->in_seq[$y] ) ) {
$k = $this->_lcs_pos( $y );
assert( $k > 0 );
break;
}
}
- while (list ( /* $junk */, $y) = each($matches)) {
+ while (list ( , $y) = each($matches)) {
if ($y > $this->seq[$k-1]) {
assert($y < $this->seq[$k]);
// Optimization: this is a common case:
* Set this to false to show a creation checkbox.
*/
public function getWebUserBox( $noCreateMsg = false ) {
- $name = $this->getName();
$s = Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
$this->getCheckBox(
if ( !$create ) {
// Test the web account
try {
- $webConn = new Database(
+ new Database(
$this->getVar( 'wgDBserver' ),
$this->getVar( 'wgDBuser' ),
$this->getVar( 'wgDBpassword' ),
$prev_namespace = $row->cur_namespace;
}
$sql = "DELETE FROM $cur WHERE cur_id IN ( " . join( ',', $deleteId ) . ')';
- $rows = $this->db->query( $sql, __METHOD__ );
+ $this->db->query( $sql, __METHOD__ );
$this->output( wfTimestamp( TS_DB ) );
$this->output( "......<b>Deleted</b> " . $this->db->affectedRows() . " records.\n" );
}
}
public function getWebUserBox( $noCreateMsg = false ) {
- $name = $this->getName();
$this->parent->setVar( '_SameAccount', false );
$this->parent->setVar( '_CreateDBAccount', true );
$this->parent->setVar( 'wgDBname', '' );
}
function getMetadata( $file, $filename ) {
- $metadata = array();
try {
$metadata = SVGMetadataExtractor::getMetadata( $filename );
} catch( Exception $e ) {
$current = null;
foreach ( $this->internals as $ns => $entries ) {
foreach ( $entries as $index => $entry ) {
- $key = "$ns:$index";
$title = $entry['title'];
$pdbk = $entry['pdbk'];