global $wgOut, $wgUser;
global $wgLang, $wgParser, $wgTitle;
global $wgAllowAnonymousMinor;
+ global $wgWhitelistEdit;
$sk = $wgUser->getSkin();
$isConflict = false;
$this->mPreFilled = true;
if ( $wgEnablePersistentLC ) {
- $this->saveToLinkscc( $id, $dbkeyfrom );
+ $this->saveToLinkscc( $id );
}
wfProfileOut( $fname );
}
}
- /* private */ function saveToLinkscc( $pid, $dbkeyfrom ){
+ /* private */ function saveToLinkscc( $pid ){
global $wgCompressedPersistentLC;
if( $wgCompressedPersistentLC and function_exists( "gzcompress" ) ) {
$ser = wfStrencode( gzcompress( serialize( $this ), 3 ));
$state["em"] = FALSE;
$state["strong"] = FALSE;
$tagIsOpen = FALSE;
-
+ $threeopen = false;
+
# The tokenizer splits the text into tokens and returns them one by one.
# Every call to the tokenizer returns a new token.
while ( $token = $tokenizer->nextToken() )
# that is done by showResults()
function powersearch()
{
- global $wgUser, $wgOut, $wgLang, $wgTitle;
+ global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest;
- $search = $_REQUEST['search'];
- $searchx = $_REQUEST['searchx'];
- $listredirs = $_REQUEST['redirs'];
+ $search = $wgRequest->getText( 'search' );
+ $searchx = $wgRequest->getVal( 'searchx' );
+ $listredirs = $wgRequest->getVal( 'redirs' );
$ret = wfMsg("powersearchtext"); # Text to be returned
$tempText = ""; # Temporary text, for substitution into $ret
$spanabs = ceil($slen * (1 + $span)) - $slen;
# print "Word: $sstr, len = $slen, range = [$min, $max], tolerance_count = $tolerance_count<BR>\n";
$result = array();
+ $cnt = 0;
for( $i=0; $i <= $spanabs; $i++ ){
$titles = SearchEngine::getTitlesByLength( $slen + $i, $namespace );
- if( $i != 0)
+ if( $i != 0) {
$titles = array_merge($titles, SearchEngine::getTitlesByLength( $slen - $i, $namespace ) );
+ }
foreach($titles as $t){
$d = levenshtein($sstr, $t);
if($d < $tolerance_count)
$result[] = array($d, $t);
$cnt++;
}
- }
+ }
usort($result, "SearchEngine_pcmp");
return $result;
}
function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor )
{
- global $wgLang, $wgOut, $wgUser, $target;
+ global $wgLang, $wgOut, $wgUser, $wgRequest, $target;
$page = Title::makeName( $ns, $t );
$link = $sk->makeKnownLink( $page, "" );
$topmarktext = $topmark ? wfMsg ( "uctop" ) : "";
$sysop = $wgUser->isSysop();
- $extraRollback = $_REQUEST['bot'] ? '&bot=1' : '';
+ $extraRollback = $wgRequest->getBool( "bot" ) ? '&bot=1' : '';
if($sysop && $topmark ) {
$topmarktext .= " [". $sk->makeKnownLink( $page,
wfMsg( "rollbacklink" ),
}
$d = $wgLang->timeanddate( $ts, true );
- if ($isminor) {
- $mflag = "<strong>" . wfMsg( "minoreditletter" ) . "</strong> ";
- }
+ if ($isminor) {
+ $mflag = "<strong>" . wfMsg( "minoreditletter" ) . "</strong> ";
+ } else {
+ $mflag = "";
+ }
$wgOut->addHTML( "<li>{$d} {$mflag}{$link} {$comment}{$topmarktext}</li>\n" );
}
global $wgUseCopyrightUpload , $wpUploadCopyStatus , $wpUploadSource ;
global $wgCheckFileExtensions, $wgStrictFileExtensions;
global $wgFileExtensions, $wgFileBlacklist;
+ global $wgRequest;
if ( $wgUseCopyrightUpload ) {
$wpUploadAffirm = 1;
$wpUploadSize = $HTTP_POST_FILES['wpUploadFile']['size'];
}
$prev = error_reporting( E_ALL & ~( E_NOTICE | E_WARNING ) );
- $oname = $wgRequest->getVal( $HTTP_POST_FILES['wpUploadFile'], 'name' );
+ $oname = $wgRequest->getGPCVal( $HTTP_POST_FILES['wpUploadFile'], 'name' );
error_reporting( $prev );
if ( "" != $oname ) {