&$rev_id = null, &$log_id = null, $params = null, RecentChange $rc = null,
User $user = null
) {
-
$tagsToAdd = array_filter( (array)$tagsToAdd ); // Make sure we're submitting all tags...
$tagsToRemove = array_filter( (array)$tagsToRemove );
// update the tag_summary row
$prevTags = [];
if ( !self::updateTagSummaryRow( $tagsToAdd, $tagsToRemove, $rc_id, $rev_id,
- $log_id, $prevTags ) ) {
-
+ $log_id, $prevTags )
+ ) {
// nothing to do
return [ [], [], $prevTags ];
}
* @since 1.25
*/
protected static function updateTagSummaryRow( &$tagsToAdd, &$tagsToRemove,
- $rc_id, $rev_id, $log_id, &$prevTags = [] ) {
-
+ $rc_id, $rev_id, $log_id, &$prevTags = []
+ ) {
$dbw = wfGetDB( DB_MASTER );
$tsConds = array_filter( [
* @return Status
* @since 1.25
*/
- public static function canAddTagsAccompanyingChange( array $tags,
- User $user = null ) {
-
+ public static function canAddTagsAccompanyingChange( array $tags, User $user = null ) {
if ( !is_null( $user ) ) {
if ( !$user->isAllowed( 'applychangetags' ) ) {
return Status::newFatal( 'tags-apply-no-permission' );
public static function addTagsAccompanyingChangeWithChecks(
array $tags, $rc_id, $rev_id, $log_id, $params, User $user
) {
-
// are we allowed to do this?
$result = self::canAddTagsAccompanyingChange( $tags, $user );
if ( !$result->isOK() ) {
* @since 1.25
*/
public static function canUpdateTags( array $tagsToAdd, array $tagsToRemove,
- User $user = null ) {
-
+ User $user = null
+ ) {
if ( !is_null( $user ) ) {
if ( !$user->isAllowed( 'changetags' ) ) {
return Status::newFatal( 'tags-update-no-permission' );
* @since 1.25
*/
public static function updateTagsWithChecks( $tagsToAdd, $tagsToRemove,
- $rc_id, $rev_id, $log_id, $params, $reason, User $user ) {
-
+ $rc_id, $rev_id, $log_id, $params, $reason, User $user
+ ) {
if ( is_null( $tagsToAdd ) ) {
$tagsToAdd = [];
}
* @since 1.25
*/
protected static function logTagManagementAction( $action, $tag, $reason,
- User $user, $tagCount = null, array $logEntryTags = [] ) {
-
+ User $user, $tagCount = null, array $logEntryTags = []
+ ) {
$dbw = wfGetDB( DB_MASTER );
$logEntry = new ManualLogEntry( 'managetags', $action );
* @since 1.25
*/
public static function activateTagWithChecks( $tag, $reason, User $user,
- $ignoreWarnings = false, array $logEntryTags = [] ) {
-
+ $ignoreWarnings = false, array $logEntryTags = []
+ ) {
// are we allowed to do this?
$result = self::canActivateTag( $tag, $user );
if ( $ignoreWarnings ? !$result->isOK() : !$result->isGood() ) {
* @since 1.25
*/
public static function deactivateTagWithChecks( $tag, $reason, User $user,
- $ignoreWarnings = false, array $logEntryTags = [] ) {
-
+ $ignoreWarnings = false, array $logEntryTags = []
+ ) {
// are we allowed to do this?
$result = self::canDeactivateTag( $tag, $user );
if ( $ignoreWarnings ? !$result->isOK() : !$result->isGood() ) {
* @since 1.25
*/
public static function createTagWithChecks( $tag, $reason, User $user,
- $ignoreWarnings = false, array $logEntryTags = [] ) {
-
+ $ignoreWarnings = false, array $logEntryTags = []
+ ) {
// are we allowed to do this?
$result = self::canCreateTag( $tag, $user );
if ( $ignoreWarnings ? !$result->isOK() : !$result->isGood() ) {
* @since 1.25
*/
public static function deleteTagWithChecks( $tag, $reason, User $user,
- $ignoreWarnings = false, array $logEntryTags = [] ) {
-
+ $ignoreWarnings = false, array $logEntryTags = []
+ ) {
// are we allowed to do this?
$result = self::canDeleteTag( $tag, $user );
if ( $ignoreWarnings ? !$result->isOK() : !$result->isGood() ) {