Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
bibliossimo
opacce
Commits
96031aaf
Commit
96031aaf
authored
May 28, 2018
by
Patrick Barroca
😁
Browse files
fix syntax error
parent
8cbb7083
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
application/modules/opac/controllers/ParseEpubController.php
application/modules/opac/controllers/ParseEpubController.php
+6
-5
No files found.
application/modules/opac/controllers/ParseEpubController.php
View file @
96031aaf
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment