while ( '' != $text ) {
if($tag==STRIP_COMMENTS) {
- $p = preg_split( '/<!--/i', $text, 2 );
+ $p = preg_split( '/<!--/', $text, 2 );
} else {
$p = preg_split( "/<\\s*$tag\\s*>/i", $text, 2 );
}
}
else if ( count ( $td ) == 0 ) { } # Don't do any of the following
else if ( '|}' == substr ( $x , 0 , 2 ) ) {
- $z = "</table>\n" ;
+ $z = "</table>" . substr ( $x , 2) . "\n";
$l = array_pop ( $ltd ) ;
if ( array_pop ( $tr ) ) $z = '</tr>' . $z ;
if ( array_pop ( $td ) ) $z = '</'.$l.'>' . $z ;
# Not in the link cache, add it to the query
if ( !isset( $current ) ) {
$current = $val;
- $tables = $page;
- $join = '';
$query = "SELECT page_id, page_namespace, page_title";
if ( $threshold > 0 ) {
- $textTable = $dbr->tableName( 'text' );
- $query .= ', LENGTH(old_text) AS page_len, page_is_redirect';
- $tables .= ", $textTable";
- $join = 'page_latest=old_id AND';
+ $query .= ', page_len, page_is_redirect';
}
- $query .= " FROM $tables WHERE $join (page_namespace=$val AND page_title IN(";
+ $query .= " FROM $page WHERE (page_namespace=$val AND page_title IN(";
} elseif ( $current != $val ) {
$current = $val;
$query .= ")) OR (page_namespace=$val AND page_title IN(";