if ( wfRunHooks( 'AbortEmailNotification', array($editor, $title) ) ) {
# @todo FIXME: This would be better as an extension hook
$enotif = new EmailNotification();
- $status = $enotif->notifyOnPageChange( $editor, $title,
+ $enotif->notifyOnPageChange( $editor, $title,
$this->mAttribs['rc_timestamp'],
$this->mAttribs['rc_comment'],
$this->mAttribs['rc_minor'],
if ( !$oldfile->exists() || !$oldfile->isLocal() || $oldfile->getRedirected() ) {
return array( array( 'nodeleteablefile' ) );
}
- } else {
- $oldfile = false;
}
if ( is_null( $reason ) ) { // Log and RC don't like null reasons
$args = array_merge( array( $params, 'entirewatchlist' ), array_keys( $pageSet->getAllowedParams() ) );
call_user_func_array( array( $this, 'requireOnlyOneParameter' ), $args );
- $db = $this->getDB();
$dbw = $this->getDB( DB_MASTER );
$timestamp = null;
}
// Now, put the valid titles into the result
- $pages = array();
foreach ( $pageSet->getTitles() as $title ) {
$ns = $title->getNamespace();
$dbkey = $title->getDBkey();
* @return array
*/
protected function getApiWarnings() {
- $warnings = array();
-
$warnings = $this->mUpload->checkWarnings();
return $this->transformWarnings( $warnings );
* Make sure remaining locks get cleared for sanity
*/
function __destruct() {
- foreach ( $this->conns as $lockDb => $db ) {
+ foreach ( $this->conns as $db ) {
if ( $db->trxLevel() ) { // in transaction
try {
$db->rollback( __METHOD__ ); // finish transaction and kill any rows
public function getIRCActionText() {
$this->plaintext = true;
$this->irctext = true;
- $text = $this->getActionText();
$entry = $this->entry;
$parameters = $entry->getParameters();
// or {{filepath|300px}}, {{filepath|200x300px}}, {{filepath|nowiki|200x300px}}, {{filepath|200x300px|nowiki}}
public static function filepath( $parser, $name='', $argA='', $argB='' ) {
$file = wfFindFile( $name );
- $isNowiki = false;
if( $argA == 'nowiki' ) {
// {{filepath: | option [| size] }}
if ( count( $fields ) > 1 && $count > 30 ) {
$this->toc = Linker::tocIndent();
$tocLength = 0;
- foreach( $fields as $key => $data ) {
+ foreach( $fields as $data ) {
# strip out the 'ns' prefix from the section name:
$ns = substr( $data['section'], 2 );
// Output a copy of this first to chunk 0 location:
$status = $this->outputChunk( $this->mLocalFile->getPath() );
-
+
// Update db table to reflect initial "chunk" state
$this->updateChunkStatus();
return $this->mLocalFile;
$this->mUpload = $webRequestUpload;
// Get the chunk status form the db:
$this->getChunkStatus();
-
+
$metadata = $this->stash->getMetadata( $key );
$this->initializePathInfo( $name,
$this->getRealPath( $metadata['us_path'] ),
false
);
}
-
+
/**
* Append the final chunk and ready file for parent::performUpload()
* @return FileRepoStatus
}
return $status;
}
-
+
/**
* Update the chunk db table with the current status:
*/
__METHOD__
);
}
+
/**
* Get the chunk db state and populate update relevant local values
*/
$this->mVirtualTempPath = $row->us_path;
}
}
+
/**
* Get the current Chunk index
* @return Integer index of the current chunk
}
return 0;
}
-
+
/**
* Gets the current offset in fromt the stashedupload table
* @return Integer current byte offset of the chunk file set
}
return 0;
}
-
+
/**
* Output the chunk to disk
*