summaryrefslogtreecommitdiff
path: root/plugins/odfviewer
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-01-21 19:32:06 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-01-21 19:32:06 (GMT)
commit8d420a94cc3fe3eda4475b22b1dc1b218cb84aca (patch)
treebafc54fed85dfbf0d5ce76eec18f735d9b8f023e /plugins/odfviewer
parent59b64ae7cd5cb8d4c80bfd126926753ee49fa740 (diff)
downloadroundcubemail-plugins-kolab-8d420a94cc3fe3eda4475b22b1dc1b218cb84aca.tar.gz
Use asset_url() for loading viewer files (#4307)
Diffstat (limited to 'plugins/odfviewer')
-rw-r--r--plugins/odfviewer/odfviewer.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/odfviewer/odfviewer.php b/plugins/odfviewer/odfviewer.php
index 4a57b64..77285a0 100644
--- a/plugins/odfviewer/odfviewer.php
+++ b/plugins/odfviewer/odfviewer.php
@@ -74,6 +74,7 @@ class odfviewer extends rcube_plugin
{
if (!$args['download'] && $args['mimetype'] && in_array($args['mimetype'], $this->odf_mimetypes)) {
if (empty($_GET['_load'])) {
+ $rcmail = rcube::get_instance();
$exts = rcube_mime::get_mime_extensions($args['mimetype']);
$suffix = $exts ? '.'.$exts[0] : '.odt';
$fn = md5(session_id() . $_SERVER['REQUEST_URI']) . $suffix;
@@ -99,8 +100,8 @@ class odfviewer extends rcube_plugin
$html = file_get_contents($this->home . '/odf.html');
header("Content-Type: text/html; charset=" . RCMAIL_CHARSET);
echo strtr($html, array(
- '%%DOCROOT%%' => $this->urlbase,
- '%%DOCURL%%' => $this->tempbase . $fn, # $_SERVER['REQUEST_URI'].'&_load=1',
+ '%%DOCROOT%%' => $rcmail->output->asset_url($this->urlbase),
+ '%%DOCURL%%' => $rcmail->output->asset_url($this->tempbase . $fn), # $_SERVER['REQUEST_URI'].'&_load=1',
));
$args['abort'] = true;
}