function htmlFooter() {
return "</body></html>";
}
-
+
/**
* headers handled by subclass?
*/
* - sslVerifyCert (curl only) Verify SSL certificate
* - caInfo (curl only) Provide CA information
* - maxRedirects Maximum number of redirects to follow (defaults to 5)
- * - followRedirects Whether to follow redirects (defaults to false).
+ * - followRedirects Whether to follow redirects (defaults to false).
* Note: this should only be used when the target URL is trusted,
* to avoid attacks on intranet services accessible by HTTP.
* @return Mixed: (bool)false on failure or a string on success
/**
* Set the parameters of the request
-
+
* @param $args Array
* @todo overload the args param
*/
}
/**
- * Returns true if the backend can follow redirects. Overridden by the
+ * Returns true if the backend can follow redirects. Overridden by the
* child classes.
*/
public function canFollowRedirects() {
if ( isset( $this->sslVerifyHost ) ) {
$this->curlOptions[CURLOPT_SSL_VERIFYHOST] = $this->sslVerifyHost;
}
-
+
if ( isset( $this->sslVerifyCert ) ) {
$this->curlOptions[CURLOPT_SSL_VERIFYPEER] = $this->sslVerifyCert;
}
if ( ! @curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, true ) ) {
wfDebug( __METHOD__.": Couldn't set CURLOPT_FOLLOWLOCATION. " .
"Probably safe_mode or open_basedir is set.\n");
- // Continue the processing. If it were in curl_setopt_array,
+ // Continue the processing. If it were in curl_setopt_array,
// processing would have halted on its entry
}
}
wfProfileOut( __METHOD__ );
}
-
+
/**
* Get the query to generate a dynamic stylesheet
- *
+ *
* @return array
*/
public static function getDynamicStylesheetQuery() {
* Currently only used for MediaWiki:Sidebar (but may be used by Extensions)
*
* This is just a wrapper around addToSidebarPlain() for backwards compatibility
- *
+ *
* @param &$bar array
* @param $message String
*/
function addToSidebar( &$bar, $message ) {
$this->addToSidebarPlain( $bar, wfMsgForContent( $message ) );
}
-
+
/**
* Add content from plain text
* @since 1.17
);
} else if ( (substr($line, 0, 2) == '{{') && (substr($line, -2) == '}}') ) {
global $wgParser, $wgTitle;
-
+
$line = substr($line, 2, strlen($line) - 4 );
-
+
if (is_null($wgParser->mOptions))
$wgParser->mOptions = new ParserOptions();
-
+
$wgParser->mOptions->setEditSection(false);
$wikiBar[$heading] = $wgParser->parse( wfMsgForContentNoTrans( $line ) , $wgTitle, $wgParser->mOptions )->getText();
} else {
}
}
}
-
+
if ( count($wikiBar) > 0 )
$bar = array_merge($bar, $wikiBar);
-
+
return $bar;
}
/**
* Returns true if this database requires that SELECT DISTINCT queries require that all
- ORDER BY expressions occur in the SELECT list per the SQL92 standard
+ ORDER BY expressions occur in the SELECT list per the SQL92 standard
*/
function standardSelectDistinct() {
return true;
* @return Database replication lag in seconds
*/
function getLag() {
- return $this->mFakeSlaveLag;
+ return $this->mFakeSlaveLag;
}
/**
throw $e;
}
}
-
+
fclose( $fp );
return $error;
}
<small>$outofdate</small></div>
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/search" id="googlesearch">
- <input type="hidden" name="domains" value="$wgServer" />
- <input type="hidden" name="num" value="50" />
- <input type="hidden" name="ie" value="$wgInputEncoding" />
- <input type="hidden" name="oe" value="$wgInputEncoding" />
+ <input type="hidden" name="domains" value="$wgServer" />
+ <input type="hidden" name="num" value="50" />
+ <input type="hidden" name="ie" value="$wgInputEncoding" />
+ <input type="hidden" name="oe" value="$wgInputEncoding" />
- <input type="text" name="q" size="31" maxlength="255" value="$search" />
- <input type="submit" name="btnG" value="$googlesearch" />
+ <input type="text" name="q" size="31" maxlength="255" value="$search" />
+ <input type="submit" name="btnG" value="$googlesearch" />
<div>
- <input type="radio" name="sitesearch" id="gwiki" value="$wgServer" checked="checked" /><label for="gwiki">$wgSitename</label>
- <input type="radio" name="sitesearch" id="gWWW" value="" /><label for="gWWW">WWW</label>
+ <input type="radio" name="sitesearch" id="gwiki" value="$wgServer" checked="checked" /><label for="gwiki">$wgSitename</label>
+ <input type="radio" name="sitesearch" id="gWWW" value="" /><label for="gWWW">WWW</label>
</div>
</form>
<!-- SiteSearch Google -->
$file->loadFromRow( $row );
return $file;
}
-
+
/**
* Create a LocalFile from a SHA-1 key
* Do not call this except from inside a repo class.
return false;
}
}
-
+
/**
* Fields in the image table
*/
}
/**
- * Get the memcached key for the main data for this file, or false if
+ * Get the memcached key for the main data for this file, or false if
* there is no access to the shared cache.
*/
function getCacheKey() {
$opts['ORDER BY'] = "oi_timestamp $order";
$opts['USE INDEX'] = array( 'oldimage' => 'oi_name_timestamp' );
- wfRunHooks( 'LocalFile::getHistory', array( &$this, &$tables, &$fields,
+ wfRunHooks( 'LocalFile::getHistory', array( &$this, &$tables, &$fields,
&$conds, &$opts, &$join_conds ) );
$res = $dbr->select( $tables, $fields, $conds, __METHOD__, $opts, $join_conds );
{
if( is_null( $user ) ) {
global $wgUser;
- $user = $wgUser;
+ $user = $wgUser;
}
$dbw = $this->repo->getMasterDB();
$nullRevision = Revision::newNullRevision( $dbw, $descTitle->getArticleId(),
$log->getRcComment(), false );
$nullRevision->insertOn( $dbw );
-
+
wfRunHooks( 'NewRevisionFromEditComplete', array( $article, $nullRevision, $latest, $user ) );
$article->updateRevisionOn( $dbw, $nullRevision );
// Purge the new image
$this->purgeEverything();
}
-
+
return $status;
}
$dbw = $this->db;
// Update current image
- $dbw->update(
+ $dbw->update(
'image',
array( 'img_name' => $this->newName ),
array( 'img_name' => $this->oldName ),
/**
* Generate triplets for FSRepo::storeBatch().
- */
+ */
function getMoveTriplets() {
$moves = array_merge( array( $this->cur ), $this->olds );
$triplets = array(); // The format is: (srcUrl, destZone, destUrl)
/**
* Removes non-existent files from move batch.
- */
+ */
function removeNonexistentFiles( $triplets ) {
$files = array();
foreach( $triplets as $file )
/**
* Constructor.
- *
+ *
* @param $siteName
* @param $admin
* @param $option Array
}
$this->setVar( 'wgSitename', $siteName );
-
+
if ( $admin ) {
$this->setVar( '_AdminName', $admin );
}
public function endStage( $step, $status ) {
$warnings = $status->getWarningsArray();
-
+
if ( !$status->isOk() ) {
$this->showStatusMessage( $status );
echo "\n";
wfMsg( 'word-separator' ) );
}
}
-
+
$this->showMessage( wfMsg( 'config-install-step-done' ) ."\n");
}
$db->query( "DROP TABLE IF EXISTS $newTableName" );
} elseif ( in_array( $wgDBtype, array( 'postgres', 'oracle' ) ) ) {
/* DROPs wouldn't work due to Foreign Key Constraints (bug 14990, r58669)
- * Use "DROP TABLE IF EXISTS $newTableName CASCADE" for postgres? That
+ * Use "DROP TABLE IF EXISTS $newTableName CASCADE" for postgres? That
* syntax would also work for mysql.
*/
} elseif ( $db->tableExists( $tbl ) ) {
$wgUser = User::newFromId( "admin" );
$wgUser->setId( 1 );
$wgUser->setOption( 'variant', 'tg-latn' ); // The user's data is ignored
- // because the variant is set in the URL.
+ // because the variant is set in the URL.
$this->assertEquals( 'tg', $this->lc->getPreferredVariant( true, false ) );
$this->assertEquals( 'tg', $this->lc->getPreferredVariant( true, true ) );
}
function setUp() {
global $wgParser, $wgParserConf, $IP, $messageMemc, $wgMemc, $wgDeferredUpdateList,
- $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
- $wgMessageCache, $wgUseDatabaseMessages, $wgMsgCacheExpiry, $parserMemc,
- $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
- $wgThumbnailScriptPath, $wgScriptPath,
- $wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath;
+ $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
+ $wgMessageCache, $wgUseDatabaseMessages, $wgMsgCacheExpiry, $parserMemc,
+ $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
+ $wgThumbnailScriptPath, $wgScriptPath,
+ $wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath;
$wgScript = '/index.php';
$wgScriptPath = '/';
return $dir;
}
- public static function suite()
- {
- return new UploadFromUrlTestSuite( 'UploadFromUrlTest' );
- }
+ public static function suite()
+ {
+ return new UploadFromUrlTestSuite( 'UploadFromUrlTest' );
+ }
}
if ( $value != true ) {
throw new Testing_Selenium_Exception( "Login Failed" );
}
-
+
}
public static function getInstance() {
public function log( $message ) {
$this->logger->write( $message );
}
-
+
public function setUrl( $url ) {
self::$url = $url;
}
if ( $this->isSetUp ) {
return;
}
- $this->isSetUp = true;
+ $this->isSetUp = true;
$this->selenium = Selenium::getInstance();
$this->selenium->start();
$this->login();