Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F27222064
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Addshore
Nov 14 2018, 6:45 PM
2018-11-14 18:45:23 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
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' );
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6694224
Default Alt Text
(1 KB)
Attached To
Mode
P7805 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment