Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P7805
(An Untitled Masterwork)
Active
Public
Actions
Authored by
Addshore
on Nov 14 2018, 6:45 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F27222064:
Nov 14 2018, 6:45 PM
2018-11-14 18:45:23 (UTC+0)
Subscribers
None
diff --git a/lib/includes/Formatters/ControlledFallbackEntityIdFormatter.php b/lib/includes/Formatters/ControlledFallbackEntityIdFormatter.php
index 52a41811f..1b200ea12 100644
--- a/lib/includes/Formatters/ControlledFallbackEntityIdFormatter.php
+++ b/lib/includes/Formatters/ControlledFallbackEntityIdFormatter.php
@@ -71,7 +71,13 @@ class ControlledFallbackEntityIdFormatter implements EntityIdFormatter {
}
public function formatEntityId( EntityId $value ) {
- if ( $value instanceof Int32EntityId && $value->getNumericId() <= $this->maxEntityId ) {
+ $testHeader = \RequestContext::getMain()->getRequest()->getHeader( 'X-WIKIBASE-formatEntityId' );
+ wfDebugLog( 'AdHocDebug', json_encode( $testHeader ) );
+ if (
+ ( $value instanceof Int32EntityId && $value->getNumericId() <= $this->maxEntityId && $testHeader !== 'old' ) ||
+ ( $testHeader === 'new' )
+ ) {
+ wfDebugLog( 'AdHocDebug', 'Trying new / target formatter' );
try {
$formatEntityId = $this->targetFormatter->formatEntityId( $value );
$this->statsdDataFactory->increment( $this->statsPrefix . 'targetFormatterCalled' );
Event Timeline
Addshore
created this paste.
Nov 14 2018, 6:45 PM
2018-11-14 18:45:23 (UTC+0)
Addshore
mentioned this in
T201930: Track entity page performance
.
Nov 14 2018, 9:42 PM
2018-11-14 21:42:12 (UTC+0)
Log In to Comment