Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7415350
ve.init.mw.ImageInfoCache.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ve.init.mw.ImageInfoCache.js
View Options
/*!
* VisualEditor MediaWiki Initialization ImageInfoCache class.
*
* @copyright See AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* Get information about images.
*
* @class
* @extends ve.init.mw.ApiResponseCache
* @constructor
* @param {mw.Api} [api]
*/
ve
.
init
.
mw
.
ImageInfoCache
=
function
VeInitMwImageInfoCache
()
{
// Parent constructor
ve
.
init
.
mw
.
ImageInfoCache
.
super
.
apply
(
this
,
arguments
);
};
/* Inheritance */
OO
.
inheritClass
(
ve
.
init
.
mw
.
ImageInfoCache
,
ve
.
init
.
mw
.
ApiResponseCache
);
/* Static methods */
/**
* @inheritdoc
*/
ve
.
init
.
mw
.
ImageInfoCache
.
static
.
processPage
=
function
(
page
)
{
if
(
page
.
imageinfo
)
{
return
page
.
imageinfo
[
0
];
}
else
if
(
'missing'
in
page
)
{
return
{
missing
:
true
};
}
};
/* Methods */
/**
* @inheritdoc
*/
ve
.
init
.
mw
.
ImageInfoCache
.
prototype
.
getRequestPromise
=
function
(
subqueue
)
{
// If you change what `iiprop`s are being fetched, update
// ve.ui.MWMediaDialog to add the same ones to the cache.
return
this
.
api
.
get
(
{
action
:
'query'
,
prop
:
'imageinfo'
,
indexpageids
:
'1'
,
iiprop
:
'size|mediatype'
,
titles
:
subqueue
},
{
type
:
'POST'
}
);
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 02:08 (1 d, 13 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ca/50/b81d7aa711df71eea846b3ed2ed9
Default Alt Text
ve.init.mw.ImageInfoCache.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment