dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Consolidate duplicated unseen change logic and fix inconsistent code"
[lhc/web/wiklou.git]
/
includes
/
externalstore
/
ExternalStoreHttp.php
diff --git
a/includes/externalstore/ExternalStoreHttp.php
b/includes/externalstore/ExternalStoreHttp.php
index
8e1e49f
..
a723557
100644
(file)
--- a/
includes/externalstore/ExternalStoreHttp.php
+++ b/
includes/externalstore/ExternalStoreHttp.php
@@
-20,31
+20,25
@@
* @file
*/
* @file
*/
+use MediaWiki\MediaWikiServices;
+
/**
/**
- * Example class for HTTP access
a
ble external objects.
+ * Example class for HTTP access
i
ble external objects.
* Only supports reading, not storing.
*
* @ingroup ExternalStorage
*/
class ExternalStoreHttp extends ExternalStoreMedium {
* Only supports reading, not storing.
*
* @ingroup ExternalStorage
*/
class ExternalStoreHttp extends ExternalStoreMedium {
- /**
- * @see ExternalStoreMedium::fetchFromURL()
- * @param string $url
- * @return string|bool
- * @throws MWException
- */
public function fetchFromURL( $url ) {
public function fetchFromURL( $url ) {
- return Http::get( $url, [], __METHOD__ );
+ return MediaWikiServices::getInstance()->getHttpRequestFactory()->
+ get( $url, [], __METHOD__ );
}
}
- /**
- * @see ExternalStoreMedium::store()
- * @param string $cluster
- * @param string $data
- * @return string|bool
- * @throws MWException
- */
- public function store( $cluster, $data ) {
+ public function store( $location, $data ) {
throw new MWException( "ExternalStoreHttp is read-only and does not support store()." );
}
throw new MWException( "ExternalStoreHttp is read-only and does not support store()." );
}
+
+ public function isReadOnly( $location ) {
+ return true;
+ }
}
}