diff --git a/Makefile b/Makefile index 0525a81c..06d89818 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ -VERSION=1.0.7 +VERSION=0.9.0 .PHONY: dist -dist: owncloud-ccs.spec - rm -rf owncloud-ccs-$(VERSION) - mkdir owncloud-ccs-$(VERSION) +dist: owncloud-collabora-online.spec + rm -rf owncloud-collabora-online-$(VERSION) + mkdir owncloud-collabora-online-$(VERSION) tar cf - *.php \ appinfo \ assets \ @@ -17,10 +17,10 @@ dist: owncloud-ccs.spec l10n \ lib \ templates \ - | ( cd owncloud-ccs-$(VERSION) && tar xf - ) - tar cfz owncloud-ccs-$(VERSION).tar.gz owncloud-ccs-$(VERSION) - rm -rf owncloud-ccs-$(VERSION) + | ( cd owncloud-collabora-online-$(VERSION) && tar xf - ) + tar cfz owncloud-collabora-online-$(VERSION).tar.gz owncloud-collabora-online-$(VERSION) + rm -rf owncloud-collabora-online-$(VERSION) -owncloud-ccs.spec: owncloud-ccs.spec.in Makefile - sed -e 's/@PACKAGE_VERSION@/$(VERSION)/g' owncloud-ccs.spec +owncloud-collabora-online.spec: owncloud-collabora-online.spec.in Makefile + sed -e 's/@PACKAGE_VERSION@/$(VERSION)/g' owncloud-collabora-online.spec diff --git a/appinfo/app.php b/appinfo/app.php index 796a00b4..1f73ccfc 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -23,7 +23,6 @@ namespace OCA\Richdocuments\AppInfo; -use OCA\Richdocuments\Filter\Office; use OCA\Richdocuments\Config; $app = new Application(); @@ -38,7 +37,7 @@ $navigationEntry = function () use ($c) { 'order' => 2, 'href' => $c->query('ServerContainer')->getURLGenerator()->linkToRoute('richdocuments.document.index'), 'icon' => $c->query('ServerContainer')->getURLGenerator()->imagePath('richdocuments', 'documents.svg'), - 'name' => $c->query('L10N')->t('Collabora Online Development Edition') + 'name' => $c->query('L10N')->t('Collabora Online') ]; }; $c->getServer()->getNavigationManager()->add($navigationEntry); @@ -53,262 +52,5 @@ if (isset($request->server['REQUEST_URI'])) { } } -if ($c->query('AppConfig')->isConverterEnabled()){ - $odtFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.oasis.opendocument.text', - 'format' => 'odt:writer8', - 'extension' => 'odt' - ], - 'write' => - [ - 'target' => 'application/msword', - 'format' => 'doc', - 'extension' => 'doc' - ] - ] - ); - - $docxFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.oasis.opendocument.text', - 'format' => 'odt:writer8', - 'extension' => 'odt' - ], - 'write' => - [ - 'target' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'format' => 'docx', - 'extension' => 'docx' - ] - ] - ); - - $odpFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.oasis.opendocument.presentation', - 'format' => 'odp', - 'extension' => 'odp' - ], - 'write' => - [ - 'target' => 'application/vnd.oasis.opendocument.presentation', - 'format' => 'dop', - 'extension' => 'odp' - ] - ] - ); - - $odsFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.oasis.opendocument.spreadsheet', - 'format' => 'ods', - 'extension' => 'ods' - ], - 'write' => - [ - 'target' => 'application/vnd.oasis.opendocument.spreadsheet', - 'format' => 'ods', - 'extension' => 'ods' - ] - ] - ); - - $odgFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.oasis.opendocument.graphics', - 'format' => 'odg', - 'extension' => 'odg' - ], - 'write' => - [ - 'target' => 'application/vnd.oasis.opendocument.graphics', - 'format' => 'odg', - 'extension' => 'odg' - ] - ] - ); - - $docFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/msword', - 'format' => 'doc', - 'extension' => 'doc' - ], - 'write' => - [ - 'target' => 'application/msword', - 'format' => 'doc', - 'extension' => 'doc' - ] - ] - ); - - $lwpFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.lotus-wordpro', - 'format' => 'lwp', - 'extension' => 'lwp' - ], - 'write' => - [ - 'target' => 'application/vnd.lotus-wordpro', - 'format' => 'lwp', - 'extension' => 'lwp' - ] - ] - ); - - $svgFilter = new Office( - [ - 'read' => - [ - 'target' => 'image/svg+xml', - 'format' => 'svg', - 'extension' => 'svg' - ], - 'write' => - [ - 'target' => 'image/svg+xml', - 'format' => 'svg', - 'extension' => 'svg' - ] - ] - ); - - $potFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.ms-powerpoint', - 'format' => 'pot', - 'extension' => 'pot' - ], - 'write' => - [ - 'target' => 'application/vnd.ms-powerpoint', - 'format' => 'pot', - 'extension' => 'pot' - ] - ] - ); - - $xlaFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.ms-excel', - 'format' => 'xla', - 'extension' => 'xla' - ], - 'write' => - [ - 'target' => 'application/vnd.ms-excel', - 'format' => 'xla', - 'extension' => 'xla' - ] - ] - ); - - $xlaFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.ms-excel', - 'format' => 'xla', - 'extension' => 'xla' - ], - 'write' => - [ - 'target' => 'application/vnd.ms-excel', - 'format' => 'xla', - 'extension' => 'xla' - ] - ] - ); - - $xlsxFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'format' => 'xlsx', - 'extension' => 'xlsx' - ], - 'write' => - [ - 'target' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'format' => 'xlsx', - 'extension' => 'xlsx' - ] - ] - ); - - $vsdFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.visio', - 'format' => 'vsd', - 'extension' => 'vsd' - ], - 'write' => - [ - 'target' => 'application/vnd.visio', - 'format' => 'vsd', - 'extension' => 'vsd' - ] - ] - ); - - $wpdFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.wordperfect', - 'format' => 'wpd', - 'extension' => 'wpd' - ], - 'write' => - [ - 'target' => 'application/vnd.wordperfect', - 'format' => 'wpd', - 'extension' => 'wpd' - ] - ] - ); - - $wpdFilter = new Office( - [ - 'read' => - [ - 'target' => 'application/vnd.wordperfect', - 'format' => 'wpd', - 'extension' => 'wpd' - ], - 'write' => - [ - 'target' => 'application/vnd.wordperfect', - 'format' => 'wpd', - 'extension' => 'wpd' - ] - ] - ); -} - //Listen to delete file signal \OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Richdocuments\Storage", "onDelete"); diff --git a/appinfo/info.xml b/appinfo/info.xml index 4db1815e..be9ad3ac 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -1,13 +1,13 @@ richdocuments - Collabora Online Development Edition + Collabora Online An ownCloud app to work with office documents AGPL - 0.13.0 + 0.9.0 Collabora Productivity based on work of Frank Karlitschek, Victor Dubiniuk - https://www.collaboraoffice.com/ - git://gerrit.libreoffice.org/online.git + https://github.com/owncloud/richdocuments/issues + https://github.com/owncloud/richdocuments.git productivity diff --git a/appinfo/routes.php b/appinfo/routes.php index e80c48b0..89f2b5d8 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -42,8 +42,7 @@ $application->registerRoutes($this, [ ['name' => 'document#wopiPutFile', 'url' => 'wopi/files/{fileId}/contents', 'verb' => 'POST'], //settings ['name' => 'settings#savePersonal', 'url' => 'ajax/personal.php', 'verb' => 'POST'], - ['name' => 'settings#setUnstable', 'url' => 'ajax/config/unstable', 'verb' => 'POST'], - ['name' => 'settings#setConverter', 'url' => 'ajax/admin.php', 'verb' => 'POST'], + ['name' => 'settings#setSettings', 'url' => 'ajax/admin.php', 'verb' => 'POST'], ['name' => 'settings#getSupportedMimes', 'url' => 'ajax/mimes.php', 'verb' => 'GET'], ] ]); diff --git a/controller/documentcontroller.php b/controller/documentcontroller.php index 114beb9a..e82d77a8 100644 --- a/controller/documentcontroller.php +++ b/controller/documentcontroller.php @@ -105,7 +105,6 @@ class DocumentController extends Controller{ $wopiRemote = $this->settings->getAppValue('richdocuments', 'wopi_url'); $response = new TemplateResponse('richdocuments', 'documents', [ 'enable_previews' => $this->settings->getSystemValue('enable_previews', true), - 'useUnstable' => $this->settings->getAppValue('richdocuments', 'unstable', 'false'), 'savePath' => $this->settings->getUserValue($this->uid, 'richdocuments', 'save_path', '/'), 'uploadMaxFilesize' => $maxUploadFilesize, 'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize), @@ -380,11 +379,9 @@ class DocumentController extends Controller{ $fullPath = '/files' . $path; $fileInfo = \OC\Files\Filesystem::getFileInfo($path); if ($fileInfo){ - if($fileInfo->getMimeType() !== \OCA\Richdocuments\Filter\Office::NATIVE_MIMETYPE){ - $file = new File($fileInfo->getId()); - $genesis = new Genesis($file); - $fullPath = $genesis->getPath(); - } + $file = new File($fileInfo->getId()); + $genesis = new Genesis($file); + $fullPath = $genesis->getPath(); } return new DownloadResponse($this->request, $this->uid, $fullPath); } diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index 7fbed840..61b5d840 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -18,7 +18,6 @@ use \OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http\TemplateResponse; use OCA\Richdocuments\AppConfig; -use OCA\Richdocuments\Converter; use OCA\Richdocuments\Filter; class SettingsController extends Controller{ @@ -64,7 +63,6 @@ class SettingsController extends Controller{ return new TemplateResponse( $this->appName, 'settings', - [ 'unstable' => $this->appConfig->getAppValue('unstable') ], 'blank' ); } @@ -77,9 +75,7 @@ class SettingsController extends Controller{ $this->appName, 'admin', [ - 'converter' => $this->appConfig->getAppValue('converter'), 'wopi_url' => $this->appConfig->getAppValue('wopi_url'), - 'converter_url' => $this->appConfig->getAppValue('converter_url'), ], 'blank' ); @@ -114,61 +110,16 @@ class SettingsController extends Controller{ return $response; } - public function setUnstable($unstable){ - if (!is_null($unstable)){ - $this->appConfig->setAppValue('unstable', $unstable); - } - return array('status' => 'success'); - } - - public function setConverter($converter, $wopi_url, $url){ - if (!is_null($converter)){ - $this->appConfig->setAppValue('converter', $converter); - } - + public function setSettings($wopi_url){ if (!is_null($wopi_url)){ $this->appConfig->setAppValue('wopi_url', $wopi_url); } - if (!is_null($url)){ - $this->appConfig->setAppValue('converter_url', $url); - } - $response = array( 'status' => 'success', 'data' => array('message' => (string) $this->l10n->t('Saved')) ); - $currentConverter = $this->appConfig->getAppValue('converter'); - if ($currentConverter == 'external'){ - if (!Converter::checkConnection()){ - \OC::$server->getLogger()->warning( - 'Bad response from Format Filter Server', - ['app' => $this->appName] - ); - $response = array( - 'status' => 'error', - 'data'=> - array('message' => (string) $this->l10n->t('Format filter server is down or misconfigured') ) - ); - } - } elseif ($currentConverter === 'local') { - try { - if (!Converter::testConversion()){ - $response = array( - 'status' => 'error', - 'data'=> - array('message' => (string) $this->l10n->t('Conversion failed. Check log for details.') ) - ); - } - } catch (\Exception $e){ - $response = array( - 'status' => 'error', - 'data'=> array('message' => $e->getMessage()) - ); - } - } - return $response; } } diff --git a/js/admin.js b/js/admin.js index e0f78ded..7f9329c2 100644 --- a/js/admin.js +++ b/js/admin.js @@ -6,14 +6,9 @@ $(document).ready(function(){ save : function() { $('#docs_apply').attr('disabled', true); var data = { - converter : $('[name="docs_converter"]:checked').val(), wopi_url : $('#wopi_url').val() }; - if (data.converter === 'external'){ - data.url = $('#docs_url').val(); - } - OC.msg.startAction('#documents-admin-msg', t('richdocuments', 'Saving...')); $.post( OC.filePath('richdocuments', 'ajax', 'admin.php'), @@ -28,8 +23,5 @@ $(document).ready(function(){ } }; - $('#docs_converter_external, #docs_converter_local, #docs_converter_off').on('click', function(){ - $('#docs_extra').toggle($('[name="docs_converter"]:checked').val() === 'external'); - }); $('#docs_apply').on('click', documentsSettings.save); }); diff --git a/js/settings.js b/js/settings.js deleted file mode 100644 index b27fafaf..00000000 --- a/js/settings.js +++ /dev/null @@ -1,15 +0,0 @@ -$(document).ready(function(){ - - var documentsSettings = { - save : function() { - var data = { - unstable : $('#webodf-unstable').attr('checked')==="checked" - }; - $.post(OC.generateUrl('apps/richdocuments/ajax/config/unstable'), data, documentsSettings.afterSave); - }, - afterSave : function(){ - documentsMain.useUnstable = $('#webodf-unstable').attr('checked')==="checked"; - } - }; - $('#webodf-unstable').change(documentsSettings.save); -}); \ No newline at end of file diff --git a/lib/appconfig.php b/lib/appconfig.php index 490c7eb2..bc255d22 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -16,10 +16,7 @@ use \OCP\IConfig; class AppConfig{ private $appName = 'richdocuments'; private $defaults = [ - 'converter' => 'off', - 'converter_url' => 'http://localhost:16080', - 'unstable' => 'false', - 'wopi_url' => 'htpp://localhost' + 'wopi_url' => 'http://localhost' ]; private $config; @@ -28,14 +25,6 @@ use \OCP\IConfig; $this->config = $config; } - /** - * Can we convert anything to odt? - * @return bool - */ - public function isConverterEnabled(){ - return $this->getAppValue('converter') !== 'off'; - } - /** * Get a value by key * @param string $key diff --git a/lib/converter.php b/lib/converter.php deleted file mode 100644 index 2ddfbc96..00000000 --- a/lib/converter.php +++ /dev/null @@ -1,147 +0,0 @@ -getTempManager()->getTemporaryFile(); - $outdir = \OC::$server->getTempManager()->getTemporaryFolder(); - $outfile = $outdir . '/' . basename($infile) . '.' . $targetExtension; - $cmd = Helper::findOpenOffice(); - - $params = ' --headless --convert-to ' . escapeshellarg($targetFilter) . ' --outdir ' - . escapeshellarg($outdir) - . ' --writer '. escapeshellarg($infile) - . ' -env:UserInstallation=file://' - . escapeshellarg(\OC::$server->getTempManager()->getTempBaseDir() . '/owncloud-' . \OC_Util::getInstanceId().'/') . ' 2>&1' - ; - file_put_contents($infile, $input); - - $result = shell_exec($cmd . $params); - $exists = file_exists($outfile); - - if (!$exists){ - \OC::$server->getLogger()->warn( - 'Conversion test failed. Raw output:' . $result, - ['app' => 'richdocuments'] - - ); - return false; - } else { - unlink($outfile); - } - return true; - } - - public static function convert($input, $targetFilter, $targetExtension){ - if (self::getAppConfig()->getAppValue('converter') === 'local'){ - $output = self::convertLocal($input, $targetFilter, $targetExtension); - } else { - $output = self::convertExternal($input, $targetExtension); - } - - if (empty($output)){ - \OC::$server->getLogger()->warn( - 'Empty conversion output', - ['app' => 'richdocuments'] - - ); - throw new \RuntimeException('Empty conversion output'); - } - return $output; - } - - public static function checkConnection(){ - $expected = file_get_contents(dirname(__DIR__) . '/assets/response.odt'); - $converted = self::convertExternal('', 'odt'); - - return $converted === $expected; - } - - /** - * convert via openOffice hosted on the same server - * @param string $input - * @param string $targetFilter - * @param string $targetExtension - * @return string - */ - protected static function convertLocal($input, $targetFilter, $targetExtension){ - $infile = \OC::$server->getTempManager()->getTemporaryFile(); - $outdir = \OC::$server->getTempManager()->getTemporaryFolder(); - $cmd = Helper::findOpenOffice(); - $params = ' --headless --convert-to ' . $targetFilter . ' --outdir ' - . escapeshellarg($outdir) - . ' --writer '. escapeshellarg($infile) - . ' -env:UserInstallation=file://' - . escapeshellarg(\OC::$server->getTempManager()->getTempBaseDir() . '/owncloud-' . \OC_Util::getInstanceId().'/') - ; - - file_put_contents($infile, $input); - shell_exec($cmd . $params); - $output = file_get_contents($outdir . '/' . basename($infile) . '.' . $targetExtension); - - return $output; - } - - /** - * convert via format-filter-server installed on the same host with openOffice - * @param string $input - * @return string - */ - protected static function convertExternal($input, $targetExtension){ - $options = array( - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HEADER => false, - CURLOPT_FOLLOWLOCATION => true, - CURLOPT_ENCODING => "", - CURLOPT_AUTOREFERER => true, - CURLOPT_CONNECTTIMEOUT => 120, - CURLOPT_TIMEOUT => 120, - CURLOPT_MAXREDIRS => 2, - CURLOPT_POST => 1, - CURLOPT_POSTFIELDS => $input, - CURLOPT_SSL_VERIFYHOST => 0, - CURLOPT_SSL_VERIFYPEER => 0, - CURLOPT_VERBOSE => 1 - ); - - $ch = curl_init(self::getAppConfig()->getAppValue('converter_url') . '?target_format=' . $targetExtension); - curl_setopt_array($ch, $options); - $content = curl_exec($ch); - if (curl_errno($ch)){ - \OC::$server->getLogger()->debug( - 'cURL error' . curl_errno($ch) . ':' . curl_error($ch), - ['app' => 'richdocuments'] - - ); - } - curl_close($ch); - - return $content; - } - - protected static function getAppConfig(){ - $app = new Application(); - $c = $app->getContainer(); - return $c->query('AppConfig'); - } - -} diff --git a/lib/filter/office.php b/lib/filter/office.php deleted file mode 100644 index bfbde6c1..00000000 --- a/lib/filter/office.php +++ /dev/null @@ -1,85 +0,0 @@ - - array ( - 'target' => 'application/vnd.oasis.opendocument.text', - 'format' => 'odt:writer8', - 'extension' => 'odt' - ), - 'write' => - array ( - 'target' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'format' => 'docx', - 'extension' => 'docx' - ) - ); - - array( - 'read' => - array ( - 'target' => 'application/vnd.oasis.opendocument.text', - 'format' => 'odt:writer8', - 'extension' => 'odt' - ), - 'write' => - array ( - 'target' => 'application/msword', - 'format' => 'doc', - 'extension' => 'doc' - ) - ); - - */ - - public function __construct($mimeSpec){ - $this->readSpec = $mimeSpec['read']; - $this->writeSpec = $mimeSpec['write']; - - \OCA\Richdocuments\Filter::add($mimeSpec['write']['target'], $this); - } - - public function read($data){ - return array( - 'mimetype' => $this->readSpec['target'], - 'content' => - \OCA\Richdocuments\Converter::convert( - $data['content'], - $this->readSpec['format'], - $this->readSpec['extension'] - ) - ); - } - - public function write($data){ - return array( - 'mimetype' => $this->writeSpec['target'], - 'content' => - \OCA\Richdocuments\Converter::convert( - $data['content'], - $this->writeSpec['format'], - $this->writeSpec['extension'] - ) - ); - } - -} diff --git a/lib/helper.php b/lib/helper.php index 46e682c8..db61a6ad 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -26,7 +26,7 @@ class Helper { return $path; } - + public static function getArrayValueByKey($array, $key, $default=''){ if (array_key_exists($key, $array)){ return $array[$key]; @@ -141,39 +141,5 @@ class Helper { $dB = str_pad(dechex(round($dB)), 2, "0", STR_PAD_LEFT); return $dR.$dG.$dB; } - - public static function findOpenOffice(){ - $config = \OC::$server->getConfig(); - $cmd = ''; - if (is_string($config->getSystemValue('preview_libreoffice_path', null))){ - $cmd = $config->getSystemValue('preview_libreoffice_path', null); - } - - $whichLibreOffice = shell_exec('which libreoffice'); - if ($cmd === '' && !empty($whichLibreOffice)){ - $cmd = 'libreoffice'; - } - - $whichOpenOffice = shell_exec('which openoffice'); - if ($cmd === '' && !empty($whichOpenOffice)){ - $cmd = 'openoffice'; - } - - if (empty($cmd)){ - \OC::$server->getLogger()->warn( - 'Pure configuration issue. Missing open office binary that is mandatory for conversion.', - ['app' => 'richdocuments'] - - ); - \OC::$server->getLogger()->debug( - 'If openoffice or libreoffice is already installed please specify the path to it using preview_libreoffice_path config. Refer to admin manual for details.', - ['app' => 'richdocuments'] - - ); - throw new \RuntimeException('Missing open office binary that is mandatory for conversion.'); - } - - return $cmd; - } } diff --git a/owncloud-ccs.spec.in b/owncloud-collabora-online.spec.in similarity index 91% rename from owncloud-ccs.spec.in rename to owncloud-collabora-online.spec.in index 530803cd..ae1e08b3 100644 --- a/owncloud-ccs.spec.in +++ b/owncloud-collabora-online.spec.in @@ -1,5 +1,5 @@ # -# spec file for package owncloud-ccs +# spec file for package owncloud-collabora-online # # Copyright (c) 2015 Collabora # @@ -15,13 +15,13 @@ # See also http://en.opensuse.org/openSUSE:Specfile_guidelines -Name: owncloud-ccs +Name: owncloud-collabora-online Version: @PACKAGE_VERSION@ Release: 0 Vendor: Collabora Summary: Collabora CloudSuite plugin for ownCloud License: MPL -Source0: owncloud-ccs-@PACKAGE_VERSION@.tar.gz +Source0: owncloud-collabora-online-@PACKAGE_VERSION@.tar.gz BuildArch: noarch Requires: owncloud Requires: loolwsd diff --git a/src/updateWebODF.sh b/src/updateWebODF.sh deleted file mode 100755 index e5f86e59..00000000 --- a/src/updateWebODF.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# Copies the needed files from the build dir of the WebODF pullbox branch -# -# Prepare the webodf build dir by calling: make webodf-debug.js-target editor-compiled.js-target - -if [ ! -e "README.md" ]; then - echo "Call me in the toplevel dir of OwnCloud Documents." - exit 1 -fi - -if [ $# -lt 1 ]; then - echo "Usage : $0 prepare|copy|patch" - exit 1 -fi - -WEBODF_BUILDDIR='build/' -WEBODF_SRCDIR='webodf/' - -# create folders -function prepare(){ - if [ ! -d "$WEBODF_SRCDIR" ]; then - git clone git@github.com:kogmbh/WebODF.git "$WEBODF_SRCDIR" - else - pushd "$WEBODF_SRCDIR" - git pull --rebase - popd - fi - - if [ ! -d "$WEBODF_BUILDDIR" ]; then - mkdir "$WEBODF_BUILDDIR" - fi - - pushd "$WEBODF_BUILDDIR" - cmake "../${WEBODF_SRCDIR}" - make all webodf-debug.js-target build-wodocollabtexteditor - popd -} - -# copy sources -function copy_sources(){ - # webodf.js - cp "$WEBODF_BUILDDIR"/webodf/webodf.js ./js/3rdparty/webodf - cp "$WEBODF_BUILDDIR"/webodf/webodf-debug.js ./js/3rdparty/webodf - # dojo - cp "$WEBODF_BUILDDIR"/programs/editor/dojo-amalgamation.js ./js/3rdparty/webodf - - # Tools, Editor, EditorSession, MemberListView: - cp "$WEBODF_BUILDDIR"/programs/editor/{Tools,Editor,EditorSession,MemberListView}.js ./js/3rdparty/webodf/editor - cp "$WEBODF_BUILDDIR"/programs/editor/backend/pullbox/* ./js/3rdparty/webodf/editor/backend/pullbox -R - cp "$WEBODF_BUILDDIR"/programs/editor/backend/ServerFactory.js ./js/3rdparty/webodf/editor/backend -R - cp "$WEBODF_BUILDDIR"/programs/editor/widgets ./js/3rdparty/webodf/editor -R - cp "$WEBODF_BUILDDIR"/wodocollabtexteditor/wodo/{wodotexteditor,wodocollabpane}.css ./css/3rdparty/webodf - - cp "$WEBODF_BUILDDIR"/programs/editor/dojo/* ./js/3rdparty/resources/dojo -R - cp "$WEBODF_BUILDDIR"/programs/editor/dojox/* ./js/3rdparty/resources/dojox -R - cp "$WEBODF_BUILDDIR"/programs/editor/dijit/* ./js/3rdparty/resources/dijit -R - - # files which need to be adapted manually: - # "$WEBODF_BUILDDIR"/programs/editor/dojo-deps/src/app/resources/app.css -> ./css/3rdparty/webodf/dojo-app.css - # dojo-app.css has other paths then upstream, needs to be manually adapted to changes - # also is dojo.css is not imported here, other than in upstream -} - -# patches against upstream -function patch_sources(){ - patch -p1 -i src/patches/Patch-EditorSession.patch - patch -p1 -i src/patches/Patch-MemberListView.patch - patch -p1 -i src/patches/Patch-Tools.patch - - #Just for the record - #patch -p1 -i src/patches/dojoStylesPill.patch -} - -case "$1" in - 'prepare' ) - prepare ;; - 'copy' ) - copy_sources ;; - 'patch' ) - patch_sources ;; -esac diff --git a/templates/admin.php b/templates/admin.php index 59cf7584..9d361439 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -1,43 +1,12 @@ -
-

t('Documents')) ?>

-

t('MS Word support (requires openOffice/libreOffice)')) ?>

-

- - /> -
- t('openOffice/libreOffice is installed on this server. Path to binary is provided via preview_libreoffice_path in config.php')) ?> -

-

- - /> -
- t('openOffice/libreOffice is installed on external server running a format filter server')) ?> -

-

- - /> -
- t('No MS Word support')) ?> -

-
> - -
t('Server URL')) ?> -
-
+
+

t('Collabora Online')) ?>


t('WOPI Client')) ?>
-
+
diff --git a/templates/documents.php b/templates/documents.php index 0c68ed4b..012d99ed 100644 --- a/templates/documents.php +++ b/templates/documents.php @@ -51,7 +51,6 @@ script('files', 'jquery.fileupload');
- diff --git a/templates/personal.php b/templates/personal.php index d4f41c75..616c97ac 100644 --- a/templates/personal.php +++ b/templates/personal.php @@ -1,8 +1,8 @@ -
-

t('Documents')); ?>

+
+

t('Collabora Online')); ?>

diff --git a/templates/settings.php b/templates/settings.php deleted file mode 100644 index 5d1b88af..00000000 --- a/templates/settings.php +++ /dev/null @@ -1,15 +0,0 @@ - -
-

t('Documents')) ?>

- - checked="checked" - - /> - -
diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 78c9fec1..6b314461 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -5,7 +5,7 @@ timeoutForMediumTests="900" timeoutForLargeTests="900" > - + . @@ -22,4 +22,4 @@ - \ No newline at end of file +