Deskana has uploaded a new change for review.
https://gerrit.wikimedia.org/r/193017
Change subject: Remove all images and recent uploads from UserProfile
......................................................................
Remove all images and recent uploads from UserProfile
This patch removes all images and recent uploads from UserProfile. They're
more trouble than they're worth.
Bug: T90801
Change-Id: Ic6800431a382c022d92a79043c76bbe441528ae6
---
M includes/specials/SpecialUserProfile.php
1 file changed, 1 insertion(+), 41 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/17/193017/1
diff --git a/includes/specials/SpecialUserProfile.php
b/includes/specials/SpecialUserProfile.php
index 6779513..fc4a730 100644
--- a/includes/specials/SpecialUserProfile.php
+++ b/includes/specials/SpecialUserProfile.php
@@ -39,39 +39,6 @@
}
/**
- * Returns HTML to show the last upload or an empty string when there
has been no last upload
- *
- * @return String HTML string representing the last upload by the user
- */
- protected function getLastUploadHtml() {
- $file = $this->userInfo->getLastUpload();
- if ( !$file ) {
- return '';
- }
-
- $title = $file->getTitle();
- $ts = new MWTimestamp( $file->getTimestamp() );
- $daysAgo = $this->getDaysAgo( $ts );
- $page = new MobilePage( $title, $file );
- $img = Html::openElement( 'div', array( 'class' => 'card' ) ) .
- Html::openElement( 'a', array(
- 'class' => 'container image',
- 'href' => $title->getLocalUrl() )
- ) .
- $page->getMediumThumbnailHtml() .
- Html::openElement( 'div', array( 'class' => 'caption' )
) .
- $this->msg(
'mobile-frontend-profile-last-upload-caption' )
- ->numParams( $daysAgo ) // $1
- ->params( $this->targetUser->getName() ) // $2
- ->parse() .
- Html::closeElement( 'div' ) .
- Html::closeElement( 'a' ) .
- Html::closeElement( 'div' );
-
- return $img;
- }
-
- /**
* Returns HTML to show the last thanking or an empty string if the
user has never been thanked
*
* @return String HTML string representing the last thank by the user
@@ -107,14 +74,8 @@
if ( $rev ) {
$daysAgo = $this->getDaysAgo( new MWTimestamp(
wfTimestamp( TS_UNIX, $rev->getTimestamp() ) ) );
$page = new MobilePage( $rev->getTitle() );
- if ( $page->hasThumbnail() ) {
- $thumbnail = $page->getMediumThumbnailHtml();
- } else {
- $thumbnail =
$page->getPlaceHolderThumbnailHtml( 'list-thumb-edit' );
- }
$html = Html::openElement( 'div', array( 'class' =>
'card' ) )
. Html::openElement( 'div', array( 'class' =>
'container image' ) )
- . $thumbnail
. Html::openElement( 'div', array( 'class' =>
'caption' ) )
. $this->msg(
'mobile-frontend-profile-last-edit',
$rev->getTitle(),
@@ -233,8 +194,7 @@
// Prepare content
$this->userInfo = new MobileUserInfo(
$this->targetUser );
- $activityHtml = $this->getLastEditHtml() .
$this->getLastUploadHtml()
- . $this->getLastThanksHtml();
+ $activityHtml = $this->getLastEditHtml() .
$this->getLastThanksHtml();
$html = Html::openElement( 'div', array(
'class' => 'profile content' ) );
--
To view, visit https://gerrit.wikimedia.org/r/193017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6800431a382c022d92a79043c76bbe441528ae6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Deskana <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits