Commit 96031aaf authored by Patrick Barroca's avatar Patrick Barroca 😠
Browse files

fix syntax error

parent 8cbb7083
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//include_once(ROOT_PATH.'library/BookGluttonEpub/BookGluttonEpub.php');
class ParseEpubController extends Zend_Controller_Action {
......@@ -26,7 +26,8 @@ class ParseEpubController extends Zend_Controller_Action {
$url =$this->view->url();
$filepath=substr($url,strpos($url,'/file')+6);
if (substr($filepath,-1)=='/')
$filepath=substr($filepath,0,-1;)
$filepath=substr($filepath,0,-1);
return $filepath;
}
......@@ -51,7 +52,7 @@ class ParseEpubController extends Zend_Controller_Action {
// on va devoir modifier les entetes HTTP
$response = Zend_Controller_Front::getInstance()->getResponse();
$response->canSendHeaders(true);
$ext = explode('.', $filepath);
$ext = end($ext);
......@@ -60,12 +61,12 @@ class ParseEpubController extends Zend_Controller_Action {
$fileInfos['size'] = sizeof($content);
$parts = pathinfo($filepath);
if (strlen($content)>0) {
$this->getResponse()->setHeader('Content-Type',$mime);
}
else {
}
$this->getResponse()->setBody($content);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment