diff --git a/action.php b/action.php index e0bc97d..44e750b 100644 --- a/action.php +++ b/action.php @@ -1,12 +1,14 @@ helper) { $this->helper = $this->loadHelper('epub', true); } - if (!$this->helper->is_inCache($INFO['id'])) return; //cache set in syntax.php + if (isset($INFO['id']) && !$this->helper->is_inCache($INFO['id'])) return; //cache set in syntax.php $event->preventDefault(); } diff --git a/plugin.info.txt b/plugin.info.txt index 681541a..e5970ac 100644 --- a/plugin.info.txt +++ b/plugin.info.txt @@ -1,7 +1,7 @@ base epub author Myron Turner email turnermm02@shaw.ca -date 2022-10-05 +date 2023-01-31 name epub desc Ebook creator url http://www.dokuwiki.org/plugin:epub diff --git a/renderer.php b/renderer.php index 15bdff2..5c756ae 100644 --- a/renderer.php +++ b/renderer.php @@ -128,18 +128,18 @@ function _media ($src, $title=NULL, $align=NULL, $width=NULL, $mpfile = str_replace('Audio/',"",$src); $display_name = $title; $title = $mpfile; - $out .= $this->_formatLink( array('class'=>'media mediafile mf_mp3','title'=>$title,'name'=>$title, 'display'=>$display_name) ) ."\n
"; + $out .= $this->_formatLink( array('class'=>'media mediafile mf_mp3','title'=>$title,'name'=>$title, 'display'=>$display_name, 'url'=>'') ) ."\n
"; } } else if(strpos($mtype[1],'video') !== false) { if($this->video_link) $out .= '
"; + $out .= $this->_formatLink( array('class'=>'media mediafile mf_mp4','title'=>$title,'name'=>$title, 'display'=>$display_name, 'url'=>'') ) ."\n
";
}
}
else {
@@ -180,7 +180,7 @@ function is_image($link,&$type) {
$mime_type = mimetype($link['title']);
if(!$mime_type[1] ) {
- list($url,$rest) = explode('?', $link['url']);
+ list($url,$rest) = array_pad(explode('?', $link['url']), 2,'');
$mime_type = mimetype($url);
if(!$mime_type[1]) {
$mime_type = mimetype($rest);
@@ -333,7 +333,7 @@ function smiley($smiley) {
function local_name($link,&$orig="", &$frag ="") {
$base_name= basename($link['url']);
$title = $link['title']? ltrim($link['title'],':'): "";
- list($starturl,$frag) = explode('#',$link['url']);
+ list($starturl,$frag) = array_pad(explode('#',$link['url']), 2, '');
if ($title) {
$name = $title;
}
diff --git a/scripts/css2.php b/scripts/css2.php
index 1c9b313..837018b 100644
--- a/scripts/css2.php
+++ b/scripts/css2.php
@@ -6,14 +6,11 @@
* @author Andreas Gohr