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 { try {
$json_string = stream_get_contents($info); $json_string = stream_get_contents($info);
$json_data = json_decode($json_string); $json_data = json_decode($json_string);
return $json_data;
} finally { } finally {
fclose($info); fclose($info);
} }
return $json_data;
} else { } else {
return null; return null;
} }

View file

@ -19,14 +19,13 @@ class IcoFileHandler extends DataHandlerExtension
try { try {
unpack("Snull/Stype/Scount", fread($fp, 6)); unpack("Snull/Stype/Scount", fread($fp, 6));
$subheader = unpack("Cwidth/Cheight/Ccolours/Cnull/Splanes/Sbpp/Lsize/loffset", fread($fp, 16)); $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 { } finally {
fclose($fp); 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 protected function create_thumb(string $hash, string $mime): bool

View file

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

View file

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