diff --git a/admin.php b/admin.php
index 9816fa76..82a227e9 100644
--- a/admin.php
+++ b/admin.php
@@ -1,10 +1,10 @@
getContainer()->query('\OCA\Documents\Controller\SettingsController')->adminIndex();
+$response = $app->getContainer()->query('\OCA\Richdocuments\Controller\SettingsController')->adminIndex();
return $response->render();
diff --git a/appinfo/app.php b/appinfo/app.php
index 97ee709a..796a00b4 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -1,7 +1,7 @@
getContainer();
-\OCP\App::registerAdmin('documents', 'admin');
-\OCP\App::registerPersonal('documents', 'personal');
+\OCP\App::registerAdmin('richdocuments', 'admin');
+\OCP\App::registerPersonal('richdocuments', 'personal');
$navigationEntry = function () use ($c) {
return [
- 'id' => 'documents_index',
+ 'id' => 'richdocuments_index',
'order' => 2,
- 'href' => $c->query('ServerContainer')->getURLGenerator()->linkToRoute('documents.document.index'),
- 'icon' => $c->query('ServerContainer')->getURLGenerator()->imagePath('documents', 'documents.svg'),
+ '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')
];
};
@@ -49,7 +49,7 @@ if (isset($request->server['REQUEST_URI'])) {
$url = $request->server['REQUEST_URI'];
if (preg_match('%index.php/apps/files(/.*)?%', $url)) {
- \OCP\Util::addScript('documents', 'viewer/viewer');
+ \OCP\Util::addScript('richdocuments', 'viewer/viewer');
}
}
@@ -311,4 +311,4 @@ if ($c->query('AppConfig')->isConverterEnabled()){
}
//Listen to delete file signal
-\OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Documents\Storage", "onDelete");
+\OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Richdocuments\Storage", "onDelete");
diff --git a/appinfo/application.php b/appinfo/application.php
index 1dda6655..465d4361 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -1,6 +1,6 @@
getContainer();
diff --git a/appinfo/database.xml b/appinfo/database.xml
index 86913184..443a4f54 100644
--- a/appinfo/database.xml
+++ b/appinfo/database.xml
@@ -5,7 +5,7 @@
false
utf8
- *dbprefix*documents_session
+ *dbprefix*richdocuments_session
@@ -43,7 +43,7 @@
- documents_session_ei_idx
+ richdocuments_session_ei_idx
true
true
@@ -56,7 +56,7 @@
- *dbprefix*documents_member
+ *dbprefix*richdocuments_member
@@ -119,7 +119,7 @@
- *dbprefix*documents_op
+ *dbprefix*richdocuments_op
@@ -162,7 +162,7 @@
- seq_pKey
+ richdocs_seq_pKey
true
seq
@@ -170,7 +170,7 @@
- documents_op_eis_idx
+ richdocuments_op_eis_idx
true
es_id
@@ -185,7 +185,7 @@
- *dbprefix*documents_invite
+ *dbprefix*richdocuments_invite
@@ -218,7 +218,7 @@
- *dbprefix*documents_revisions
+ *dbprefix*richdocuments_revisions
@@ -259,7 +259,7 @@
- documents_rev_eis_idx
+ richdocuments_rev_eis_idx
true
es_id
diff --git a/appinfo/info.xml b/appinfo/info.xml
index b68060fd..5d9b74a5 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -1,6 +1,6 @@
- documents
+ richdocuments
Collabora Online Development Edition
An ownCloud app to work with office documents
AGPL
@@ -13,7 +13,6 @@
- public.php
+ public.php
- 168711
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 8b23332a..fbcba020 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -1,6 +1,6 @@
registerRoutes($this, [
'routes' => [
//users
diff --git a/appinfo/update.php b/appinfo/update.php
deleted file mode 100644
index 8406ae51..00000000
--- a/appinfo/update.php
+++ /dev/null
@@ -1,51 +0,0 @@
-getConfig();
-$dbConnection = \OC::$server->getDatabaseConnection();
-$installedVersion = $config->getAppValue('documents', 'installed_version');
-
-$cleanup = $dbConnection->prepare('DELETE FROM `*PREFIX*documents_member` WHERE `last_activity`=0 or `last_activity` is NULL');
-$cleanup->execute();
-
-if (version_compare($installedVersion, '0.7', '<=')) {
- $config->setAppValue('documents', 'unstable', 'false');
- $session = new \OCA\Documents\Db\Session();
-
- $query = $dbConnection->prepare('UPDATE `*PREFIX*documents_session` SET `genesis_url`=? WHERE `es_id`=?');
-
- foreach ($session->getCollection() as $sessionData){
- $sessionData['genesis_url'] = \OCA\Documents\Genesis::DOCUMENTS_DIRNAME . $sessionData['genesis_url'];
- $query->execute(array(
- $sessionData['genesis_url'],
- $sessionData['es_id']
- ));
-
- }
-}
-if (version_compare($installedVersion, '0.8', '<')) {
- $query = $dbConnection->prepare('UPDATE `*PREFIX*documents_member` SET `is_guest`=1 WHERE `uid` LIKE \'%(guest)\' ');
- $query->execute(array());
-}
-
-if (version_compare($installedVersion, '0.9', '<')) {
- $query = $dbConnection->prepare('UPDATE `*PREFIX*documents_op` SET `optype`=? WHERE `seq`=?');
- $ops = new \OCA\Documents\Db\Op();
- foreach ($ops->getCollection() as $opData){
- $opSpec = json_decode($opData['opspec'], true);
- $query->execute(
- array(
- $opSpec['optype'],
- $opData['seq']
- )
- );
- }
-}
\ No newline at end of file
diff --git a/controller/documentcontroller.php b/controller/documentcontroller.php
index 26384ed8..4da29099 100644
--- a/controller/documentcontroller.php
+++ b/controller/documentcontroller.php
@@ -1,6 +1,6 @@
getNavigationManager()->setActiveEntry( 'documents_index' );
+ \OC::$server->getNavigationManager()->setActiveEntry( 'richdocuments_index' );
$maxUploadFilesize = \OCP\Util::maxUploadFilesize("/");
- $response = new TemplateResponse('documents', 'documents', [
+ $response = new TemplateResponse('richdocuments', 'documents', [
'enable_previews' => $this->settings->getSystemValue('enable_previews', true),
- 'useUnstable' => $this->settings->getAppValue('documents', 'unstable', 'false'),
- 'savePath' => $this->settings->getUserValue($this->uid, 'documents', 'save_path', '/'),
+ 'useUnstable' => $this->settings->getAppValue('richdocuments', 'unstable', 'false'),
+ 'savePath' => $this->settings->getUserValue($this->uid, 'richdocuments', 'save_path', '/'),
'uploadMaxFilesize' => $maxUploadFilesize,
'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize),
'allowShareWithLink' => $this->settings->getAppValue('core', 'shareapi_allow_links', 'yes'),
@@ -240,7 +240,7 @@ class DocumentController extends Controller{
$fullPath = '/files' . $path;
$fileInfo = \OC\Files\Filesystem::getFileInfo($path);
if ($fileInfo){
- if($fileInfo->getMimeType() !== \OCA\Documents\Filter\Office::NATIVE_MIMETYPE){
+ if($fileInfo->getMimeType() !== \OCA\Richdocuments\Filter\Office::NATIVE_MIMETYPE){
$file = new File($fileInfo->getId());
$genesis = new Genesis($file);
$fullPath = $genesis->getPath();
diff --git a/controller/sessioncontroller.php b/controller/sessioncontroller.php
index f8c6b6e7..916f00d1 100644
--- a/controller/sessioncontroller.php
+++ b/controller/sessioncontroller.php
@@ -1,6 +1,6 @@
uid){
$view = new View('/' . $this->uid . '/files');
- $dir = \OC::$server->getConfig()->getUserValue($this->uid, 'documents', 'save_path', '');
+ $dir = \OC::$server->getConfig()->getUserValue($this->uid, 'richdocuments', 'save_path', '');
$path = Helper::getNewFileName($view, $dir . 'New Document.odt');
} else {
throw $e;
diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php
index c9d90a54..3e008a7b 100644
--- a/controller/settingscontroller.php
+++ b/controller/settingscontroller.php
@@ -1,6 +1,6 @@
'
- + t('documents', 'No documents were found. Upload or create a document to get started!')
+ + t('richdocuments', 'No documents were found. Upload or create a document to get started!')
+ ''
);
} else {
@@ -239,7 +239,7 @@ var documentsMain = {
$('#memberList .memberListButton').css({opacity : 0.3});
$('#ocToolbar').children(':not(#document-title)').hide();
$('').prependTo('#memberList');
- $('' + t('documents', 'No connection to server. Trying to reconnect.') +'
').prependTo('#ocToolbar');
+ $('' + t('richdocuments', 'No connection to server. Trying to reconnect.') +'
').prependTo('#ocToolbar');
},
hideLostConnection : function() {
@@ -289,7 +289,7 @@ var documentsMain = {
documentsMain.isEditorMode = true;
documentsMain.overlay.documentOverlay('show');
$(window).on('beforeunload', function(){
- return t('documents', "Leaving this page in Editor mode might cause unsaved data. It is recommended to use 'Close' button instead.");
+ return t('richdocuments', "Leaving this page in Editor mode might cause unsaved data. It is recommended to use 'Close' button instead.");
});
$(window).on("unload", documentsMain.onTerminate);
},
@@ -308,7 +308,7 @@ var documentsMain = {
$(documentsMain.toolbar).appendTo('#header');
if (!response || !response.status || response.status==='error'){
- documentsMain.onEditorShutdown(t('documents', 'Failed to load this document. Please check if it can be opened with an external editor. This might also mean it has been unshared or deleted recently.'));
+ documentsMain.onEditorShutdown(t('richdocuments', 'Failed to load this document. Please check if it can be opened with an external editor. This might also mean it has been unshared or deleted recently.'));
return;
}
@@ -320,11 +320,11 @@ var documentsMain = {
}
var pollUrl = documentsMain.isGuest
- ? OC.generateUrl('apps/documents/session/guest/poll/{token}', {'token' : $("[name='document']").val()})
- : OC.generateUrl('apps/documents/session/user/poll'),
+ ? OC.generateUrl('apps/richdocuments/session/guest/poll/{token}', {'token' : $("[name='document']").val()})
+ : OC.generateUrl('apps/richdocuments/session/user/poll'),
saveUrl = documentsMain.isGuest
- ? OC.generateUrl('apps/documents/session/guest/save/{token}', {'token' : $("[name='document']").val()})
- : OC.generateUrl('apps/documents/session/user/save')
+ ? OC.generateUrl('apps/richdocuments/session/guest/save/{token}', {'token' : $("[name='document']").val()})
+ : OC.generateUrl('apps/richdocuments/session/user/save')
;
documentsMain.canShare = !documentsMain.isGuest
&& typeof OC.Share !== 'undefined' && response.permissions & OC.PERMISSION_SHARE;
@@ -341,7 +341,7 @@ var documentsMain = {
documentsMain.loadDocument();
if (documentsMain.isGuest){
- $('#odf-close').text(t('documents', 'Save') );
+ $('#odf-close').text(t('richdocuments', 'Save') );
$('#odf-close').removeClass('icon-view-close');
}
});
@@ -352,9 +352,9 @@ var documentsMain = {
console.log('joining session '+fileId);
var url;
if (documentsMain.isGuest){
- url = OC.generateUrl('apps/documents/session/guest/join/{token}', {token: fileId});
+ url = OC.generateUrl('apps/richdocuments/session/guest/join/{token}', {token: fileId});
} else {
- url = OC.generateUrl('apps/documents/session/user/join/{file_id}', {file_id: fileId});
+ url = OC.generateUrl('apps/richdocuments/session/user/join/{file_id}', {file_id: fileId});
}
$.post(
url,
@@ -364,7 +364,7 @@ var documentsMain = {
},
view : function(id){
- OC.addScript('documents', 'viewer/viewer', function() {
+ OC.addScript('richdocuments', 'viewer/viewer', function() {
documentsMain.prepareGrid();
$(window).off('beforeunload');
$(window).off('unload');
@@ -396,7 +396,7 @@ var documentsMain = {
docElem.insertAfter('.documentslist .template');
docElem.show();
$.post(
- OC.generateUrl('apps/documents/ajax/documents/create'),
+ OC.generateUrl('apps/richdocuments/ajax/documents/create'),
{ mimetype : mimetype },
function(response){
if (response && response.fileid){
@@ -414,7 +414,7 @@ var documentsMain = {
},
changeNick: function(memberId, name, node){
- var url = OC.generateUrl('apps/documents/ajax/user/rename');
+ var url = OC.generateUrl('apps/richdocuments/ajax/user/rename');
$.ajax({
url: url,
type: "POST",
@@ -489,7 +489,7 @@ var documentsMain = {
},
loadDocument: function() {
- var url = OC.generateUrl('apps/documents/load/{file_id}', {file_id: documentsMain.fileId});
+ var url = OC.generateUrl('apps/richdocuments/load/{file_id}', {file_id: documentsMain.fileId});
$.post(
url,
{},
@@ -498,7 +498,7 @@ var documentsMain = {
if (result.message){
documentsMain.IU.notify(result.message);
}
- documentsMain.onEditorShutdown(t('documents', 'Failed to load this document. Please check if it can be opened with an external editor. This might also mean it has been unshared or deleted recently.'));
+ documentsMain.onEditorShutdown(t('richdocuments', 'Failed to load this document. Please check if it can be opened with an external editor. This might also mean it has been unshared or deleted recently.'));
return;
}
@@ -511,7 +511,7 @@ var documentsMain = {
},
saveDocumentBack: function() {
- var url = OC.generateUrl('apps/documents/save/{file_id}', {file_id: documentsMain.fileId});
+ var url = OC.generateUrl('apps/richdocuments/save/{file_id}', {file_id: documentsMain.fileId});
$.post(
url,
{ basename : documentsMain.baseName },
@@ -520,7 +520,7 @@ var documentsMain = {
if (result.message){
documentsMain.IU.notify(result.message);
}
- documentsMain.onEditorShutdown(t('documents', 'Failed to save this document. Please check if it can be saved with an external editor. This might also mean it has been unshared or deleted recently.'));
+ documentsMain.onEditorShutdown(t('richdocuments', 'Failed to save this document. Please check if it can be saved with an external editor. This might also mean it has been unshared or deleted recently.'));
return;
}
}
@@ -528,7 +528,7 @@ var documentsMain = {
},
closeDocument: function() {
- var url = OC.generateUrl('apps/documents/close/{file_id}', {file_id: documentsMain.fileId});
+ var url = OC.generateUrl('apps/richdocuments/close/{file_id}', {file_id: documentsMain.fileId});
$.post(
url,
{ basename : documentsMain.baseName }
@@ -536,7 +536,7 @@ var documentsMain = {
},
renameDocument: function(name) {
- var url = OC.generateUrl('apps/documents/ajax/documents/rename/{file_id}', {file_id: documentsMain.fileId});
+ var url = OC.generateUrl('apps/richdocuments/ajax/documents/rename/{file_id}', {file_id: documentsMain.fileId});
$.post(
url,
{ name : name },
@@ -592,9 +592,9 @@ var documentsMain = {
onTerminate: function(){
var url = '';
if (documentsMain.isGuest){
- url = OC.generateUrl('apps/documents/ajax/user/disconnectGuest/{member_id}', {member_id: documentsMain.memberId});
+ url = OC.generateUrl('apps/richdocuments/ajax/user/disconnectGuest/{member_id}', {member_id: documentsMain.memberId});
} else {
- url = OC.generateUrl('apps/documents/ajax/user/disconnect/{member_id}', {member_id: documentsMain.memberId});
+ url = OC.generateUrl('apps/richdocuments/ajax/user/disconnect/{member_id}', {member_id: documentsMain.memberId});
}
$.ajax({
type: "POST",
@@ -613,7 +613,7 @@ var documentsMain = {
if (documentsMain.isGuest){
return;
}
- documentsMain.UI.showProgress(t('documents', 'Loading documents...'));
+ documentsMain.UI.showProgress(t('richdocuments', 'Loading documents...'));
documentsMain.docs.documentGrid('render');
documentsMain.UI.hideProgress();
}
diff --git a/js/locale.js b/js/locale.js
index 998a4e12..eb9a5740 100644
--- a/js/locale.js
+++ b/js/locale.js
@@ -1,48 +1,48 @@
-t('documents', 'Align Left');
-t('documents', 'Alignment');
-t('documents', 'Align Right');
-t('documents', 'Annotate');
-t('documents', 'Background');
-t('documents', 'Bold');
-t('documents', 'Bottom');
-t('documents', 'Cancel');
-t('documents', 'Center');
-t('documents', 'Clone');
-t('documents', 'Clone this Style');
-t('documents', 'Close');
-t('documents', 'Color');
-t('documents', 'Create');
-t('documents', 'Decrease Indent');
-t('documents', 'Default Style');
-t('documents', 'Delete');
-t('documents', 'Family');
-t('documents', 'Font');
-t('documents', 'Font Effects');
-t('documents', 'Format');
-t('documents', 'Increase Indent');
-t('documents', 'Insert Image');
-t('documents', 'Invite Members');
-t('documents', 'Italic');
-t('documents', 'Justified');
-t('documents', 'Justify');
-t('documents', 'Left');
-t('documents', 'Loading');
-t('documents', 'Members');
-t('documents', 'New Name:');
-t('documents', 'OK');
-t('documents', 'Open');
-t('documents', 'Options');
-t('documents', 'Paragraph...');
-t('documents', 'Paragraph Styles');
-t('documents', 'Redo');
-t('documents', 'Right');
-t('documents', 'Save');
-t('documents', 'Size');
-t('documents', 'Spacing');
-t('documents', 'Strikethrough');
-t('documents', 'Style');
-t('documents', 'Text');
-t('documents', 'Top');
-t('documents', 'Underline');
-t('documents', 'Undo');
-t('documents', 'Unknown Author');
+t('richdocuments', 'Align Left');
+t('richdocuments', 'Alignment');
+t('richdocuments', 'Align Right');
+t('richdocuments', 'Annotate');
+t('richdocuments', 'Background');
+t('richdocuments', 'Bold');
+t('richdocuments', 'Bottom');
+t('richdocuments', 'Cancel');
+t('richdocuments', 'Center');
+t('richdocuments', 'Clone');
+t('richdocuments', 'Clone this Style');
+t('richdocuments', 'Close');
+t('richdocuments', 'Color');
+t('richdocuments', 'Create');
+t('richdocuments', 'Decrease Indent');
+t('richdocuments', 'Default Style');
+t('richdocuments', 'Delete');
+t('richdocuments', 'Family');
+t('richdocuments', 'Font');
+t('richdocuments', 'Font Effects');
+t('richdocuments', 'Format');
+t('richdocuments', 'Increase Indent');
+t('richdocuments', 'Insert Image');
+t('richdocuments', 'Invite Members');
+t('richdocuments', 'Italic');
+t('richdocuments', 'Justified');
+t('richdocuments', 'Justify');
+t('richdocuments', 'Left');
+t('richdocuments', 'Loading');
+t('richdocuments', 'Members');
+t('richdocuments', 'New Name:');
+t('richdocuments', 'OK');
+t('richdocuments', 'Open');
+t('richdocuments', 'Options');
+t('richdocuments', 'Paragraph...');
+t('richdocuments', 'Paragraph Styles');
+t('richdocuments', 'Redo');
+t('richdocuments', 'Right');
+t('richdocuments', 'Save');
+t('richdocuments', 'Size');
+t('richdocuments', 'Spacing');
+t('richdocuments', 'Strikethrough');
+t('richdocuments', 'Style');
+t('richdocuments', 'Text');
+t('richdocuments', 'Top');
+t('richdocuments', 'Underline');
+t('richdocuments', 'Undo');
+t('richdocuments', 'Unknown Author');
diff --git a/js/personal.js b/js/personal.js
index 3ff0a69b..7bf434f4 100644
--- a/js/personal.js
+++ b/js/personal.js
@@ -5,7 +5,7 @@ $(document).ready(function(){
savePath : $('#documents-default-path').val()
};
OC.msg.startSaving('#documents-personal .msg');
- $.post(OC.filePath('documents', 'ajax', 'personal.php'), data, documentsSettings.afterSave);
+ $.post(OC.filePath('richdocuments', 'ajax', 'personal.php'), data, documentsSettings.afterSave);
},
afterSave : function(data){
OC.msg.finishedSaving('#documents-personal .msg', data);
diff --git a/js/settings.js b/js/settings.js
index 87e29657..b27fafaf 100644
--- a/js/settings.js
+++ b/js/settings.js
@@ -5,7 +5,7 @@ $(document).ready(function(){
var data = {
unstable : $('#webodf-unstable').attr('checked')==="checked"
};
- $.post(OC.generateUrl('apps/documents/ajax/config/unstable'), data, documentsSettings.afterSave);
+ $.post(OC.generateUrl('apps/richdocuments/ajax/config/unstable'), data, documentsSettings.afterSave);
},
afterSave : function(){
documentsMain.useUnstable = $('#webodf-unstable').attr('checked')==="checked";
diff --git a/js/viewer/viewer.js b/js/viewer/viewer.js
index 9f88dcbb..8613116d 100644
--- a/js/viewer/viewer.js
+++ b/js/viewer/viewer.js
@@ -60,7 +60,7 @@ var odfViewer = {
OC.PERMISSION_UPDATE,
OC.imagePath('core', 'actions/rename'),
odfViewer.onEdit,
- t('documents', 'Edit')
+ t('richdocuments', 'Edit')
);
OCA.Files.fileActions.setDefault(mimeReadWrite, 'Edit');
}
@@ -78,7 +78,7 @@ var odfViewer = {
onEdit : function(fileName, context){
var fileId = context.$file.attr('data-id');
- window.location = OC.generateUrl('apps/documents/index#{file_id}', {file_id: fileId});
+ window.location = OC.generateUrl('apps/richdocuments/index#{file_id}', {file_id: fileId});
},
onView: function(filename, context) {
@@ -119,7 +119,7 @@ $(document).ready(function() {
&& typeof OCA.Files.fileActions !== 'undefined'
) {
$.get(
- OC.filePath('documents', 'ajax', 'mimes.php'),
+ OC.filePath('richdocuments', 'ajax', 'mimes.php'),
{},
odfViewer.register
);
diff --git a/js/widgets/ocShare.js b/js/widgets/ocShare.js
index cb81f31e..03bc54e0 100644
--- a/js/widgets/ocShare.js
+++ b/js/widgets/ocShare.js
@@ -5,7 +5,7 @@ define("owncloud/widgets/ocShare",
return declare("OcShare", [_WidgetBase, _TemplatedMixin], {
templateString: ''
+ '
',
postCreate: function () {
this.inherited(arguments);
@@ -21,7 +21,7 @@ define("owncloud/widgets/ocShare",
var target = OC.Share.showLink;
OC.Share.showLink = function () {
var r = target.apply(this, arguments);
- $('#linkText').val($('#linkText').val().replace('index.php/s/', 'public.php?service=documents&t='));
+ $('#linkText').val($('#linkText').val().replace('index.php/s/', 'public.php?service=richdocuments&t='));
return r;
};
})();
diff --git a/lib/appconfig.php b/lib/appconfig.php
index 1f4463d0..a83ceae3 100644
--- a/lib/appconfig.php
+++ b/lib/appconfig.php
@@ -1,6 +1,6 @@
'off',
'converter_url' => 'http://localhost:16080',
diff --git a/lib/converter.php b/lib/converter.php
index 3d325e3d..2ddfbc96 100644
--- a/lib/converter.php
+++ b/lib/converter.php
@@ -1,7 +1,7 @@
getLogger()->warn(
'Conversion test failed. Raw output:' . $result,
- ['app' => 'documents']
+ ['app' => 'richdocuments']
);
return false;
@@ -61,7 +61,7 @@ class Converter {
if (empty($output)){
\OC::$server->getLogger()->warn(
'Empty conversion output',
- ['app' => 'documents']
+ ['app' => 'richdocuments']
);
throw new \RuntimeException('Empty conversion output');
@@ -129,7 +129,7 @@ class Converter {
if (curl_errno($ch)){
\OC::$server->getLogger()->debug(
'cURL error' . curl_errno($ch) . ':' . curl_error($ch),
- ['app' => 'documents']
+ ['app' => 'richdocuments']
);
}
diff --git a/lib/db.php b/lib/db.php
index 53935830..10035714 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -1,6 +1,6 @@
getL10n('documents')->t('guest') . ')';
+ return '(' . \OC::$server->getL10n('richdocuments')->t('guest') . ')';
}
diff --git a/lib/db/op.php b/lib/db/op.php
index e795da6d..ee8cf760 100644
--- a/lib/db/op.php
+++ b/lib/db/op.php
@@ -1,6 +1,6 @@
loadBy('file_id', $file->getFileId());
@@ -72,8 +72,8 @@ class Session extends \OCA\Documents\Db {
->getData()
;
- $memberColor = \OCA\Documents\Helper::getMemberColor($uid);
- $member = new \OCA\Documents\Db\Member([
+ $memberColor = \OCA\Richdocuments\Helper::getMemberColor($uid);
+ $member = new \OCA\Richdocuments\Db\Member([
$sessionData['es_id'],
$uid,
$memberColor,
@@ -95,11 +95,11 @@ class Session extends \OCA\Documents\Db {
}
$displayName = $file->isPublicShare()
- ? $uid . ' ' . \OCA\Documents\Db\Member::getGuestPostfix()
+ ? $uid . ' ' . \OCA\Richdocuments\Db\Member::getGuestPostfix()
: \OC::$server->getUserSession()->getUser()->getDisplayName($uid)
;
$userId = $file->isPublicShare() ? $displayName : \OC::$server->getUserSession()->getUser()->getUID();
- $op = new \OCA\Documents\Db\Op();
+ $op = new \OCA\Richdocuments\Db\Op();
$op->addMember(
$sessionData['es_id'],
$sessionData['member_id'],
@@ -119,17 +119,17 @@ class Session extends \OCA\Documents\Db {
$session = new Session();
$session->deleteBy('es_id', $esId);
- $member = new \OCA\Documents\Db\Member();
+ $member = new \OCA\Richdocuments\Db\Member();
$member->deleteBy('es_id', $esId);
- $op= new \OCA\Documents\Db\Op();
+ $op= new \OCA\Richdocuments\Db\Op();
$op->deleteBy('es_id', $esId);
}
public function syncOps($memberId, $currentHead, $clientHead, $clientOps){
$hasOps = count($clientOps)>0;
- $op = new \OCA\Documents\Db\Op();
+ $op = new \OCA\Richdocuments\Db\Op();
// TODO handle the case ($currentHead == "") && ($seqHead != "")
if ($clientHead == $currentHead) {
@@ -137,7 +137,7 @@ class Session extends \OCA\Documents\Db {
if ($hasOps) {
// incoming ops without conflict
// Add incoming ops, respond with a new head
- $newHead = \OCA\Documents\Db\Op::addOpsArray($this->getEsId(), $memberId, $clientOps);
+ $newHead = \OCA\Richdocuments\Db\Op::addOpsArray($this->getEsId(), $memberId, $clientOps);
$result = array(
'result' => 'added',
'head_seq' => $newHead ? $newHead : $currentHead
@@ -169,7 +169,7 @@ class Session extends \OCA\Documents\Db {
public function updateGenesisHash($esId, $genesisHash){
return $this->execute(
- 'UPDATE `*PREFIX*documents_session` SET `genesis_hash`=? WHERE `es_id`=?',
+ 'UPDATE `*PREFIX*richdocuments_session` SET `genesis_hash`=? WHERE `es_id`=?',
array(
$genesisHash, $esId
)
@@ -180,7 +180,7 @@ class Session extends \OCA\Documents\Db {
$result = $this->execute('
SELECT `s`.*, COUNT(`m`.`member_id`) AS `users`
FROM ' . $this->tableName . ' AS `s`
- LEFT JOIN `*PREFIX*documents_member` AS `m` ON `s`.`es_id`=`m`.`es_id`
+ LEFT JOIN `*PREFIX*richdocuments_member` AS `m` ON `s`.`es_id`=`m`.`es_id`
AND `m`.`status`=' . Db\Member::MEMBER_STATUS_ACTIVE . '
AND `m`.`uid` != ?
WHERE `s`.`es_id` = ?
diff --git a/lib/downloadresponse.php b/lib/downloadresponse.php
index a24ca447..01115b30 100644
--- a/lib/downloadresponse.php
+++ b/lib/downloadresponse.php
@@ -1,6 +1,6 @@
ETag = $info['etag'];
$content = $this->view->file_get_contents($this->path);
- $data = \OCA\Documents\Filter::read($content, $info['mimetype']);
+ $data = \OCA\Richdocuments\Filter::read($content, $info['mimetype']);
$size = strlen($data['content']);
diff --git a/lib/file.php b/lib/file.php
index fb6ae9fb..4668e569 100644
--- a/lib/file.php
+++ b/lib/file.php
@@ -1,6 +1,6 @@
ownerView->getMimeType($this->path);
if (!Filter::isSupportedMimetype($mimetype)){
- throw new \Exception( $this->path . ' is ' . $mimetype . ' and is not supported by Documents app');
+ throw new \Exception( $this->path . ' is ' . $mimetype . ' and is not supported by RichDocuments app');
}
}
diff --git a/lib/filter.php b/lib/filter.php
index bfd6b598..9b5a93f1 100644
--- a/lib/filter.php
+++ b/lib/filter.php
@@ -1,7 +1,7 @@
readSpec = $mimeSpec['read'];
$this->writeSpec = $mimeSpec['write'];
- \OCA\Documents\Filter::add($mimeSpec['write']['target'], $this);
+ \OCA\Richdocuments\Filter::add($mimeSpec['write']['target'], $this);
}
public function read($data){
return array(
'mimetype' => $this->readSpec['target'],
'content' =>
- \OCA\Documents\Converter::convert(
+ \OCA\Richdocuments\Converter::convert(
$data['content'],
$this->readSpec['format'],
$this->readSpec['extension']
@@ -74,7 +74,7 @@ class Office {
return array(
'mimetype' => $this->writeSpec['target'],
'content' =>
- \OCA\Documents\Converter::convert(
+ \OCA\Richdocuments\Converter::convert(
$data['content'],
$this->writeSpec['format'],
$this->writeSpec['extension']
diff --git a/lib/genesis.php b/lib/genesis.php
index 345e7a78..de0e0c87 100644
--- a/lib/genesis.php
+++ b/lib/genesis.php
@@ -1,6 +1,6 @@
getLogger()->warn(
'Pure configuration issue. Missing open office binary that is mandatory for conversion.',
- ['app' => 'documents']
+ ['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' => 'documents']
+ ['app' => 'richdocuments']
);
throw new \RuntimeException('Missing open office binary that is mandatory for conversion.');
diff --git a/lib/storage.php b/lib/storage.php
index 31e28e5f..ce65d39c 100644
--- a/lib/storage.php
+++ b/lib/storage.php
@@ -1,7 +1,7 @@
getContainer()->query('\OCA\Documents\Controller\SettingsController')->personalIndex();
+$response = $app->getContainer()->query('\OCA\Richdocuments\Controller\SettingsController')->personalIndex();
return $response->render();
diff --git a/public.php b/public.php
index b3b84eee..74481487 100644
--- a/public.php
+++ b/public.php
@@ -1,7 +1,7 @@
assign('hasPassword', true);
} else {
- \OCP\Util::addStyle( 'documents', '3rdparty/webodf/dojo-app');
- \OCP\Util::addScript('documents', 'documents');
+ \OCP\Util::addStyle( 'richdocuments', '3rdparty/webodf/dojo-app');
+ \OCP\Util::addScript('richdocuments', 'documents');
if ($file->getFileId()){
$session = new Db\Session();
$session->loadBy('file_id', $file->getFileId());
diff --git a/settings.php b/settings.php
index 7a36b929..5d801f45 100644
--- a/settings.php
+++ b/settings.php
@@ -1,7 +1,7 @@
getContainer()->query('\OCA\Documents\Controller\SettingsController')->settingsIndex();
+$response = $app->getContainer()->query('\OCA\Richdocuments\Controller\SettingsController')->settingsIndex();
return $response->render();
diff --git a/templates/admin.php b/templates/admin.php
index 6b088eed..2d391d30 100644
--- a/templates/admin.php
+++ b/templates/admin.php
@@ -1,5 +1,5 @@
t('Documents')) ?>
diff --git a/templates/documents.php b/templates/documents.php
index ccce1174..cd639fda 100644
--- a/templates/documents.php
+++ b/templates/documents.php
@@ -1,9 +1,9 @@
t('Documents')); ?>
diff --git a/templates/public.php b/templates/public.php
index cd34217e..11001dca 100644
--- a/templates/public.php
+++ b/templates/public.php
@@ -1,5 +1,5 @@
diff --git a/templates/settings.php b/templates/settings.php
index c835bb44..5d1b88af 100644
--- a/templates/settings.php
+++ b/templates/settings.php
@@ -1,5 +1,5 @@
t('Documents')) ?>
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index fe1e965c..6ef476d1 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -9,5 +9,5 @@ require_once __DIR__.'/../../../lib/base.php';
if(!class_exists('PHPUnit_Framework_TestCase')) {
require_once('PHPUnit/Autoload.php');
}
-\OC_App::loadApp('documents');
+\OC_App::loadApp('richdocuments');
OC_Hook::clear();
diff --git a/tests/controller/documentcontrollertest.php b/tests/controller/documentcontrollertest.php
index cbc17ce3..ca6f4f54 100644
--- a/tests/controller/documentcontrollertest.php
+++ b/tests/controller/documentcontrollertest.php
@@ -1,6 +1,6 @@