Upgrade php-epub-meta from upstream. Should fix coverpath on Windows. Reported by Mario
Šis iesūtījums ir iekļauts:
vecāks
f9c6e8277b
iesūtījums
40f137c84a
1 izmainītas datnes ar 1 papildinājumiem un 12 izdzēšanām
|
@ -430,6 +430,7 @@ class EPub {
|
|||
$mime = $item->attr('opf:media-type');
|
||||
$this->coverpath = $item->attr('opf:href');
|
||||
$this->coverpath = dirname('/'.$this->meta).'/'.$this->coverpath; // image path is relative to meta file
|
||||
$this->coverpath = ltrim($this->coverpath,'\\');
|
||||
$this->coverpath = ltrim($this->coverpath,'/');
|
||||
}
|
||||
|
||||
|
@ -448,18 +449,6 @@ class EPub {
|
|||
}
|
||||
|
||||
if (!$hascover) return $this->no_cover();
|
||||
|
||||
$zip = new ZipArchive();
|
||||
if(!@$zip->open($this->file)){
|
||||
throw new Exception('Failed to read epub file');
|
||||
}
|
||||
$data = $zip->getFromName($this->coverpath);
|
||||
|
||||
return array(
|
||||
'mime' => $mime,
|
||||
'data' => $data,
|
||||
'found' => $this->coverpath
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Notiek ielāde…
Pievienot tabulu
Pievienot saiti
Atsaukties jaunā pieteikumā