This commit is contained in:
Shish 2023-01-11 11:59:56 +00:00
parent 0d77a1dc81
commit f0c6dec798
4 changed files with 10 additions and 20 deletions

View file

@ -174,10 +174,10 @@ class BulkImportExport extends DataHandlerExtension
try {
$json_string = stream_get_contents($info);
$json_data = json_decode($json_string);
return $json_data;
} finally {
fclose($info);
}
return $json_data;
} else {
return null;
}

View file

@ -19,14 +19,13 @@ class IcoFileHandler extends DataHandlerExtension
try {
unpack("Snull/Stype/Scount", fread($fp, 6));
$subheader = unpack("Cwidth/Cheight/Ccolours/Cnull/Splanes/Sbpp/Lsize/loffset", fread($fp, 16));
$width = $subheader['width'];
$height = $subheader['height'];
$event->image->width = $width == 0 ? 256 : $width;
$event->image->height = $height == 0 ? 256 : $height;
} finally {
fclose($fp);
}
$width = $subheader['width'];
$height = $subheader['height'];
$event->image->width = $width == 0 ? 256 : $width;
$event->image->height = $height == 0 ? 256 : $height;
}
protected function create_thumb(string $hash, string $mime): bool

View file

@ -79,8 +79,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase
/** @depends testCreate */
public function testList($args)
{
[$pool_id, $image_ids] = $this->testCreate();
$this->testCreate();
$this->get_page("pool/list");
$this->assert_text("Pool");
}

View file

@ -117,20 +117,12 @@ EOD;
$i = $block->id;
$html = "<section id='{$i}'>";
if (!is_null($h)) {
if ($salt == "main") {
$html .= "<div class='maintop navside tab shm-toggler' data-toggle-sel='#{$i}'>{$h}</div>";
} else {
$html .= "<div class='navtop navside tab shm-toggler' data-toggle-sel='#{$i}'>{$h}</div>";
}
$html .= "<div class='navtop navside tab shm-toggler' data-toggle-sel='#{$i}'>{$h}</div>";
}
if (!is_null($b)) {
if ($salt =="main") {
$html .= "<div class='blockbody'>{$b}</div>";
} else {
$html .= "
<div class='navside tab'>{$b}</div>
";
}
$html .= "
<div class='navside tab'>{$b}</div>
";
}
$html .= "</section>";
return $html;