Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2015-12-16 17:57:44 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2015-12-16 18:04:32 +0300
commit447610b2603b8d258a90fc93ecb54708f70a002d (patch)
tree76763a13faa5bb2f4164d018fdad7f94da9e5a41
parent840a124b66d404c57c22e2ea566c6c4b1b83601b (diff)
Fix appid
-rw-r--r--admin.php6
-rw-r--r--appinfo/app.php22
-rw-r--r--appinfo/application.php16
-rw-r--r--appinfo/database.xml18
-rw-r--r--appinfo/info.xml5
-rw-r--r--appinfo/routes.php6
-rw-r--r--appinfo/update.php51
-rw-r--r--controller/documentcontroller.php28
-rw-r--r--controller/sessioncontroller.php14
-rw-r--r--controller/settingscontroller.php10
-rw-r--r--controller/usercontroller.php6
-rw-r--r--js/3rdparty/webodf/editor/EditorSession.js4
-rw-r--r--js/ServerFactory.js2
-rw-r--r--js/admin.js4
-rw-r--r--js/documents.js50
-rw-r--r--js/locale.js96
-rw-r--r--js/personal.js2
-rw-r--r--js/settings.js2
-rw-r--r--js/viewer/viewer.js6
-rw-r--r--js/widgets/ocShare.js4
-rw-r--r--lib/appconfig.php6
-rw-r--r--lib/converter.php12
-rw-r--r--lib/db.php8
-rw-r--r--lib/db/member.php16
-rw-r--r--lib/db/op.php12
-rw-r--r--lib/db/session.php40
-rw-r--r--lib/downloadresponse.php6
-rw-r--r--lib/file.php6
-rw-r--r--lib/filter.php4
-rw-r--r--lib/filter/office.php10
-rw-r--r--lib/genesis.php4
-rw-r--r--lib/helper.php10
-rw-r--r--lib/storage.php4
-rw-r--r--personal.php8
-rw-r--r--public.php8
-rw-r--r--settings.php8
-rw-r--r--templates/admin.php2
-rw-r--r--templates/documents.php10
-rw-r--r--templates/personal.php2
-rw-r--r--templates/public.php2
-rw-r--r--templates/settings.php2
-rw-r--r--tests/bootstrap.php2
-rw-r--r--tests/controller/documentcontrollertest.php6
43 files changed, 244 insertions, 296 deletions
diff --git a/admin.php b/admin.php
index 9816fa76..82a227e9 100644
--- a/admin.php
+++ b/admin.php
@@ -1,10 +1,10 @@
<?php
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
-use \OCA\Documents\AppInfo\Application;
+use \OCA\Richdocuments\AppInfo\Application;
$app = new Application();
-$response = $app->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Frank Karlitschek
* @copyright 2013-2014 Frank Karlitschek karlitschek@kde.org
@@ -21,23 +21,23 @@
*
*/
-namespace OCA\Documents\AppInfo;
+namespace OCA\Richdocuments\AppInfo;
-use OCA\Documents\Filter\Office;
-use OCA\Documents\Config;
+use OCA\Richdocuments\Filter\Office;
+use OCA\Richdocuments\Config;
$app = new Application();
$c = $app->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -9,19 +9,19 @@
* later.
*/
-namespace OCA\Documents\AppInfo;
+namespace OCA\Richdocuments\AppInfo;
use \OCP\AppFramework\App;
-use \OCA\Documents\Controller\UserController;
-use \OCA\Documents\Controller\SessionController;
-use \OCA\Documents\Controller\DocumentController;
-use \OCA\Documents\Controller\SettingsController;
-use \OCA\Documents\AppConfig;
+use \OCA\Richdocuments\Controller\UserController;
+use \OCA\Richdocuments\Controller\SessionController;
+use \OCA\Richdocuments\Controller\DocumentController;
+use \OCA\Richdocuments\Controller\SettingsController;
+use \OCA\Richdocuments\AppConfig;
class Application extends App {
public function __construct (array $urlParams = array()) {
- parent::__construct('documents', $urlParams);
+ parent::__construct('richdocuments', $urlParams);
$container = $this->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 @@
<overwrite>false</overwrite>
<charset>utf8</charset>
<table>
- <name>*dbprefix*documents_session</name>
+ <name>*dbprefix*richdocuments_session</name>
<declaration>
<field>
@@ -43,7 +43,7 @@
</field>
<index>
- <name>documents_session_ei_idx</name>
+ <name>richdocuments_session_ei_idx</name>
<primary>true</primary>
<unique>true</unique>
<field>
@@ -56,7 +56,7 @@
</table>
<table>
- <name>*dbprefix*documents_member</name>
+ <name>*dbprefix*richdocuments_member</name>
<declaration>
<field>
@@ -119,7 +119,7 @@
</table>
<table>
- <name>*dbprefix*documents_op</name>
+ <name>*dbprefix*richdocuments_op</name>
<declaration>
<field>
@@ -162,7 +162,7 @@
</field>
<index>
- <name>seq_pKey</name>
+ <name>richdocs_seq_pKey</name>
<primary>true</primary>
<field>
<name>seq</name>
@@ -170,7 +170,7 @@
</field>
</index>
<index>
- <name>documents_op_eis_idx</name>
+ <name>richdocuments_op_eis_idx</name>
<unique>true</unique>
<field>
<name>es_id</name>
@@ -185,7 +185,7 @@
</declaration>
</table>
<table>
- <name>*dbprefix*documents_invite</name>
+ <name>*dbprefix*richdocuments_invite</name>
<declaration>
<field>
@@ -218,7 +218,7 @@
</declaration>
</table>
<table>
- <name>*dbprefix*documents_revisions</name>
+ <name>*dbprefix*richdocuments_revisions</name>
<declaration>
<field>
@@ -259,7 +259,7 @@
</field>
<index>
- <name>documents_rev_eis_idx</name>
+ <name>richdocuments_rev_eis_idx</name>
<unique>true</unique>
<field>
<name>es_id</name>
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 @@
<?xml version="1.0"?>
<info>
- <id>documents</id>
+ <id>richdocuments</id>
<name>Collabora Online Development Edition</name>
<description>An ownCloud app to work with office documents</description>
<licence>AGPL</licence>
@@ -13,7 +13,6 @@
<owncloud min-version="8.1" max-version="9.0" />
</dependencies>
<public>
- <documents>public.php</documents>
+ <richdocuments>public.php</richdocuments>
</public>
- <ocsid>168711</ocsid>
</info>
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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013-2014 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -9,9 +9,9 @@
* later.
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
-$application = new \OCA\Documents\AppInfo\Application();
+$application = new \OCA\Richdocuments\AppInfo\Application();
$application->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 @@
-<?php
-/**
- * ownCloud - Documents App
- *
- * @author Victor Dubiniuk
- * @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- */
-
-$config = \OC::$server->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -9,7 +9,7 @@
* later.
*/
-namespace OCA\Documents\Controller;
+namespace OCA\Richdocuments\Controller;
use \OCP\AppFramework\Controller;
use \OCP\IRequest;
@@ -19,13 +19,13 @@ use \OCP\AppFramework\Http\ContentSecurityPolicy;
use \OCP\AppFramework\Http\JSONResponse;
use \OCP\AppFramework\Http\TemplateResponse;
-use \OCA\Documents\Db;
-use \OCA\Documents\Helper;
-use \OCA\Documents\Storage;
-use \OCA\Documents\Download;
-use \OCA\Documents\DownloadResponse;
-use \OCA\Documents\File;
-use OCA\Documents\Genesis;
+use \OCA\Richdocuments\Db;
+use \OCA\Richdocuments\Helper;
+use \OCA\Richdocuments\Storage;
+use \OCA\Richdocuments\Download;
+use \OCA\Richdocuments\DownloadResponse;
+use \OCA\Richdocuments\File;
+use OCA\Richdocuments\Genesis;
use \OC\Files\View;
class DocumentController extends Controller{
@@ -49,12 +49,12 @@ class DocumentController extends Controller{
* @NoCSRFRequired
*/
public function index(){
- \OC::$server->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -9,17 +9,17 @@
* later.
*/
-namespace OCA\Documents\Controller;
+namespace OCA\Richdocuments\Controller;
use \OCP\AppFramework\Controller;
use \OCP\IRequest;
use \OCP\AppFramework\Http;
use \OCP\AppFramework\Http\JSONResponse;
-use \OCA\Documents\Db;
-use \OCA\Documents\File;
-use \OCA\Documents\Helper;
-use OCA\Documents\Filter;
+use \OCA\Richdocuments\Db;
+use \OCA\Richdocuments\File;
+use \OCA\Richdocuments\Helper;
+use OCA\Richdocuments\Filter;
use \OC\Files\View;
class BadRequestException extends \Exception {
@@ -219,7 +219,7 @@ class SessionController extends Controller{
if ($this->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -9,7 +9,7 @@
* later.
*/
-namespace OCA\Documents\Controller;
+namespace OCA\Richdocuments\Controller;
use \OCP\AppFramework\Controller;
use \OCP\IRequest;
@@ -17,9 +17,9 @@ use \OCP\IL10N;
use \OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\TemplateResponse;
-use OCA\Documents\AppConfig;
-use OCA\Documents\Converter;
-use OCA\Documents\Filter;
+use OCA\Richdocuments\AppConfig;
+use OCA\Richdocuments\Converter;
+use OCA\Richdocuments\Filter;
class SettingsController extends Controller{
diff --git a/controller/usercontroller.php b/controller/usercontroller.php
index 6bee7e02..8442ada6 100644
--- a/controller/usercontroller.php
+++ b/controller/usercontroller.php
@@ -1,6 +1,6 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -10,13 +10,13 @@
*/
-namespace OCA\Documents\Controller;
+namespace OCA\Richdocuments\Controller;
use \OCP\AppFramework\Controller;
use \OCP\IRequest;
use \OCP\AppFramework\Http\JSONResponse;
-use \OCA\Documents\Db;
+use \OCA\Richdocuments\Db;
class UserController extends Controller {
diff --git a/js/3rdparty/webodf/editor/EditorSession.js b/js/3rdparty/webodf/editor/EditorSession.js
index 709fd249..63e07e6e 100644
--- a/js/3rdparty/webodf/editor/EditorSession.js
+++ b/js/3rdparty/webodf/editor/EditorSession.js
@@ -25,11 +25,11 @@
/*global runtime, define, document, core, odf, gui, ops*/
define("webodf/editor/EditorSession", [
- "dojo/text!" + OC.filePath('documents', 'css', 'fonts.css')
+ "dojo/text!" + OC.filePath('richdocuments', 'css', 'fonts.css')
], function (fontsCSS) { // fontsCSS is retrieved as a string, using dojo's text retrieval AMD plugin
"use strict";
- fontsCSS = fontsCSS.replace(/\.\/fonts/g, OC.appswebroots['documents']+'/css/fonts');
+ fontsCSS = fontsCSS.replace(/\.\/fonts/g, OC.appswebroots['richdocuments']+'/css/fonts');
runtime.loadClass("core.Async");
runtime.loadClass("core.DomUtils");
diff --git a/js/ServerFactory.js b/js/ServerFactory.js
index b3f5066b..180d10c9 100644
--- a/js/ServerFactory.js
+++ b/js/ServerFactory.js
@@ -43,7 +43,7 @@ define("owncloud/ServerFactory", [
server = new PullBoxServer(args);
server.getGenesisUrl = function(sid) {
- return OC.generateUrl('apps/documents/ajax/genesis/{es_id}', {es_id: sid}) + '?requesttoken=' + encodeURIComponent(oc_requesttoken);
+ return OC.generateUrl('apps/richdocuments/ajax/genesis/{es_id}', {es_id: sid}) + '?requesttoken=' + encodeURIComponent(oc_requesttoken);
};
return server;
};
diff --git a/js/admin.js b/js/admin.js
index ae7d2214..f2da6bdc 100644
--- a/js/admin.js
+++ b/js/admin.js
@@ -13,9 +13,9 @@ $(document).ready(function(){
data.url = $('#docs_url').val();
}
- OC.msg.startAction('#documents-admin-msg', t('documents', 'Saving...'));
+ OC.msg.startAction('#documents-admin-msg', t('richdocuments', 'Saving...'));
$.post(
- OC.filePath('documents', 'ajax', 'admin.php'),
+ OC.filePath('richdocuments', 'ajax', 'admin.php'),
data,
documentsSettings.afterSave
);
diff --git a/js/documents.js b/js/documents.js
index 75c4f0cc..af7c6e8e 100644
--- a/js/documents.js
+++ b/js/documents.js
@@ -78,7 +78,7 @@ $.widget('oc.documentGrid', {
_load : function (){
var that = this;
var def = new $.Deferred();
- $.getJSON(OC.generateUrl('apps/documents/ajax/documents/list'))
+ $.getJSON(OC.generateUrl('apps/richdocuments/ajax/documents/list'))
.done(function (data) {
that.options.documents = data.documents;
that.options.sessions = data.sessions;
@@ -86,7 +86,7 @@ $.widget('oc.documentGrid', {
def.resolve();
})
.fail(function(data){
- console.log(t('documents','Failed to load documents.'));
+ console.log(t('richdocuments','Failed to load documents.'));
});
return def;
},
@@ -121,7 +121,7 @@ $.widget('oc.documentGrid', {
if (!hasDocuments){
$(this.options.context).before('<div id="emptycontent">'
- + 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!')
+ '</div>'
);
} else {
@@ -239,7 +239,7 @@ var documentsMain = {
$('#memberList .memberListButton').css({opacity : 0.3});
$('#ocToolbar').children(':not(#document-title)').hide();
$('<div id="connection-lost"></div>').prependTo('#memberList');
- $('<div id="warning-connection-lost">' + t('documents', 'No connection to server. Trying to reconnect.') +'<img src="'+ OC.imagePath('core', 'loading-dark.gif') +'" alt="" /></div>').prependTo('#ocToolbar');
+ $('<div id="warning-connection-lost">' + t('richdocuments', 'No connection to server. Trying to reconnect.') +'<img src="'+ OC.imagePath('core', 'loading-dark.gif') +'" alt="" /></div>').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: '<div class="dijit" style="float:left;margin-top:3px">'
+ '<button id="odf-invite" class="drop icon-share svg" data-dojo-attach-event="onclick: showDropdown">' +
- t('documents', 'Share') +
+ t('richdocuments', 'Share') +
'</button></div>',
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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2015 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -9,12 +9,12 @@
* later.
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
use \OCP\IConfig;
class AppConfig{
- private $appName = 'documents';
+ private $appName = 'richdocuments';
private $defaults = [
'converter' => '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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -10,9 +10,9 @@
* later.
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
-use OCA\Documents\AppInfo\Application;
+use OCA\Richdocuments\AppInfo\Application;
class Converter {
@@ -41,7 +41,7 @@ class Converter {
if (!$exists){
\OC::$server->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -9,7 +9,7 @@
* later.
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
/**
* Generic DB class
@@ -49,7 +49,7 @@ abstract class Db {
/**
* Get single record by primary key
* @param int $value primary key value
- * @return \OCA\Documents\Db
+ * @return \OCA\Richdocuments\Db
*/
public function load($value){
if (!is_array($value)){
@@ -69,7 +69,7 @@ abstract class Db {
* Get single record matching condition
* @param string $field for WHERE condition
* @param mixed $value matching value(s)
- * @return \OCA\Documents\Db
+ * @return \OCA\Richdocuments\Db
* @throws Exception
*/
public function loadBy($field, $value){
diff --git a/lib/db/member.php b/lib/db/member.php
index a0db4dba..d44f420a 100644
--- a/lib/db/member.php
+++ b/lib/db/member.php
@@ -1,7 +1,7 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -10,7 +10,7 @@
* later.
*/
-namespace OCA\Documents\Db;
+namespace OCA\Richdocuments\Db;
/**
* @method boolean getIsGuest()
@@ -19,24 +19,24 @@ namespace OCA\Documents\Db;
* @method int getStatus()
*/
-class Member extends \OCA\Documents\Db{
+class Member extends \OCA\Richdocuments\Db{
- const DB_TABLE = '`*PREFIX*documents_member`';
+ const DB_TABLE = '`*PREFIX*richdocuments_member`';
const ACTIVITY_THRESHOLD = 90; // 1.5 Minutes
const MEMBER_STATUS_ACTIVE = 1;
const MEMBER_STATUS_INACTIVE = 2;
- protected $tableName = '`*PREFIX*documents_member`';
+ protected $tableName = '`*PREFIX*richdocuments_member`';
- protected $insertStatement = 'INSERT INTO `*PREFIX*documents_member` (`es_id`, `uid`, `color`, `last_activity`, `is_guest`, `token`)
+ protected $insertStatement = 'INSERT INTO `*PREFIX*richdocuments_member` (`es_id`, `uid`, `color`, `last_activity`, `is_guest`, `token`)
VALUES (?, ?, ?, ?, ?, ?)';
- protected $loadStatement = 'SELECT * FROM `*PREFIX*documents_member` WHERE `member_id`= ?';
+ protected $loadStatement = 'SELECT * FROM `*PREFIX*richdocuments_member` WHERE `member_id`= ?';
public static function getGuestPostfix(){
- return '(' . \OC::$server->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -9,15 +9,15 @@
* later.
*/
-namespace OCA\Documents\Db;
+namespace OCA\Richdocuments\Db;
-class Op extends \OCA\Documents\Db {
+class Op extends \OCA\Richdocuments\Db {
- const DB_TABLE = '`*PREFIX*documents_op`';
+ const DB_TABLE = '`*PREFIX*richdocuments_op`';
- protected $tableName = '`*PREFIX*documents_op`';
+ protected $tableName = '`*PREFIX*richdocuments_op`';
- protected $insertStatement = 'INSERT INTO `*PREFIX*documents_op` (`es_id`, `optype`, `member`, `opspec`) VALUES (?, ?, ?, ?)';
+ protected $insertStatement = 'INSERT INTO `*PREFIX*richdocuments_op` (`es_id`, `optype`, `member`, `opspec`) VALUES (?, ?, ?, ?)';
public static function addOpsArray($esId, $memberId, $ops){
$opObj = new Op();
diff --git a/lib/db/session.php b/lib/db/session.php
index 31b2ab30..583cd342 100644
--- a/lib/db/session.php
+++ b/lib/db/session.php
@@ -1,7 +1,7 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -10,11 +10,11 @@
* later.
*/
-namespace OCA\Documents\Db;
+namespace OCA\Richdocuments\Db;
use OCP\Security\ISecureRandom;
-use OCA\Documents\Filter;
+use OCA\Richdocuments\Filter;
/**
* Session management
@@ -26,29 +26,29 @@ use OCA\Documents\Filter;
* @method string getGenesisHash()
*
*/
-class Session extends \OCA\Documents\Db {
+class Session extends \OCA\Richdocuments\Db {
/**
* DB table
*/
- const DB_TABLE = '`*PREFIX*documents_session`';
- protected $tableName = '`*PREFIX*documents_session`';
+ const DB_TABLE = '`*PREFIX*richdocuments_session`';
+ protected $tableName = '`*PREFIX*richdocuments_session`';
- protected $insertStatement = 'INSERT INTO `*PREFIX*documents_session` (`es_id`, `genesis_url`, `genesis_hash`, `owner`, `file_id`)
+ protected $insertStatement = 'INSERT INTO `*PREFIX*richdocuments_session` (`es_id`, `genesis_url`, `genesis_hash`, `owner`, `file_id`)
VALUES (?, ?, ?, ?, ?)';
- protected $loadStatement = 'SELECT * FROM `*PREFIX*documents_session` WHERE `es_id`= ?';
+ protected $loadStatement = 'SELECT * FROM `*PREFIX*richdocuments_session` WHERE `es_id`= ?';
/**
* Start a editing session or return an existing one
* @param string $uid of the user starting a session
- * @param \OCA\Documents\File $file - file object
+ * @param \OCA\Richdocuments\File $file - file object
* @return array
* @throws \Exception
*/
public static function start($uid, $file){
// Create a directory to store genesis
- $genesis = new \OCA\Documents\Genesis($file);
+ $genesis = new \OCA\Richdocuments\Genesis($file);
$oldSession = new Session();
$oldSession->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -9,7 +9,7 @@
* later.
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
use \OCP\AppFramework\Http;
use \OCP\IRequest;
@@ -44,7 +44,7 @@ class DownloadResponse extends \OCP\AppFramework\Http\Response {
$this->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -20,7 +20,7 @@
*
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
use \OC\Files\View;
@@ -190,7 +190,7 @@ class File {
$mimetype = $this->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -10,7 +10,7 @@
* later.
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
class Filter {
protected static $filters = array();
diff --git a/lib/filter/office.php b/lib/filter/office.php
index c4f000ea..bfbde6c1 100644
--- a/lib/filter/office.php
+++ b/lib/filter/office.php
@@ -1,7 +1,7 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - RichDocuments App
*
* @author Victor Dubiniuk
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -10,7 +10,7 @@
* later.
*/
-namespace OCA\Documents\Filter;
+namespace OCA\Richdocuments\Filter;
class Office {
const NATIVE_MIMETYPE = 'application/vnd.oasis.opendocument.text';
@@ -55,14 +55,14 @@ class Office {
$this->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -20,7 +20,7 @@
*
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
use \OC\Files\View;
diff --git a/lib/helper.php b/lib/helper.php
index e67d32ad..46e682c8 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -1,7 +1,7 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -10,11 +10,11 @@
* later.
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
class Helper {
- const APP_ID = 'documents';
+ const APP_ID = 'richdocuments';
public static function getNewFileName($view, $path, $prepend = ' '){
$fileNum = 1;
@@ -162,12 +162,12 @@ class Helper {
if (empty($cmd)){
\OC::$server->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Frank Karlitschek
* @copyright 2013-2014 Frank Karlitschek frank@owncloud.org
@@ -22,7 +22,7 @@
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
class Storage {
public static $MIMETYPE_LIBREOFFICE_WORDPROCESSOR = array(
diff --git a/personal.php b/personal.php
index b5af9798..213c37b9 100644
--- a/personal.php
+++ b/personal.php
@@ -1,7 +1,7 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -10,10 +10,10 @@
* later.
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
-use \OCA\Documents\AppInfo\Application;
+use \OCA\Richdocuments\AppInfo\Application;
$app = new Application();
-$response = $app->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -11,7 +11,7 @@
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
\OCP\JSON::checkAppEnabled('documents');
@@ -33,8 +33,8 @@ if (isset($_GET['t'])) {
}
$tmpl->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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -10,10 +10,10 @@
* later.
*/
-namespace OCA\Documents;
+namespace OCA\Richdocuments;
-use \OCA\Documents\AppInfo\Application;
+use \OCA\Richdocuments\AppInfo\Application;
$app = new Application();
-$response = $app->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 @@
<?php
-script('documents', 'admin');
+script('richdocuments', 'admin');
?>
<div class="section" id="documents">
<h2><?php p($l->t('Documents')) ?></h2>
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 @@
<?php
-style( 'documents', 'share' );
-style( 'documents', 'style' );
-style( 'documents', '3rdparty/webodf/dojo-app' );
-script('documents', 'share');
-script('documents', 'documents');
+style( 'richdocuments', 'share' );
+style( 'richdocuments', 'style' );
+style( 'richdocuments', '3rdparty/webodf/dojo-app' );
+script('richdocuments', 'share');
+script('richdocuments', 'documents');
script('files', 'file-upload');
script('files', 'jquery.iframe-transport');
script('files', 'jquery.fileupload');
diff --git a/templates/personal.php b/templates/personal.php
index 0c881812..d4f41c75 100644
--- a/templates/personal.php
+++ b/templates/personal.php
@@ -1,5 +1,5 @@
<?php
-script('documents', 'personal');
+script('richdocuments', 'personal');
?>
<div class="section" id="documents-personal">
<h2><?php p($l->t('Documents')); ?></h2>
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 @@
<?php
-style( 'documents', 'style' );
+style( 'richdocuments', 'style' );
?>
<div id="notification-container">
<div id="notification" style="display: none;"></div>
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 @@
<?php
-script('documents', 'settings');
+script('richdocuments', 'settings');
?>
<div id="documents" class="section">
<h2><?php p($l->t('Documents')) ?></h2>
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 @@
<?php
/**
- * ownCloud - Documents App
+ * ownCloud - Richdocuments App
*
* @author Victor Dubiniuk
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
@@ -9,10 +9,10 @@
* later.
*/
-namespace OCA\Documents\Controller;
+namespace OCA\Richdocuments\Controller;
class DocumentControllerTest extends \PHPUnit_Framework_TestCase {
- private $appName = 'documents';
+ private $appName = 'richdocuments';
private $request;
private $l10n;
private $settings;