r105506 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105505‎ | r105506 | r105507 >
Date:01:09, 8 December 2011
Author:jeroendedauw
Status:reverted (Comments)
Tags:
Comment:
added review control links
Modified paths:
  • /trunk/extensions/Reviews/Reviews.i18n.php (modified) (history)
  • /trunk/extensions/Reviews/includes/Review.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Reviews/includes/Review.php
@@ -403,8 +403,26 @@
404404
405405 $html .= $this->getStateControl( $user, false );
406406
407 - $html .= " ( View details | Edit )";
 407+ $controlLinks = array();
408408
 409+ if ( $user->isAllowed( 'reviewsadmin' ) ) {
 410+ $controlLinks[] = Linker::linkKnown(
 411+ SpecialPage::getTitleFor( 'Reviews', $this->getId() ),
 412+ wfMsg( 'reviews-review-details' )
 413+ );
 414+ }
 415+
 416+ if ( $user->getId() === $this->getField( 'user_id' ) ) {
 417+ $controlLinks[] = Linker::linkKnown(
 418+ SpecialPage::getTitleFor( 'MyReviews', $this->getId() ),
 419+ wfMsg( 'reviews-review-edit' )
 420+ );
 421+ }
 422+
 423+ if ( count( $controlLinks ) > 0 ) {
 424+ $html .= '(' . $lang->pipeList( $controlLinks ) . ')';
 425+ }
 426+
409427 $html .= '</td></tr>';
410428
411429 $html .= '</table>';
Index: trunk/extensions/Reviews/Reviews.i18n.php
@@ -111,6 +111,9 @@
112112 // Review display
113113 'reviews-posted-by' => 'By $1',
114114 'reviews-posted-on' => 'Added $1',
 115+ 'reviews-review-details' => 'View details',
 116+ 'reviews-review-edit' => 'Edit',
 117+ 'reviews-review-delete' => 'Delete',
115118 );
116119
117120 /** Message documentation (Message documentation)

Comments

#Comment by Siebrand (talk | contribs)   08:32, 8 December 2011

Please add message documentation for the newly added messages. Thanks.

#Comment by Jeroen De Dauw (talk | contribs)   01:10, 9 December 2011

Like I noted in a previous reply, my client does not want this extension in the WMF repo any longer, so I'm further developing it somewhere else, hence no point in adding message docs.

Status & tagging log