From 61eb76b12de53d936d9c78a83f269c233cd112a4 Mon Sep 17 00:00:00 2001 From: Christian Ernst Date: Mon, 12 Dec 2022 08:52:28 +0100 Subject: [PATCH] fix: install viewer.js config; --- admin/update/update.php | 9 ++------- install/_tmpl/conf/system.conf.php | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/admin/update/update.php b/admin/update/update.php index 07e33138..faef1e22 100644 --- a/admin/update/update.php +++ b/admin/update/update.php @@ -470,16 +470,11 @@ function run($installedVersion) { } if(version_compare ( '6.0.101', $installedVersion ) > 0) { - file_put_contents(MC_ROOT_PATH . 'conf/system.conf.php', 'DEFINE("ENABLE_VIEWER_JS", true); # toggle viewer.js for office documents', FILE_APPEND | LOCK_EX); + file_put_contents(MC_ROOT_PATH . 'conf/system.conf.php', 'DEFINE("ENABLE_VIEWER_JS", true); # toggle viewer.js for office documents' . PHP_EOL, FILE_APPEND | LOCK_EX); } if(version_compare ( '6.0.102', $installedVersion ) > 0) { - $viewer_js_conf = "VIEWER_JS_CONFIG = [ - 'pdf', - //'office', - //'spreadsheet' - ];"; - file_put_contents(MC_ROOT_PATH . 'conf/system.conf.php', $viewer_js_conf, FILE_APPEND | LOCK_EX); + file_put_contents(MC_ROOT_PATH . 'conf/system.conf.php', '$VIEWER_JS_CONFIG = ["pdf"]; # office and spreadsheet also available' . PHP_EOL, FILE_APPEND | LOCK_EX); } diff --git a/install/_tmpl/conf/system.conf.php b/install/_tmpl/conf/system.conf.php index 32cbbb51..a40ce2ce 100644 --- a/install/_tmpl/conf/system.conf.php +++ b/install/_tmpl/conf/system.conf.php @@ -21,6 +21,7 @@ ]; DEFINE("ENABLE_VIEWER_JS", true); # toggle viewer.js for office documents +$VIEWER_JS_CONFIG = ["pdf"]; # office and spreadsheet also available $ESRENDER_SESSION_NAME = 'ESSID';