EBernhardson (WMF) has uploaded a new change for review. https://gerrit.wikimedia.org/r/88637
Change subject: Use standard humanized timestamps for moderation ...................................................................... Use standard humanized timestamps for moderation The original intention was to show messages like Hidden by Foo after 7 minutes Unfortunatly this is not currently supported by the cldr extension and creating new internationalized timestamp rendering is beyond the MVP scope of the flow project. Change-Id: Id4b5a106785334f2e427ce91e0ef9b12b78a133a --- M includes/Model/AbstractRevision.php 1 file changed, 1 insertion(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/37/88637/1 diff --git a/includes/Model/AbstractRevision.php b/includes/Model/AbstractRevision.php index 84fbe0c..d8404df 100644 --- a/includes/Model/AbstractRevision.php +++ b/includes/Model/AbstractRevision.php @@ -213,26 +213,11 @@ } else { $moderatedAt = new MWTimestamp( $this->moderationTimestamp ); - if ( $this->moderationState === self::MODERATED_CENSORED ) { - // Censored is based on timestamp of this revision - $createdAt = $this->revId->getTimestampObj(); - } elseif ( $this->prevRevision ) { - // Everything else is based on timestamp of previous revision - $createdAt = $this->prevRevision->getTimestampObj(); - } else { - // not censored, but this is the first revision. We should never get here. - wfDebugLog( __CLASS__, __FUNCTION__ . ': Unreachable condition, un censored but moderated first post : ' . $this->revId->getHex() ); - $createdAt = $this->revId->getTimestampObj(); - } - // Messages: flow-post-hidden-by, flow-post-deleted-by, flow-post-censored-by return wfMessage( self::$perms[$this->moderationState]['content'], $this->moderatedByUserText, - // FIXME (spage, 2013-09-13) results in, e.g. "Deleted by Admin In 8 days". - // Removing createdAt gives right timeframe, but all the $createdAt code - // above suggests we intend something like "3 days later"? - $moderatedAt->getHumanTimestamp( $createdAt ) + $moderatedAt->getHumanTimestamp() ); } } -- To view, visit https://gerrit.wikimedia.org/r/88637 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4b5a106785334f2e427ce91e0ef9b12b78a133a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson (WMF) <ebernhard...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits