Skip to content

Commit 9b006a2

Browse files
committed
1.1.5
1 parent 750a61c commit 9b006a2

File tree

6 files changed

+15
-10
lines changed

6 files changed

+15
-10
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#Changes
2+
##1.1.5
3+
* Fixed an incorrect call to makeErrorBox().
4+
* Fixed checking titles for existence that in some cases would fail with a fatal error.
5+
* Fixed central repositories trying to work through a ForeignDBRepo when SpriteSheet only supports ForeignAPIRepo.
6+
27
##1.1.4
38
* Fixed MediaWiki 1.26+ compatibility.
49
* Removed jQuery dependency in resource loader module

README.wiki

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
|status = stable
55
|type = parser function
66
|author = Alexia E. Smith ([[User:Alexia E. Smith|Alexia E. Smith]]), Hydra Wiki Platform Team
7-
|version = 1.1.4
8-
|update = 2016-07-23
7+
|version = 1.1.5
8+
|update = 2016-11-07
99
|mediawiki = 1.23+
10-
|php = 5.4+
10+
|php = 5.5+
1111
|download = {{ {{TNTN|GithubDownload}} |HydraWiki|SpriteSheet}}
1212
|hook1 = ParserFirstCallInit
1313
|hook2 = ImagePageShowTOC
@@ -31,7 +31,7 @@ The '''SpriteSheet''' extension allows uploaded images to be divided into sprite
3131

3232
{{{{TNTN|ExtensionInstall}}
3333
|db-update=true
34-
|download-link=[https://github.com/HydraWiki/SpriteSheet/archive/v1.1.4.zip Download]}}
34+
|download-link=[https://github.com/HydraWiki/SpriteSheet/archive/v1.1.5.zip Download]}}
3535

3636
==Configuration==
3737
There are two available rights that may be assigned to groups, 'edit_sprites' and 'spritesheet_rollback'. The 'edit_sprites' permission gives the ability to edit sprite sheets, sprites, slices, assign names, and delete. The 'spritesheet_rollback' allows the ability to rollback changes from the change log.

SpriteSheet.hooks.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,12 @@ static public function generateSpriteOutput(Parser &$parser, PPFrame $frame, $ar
161161

162162
$title = Title::newFromDBKey($parameters['file']);
163163

164-
if ($title->isKnown()) {
164+
if ($title !== null && $title->isKnown()) {
165165
$spriteSheet = SpriteSheet::newFromTitle($title, true);
166166

167167
if (!$spriteSheet->getId() || !$spriteSheet->getColumns() || !$spriteSheet->getRows()) {
168168
//Either a sprite sheet does not exist or has invalid values.
169-
return self::makeError('no_sprite_sheet_defined', [$title->getPrefixedText()]);
169+
return self::makeErrorBox('no_sprite_sheet_defined', [$title->getPrefixedText()]);
170170
}
171171

172172
if (!empty($parameters['name'])) {
@@ -250,7 +250,7 @@ static public function generateSliceOutput(Parser &$parser, PPFrame $frame, $arg
250250

251251
$title = Title::newFromDBKey($parameters['file']);
252252

253-
if ($title) {
253+
if ($title !== null) {
254254
$spriteSheet = SpriteSheet::newFromTitle($title, true);
255255

256256
if ($spriteSheet !== false) {

SpriteSheet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/******************************************/
1414
/* Credits */
1515
/******************************************/
16-
define('SPRITESHEET_VERSION', '1.1.4');
16+
define('SPRITESHEET_VERSION', '1.1.5');
1717
$credits = [
1818
'path' => __FILE__,
1919
'name' => 'SpriteSheet',

classes/SpriteSheet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ public function load($row = null) {
892892
if (!$this->isLoaded) {
893893
$this->image = wfFindFile($this->getTitle());
894894

895-
if ($this->image !== false && $this->image->exists() && !$this->image->isLocal()) {
895+
if ($this->image !== false && $this->image->exists() && !$this->image->isLocal() && $this->image->getRepo() instanceof ForeignAPIRepo) {
896896
$query = [
897897
'action' => 'spritesheet',
898898
'do' => 'getSpriteSheet',

extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SpriteSheet",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"author": [
55
"Curse Inc. Wiki Platform Team",
66
"Alexia E. Smith"

0 commit comments

Comments
 (0)