mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-24 07:53:37 +00:00
Remove all references to TemplateInfo
Change-Id: I5ffc8f75140a2c372fc1c64509b13a534fe07479
This commit is contained in:
parent
8dc157bc09
commit
7bf85a39a1
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Hooks for TemplateInfo extension
|
* Hooks for TemplateData extension
|
||||||
*
|
*
|
||||||
* @file
|
* @file
|
||||||
* @ingroup Extensions
|
* @ingroup Extensions
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* TemplateInfo extension.
|
* TemplateData extension.
|
||||||
*
|
*
|
||||||
* @file
|
* @file
|
||||||
* @ingroup Extensions
|
* @ingroup Extensions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( version_compare( $wgVersion, '1.20', '<' ) ) {
|
if ( version_compare( $wgVersion, '1.20', '<' ) ) {
|
||||||
echo "Extension:TemplateInfo requires MediaWiki 1.20 or higher.\n";
|
echo "Extension:TemplateData requires MediaWiki 1.20 or higher.\n";
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class TemplateDataBlob {
|
||||||
private $data;
|
private $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Status: Cache of TemplateInfo::validate
|
* @var Status: Cache of TemplateDataBlob::parse
|
||||||
*/
|
*/
|
||||||
private $status;
|
private $status;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class TemplateDataBlob {
|
||||||
* Parse and validate passed JSON (possibly gzip-compressed) and create a TemplateDataBlob object.
|
* Parse and validate passed JSON (possibly gzip-compressed) and create a TemplateDataBlob object.
|
||||||
*
|
*
|
||||||
* @param string $json
|
* @param string $json
|
||||||
* @return TemplateInfo
|
* @return TemplateDataBlob
|
||||||
*/
|
*/
|
||||||
public static function newFromDatabase( $json ) {
|
public static function newFromDatabase( $json ) {
|
||||||
// Handle GZIP compression. \037\213 is the header for GZIP files.
|
// Handle GZIP compression. \037\213 is the header for GZIP files.
|
||||||
|
|
|
@ -394,7 +394,7 @@ class TemplateDataBlobTest extends MediaWikiTestCase {
|
||||||
// Compress JSON to trigger the code pass in newFromDatabase that ends
|
// Compress JSON to trigger the code pass in newFromDatabase that ends
|
||||||
// up calling gzdecode().
|
// up calling gzdecode().
|
||||||
$gzJson = gzencode( '{}' );
|
$gzJson = gzencode( '{}' );
|
||||||
$templateInfo = TemplateDataBlob::newFromDatabase( $gzJson );
|
$templateData = TemplateDataBlob::newFromDatabase( $gzJson );
|
||||||
$this->assertInstanceOf( 'TemplateDataBlob', $templateInfo );
|
$this->assertInstanceOf( 'TemplateDataBlob', $templateData );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue