/**
* This is largely cadged from PageHistory::history
*
- * @return String HTML
+ * @return string HTML
*/
public function onView() {
wfProfileIn( __METHOD__ );
/**
* Get a list of contributors
*
- * @param int $cnt maximum list of contributors to show
- * @param bool $showIfMax whether to contributors if there more than $cnt
- * @return String: html
+ * @param int $cnt Maximum list of contributors to show
+ * @param bool $showIfMax Whether to contributors if there more than $cnt
+ * @return string html
*/
public function getCredits( $cnt, $showIfMax = true ) {
wfProfileIn( __METHOD__ );
}
wfProfileOut( __METHOD__ );
+
return $s;
}
/**
* Get the last author with the last modification time
* @param Page $page
- * @return String HTML
+ * @return string HTML
*/
protected function getAuthor( Page $page ) {
$user = User::newFromName( $page->getUserText(), false );
$d = '';
$t = '';
}
+
return $this->msg( 'lastmodifiedatby', $d, $t )->rawParams(
$this->userLink( $user ) )->params( $user->getName() )->escaped();
}
/**
* Get a list of contributors of $article
- * @param int $cnt maximum list of contributors to show
- * @param bool $showIfMax whether to contributors if there more than $cnt
- * @return String: html
+ * @param int $cnt Maximum list of contributors to show
+ * @param bool $showIfMax Whether to contributors if there more than $cnt
+ * @return string html
*/
protected function getContributors( $cnt, $showIfMax ) {
global $wgHiddenPrefs;
# Hmm... too many to fit!
if ( $cnt > 0 && $contributors->count() > $cnt ) {
$others_link = $this->othersLink();
- if ( !$showIfMax )
+ if ( !$showIfMax ) {
return $this->msg( 'othercontribs' )->rawParams(
$others_link )->params( $contributors->count() )->escaped();
+ }
}
$real_names = array();
$anon_ips = array();
# Sift for real versus user names
+ /** @var $user User */
foreach ( $contributors as $user ) {
$cnt--;
if ( $user->isLoggedIn() ) {
}
$count = count( $fulllist );
+
# "Based on work by ..."
return $count
? $this->msg( 'othercontribs' )->rawParams(
/**
* Get a link to $user's user page
- * @param $user User object
- * @return String: html
+ * @param User $user
+ * @return string Html
*/
protected function link( User $user ) {
global $wgHiddenPrefs;
/**
* Get a link to $user's user page
- * @param $user User object
- * @return String: html
+ * @param User $user
+ * @return string Html
*/
protected function userLink( User $user ) {
$link = $this->link( $user );
/**
* Get a link to action=credits of $article page
- * @return String: HTML link
+ * @return string HTML link
*/
protected function othersLink() {
return Linker::linkKnown(