$hasmatch = preg_match( "/^ *([=]{1,6})(.*?)(\\1) *\\n/i", $this->textbox1, $matches );
# we can't deal with anchors, includes, html etc in the header for now,
# headline would need to be parsed to improve this
- if ( $hasmatch and strlen( $matches[2] ) > 0 ) {
+ if ( $hasmatch && strlen( $matches[2] ) > 0 ) {
$sectionanchor = $wgParser->guessLegacySectionNameFromWikiText( $matches[2] );
}
}
return $comment;
}
+ /**
+ * @var Title
+ */
static $autocommentTitle;
static $autocommentLocal;
}
/**
- * Load the data for this user object from another user object.
+ * Load the data for this user object from another user object.
+ *
+ * @param $user User
*/
protected function loadFromUserObject( $user ) {
$user->load();
* comment (you can use __METHOD__ or add some extra info)
* @param $tempIgnore Boolean: Whether to avoid throwing an exception on errors...
* maybe best to catch the exception instead?
- * @return boolean or ResultWrapper. true for a successful write query, ResultWrapper object for a successful read query,
+ * @return boolean|ResultWrapper. true for a successful write query, ResultWrapper object for a successful read query,
* or false on failure if $tempIgnore set
* @throws DBQueryError Thrown when the database returns an error of any kind
*/
return $sql;
}
+ /**
+ * @param $b
+ * @return Blob
+ */
function encodeBlob( $b ) {
return new Blob( pg_escape_bytea( $this->mConn, $b ) );
}
return pg_escape_string( $this->mConn, $s );
}
+ /**
+ * @param $s null|bool|Blob
+ * @return int|string
+ */
function addQuotes( $s ) {
if ( is_null( $s ) ) {
return 'NULL';
* @param $srcPath string File system path of the source file
* @param $archiveName string Full archive name of the file, in the form
* $timestamp!$filename, where $filename must match $this->getName()
+ *
+ * @return FileRepoStatus
*/
function uploadOld( $srcPath, $archiveName, $timestamp, $comment, $user, $flags = 0 ) {
$this->lock();
/**
* ParserOptions are constructed before we determined the language, so fix it
+ *
+ * @param $lang Language
*/
public function setParserLanguage( $lang ) {
$this->parserOptions->setTargetLanguage( $lang );
/**
* Output an error or warning box using a Status object.
+ *
+ * @param $status Status
*/
public function showStatusBox( $status ) {
if( !$status->isGood() ) {
$this->endForm();
}
+ /**
+ * @return string
+ */
public function getCCPartnerUrl() {
global $wgServer;
$exitUrl = $wgServer . $this->parent->getUrl( array(
}
}
+ /**
+ * @param $step
+ * @param $status Status
+ */
public function endStage( $step, $status ) {
if ( $step == 'extension-tables' ) {
$this->endLiveBox();
* @ingroup SpecialPage
*/
class SpecialUndelete extends SpecialPage {
- var $mAction, $mTarget, $mTimestamp, $mRestore, $mInvert, $mTargetObj, $mFile;
+ var $mAction, $mTarget, $mTimestamp, $mRestore, $mInvert, $mFile;
var $mTargetTimestamp, $mAllowed, $mCanView, $mComment, $mToken, $mRequest;
+ /**
+ * @var Title
+ */
+ var $mTargetObj;
+
function __construct( $request = null ) {
parent::__construct( 'Undelete', 'deletedhistory' );
);
}
- // Generic list of deleted pages
+ /**
+ * Generic list of deleted pages
+ *
+ * @param $result ResultWrapper
+ * @return bool
+ */
private function showList( $result ) {
global $wgLang, $wgUser, $wgOut;