* @deprecated since 1.21, getContent() should be used instead.
*/
public function getText( $audience = Revision::FOR_PUBLIC, User $user = null ) {
- ContentHandler::deprecated( __METHOD__, '1.21' );
+ wfDeprecated( __METHOD__, '1.21' );
$this->loadLastEdit();
if ( $this->mLastRevision ) {
* @deprecated since 1.21: use doEditContent() instead.
*/
public function doEdit( $text, $summary, $flags = 0, $baseRevId = false, $user = null ) {
- ContentHandler::deprecated( __METHOD__, '1.21' );
+ wfDeprecated( __METHOD__, '1.21' );
$content = ContentHandler::makeContent( $text, $this->getTitle() );
* @param bool $u2 Unused
* @param array|string &$error Array of errors to append to
* @param User $user The deleting user
+ * @param array $tags Tags to apply to the deletion action
* @return Status Status object; if successful, $status->value is the log_id of the
* deletion log entry. If the page couldn't be deleted because it wasn't
* found, $status is a non-fatal 'cannotdelete' error
*/
public function doDeleteArticleReal(
- $reason, $suppress = false, $u1 = null, $u2 = null, &$error = '', User $user = null
+ $reason, $suppress = false, $u1 = null, $u2 = null, &$error = '', User $user = null,
+ $tags = []
) {
global $wgUser, $wgContentHandlerUseDB;
$logEntry->setPerformer( $user );
$logEntry->setTarget( $logTitle );
$logEntry->setComment( $reason );
+ $logEntry->setTags( $tags );
$logid = $logEntry->insert();
$dbw->onTransactionPreCommitOrIdle(
$dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select( 'categorylinks',
[ 'cl_to AS page_title, ' . NS_CATEGORY . ' AS page_namespace' ],
- // Have to do that since DatabaseBase::fieldNamesWithAlias treats numeric indexes
+ // Have to do that since Database::fieldNamesWithAlias treats numeric indexes
// as not being aliases, and NS_CATEGORY is numeric
[ 'cl_from' => $id ],
__METHOD__ );
// NOTE: stub for backwards-compatibility. assumes the given text is
// wikitext. will break horribly if it isn't.
- ContentHandler::deprecated( __METHOD__, '1.21' );
+ wfDeprecated( __METHOD__, '1.21' );
$handler = ContentHandler::getForModelID( CONTENT_MODEL_WIKITEXT );
$oldContent = is_null( $oldtext ) ? null : $handler->unserializeContent( $oldtext );