Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/113381
Change subject: Remove old CU formatter ...................................................................... Remove old CU formatter https://gerrit.wikimedia.org/r/#/c/113154/ moves all formatters. For some reason, this one was not properly renamed, but added a second time, instead. Change-Id: I8d429a460f75e60df04d0a0802d6e9e134677ab4 --- D includes/CheckUser/Formatter.php 1 file changed, 0 insertions(+), 64 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/81/113381/1 diff --git a/includes/CheckUser/Formatter.php b/includes/CheckUser/Formatter.php deleted file mode 100644 index 1b40666..0000000 --- a/includes/CheckUser/Formatter.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -namespace Flow\CheckUser; - -use CheckUser; -use Html; -use Linker; -use Title; -use Flow\AbstractFormatter; -use Flow\Model\UUID; - -class Formatter extends AbstractFormatter { - - /** - * @param CheckUser $checkUser - * @param object $row - * @return array|null - */ - public function format( CheckUser $checkUser, $row ) { - if ( $row->cuc_type != RC_FLOW || !$row->cuc_comment ) { - return null; - } - - $data = explode( ',', $row->cuc_comment ); - $post = null; - switch( count( $data ) ) { - case 3: - $post = UUID::create( $data[2] ); - // fall-through to 2 parameter case - case 2: - $workflow = UUID::create( $data[1] ); - $action = $data[0]; - break; - default: - wfDebugLog( __CLASS__, __FUNCTION__ . ': Invalid number of parameters received from cuc_comment. Expected 2 or 3 but received ' . count( $data ) ); - return null; - } - - $title = Title::makeTitle( $row->cuc_namespace, $row->cuc_title ); - $links = $this->buildActionLinks( $title, $action, $workflow, $post ); - if ( $links === false ) { - return null; - } - - $result = array(); - $ctx = $checkUser->getContext(); - foreach ( $links as $key => $link ) { - list( $url, $message ) = $link; - $text = $message->setContext( $ctx )->text(); - $result[$key] = $checkUser->msg( 'parentheses' ) - ->rawParams( Html::element( - 'a', - array( - 'href' => $url, - 'title' => $text, - ), - $text - ) ); - } - $result['title'] = '. . ' . Linker::link( $title ); - - return $result; - } -} -- To view, visit https://gerrit.wikimedia.org/r/113381 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d429a460f75e60df04d0a0802d6e9e134677ab4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie <mmul...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits