Merge pull request #78 from nextcloud/fix-last-occurencesof-oc-master

Fix it
This commit is contained in:
Joas Schilling
2016-07-25 11:08:20 +02:00
committed by GitHub
33 changed files with 325 additions and 361 deletions

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# ownCloud Documentation documentation build configuration file, created by
# Nextcloud Documentation documentation build configuration file, created by
# sphinx-quickstart on Mon Oct 22 23:16:40 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
@@ -282,5 +282,3 @@ epub_copyright = u'2012-2016, The ownCloud developers'
# Include todos?
todo_include_todos = True

View File

@@ -2,7 +2,7 @@
Installing and Managing Apps
============================
After installing Nextcloud, you may provide added functionality by installing
After installing Nextcloud, you may provide added functionality by installing
applications.
Supported Apps
@@ -13,58 +13,58 @@ See :doc:`apps_supported` for a list of supported Enterprise edition apps.
Viewing Enabled Apps
--------------------
During the Nextcloud installation, some apps are enabled by default. To see which
During the Nextcloud installation, some apps are enabled by default. To see which
apps are enabled go to your Apps page.
.. figure:: ../images/oc_admin_app_page.png
:alt: Apps page for enabling and disabling apps.
You will see which apps are enabled, not enabled, and recommended. You'll also
see additional filters, such as Multimedia, Productivity, and Tool for finding
You will see which apps are enabled, not enabled, and recommended. You'll also
see additional filters, such as Multimedia, Productivity, and Tool for finding
more apps quickly.
Managing Apps
-------------
In the Apps page you can enable or disable applications. Some apps have
configurable options on the Apps page, such as **Enable only for specific
groups**, but mainly they are enabled or disabled here, and are configured on
In the Apps page you can enable or disable applications. Some apps have
configurable options on the Apps page, such as **Enable only for specific
groups**, but mainly they are enabled or disabled here, and are configured on
your Nextcloud Admin page, Personal page, or in ``config.php``.
Adding Third Party Apps
-----------------------
Some apps are developed and supported by Nextcloud directly. These have an
**Official** tag. Apps with the **Approved** tag are community-developed and
supported; they are maintained by trusted developers, and are under active
development. Only **Official** and **Approved** apps are linked on the Apps
Some apps are developed and supported by Nextcloud directly. These have an
**Official** tag. Apps with the **Approved** tag are community-developed and
supported; they are maintained by trusted developers, and are under active
development. Only **Official** and **Approved** apps are linked on the Apps
page by default.
Click the app name to view a description of the app and any of the app settings in the Application View field. Clicking the **Enable** button will enable the app. If the app is not part of the Nextcloud installation, it will be downloaded from the app store, installed and enabled.
Click the app name to view a description of the app and any of the app settings in the Application View field. Clicking the **Enable** button will enable the app. If the app is not part of the Nextcloud installation, it will be downloaded from the app store, installed and enabled.
Click the gear icon on the lower left to browse experimental apps in the `ownCloud Apps
Store <https://apps.owncloud.com/>`_. Install experimental apps at your own risk.
Sometimes the installation of a third-party app fails silently, possibly because
``'appcodechecker' => true,`` is enabled in ``config.php``. When ``appcodechecker`` is
enabled it checks if third-party apps are using the private API, rather than the public
``'appcodechecker' => true,`` is enabled in ``config.php``. When ``appcodechecker`` is
enabled it checks if third-party apps are using the private API, rather than the public
API. If they are then they will not be installed.
.. note:: If you would like to create or add your own Nextcloud app, please
.. note:: If you would like to create or add your own Nextcloud app, please
refer to the `developer manual
<https://docs.nextcloud.org/server/10/developer_manual/app/index.html>`_.
Using Custom App Directories
----------------------------
Use the **apps_paths** array in ``config.php`` to set any custom apps directory
locations. The key **path** defines the absolute file system path to the app
folder. The key **url** defines the HTTP web path to that folder, starting at
the Nextcloud web root. The key **writable** indicates if a user can install apps
Use the **apps_paths** array in ``config.php`` to set any custom apps directory
locations. The key **path** defines the absolute file system path to the app
folder. The key **url** defines the HTTP web path to that folder, starting at
the Nextcloud web root. The key **writable** indicates if a user can install apps
in that folder.
.. note:: To ensure that the default **/apps/** folder only contains apps
shipped with Nextcloud, follow this example to setup an **/apps2/** folder
.. note:: To ensure that the default **/apps/** folder only contains apps
shipped with Nextcloud, follow this example to setup an **/apps2/** folder
which will be used to store all other apps.
::
@@ -87,7 +87,7 @@ in that folder.
Using Your Own Appstore
-----------------------
You can enable the installation of apps from your own apps store. This requires that you
You can enable the installation of apps from your own apps store. This requires that you
can write to at least one of the configured apps directories.
To enable installation from your own apps store:
@@ -98,7 +98,7 @@ To enable installation from your own apps store:
2. Set the **appstoreurl** to the URL of your Nextcloud apps store.
This parameter is used to set the http path to the Nextcloud apps store. The appstore
This parameter is used to set the http path to the Nextcloud apps store. The appstore
server must use :abbr:`OCS (Open Collaboration Services)`.
::

View File

@@ -2,15 +2,15 @@
Code Signing
============
.. sectionauthor:: Lukas Reschke <lukas@owncloud.com>
.. sectionauthor:: Lukas Reschke <lukas@nextcloud.com>
.. _code_signing_label:
Nextcloud supports code signing for the core releases, and for Nextcloud
applications. Code signing gives our users an additional layer of security by
Nextcloud supports code signing for the core releases, and for Nextcloud
applications. Code signing gives our users an additional layer of security by
ensuring that nobody other than authorized persons can push updates.
It also ensures that all upgrades have been executed properly, so that no files
are left behind, and all old files are properly replaced. In the past, invalid
It also ensures that all upgrades have been executed properly, so that no files
are left behind, and all old files are properly replaced. In the past, invalid
updates were a significant source of errors when updating Nextcloud.
FAQ
@@ -19,34 +19,34 @@ FAQ
Why Did Nextcloud Add Code Signing?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By supporting Code Signing we add another layer of security by ensuring that
nobody other than authorized persons can push updates for applications, and
By supporting Code Signing we add another layer of security by ensuring that
nobody other than authorized persons can push updates for applications, and
ensuring proper upgrades.
Do We Lock Down Nextcloud?
^^^^^^^^^^^^^^^^^^^^^^^^^^
The Nextcloud project is open source and always will be. We do not want to
make it more difficult for our users to run Nextcloud. Any code signing errors on
upgrades will not prevent Nextcloud from running, but will display a warning on
the Admin page. For applications that are not tagged "Official" the code signing
The Nextcloud project is open source and always will be. We do not want to
make it more difficult for our users to run Nextcloud. Any code signing errors on
upgrades will not prevent Nextcloud from running, but will display a warning on
the Admin page. For applications that are not tagged "Official" the code signing
process is optional.
Not Open Source Anymore?
^^^^^^^^^^^^^^^^^^^^^^^^
The Nextcloud project is open source and always will be. The code signing
process is optional, though highly recommended. The code check for the
core parts of Nextcloud is enabled when the Nextcloud release version branch has
The Nextcloud project is open source and always will be. The code signing
process is optional, though highly recommended. The code check for the
core parts of Nextcloud is enabled when the Nextcloud release version branch has
been set to stable.
For custom distributions of Nextcloud it is recommended to change the release
For custom distributions of Nextcloud it is recommended to change the release
version branch in version.php to something else than "stable".
Is Code Signing Mandatory For Apps?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Code signing is optional for all third-party applications. Applications
Code signing is optional for all third-party applications. Applications
with a tag of "Official" on apps.owncloud.com require code signing.
.. _code_signing_fix_warning_label:
@@ -54,8 +54,8 @@ with a tag of "Official" on apps.owncloud.com require code signing.
Fixing Invalid Code Integrity Messages
--------------------------------------
A code integrity error message ("There were problems with the code integrity
check. More information…") appears in a yellow banner at the top of your
A code integrity error message ("There were problems with the code integrity
check. More information…") appears in a yellow banner at the top of your
Nextcloud Web interface:
.. image:: images/code-integrity-notification.png
@@ -63,7 +63,7 @@ Nextcloud Web interface:
.. note:: The yellow banner is only shown for admin users.
Clicking on this link will take you to your Nextcloud admin page, which provides
Clicking on this link will take you to your Nextcloud admin page, which provides
the following options:
1. Link to this documentation entry.
@@ -73,8 +73,8 @@ the following options:
.. image:: images/code-integrity-admin.png
:alt: Links for resolving code integrity warnings.
To debug issues caused by the code integrity check click on "List of invalid
files...", and you will be shown a text document listing the different issues. The
To debug issues caused by the code integrity check click on "List of invalid
files...", and you will be shown a text document listing the different issues. The
content of the file will look similar to the following example:
::
@@ -108,11 +108,11 @@ content of the file will look similar to the following example:
(
[/index.php] => Array
(
[expected] =>
[expected] =>
f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3
c2521b050955d9d452769f61454c9ddfa9c308146ade10546c
fa829794448eaffbc9a04a29d216
[current] =>
[current] =>
ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d321
42cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec2
31d4a230559d4f3e2c471d3ea094
@@ -120,11 +120,11 @@ content of the file will look similar to the following example:
[/version.php] => Array
(
[expected] =>
[expected] =>
c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4
b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7
d5685c3b45aee373b09be54742ea
[current] =>
[current] =>
88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3
b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300
c478e6c156c5955ed53c40d06585
@@ -137,7 +137,7 @@ content of the file will look similar to the following example:
[/test.php] => Array
(
[expected] =>
[current] =>
[current] =>
09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b
935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522
b4af8db0ae269d73432e9a01e63a
@@ -162,7 +162,7 @@ content of the file will look similar to the following example:
In above error output it can be seen that:
1. In the Nextcloud core (that is, the Nextcloud server itself) the files
1. In the Nextcloud core (that is, the Nextcloud server itself) the files
"index.php" and "version.php" do have the wrong version.
2. In the Nextcloud core the unrequired extra file "/test.php" has been found.
3. It was not possible to verify the signature of the calendar application.
@@ -175,9 +175,9 @@ https://nextcloud.com/support/. After fixing these problems verify by clicking
.. note:: When using a FTP client to upload those files make sure it is using the
``Binary`` transfer mode instead of the ``ASCII`` transfer mode.
.. _rescans_label:
.. _rescans_label:
Rescans
-------
@@ -185,8 +185,8 @@ Rescans are triggered at installation, and by updates. You may run scans manuall
occ integrity:check-core
occ integrity:check-app $appid
See :doc:`../configuration_server/occ_command` to learn more about using ``occ``.
See :doc:`../configuration_server/occ_command` to learn more about using ``occ``.
Errors
------
@@ -198,18 +198,18 @@ The following errors can be encountered when trying to verify a code signature.
- ``INVALID_HASH``
- The file has a different hash than specified within ``signature.json``. This
usually happens when the file has been modified after writing the signature
usually happens when the file has been modified after writing the signature
data.
- ``MISSING_FILE``
- The file cannot be found but has been specified within ``signature.json``.
Either a required file has been left out, or ``signature.json`` needs to be
- The file cannot be found but has been specified within ``signature.json``.
Either a required file has been left out, or ``signature.json`` needs to be
edited.
- ``EXTRA_FILE``
- The file does not exist in ``signature.json``. This usually happens when a
- The file does not exist in ``signature.json``. This usually happens when a
file has been removed and ``signature.json`` has not been updated. It also
happens if you have placed additional files in your Nextcloud installation
folder.
@@ -221,18 +221,18 @@ The following errors can be encountered when trying to verify a code signature.
- ``Signature data not found.```
- The app has mandatory code signing enforced but no ``signature.json``
- The app has mandatory code signing enforced but no ``signature.json``
file has been found in its ``appinfo`` folder.
- ``Certificate is not valid.``
- The certificate has not been issued by the official Nextcloud Code
- The certificate has not been issued by the official Nextcloud Code
Signing Root Authority.
- ``Certificate is not valid for required scope. (Requested: %s, current: %s)``
- The certificate is not valid for the defined application. Certificates
are only valid for the defined app identifier and cannot be used for
- The certificate is not valid for the defined application. Certificates
are only valid for the defined app identifier and cannot be used for
others.
- ``Signature could not get verified.``

View File

@@ -2,7 +2,7 @@
Restoring Nextcloud
===================
To restore a Nextcloud installation there are four main things you need to
To restore a Nextcloud installation there are four main things you need to
restore:
#. The configuration directory
@@ -10,19 +10,19 @@ restore:
#. The database
#. The theme directory
.. note:: You must have both the database and data directory. You cannot
.. note:: You must have both the database and data directory. You cannot
complete restoration unless you have both of these.
When you have completed your restoration, see the ``Setting Strong Directory
When you have completed your restoration, see the ``Setting Strong Directory
Permissions`` section of :doc:`../installation/installation_wizard`.
Restore Folders
---------------
.. note:: This guide assumes that your previous backup is called
"owncloud-dirbkp"
.. note:: This guide assumes that your previous backup is called
"nextcloud-dirbkp"
Simply copy your configuration and data folder (or even your whole Nextcloud
Simply copy your configuration and data folder (or even your whole Nextcloud
install and data folder) to your Nextcloud environment. You could use this command::
rsync -Aax nextcloud-dirbkp/ nextcloud/
@@ -30,7 +30,7 @@ install and data folder) to your Nextcloud environment. You could use this comma
Restore Database
----------------
.. note:: This guide assumes that your previous backup is called
.. note:: This guide assumes that your previous backup is called
"nextcloud-sqlbkp.bak"
MySQL
@@ -51,5 +51,5 @@ PostgreSQL
^^^^^^^^^^
::
PGPASSWORD="password" pg_restore -c -d nextcloud -h [server] -U [username]
PGPASSWORD="password" pg_restore -c -d nextcloud -h [server] -U [username]
nextcloud-sqlbkp.bak

View File

@@ -4,22 +4,22 @@ How to Upgrade Your Nextcloud Server
There are three ways to upgrade your Nextcloud server:
* Using your :doc:`Linux package manager <package_upgrade>` with our official
Nextcloud repositories. This is the recommended method.
* With the :doc:`Updater App <update>` (Server Edition only). Recommended for
shared hosters, and for users who want an easy way to track different
release channels. (It is not available and not supported on the Enterprise
* Using your :doc:`Linux package manager <package_upgrade>` with our official
Nextcloud repositories. This is the recommended method.
* With the :doc:`Updater App <update>` (Server Edition only). Recommended for
shared hosters, and for users who want an easy way to track different
release channels. (It is not available and not supported on the Enterprise
edition.)
* :doc:`Manually upgrading <manual_upgrade>` with the Nextcloud ``.tar`` archive
from `owncloud.org/install/`_.
* Manually upgrading is also an option for users on shared hosting; download
and unpack the Nextcloud tarball to your PC. Delete your existing Nextcloud
files, except ``data/`` and ``config/`` files, on your hosting account. Then
transfer the new Nextcloud files to your hosting account, again
* :doc:`Manually upgrading <manual_upgrade>` with the Nextcloud ``.tar`` archive
from `https://nextcloud.com/install/`_.
* Manually upgrading is also an option for users on shared hosting; download
and unpack the Nextcloud tarball to your PC. Delete your existing Nextcloud
files, except ``data/`` and ``config/`` files, on your hosting account. Then
transfer the new Nextcloud files to your hosting account, again
preserving your existing ``data/`` and ``config/`` files.
When an update is available for your Nextcloud server, you will see a
notification at the top of your Nextcloud Web interface. When you click the
When an update is available for your Nextcloud server, you will see a
notification at the top of your Nextcloud Web interface. When you click the
notification it brings you here, to this page.
**It is best to keep your Nextcloud server upgraded regularly**, and to install
@@ -29,46 +29,46 @@ releases increases the risk of errors. Major releases are 9, 10, and
example, 9.0.52 and 10.0.2 are point releases. **Skipping major releases is not
supported.**
**Upgrading is disruptive**. Your Nextcloud server will be put into maintenance
mode, so your users will be locked out until the upgrade is completed. Large
**Upgrading is disruptive**. Your Nextcloud server will be put into maintenance
mode, so your users will be locked out until the upgrade is completed. Large
installations may take several hours to complete the upgrade.
.. warning:: **Downgrading is not supported** and risks corrupting your data! If
you want to revert to an older Nextcloud version, make a new, fresh
installation and then restore your data from backup. Before doing this,
file a support ticket (if you have paid support) or ask for help in the
.. warning:: **Downgrading is not supported** and risks corrupting your data! If
you want to revert to an older Nextcloud version, make a new, fresh
installation and then restore your data from backup. Before doing this,
file a support ticket (if you have paid support) or ask for help in the
Nextcloud forums to see if your issue can be resolved without downgrading.
.. not sure about notifications
.. Update Notifier and Updater App Are Not the Same
.. ------------------------------------------------
.. Nextcloud has two update tools: the Nextcloud core update notifier, and the
.. Updater app. Figure 1 shows what you see when the Updater app is enabled:
.. both
.. the core notifier and the Updater app control panel are visible on your
.. admin
.. Nextcloud has two update tools: the Nextcloud core update notifier, and the
.. Updater app. Figure 1 shows what you see when the Updater app is enabled:
.. both
.. the core notifier and the Updater app control panel are visible on your
.. admin
.. page.
.. .. figure:: images/2-updates.png
.. :alt: Both update mechanisms displayed on Admin page.
.. *Figure 1: The top yellow banner is the update notifier, and the Updates
.. *Figure 1: The top yellow banner is the update notifier, and the Updates
.. section is the Updater app.*
.. The core update notifier has only one function, and that is to display a
.. notification when a new Nextcloud release is available. Then you decide which
.. upgrade method to use. When you maintain your Nextcloud server via your Linux
.. The core update notifier has only one function, and that is to display a
.. notification when a new Nextcloud release is available. Then you decide which
.. upgrade method to use. When you maintain your Nextcloud server via your Linux
.. package manager you should ensure that the Updater app is disabled.
Prerequisites
-------------
You should always maintain :doc:`regular backups <backup>` and make a fresh
You should always maintain :doc:`regular backups <backup>` and make a fresh
backup before every upgrade.
Then review third-party apps, if you have any, for compatibility with the new
Nextcloud release. Any apps that are not developed by Nextcloud show a 3rd party
designation. **Install unsupported apps at your own risk**. Then, before the
upgrade, all 3rd party apps must be disabled. After the upgrade is complete you
Then review third-party apps, if you have any, for compatibility with the new
Nextcloud release. Any apps that are not developed by Nextcloud show a 3rd party
designation. **Install unsupported apps at your own risk**. Then, before the
upgrade, all 3rd party apps must be disabled. After the upgrade is complete you
may re-enable them.

View File

@@ -42,7 +42,7 @@ Status.php
Nextcloud provides a very simple mechanism for determining if an application server is up and functioning
call the status.php file on each Nextcloud server. This file can be found in the root Nextcloud directory on
the server, which by default is /owncloud/status.php. If the server is functioning normally, the response
the server, which by default is /status.php. If the server is functioning normally, the response
looks something like this:
::
@@ -92,9 +92,3 @@ Load Balancer
The load balancer is monitoring the health of the application servers and is distributing the traffic in
the optimal way. The application-servers should also be monitored to detect long lasting OS or
hardware problems. Monitoring solutions like Nagios provide built in functionality to do this.

View File

@@ -55,15 +55,15 @@ Code example
...
// Set basic credentials
client.setCredentials(
OwnCloudCredentialsFactory.newBasicCredentials(username, password)
NextcloudCredentialsFactory.newBasicCredentials(username, password)
);
// Set bearer access token
client.setCredentials(
OwnCloudCredentialsFactory.newBearerCredentials(accessToken)
NextcloudCredentialsFactory.newBearerCredentials(accessToken)
);
// Set SAML2 session token
client.setCredentials(
OwnCloudCredentialsFactory.newSamlSsoCredentials(cookie)
NextcloudCredentialsFactory.newSamlSsoCredentials(cookie)
);
}
@@ -75,12 +75,12 @@ of the new folder.
Code example
~~~~~~~~~~~~
 
 
.. code-block:: java
private void startFolderCreation(String newFolderPath) {
CreateRemoteFolderOperation createOperation = new CreateRemoteFolderOperation(newFolderPath, false);
createOperation.execute( mClient , this , mHandler);
CreateRemoteFolderOperation createOperation = new CreateRemoteFolderOperation(newFolderPath, false);
createOperation.execute( mClient , this , mHandler);
}
@Override
@@ -114,10 +114,10 @@ Code example
@Override
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
if (operation instanceof ReadRemoteFolderOperation) {
if (result.isSuccess()) {
List< RemoteFile > files = result.getData();
List< RemoteFile > files = result.getData();
// do your stuff here
}
}
@@ -143,7 +143,7 @@ Code example
@Override
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
if (operation instanceof ReadRemoteFileOperation) {
if (result.isSuccess()) {
if (result.isSuccess()) {
RemoteFile file = result.getData()[0];
// do your stuff here
}
@@ -162,7 +162,7 @@ Code example
.. code-block:: java
private void startRemoveFile(String filePath) {
private void startRemoveFile(String filePath) {
RemoveRemoteFileOperation removeOperation = new RemoveRemoteFileOperation(remotePath);
removeOperation.execute( mClient , this , mHandler);
}
@@ -170,8 +170,8 @@ Code example
@Override
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
if (operation instanceof RemoveRemoteFileOperation) {
if (result.isSuccess()) {
// do your stuff here
if (result.isSuccess()) {
// do your stuff here
}
}
@@ -192,7 +192,7 @@ Code example
private void startDownload(String filePath, File targetDirectory) {
DownloadRemoteFileOperation downloadOperation = new DownloadRemoteFileOperation(filePath, targetDirectory.getAbsolutePath());
downloadOperation.addDatatransferProgressListener(this);
downloadOperation.addDatatransferProgressListener(this);
downloadOperation.execute( mClient, this, mHandler);
}
@@ -209,7 +209,7 @@ Code example
public void onTransferProgress( long progressRate, long totalTransferredSoFar, long totalToTransfer, String fileName) {
mHandler.post( new Runnable() {
@Override
public void run() {
public void run() {
// do your UI updates about progress here
}
});
@@ -227,22 +227,22 @@ Code example
.. code-block:: java
private void startUpload (File fileToUpload, String remotePath, String mimeType) {
private void startUpload (File fileToUpload, String remotePath, String mimeType) {
UploadRemoteFileOperation uploadOperation = new UploadRemoteFileOperation( fileToUpload.getAbsolutePath(), remotePath, mimeType);
uploadOperation.addDatatransferProgressListener(this);
uploadOperation.execute(mClient, this, mHandler);
uploadOperation.addDatatransferProgressListener(this);
uploadOperation.execute(mClient, this, mHandler);
}
@Override
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
if (operation instanceof UploadRemoteFileOperation) {
if (result.isSuccess()) {
// do your stuff here
// do your stuff here
}
}
}
@Override
@Override
public void onTransferProgress(long progressRate, long totalTransferredSoFar, long totalToTransfer, String fileName) {
mHandler.post( new Runnable() {
@Override
@@ -256,7 +256,7 @@ Move a file or folder
---------------------
Move an exisintg file or folder to a different location in the Nextcloud server. Parameters needed are the path
to the file or folder to move, and the new path desired for it. The parent folder of the new path must exist in
to the file or folder to move, and the new path desired for it. The parent folder of the new path must exist in
the server.
When the parameter 'overwrite' is set to 'true', the file or folder is moved even if the new path is already
@@ -264,12 +264,12 @@ used by a different file or folder. This one will be replaced by the former.
Code example
~~~~~~~~~~~~
 
 
.. code-block:: java
private void startFileMove(String filePath, String newFilePath, boolean overwrite) {
MoveRemoteFileOperation moveOperation = new MoveRemoteFileOperation(filePath, newFilePath, overwrite);
moveOperation.execute( mClient , this , mHandler);
MoveRemoteFileOperation moveOperation = new MoveRemoteFileOperation(filePath, newFilePath, overwrite);
moveOperation.execute( mClient , this , mHandler);
}
@Override
@@ -295,14 +295,14 @@ Code example
private void startAllSharesRetrieval() {
GetRemoteSharesOperation getSharesOp = new GetRemoteSharesOperation();
getSharesOp.execute( mClient , this , mHandler);
getSharesOp.execute( mClient , this , mHandler);
}
@Override
public void onRemoteOperationFinish( RemoteOperation operation, RemoteOperationResult result) {
if (operation instanceof GetRemoteSharesOperation) {
if (result.isSuccess()) {
ArrayList< OCShare > shares = new ArrayList< OCShare >();
if (result.isSuccess()) {
ArrayList< OCShare > shares = new ArrayList< OCShare >();
for (Object obj: result.getData()) {
shares.add(( OCShare) obj);
}
@@ -327,21 +327,21 @@ Code example
private void startSharesRetrievalForFileOrFolder(String filePath, boolean getReshares) {
GeteRemoteSharesForFileOperation operation = new GetRemoteSharesForFileOperation(filePath, getReshares, false);
operation.execute( mClient, this, mHandler);
operation.execute( mClient, this, mHandler);
}
private void startSharesRetrievalForFilesInFolder(String folderPath, boolean getReshares) {
GetRemoteSharesForFileOperation operation = new GetRemoteSharesForFileOperation(folderPath, getReshares, true);
operation.execute( mClient, this, mHandler);
operation.execute( mClient, this, mHandler);
}
@Override
public void onRemoteOperationFinish( RemoteOperation operation, RemoteOperationResult result) {
if (operation instanceof GetRemoteSharesForFileOperation) {
if (result.isSuccess()) {
ArrayList< OCShare > shares = new ArrayList< OCShare >();
ArrayList< OCShare > shares = new ArrayList< OCShare >();
for (Object obj: result.getData()) {
shares.add(( OCShare) obj);
shares.add(( OCShare) obj);
}
// do your stuff here
}
@@ -371,8 +371,8 @@ Code example
}
private void startCreationOfGroupShareForFile(String filePath, String groupId) {
CreateRemoteShareOperation operation = new CreateRemoteShareOperation(filePath, ShareType.GROUP, groupId, false , "", 31);
operation.execute(mClient, this, mHandler);
CreateRemoteShareOperation operation = new CreateRemoteShareOperation(filePath, ShareType.GROUP, groupId, false , "", 31);
operation.execute(mClient, this, mHandler);
}
private void startCreationOfUserShareForFile(String filePath, String userId) {
@@ -383,7 +383,7 @@ Code example
@Override
public void onRemoteOperationFinish( RemoteOperation operation, RemoteOperationResult result) {
if (operation instanceof CreateRemoteShareOperation) {
if (result.isSuccess()) {
if (result.isSuccess()) {
OCShare share = (OCShare) result.getData ().get(0);
// do your stuff here
}

View File

@@ -6,15 +6,15 @@ Changelog
Deprecations
============
This is a deprecation roadmap which lists all current deprecation targets and will be updated from release to release. This lists the version when a specific method or class will be removed.
This is a deprecation roadmap which lists all current deprecation targets and will be updated from release to release. This lists the year when a specific method or class will be removed.
.. note:: Deprecations on interfaces also affect the implementing classes!
11.1
2018
----
* **OCP\\App::setActiveNavigationEntry** has been deprecated in favour of **\\OCP\\INavigationManager**
* **OCP\\BackgroundJob::registerJob** has been deprecated in favour of **OCP\\BackgroundJob\\IJobList**
* **OCP\\Contacts** functions has been deprecated in favour of **\\OCP\\Contacts\\IManager**
* **OCP\\Contacts** functions has been deprecated in favour of **\\OCP\\Contacts\\IManager**
* **OCP\\DB** functions have been deprecated in favour of the ones in **\\OCP\\IDBConnection**
* **OCP\\Files::tmpFile** has been deprecated in favour of **\\OCP\\ITempManager::getTemporaryFile**
* **OCP\\Files::tmpFolder** has been deprecated in favour of **\\OCP\\ITempManager::getTemporaryFolder**
@@ -25,7 +25,7 @@ This is a deprecation roadmap which lists all current deprecation targets and wi
* **\\OCP\\JSON** has been completely deprecated in favour of the AppFramework. Developers shall use the AppFramework instead of using the legacy **OCP\\JSON** code. This allows testable controllers and is highly encouraged.
* **\\OCP\\Response** has been completely deprecated in favour of the AppFramework. Developers shall use the AppFramework instead of using the legacy **OCP\\JSON** code. This allows testable controllers and is highly encouraged.
* Diverse **OCP\\Users** function got deprecated in favour of **OCP\\IUserManager**:
* Diverse **OCP\\Users** function got deprecated in favour of **OCP\\IUserManager**:
* **OCP\\Users::getUsers** has been deprecated in favour of **OCP\\IUserManager::search**
* **OCP\\Users::getDisplayName** has been deprecated in favour of **OCP\\IUserManager::getDisplayName**
@@ -36,9 +36,13 @@ This is a deprecation roadmap which lists all current deprecation targets and wi
* **OCP\\Util::linkToRoute** has been deprecated in favour of **\\OCP\\IURLGenerator::linkToRoute**
* **OCP\\Util::linkTo** has been deprecated in favour of **\\OCP\\IURLGenerator::linkTo**
* **OCP\\Util::imagePath** has been deprecated in favour of **\\OCP\\IURLGenerator::imagePath**
* **OCP\\Util::isValidPath** has been deprecated in favour of **\\OCP\\IURLGenerator::imagePath**
* **OCP\\Util::isValidPath** has been deprecated in favour of **\\OCP\\IURLGenerator::imagePath**
10.0
* `OCP\\AppFramework\\IAppContainer <https://github.com/nextcloud/server/blob/stable9/lib/public/appframework/iappcontainer.php>`_: methods **getCoreApi** and **log**
* `OCP\\AppFramework\\IApi <https://github.com/nextcloud/server/blob/stable9/lib/public/appframework/iapi.php>`_: full class
2017
----
* **OCP\\IDb**: This interface and the implementing classes will be removed in favor of **OCP\\IDbConnection**. Various layers in between have also been removed to be consistent with the PDO classes. This leads to the following changes:
@@ -47,8 +51,8 @@ This is a deprecation roadmap which lists all current deprecation targets and wi
* The **__construct** method of **OCP\\AppFramework\\Db\\Mapper** no longer requires an instance of **OCP\\IDb** but an instance of **OCP\\IDbConnection**
* The **execute** method on **OCP\\AppFramework\\Db\\Mapper** no longer returns an instance of **OC_DB_StatementWrapper** but an instance of **PDOStatement**
9.0
---
2016
----
* The following methods have been moved into the **OCP\\Template::<method>** class instead of being namespaced directly:
* **OCP\\image_path**
@@ -62,13 +66,8 @@ This is a deprecation roadmap which lists all current deprecation targets and wi
* **OCP\\simple_file_size** has been deprecated in favour of **OCP\\Template::human_file_size**
* The **OCP\\PERMISSION_<permission>** and **OCP\\FILENAME_INVALID_CHARS** have been moved to **OCP\\Constants::<old name>**
* The **OC_GROUP_BACKEND_<method>** and **OC_USER_BACKEND_<method>** have been moved to **OC_Group_Backend::<method>** and **OC_User_Backend::<method>** respectively
* `OCP\\AppFramework\\Controller <https://github.com/nextcloud/server/blob/stable9/lib/public/appframework/controller.php>`_: methods **params**, **getParams**, **method**, **getUploadedFile**, **env**, **cookie**, **render**
8.3
---
* `OCP\\AppFramework\\IApi <https://github.com/owncloud/core/blob/d59c4e832fea87d03d199a3211186a47fd252c32/lib/public/appframework/iapi.php>`_: full class
* `OCP\\AppFramework\\IAppContainer <https://github.com/owncloud/core/blob/d59c4e832fea87d03d199a3211186a47fd252c32/lib/public/appframework/iappcontainer.php>`_: methods **getCoreApi** and **log**
* `OCP\\AppFramework\\Controller <https://github.com/owncloud/core/blob/d59c4e832fea87d03d199a3211186a47fd252c32/lib/public/appframework/controller.php>`_: methods **params**, **getParams**, **method**, **getUploadedFile**, **env**, **cookie**, **render**
8.1
---
* `\\OC\\Preferences <https://github.com/owncloud/core/commit/909a53e087b7815ba9cd814eb6c22845ef5b48c7>`_ and `\\OC_Preferences <https://github.com/owncloud/core/commit/4df7c0a1ed52ed1922116686cb5ad8da2544c997>`_
2015
----
* `\\OC\\Preferences <https://github.com/nextcloud/server/commit/909a53e087b7815ba9cd814eb6c22845ef5b48c7>`_ and `\\OC_Preferences <https://github.com/nextcloud/server/commit/4df7c0a1ed52ed1922116686cb5ad8da2544c997>`_

View File

@@ -2,14 +2,14 @@
Code Signing
============
.. sectionauthor:: Lukas Reschke <lukas@owncloud.com>
.. sectionauthor:: Lukas Reschke <lukas@nextcloud.com>
Nextcloud supports code signing for the core releases, and for Nextcloud
applications. Code signing gives our users an additional layer of security by
Nextcloud supports code signing for the core releases, and for Nextcloud
applications. Code signing gives our users an additional layer of security by
ensuring that nobody other than authorized persons can push updates.
It also ensures that all upgrades have been executed properly, so that no files
are left behind, and all old files are properly replaced. In the past, invalid
It also ensures that all upgrades have been executed properly, so that no files
are left behind, and all old files are properly replaced. In the past, invalid
updates were a significant source of errors when updating Nextcloud.
FAQ
@@ -18,61 +18,61 @@ FAQ
Why Did Nextcloud Add Code Signing?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By supporting Code Signing we add another layer of security by ensuring that
nobody other than authorized persons can push updates for applications, and
By supporting Code Signing we add another layer of security by ensuring that
nobody other than authorized persons can push updates for applications, and
ensuring proper upgrades.
Do We Lock Down Nextcloud?
^^^^^^^^^^^^^^^^^^^^^^^^^^
The Nextcloud project is open source and always will be. We do not want to make
it more difficult for our users to run Nextcloud. Any code signing errors on
upgrades will not prevent Nextcloud from running, but will display a warning on
the Admin page. For applications that are not tagged "Official" the code signing
The Nextcloud project is open source and always will be. We do not want to make
it more difficult for our users to run Nextcloud. Any code signing errors on
upgrades will not prevent Nextcloud from running, but will display a warning on
the Admin page. For applications that are not tagged "Official" the code signing
process is optional.
Not Open Source Anymore?
^^^^^^^^^^^^^^^^^^^^^^^^
The Nextcloud project is open source and always will be. The code signing
process is optional, though highly recommended. The code check for the
core parts of Nextcloud is enabled when the Nextcloud release version branch has
The Nextcloud project is open source and always will be. The code signing
process is optional, though highly recommended. The code check for the
core parts of Nextcloud is enabled when the Nextcloud release version branch has
been set to stable.
For custom distributions of Nextcloud it is recommended to change the release
For custom distributions of Nextcloud it is recommended to change the release
version branch in version.php to something else than "stable".
Is Code Signing Mandatory For Apps?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Code signing is optional for all third-party applications. Applications
Code signing is optional for all third-party applications. Applications
with a tag of "Official" on apps.owncloud.com require code signing.
Technical details
-----------------
Nextcloud uses a X.509 based approach to handle authentication of code. Each
Nextcloud release contains the certificate of a shipped Nextcloud Code Signing
Root Authority. The private key of this certificate is only accessible to the
project leader, who may grant trusted project members with a copy of this
Nextcloud uses a X.509 based approach to handle authentication of code. Each
Nextcloud release contains the certificate of a shipped Nextcloud Code Signing
Root Authority. The private key of this certificate is only accessible to the
project leader, who may grant trusted project members with a copy of this
private key.
This Root Authority is only used for signing certificate signing requests (CSRs)
for additional certificates. Certificates issued by the Root Authority must
always to be limited to a specific scope, usually the application identifier.
This Root Authority is only used for signing certificate signing requests (CSRs)
for additional certificates. Certificates issued by the Root Authority must
always to be limited to a specific scope, usually the application identifier.
This enforcement is done using the ``CN`` attribute of the certificate.
Code signing is then done by creating a ``signature.json`` file with the
Code signing is then done by creating a ``signature.json`` file with the
following content:
.. code-block:: json
{
"hashes": {
"/filename.php":
"/filename.php":
"2401fed2eea6f2c1027c482a633e8e25cd46701f811e2d2c10dc213fd95fa60e350b
ccbbebdccc73a042b1a2799f673fbabadc783284cc288e4f1a1eacb74e3d",
"/lib/base.php":
"/lib/base.php":
"55548cc16b457cd74241990cc9d3b72b6335f2e5f45eee95171da024087d114fcbc2
effc3d5818a6d5d55f2ae960ab39fd0414d0c542b72a3b9e08eb21206dd9"
},
@@ -82,23 +82,23 @@ following content:
nNDEzMTcxMFoXDTE2MTAxNDEzMTcxMFowEzERMA8GA1UEAwwIY29udGFjdHMwgZ8w\
nDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANoQesGdCW0L2L+a2xITYipixkScrIpB\
nkX5Snu3fs45MscDb61xByjBSlFgR4QI6McoCipPw4SUr28EaExVvgPSvqUjYLGps\
nfiv0Cvgquzbx/X3mUcdk9LcFo1uWGtrTfkuXSKX41PnJGTr6RQWGIBd1V52q1qbC\
nJKkfzyeMeuQfAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvF/KIhRMQ3tYTmgHWsiM\
nwDMgIDb7iaHF0fS+/Nvo4PzoTO/trev6tMyjLbJ7hgdCpz/1sNzE11Cibf6V6dsz\
nfiv0Cvgquzbx/X3mUcdk9LcFo1uWGtrTfkuXSKX41PnJGTr6RQWGIBd1V52q1qbC\
nJKkfzyeMeuQfAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvF/KIhRMQ3tYTmgHWsiM\
nwDMgIDb7iaHF0fS+/Nvo4PzoTO/trev6tMyjLbJ7hgdCpz/1sNzE11Cibf6V6dsz\
njCE9invP368Xv0bTRObRqeSNsGogGl5ceAvR0c9BG+NRIKHcly3At3gLkS2791bC\
niG+UxI/MNcWV0uJg9S63LF8=\n
-----END CERTIFICATE-----",
"signature": "U29tZVNpZ25lZERhdGFFeGFtcGxl"
}
``hashes`` is an array of all files in the folder with their corresponding
SHA-512 hashes. ``certificate`` is the certificate used for signing. It has to
be issued by the Nextcloud Root Authority, and its CN needs to be permitted to
perform the required action. The ``signature`` is then a signature of the hashes
``hashes`` is an array of all files in the folder with their corresponding
SHA-512 hashes. ``certificate`` is the certificate used for signing. It has to
be issued by the Nextcloud Root Authority, and its CN needs to be permitted to
perform the required action. The ``signature`` is then a signature of the hashes
which can be verified using the certificate.
Having the certificate bundled within the ``signature.json`` file has the
advantage that even if a developer loses their certificate, future updates can
Having the certificate bundled within the ``signature.json`` file has the
advantage that even if a developer loses their certificate, future updates can
still be ensured by having a new certificate issued.
How Code Signing Affects Apps in the App Store
@@ -106,68 +106,68 @@ How Code Signing Affects Apps in the App Store
- Apps which have an ``official`` tag **MUST** be code signed.
Unsigned ``official`` apps won't be installable anymore.
- Apps which have been signed in a previous release **MUST** be code-signed in
- Apps which have been signed in a previous release **MUST** be code-signed in
all future releases as well, otherwise the update will be refused.
How to Get Your App Signed
--------------------------
The following commands require that you have OpenSSL installed on your machine.
Ensure that you keep all generated files to sign your application. The following
examples will assume that you are trying to sign an application named
The following commands require that you have OpenSSL installed on your machine.
Ensure that you keep all generated files to sign your application. The following
examples will assume that you are trying to sign an application named
"contacts".
1. Generate a private key and CSR: ``openssl req -nodes -newkey rsa:2048 -keyout contacts.key -out contacts.csr -subj "/CN=contacts"``. Replace "contacts" with your application identifier.
2. Post the CSR at https://github.com/owncloud/appstore-issues, and configure
your GitHub account to show your mail address in your profile. Nextcloud
might ask you for further information to verify that you're the legitimate
2. Post the CSR at https://github.com/owncloud/appstore-issues, and configure
your GitHub account to show your mail address in your profile. Nextcloud
might ask you for further information to verify that you're the legitimate
owner of the application. Make sure to keep the private key file (``contacts.key``)
secret and not disclose it to any third-parties.
3. Nextcloud will provide you with the signed certificate.
4. Run ``./occ integrity:sign-app`` to sign your application, and specify
your private and the public key as well as the path to the application.
A valid example looks like: ``./occ integrity:sign-app --privateKey=/Users/lukasreschke/contacts.key
4. Run ``./occ integrity:sign-app`` to sign your application, and specify
your private and the public key as well as the path to the application.
A valid example looks like: ``./occ integrity:sign-app --privateKey=/Users/lukasreschke/contacts.key
--certificate=/Users/lukasreschke/CA/contacts.crt --path=/Users/lukasreschke/Programming/contacts``
The occ tool will store a ``signature.json`` file within the ``appinfo`` folder
of your application. Then compress the application folder and upload it to
apps.owncloud.com. Be aware that doing any changes to the application after it
has been signed requires another signing. So if you do not want to have some
The occ tool will store a ``signature.json`` file within the ``appinfo`` folder
of your application. Then compress the application folder and upload it to
apps.owncloud.com. Be aware that doing any changes to the application after it
has been signed requires another signing. So if you do not want to have some
files shipped remove them before running the signing command.
In case you lose your certificate please submit a new CSR as described above and
mention that you have lost the previous one. Nextcloud will revoke the old
In case you lose your certificate please submit a new CSR as described above and
mention that you have lost the previous one. Nextcloud will revoke the old
certificate.
If you maintain an app together with multiple people it is recommended to
designate a release manager responsible for the signing process as well
as the uploading to apps.owncloud.com. If there are cases where this is not
feasible and multiple certificates are required Nextcloud can create them on a
as the uploading to apps.owncloud.com. If there are cases where this is not
feasible and multiple certificates are required Nextcloud can create them on a
case by case basis. We do not recommend developers to share their private key.
Errors
------
The following errors can be encountered when trying to verify a code signature.
For information about how to get access to those results please refer to the
Issues section of the Nextcloud Server Administration
The following errors can be encountered when trying to verify a code signature.
For information about how to get access to those results please refer to the
Issues section of the Nextcloud Server Administration
manual.
- ``INVALID_HASH``
- The file has a different hash than specified within ``signature.json``. This
usually happens when the file has been modified after writing the signature
usually happens when the file has been modified after writing the signature
data.
- ``MISSING_FILE``
- The file cannot be found but has been specified within ``signature.json``.
Either a required file has been left out, or ``signature.json`` needs to be
- The file cannot be found but has been specified within ``signature.json``.
Either a required file has been left out, or ``signature.json`` needs to be
edited.
- ``EXTRA_FILE``
- The file does not exist in ``signature.json``. This usually happens when a
- The file does not exist in ``signature.json``. This usually happens when a
file has been removed and ``signature.json`` has not been updated.
- ``EXCEPTION``
@@ -177,22 +177,21 @@ manual.
- ``Signature data not found.```
- The app has mandatory code signing enforced but no ``signature.json``
- The app has mandatory code signing enforced but no ``signature.json``
file has been found in its ``appinfo`` folder.
- ``Certificate is not valid.``
- The certificate has not been issued by the official Nextcloud Code
- The certificate has not been issued by the official Nextcloud Code
Signing Root Authority.
- ``Certificate is not valid for required scope. (Requested: %s, current:
- ``Certificate is not valid for required scope. (Requested: %s, current:
%s)``
- The certificate is not valid for the defined application. Certificates
are only valid for the defined app identifier and cannot be used for
- The certificate is not valid for the defined application. Certificates
are only valid for the defined app identifier and cannot be used for
others.
- ``Signature could not get verified.``
- There was a problem with verifying the signature of ``signature.json``.

View File

@@ -42,7 +42,7 @@ Filesystem classes can be injected from the ServerContainer by calling the metho
Writing to a file
=================
All methods return a Folder object on which files and folders can be accessed, or filesystem operations can be performed relatively to their root. For instance for writing to file:`owncloud/data/myfile.txt` you should get the root folder and use:
All methods return a Folder object on which files and folders can be accessed, or filesystem operations can be performed relatively to their root. For instance for writing to file:`nextcloud/data/myfile.txt` you should get the root folder and use:
.. code-block:: php
@@ -67,9 +67,9 @@ All methods return a Folder object on which files and folders can be accessed, o
$file = $this->storage->get('/myfile.txt');
}
// the id can be accessed by $file->getId();
// the id can be accessed by $file->getId();
$file->putContent($content);
} catch(\OCP\Files\NotPermittedException $e) {
// you have to create this exception by yourself ;)
throw new StorageException('Cant write to file');

View File

@@ -135,7 +135,7 @@ Periodically run code in the background:
Logging
-------
Log to the :file:`data/owncloud.log`:
Log to the :file:`data/nextcloud.log`:
* :doc:`logging`

View File

@@ -24,18 +24,18 @@ The :file:`appinfo/info.xml` contains metadata about the app:
<documentation>
<user>https://doc.owncloud.org</user>
<admin>https://doc.owncloud.org</admin>
<developer>https://doc.owncloud.org</developer>
<user>https://docs.nextcloud.org</user>
<admin>https://docs.nextcloud.org</admin>
<developer>https://docs.nextcloud.org</developer>
</documentation>
<category>tool</category>
<website>https://owncloud.org</website>
<website>https://example.org</website>
<bugs>https://github.com/owncloud/theapp/issues</bugs>
<bugs>https://github.com/nextcloud/theapp/issues</bugs>
<repository type="git">https://github.com/owncloud/theapp.git</repository>
<repository type="git">https://github.com/nextcloud/theapp.git</repository>
<ocsid>1234</ocsid>
@@ -170,7 +170,7 @@ specified. Valid values for the 'os' attribute are as returned by the php functi
lib
===
Defines a required php extension with required minimum and/or maximum version. The names for the libraries have to match the result as returned by the php function `get_loaded_extensions <http://php.net/manual/en/function.get-loaded-extensions.php>`_.
The explicit version of an extension is read from `phpversion <http://php.net/manual/de/function.phpversion.php>`_ - with some exception as to be read up in the `code base <https://github.com/owncloud/core/blob/master/lib/private/app/platformrepository.php#L45>`_
The explicit version of an extension is read from `phpversion <http://php.net/manual/de/function.phpversion.php>`_ - with some exception as to be read up in the `code base <https://github.com/nextcloud/server/blob/master/lib/private/App/PlatformRepository.php>`_
os
==
@@ -195,17 +195,17 @@ Deprecated in favor of the **<dependencies>** tag.
public
======
Used to provide a public interface (requires no login) for the app. The id is appended to the URL **/owncloud/index.php/public**. Example with id set to 'calendar'::
Used to provide a public interface (requires no login) for the app. The id is appended to the URL **/index.php/public**. Example with id set to 'calendar'::
/owncloud/index.php/public/calendar
/index.php/public/calendar
Also take a look at :doc:`../core/externalapi`.
remote
======
Same as public but requires login. The id is appended to the URL **/owncloud/index.php/remote**. Example with id set to 'calendar'::
Same as public but requires login. The id is appended to the URL **/index.php/remote**. Example with id set to 'calendar'::
/owncloud/index.php/remote/calendar
/index.php/remote/calendar
Also take a look at :doc:`../core/externalapi`.

View File

@@ -13,7 +13,7 @@ The :file:`appinfo/app.php` is the first file that is loaded and executed in Nex
\OC::$server->getNavigationManager()->add(function () {
$urlGenerator = \OC::$server->getURLGenerator();
return [
// the string under which your app will be referenced in owncloud
// the string under which your app will be referenced in nextcloud
'id' => 'myapp',
// sorting weight for the navigation. The higher the number, the higher
@@ -43,7 +43,7 @@ The :file:`appinfo/app.php` is the first file that is loaded and executed in Nex
Although it is also possible to include :doc:`js` or :doc:`css` for other apps by placing the **addScript** or **addStyle** functions inside this file, it is strongly discouraged, because the file is loaded on each request (also such requests that do not return HTML, but e.g. json or webdav).
.. code-block:: php
<?php
\OCP\Util::addScript('myapp', 'script'); // include js/script.js for every app

View File

@@ -4,7 +4,7 @@ Translation
.. sectionauthor:: Bernhard Posselt <dev@bernhard-posselt.com>
Nextcloud's translation system is powered by `Transifex <https://www.transifex.com/nextcloud/nextcloud/>`_. To start translating sign up and enter a group. If your app should be added to Transifex just post a new topic in the `translations forum <https://help.nextcloud.com/c/translations>`_ and we will set it up for you.
Nextcloud's translation system is powered by `Transifex <https://www.transifex.com/nextcloud/>`_. To start translating sign up and enter a group. If your community app should be added to Transifex contact one of the translation team `in the forums <https://help.nextcloud.com/c/translations>`_ to set it up for you.
PHP
===
@@ -115,7 +115,7 @@ In case some translation strings may be translated wrongly because they have mul
<li id="add-new">
<?php
// TRANSLATORS Will be shown inside a popup and asks the user to add a new file
p($l->t('Add new file'));
p($l->t('Add new file'));
?>
</li>
</ul>
@@ -128,7 +128,7 @@ generate the gettext strings by yourself by creating an :file:`l10n/` directory
in the app folder and executing::
cd /srv/http/owncloud/apps/myapp/l10n
cd /srv/http/nextcloud/apps/myapp/l10n
perl l10n.pl read myapp
The translation script requires **Locale::PO** and **gettext**, installable via::

View File

@@ -6,15 +6,15 @@ Create an app
After :doc:`you've set up the development environment and installed the dev tool <../general/devenv>` change into the Nextcloud apps directory::
cd /var/www/owncloud/apps
cd /var/www/nextcloud/apps
Then run::
ocdev startapp MyApp --email mail@example.com --author "Your Name" --description "My first app" --owncloud 8
ncdev startapp MyApp --email mail@example.com --author "Your Name" --description "My first app" --owncloud 8
This will create all the needed files in the current directory. For more information on how to customize the generated app, see the `Project's GitHub page <https://github.com/owncloud/ocdev>`_ or run::
This will create all the needed files in the current directory. For more information on how to customize the generated app, see the `Project's GitHub page <https://github.com/nexcloud/ncdev>`_ or run::
ocdev startapp -h
ncdev startapp -h
Enable the app
--------------
@@ -31,4 +31,3 @@ The following directories have now been created:
* **lib/**: Contains the other class files of your app
* **templates/**: Contains the templates
* **tests/**: Contains the tests

View File

@@ -10,7 +10,7 @@ All PHP classes can be tested with `PHPUnit <http://phpunit.de/>`_, JavaScript c
PHP
===
The PHP tests go into the **tests/** directory. Unfortunately the classloader in core requires a running server (as in fully configured and setup up with a database connection). This is unfortunately too complicated and slow so a separate classloader has to be provided. If the app has been generated with the **ocdev startapp** command, the classloader is already present in the the **tests/** directory and PHPUnit can be run with::
The PHP tests go into the **tests/** directory. Unfortunately the classloader in core requires a running server (as in fully configured and setup up with a database connection). This is unfortunately too complicated and slow so a separate classloader has to be provided. If the app has been generated with the **ncdev startapp** command, the classloader is already present in the the **tests/** directory and PHPUnit can be run with::
phpunit tests/

View File

@@ -33,7 +33,7 @@ Now open another terminal window and start the development server::
Afterwards the app can be created in the **apps** folder::
cd apps
ocdev startapp OwnNotes
ncdev startapp OwnNotes
This creates a new folder called **ownnotes**. Now access and set up Nextcloud through the webinterface at `http://localhost:8080 <http://localhost:8080>`_ and enable the OwnNotes application on the `apps page <http://localhost:8080/index.php/settings/apps>`_.

View File

@@ -53,10 +53,9 @@ requests should be handled
Questions?
----------
Feel free to drop a line on the `mailing list`_ or join us on `IRC`_.
Feel free to drop a line on the `forums`_ or join us on `IRC`_.
.. _core repository: https://GitHub.com/owncloud/core
.. _continuous integration server: https://ci.owncloud.org/
.. _mailing list: https://mailman.owncloud.org/mailman/listinfo/devel
.. _IRC: http://webchat.freenode.net/?channels=owncloud-dev
.. _continuous integration server: https://drone.weasel.rocks/
.. _forums: https://help.nextcloud.com/
.. _IRC: http://webchat.freenode.net/?channels=nextcloud-dev
.. _coding guidelines: ../general/codingguidelines

View File

@@ -16,12 +16,11 @@ Thank you for helping Nextcloud by reporting bugs. Before submitting an issue, p
* If the issue is with the Nextcloud server, report it to the `Server repository`_
* If the issue is with the Nextcloud client, report it to the `Client repository`_
* If the issue with with an Nextcloud app, report it to where that app is developed
* If the app is listed in our `main github repository`_ report it to the correct sub
* If the app is listed in our `main GitHub organization`_ report it to the correct sub
repository
Please note that the mailing list should not be used for bug reports, as it is hard to track them there.
.. _Issue submission guidelines: https://github.com/nextcloud/server/blob/master/CONTRIBUTING.md#submitting-issues
.. _Server repository: https://github.com/nextcloud/server/issues
.. _Client repository: https://github.com/nextcloud/client/issues
.. _main github repository: https://github.com/nextcloud
.. _main GitHub organization: https://github.com/nextcloud

View File

@@ -1,26 +1,11 @@
Kanban Board
============
Development process
===================
This chapter contains a lot of information about the development process the
Nextcloud community tries to follow, so please take your time to digest all the
information. In any case remember this page as the documentation on how it
should be done. Nothing here is set in stone, so if you think something should
be changed please discuss it on the `mailing list`_.
Kanban Board = github issues + huboard
--------------------------------------
We are using http://huboard.com to visualize Nextcloud github issues as a `kanban
board`_ (see: `core`_, `apps`_, `client`_):
.. figure:: ../images/kanbanexample.png
:scale: 70
As you may have noticed, the columns of the kanban board represent the
life-cycle of an issue (be it a Bug or an Enhancement). An issue flows from the
1 - Backlog on the left to the 7 - To release column on the right and is not
closed until it has been released. Instead we pull an issue to the next column
by changing the label.
be changed please discuss it on the `forums`_.
The Labels
----------
@@ -140,7 +125,7 @@ Why do we have it?
What does a developer think?
"Ill check the Scenario described earlier works as expected. If necessary
Ill update the related Gherkin Scenarios. `Jenkins`_ will test the scenario
Ill update the related Gherkin Scenarios. `Drone`_ will test the scenario
on all kinds of platforms, Web server and database combinations with
`cucumber`_."
@@ -158,14 +143,14 @@ Reviewing
Why do we have it?
With the Gherkin Scenario from the Concept Phase reviewers have a checklist to
test if a Bug has been solved and if an Enhancement works as expected. **The
most eager reviewer we have is Jenkins**. When it comes to testing he soldiers
most eager reviewer we have is Drone**. When it comes to testing he soldiers
on going through the different combinations of platform, Web server and
database.
What does a developer think?
"Damn! If I had written the Gherkin Scenarios and Cucumber Step Definitions I
could leave the task of testing this on the different combinations of platform,
Web server and database to Jenkins. Ill miss something when doing this
Web server and database to Drone. Ill miss something when doing this
manually.*
When can I pull?
@@ -208,8 +193,8 @@ Reviewing considered impossible?
How can you possibly review an issue when it requires you to test various
combinations of browsers, platforms, databases and maybe even app combinations?
Well, you cant. But you can write a gherkin scenario that can be used to write
an automated test that is executed by Jenkins on every commit to the main
repositories. If for some reason Jenkins cannot be used for the review you will
an automated test that is executed by Drone on every commit to the main
repositories. If for some reason Drone cannot be used for the review you will
find yourself in the very uncomfortable situation where you release half tested
code that will hopefully not eat user data. Seriously! Write gherkin scenarios!
@@ -271,15 +256,12 @@ the Kanban board by Milestone, making it especially easy to focus on the current
Release.
.. _kanban board: http://en.wikipedia.org/wiki/Kanban_board
.. _mailing list: mailto:owncloud@kde.org
.. _core: http://huboard.com/owncloud/core/board/#
.. _apps: http://huboard.com/owncloud/apps/board/#
.. _client: http://huboard.com/owncloud/client/board/#
.. _forums: https://help.nextcloud.org
.. _Gherkin: https://github.com/cucumber/cucumber/wiki/Gherkin
.. _existing ones: https://ci.tmit.eu/job/acceptance-test/cucumber-html-reports/?
.. _existing ones: https://github.com/nextcloud/server/tree/master/build/integration/features
.. _“Given … when … then …“: https://github.com/cucumber/cucumber/wiki/Given-When-Then
.. _unit tests: https://github.com/owncloud/core/tree/master/tests
.. _Code Review Documentation: https://owncloud.org/dev/code-reviews-on-github/
.. _Jenkins: https://ci.tmit.eu/
.. _unit tests: https://github.com/nextcloud/server/tree/master/tests
.. _Code Review Documentation: codereviews
.. _Drone: https://drone.weasel.rocks
.. _cucumber: http://cukes.info/
.. _transifex: https://www.transifex.com/projects/p/owncloud/
.. _transifex: https://www.transifex.com/nextcloud/

View File

@@ -80,7 +80,7 @@ App config
/* Place to log to, can be owncloud and syslog (owncloud is log menu item in admin menu) */
"log_type" => "owncloud",
/* File for the owncloud logger to log to, (default is ownloud.log in the data dir */
/* File for the owncloud logger to log to, (default is nextcloud.log in the data dir */
"logfile" => "",
/* Loglevel to start logging at. 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR (default is WARN) */

View File

@@ -21,12 +21,12 @@ Methods are registered inside the :file:`appinfo/routes.php` using :php:class:`O
<?php
\OCP\API::register(
'get',
'/apps/yourapp/url',
'get',
'/apps/yourapp/url',
function($urlParameters) {
return new \OC_OCS_Result($data);
},
'yourapp',
'yourapp',
\OC_API::ADMIN_AUTH
);
@@ -39,13 +39,13 @@ Authentication & Basics
~~~~~~~~~~~~~~~~~~~~~~~
Because REST is stateless you have to send user and password each time you access the API. Therefore running Nextcloud **with SSL is highly recommended** otherwise **everyone in your network can log your credentials**::
https://user:password@yourowncloud.com/ocs/v1.php/apps/yourapp
https://user:password@example.com/ocs/v1.php/apps/yourapp
Output
~~~~~~
The output defaults to XML. If you want to get JSON append this to the URL::
?format=json
Output from the application is wrapped inside a **data** element:

View File

@@ -5,7 +5,7 @@ OCS Share API
The OCS Share API allows you to access the sharing API from outside over
pre-defined OCS calls.
The base URL for all calls to the share API is: *<owncloud_base_url>/ocs/v1.php/apps/files_sharing/api/v1*
The base URL for all calls to the share API is: *<nextcloud_base_url>/ocs/v1.php/apps/files_sharing/api/v1*
Local Shares
============
@@ -136,13 +136,13 @@ Federated Cloud Shares
======================
Both the sending and the receiving instance need to have federated cloud sharing
enabled and configured. See `Configuring Federated Cloud Sharing <https://doc.owncloud.org/server/9.0/admin_manual/configuration_files/federated_cloud_sharing_configuration.html>`_.
enabled and configured. See `Configuring Federated Cloud Sharing <https://docs.nextcloud.org/server/9/admin_manual/configuration_files/federated_cloud_sharing_configuration.html>`_.
Create a new Federated Cloud Share
----------------------------------
Creating a federated cloud share can be done via the local share endpoint, using
(int) 6 as a shareType and the `Federated Cloud ID <https://owncloud.org/federation/>`_
(int) 6 as a shareType and the `Federated Cloud ID <https://nextcloud.comg/federation/>`_
of the share recipient as shareWith. See `Create a new Share`_ for more information.

View File

@@ -1,10 +1,10 @@
Theming Nextcloud
=================
Themes can be used to customize the look and feel of Nextcloud.
Themes can relate to the following topics of owncloud:
Themes can relate to the following topics of Nextcloud:
* Theming the web-frontend
* Theming the owncloud Desktop client
* Theming the desktop client
This documentation contains only the Web-frontend adaptations so far.
@@ -22,7 +22,7 @@ With this facts you can easily determine, where the following object-related att
The next thing you should do, before starting any changes is:
Make a backup of your current theme(s) e.g.:
* cd …/owncloud/themes
* cd …/nextcloud/themes
* cp -r example mytheme
@@ -45,7 +45,7 @@ The folder structure of a theme is exactly the same as the main Nextcloud
structure. You can override js files, images, translations and templates with
own versions. CSS files are loaded additionally to the default files so you can
override CSS properties. CSS files and the standard pictures that are used reside
for example in /owncloud/core/ and /owncloud/settings/ in these sub folders:
for example in /nextcloud/core/ and /nextcloud/settings/ in these sub folders:
* css = style sheets
* js = JavaScripts
@@ -58,12 +58,12 @@ for example in /owncloud/core/ and /owncloud/settings/ in these sub folders:
Notes for Updates
=================
It is not recommended to the user to perform adaptations inside the
It is not recommended to the user to perform adaptations inside the
folder ``/themes/example`` because files inside this folder might get
replaced during the next Nextcloud update process.
During an update, files might get changed within the core and settings
folders. This could result in problems because your template files will
During an update, files might get changed within the core and settings
folders. This could result in problems because your template files will
not 'know' about these changes and therefore must be manually merged with
the updated core file or simply be deleted (or renamed for a test).
@@ -93,8 +93,8 @@ If you want to do a quick exchange like (1) it's important to know the size of t
The (main) pictures, that can be found inside Nextcloud standard theming are the following:
* The logo at the login-page above the credentials-box: …/owncloud/themes/default/core/img/logo.svg
* The logo, that's always in the left upper corner after login: …/owncloud/themes/default/core/img/logo-wide.svg
* The logo at the login-page above the credentials-box: …/nextcloud/themes/default/core/img/logo.svg
* The logo, that's always in the left upper corner after login: …/nextcloud/themes/default/core/img/logo-wide.svg
Inserting your new logo
-----------------------
@@ -102,17 +102,17 @@ Inserting a new logo into an existing theme is as simple as replacing the old lo
You can use: scalable vector graphics (.svg) or common graphics formats for the internet such as portable network graphics (.png) or .jepg
Just insert the new created picture by using the unchanged name of the old picture.
The app icons can also be overwritten in a theme. To change for example the app icon of the activity app you need to overwrite it by saving the new image to …/owncloud/themes/default/apps/activity/img/activity.svg
The app icons can also be overwritten in a theme. To change for example the app icon of the activity app you need to overwrite it by saving the new image to …/nextcloud/themes/default/apps/activity/img/activity.svg
Changing favicon
----------------
For compatibility with older browsers, favicon (the image that appears in your browser tab) uses .../owncloud/core/img/favicon.ico.
For compatibility with older browsers, favicon (the image that appears in your browser tab) uses .../nextcloud/core/img/favicon.ico.
To customize favicon for MyTheme:
* Create a version of your logo in .ico format
* Store your custom favicon as .../owncloud/themes/MyTheme/core/img/favicon.ico
* Include .../owncloud/themes/MyTheme/core/img/favicon.svg and favicon.png to cover any future updates to favicon handling.
* Store your custom favicon as .../nextcloud/themes/MyTheme/core/img/favicon.ico
* Include .../nextcloud/themes/MyTheme/core/img/favicon.svg and favicon.png to cover any future updates to favicon handling.
Changing the default colours
----------------------------
@@ -201,11 +201,11 @@ This can be done with a file named ``defaults.php`` within the root of the theme
class OC_Theme {
public function getAndroidClientUrl() {
return 'https://play.google.com/store/apps/details?id=com.owncloud.android';
return 'https://play.google.com/store/apps/details?id=com.nextcloud.client';
}
public function getName() {
return 'ownCloud';
return 'Nextcloud';
}
}

View File

@@ -95,8 +95,8 @@ Configure transifex
for resource in calendar contacts core files media gallery settings
do
tx set --auto-local -r owncloud.$resource "<lang>/$resource.po" --source-language=en \
tx set --auto-local -r nextcloud.$resource "<lang>/$resource.po" --source-language=en \
--source-file "templates/$resource.pot" --execute
done
.. _Transifex: https://www.transifex.net/projects/p/owncloud/
.. _Transifex: https://www.transifex.com/nextcloud/

View File

@@ -22,7 +22,7 @@ or install it manually::
After the installation the ''phpunit'' command is available::
phpunit --version
And you can update it using::
phpunit --self-update
@@ -44,7 +44,7 @@ Then you can simply run the created test with phpunit.
An example for a simple test would be:
:file:`/srv/http/owncloud/apps/myapp/tests/testaddtwo.php`
:file:`/srv/http/nextcloud/apps/myapp/tests/testaddtwo.php`
.. code-block:: php
@@ -66,7 +66,7 @@ An example for a simple test would be:
}
:file:`/srv/http/owncloud/apps/myapp/lib/testme.php`
:file:`/srv/http/nextcloud/apps/myapp/lib/testme.php`
.. code-block:: php
@@ -79,7 +79,7 @@ An example for a simple test would be:
}
}
In :file:`/srv/http/owncloud/apps/myapp/` you run the test with::
In :file:`/srv/http/nextcloud/apps/myapp/` you run the test with::
phpunit tests/testaddtwo.php
@@ -97,7 +97,7 @@ If you use Nextcloud functions or classes in your code, you'll need to make them
To do this, you'll need to provide the ``--bootstrap`` argument when running PHPUnit
:file:`/srv/http/owncloud`::
:file:`/srv/http/nextcloud`::
phpunit --bootstrap tests/bootstrap.php apps/myapp/tests/testsuite.php
@@ -108,11 +108,11 @@ adjust your php.ini and file rights.
open_basedir = none
:file:`/srv/http/owncloud`::
:file:`/srv/http/nextcloud`::
su -c "chmod a+r config/config.php"
su -c "chmod a+rx data/"
su -c "chmod a+w data/owncloud.log"
su -c "chmod a+w data/nextcloud.log"
Running unit tests for the Nextcloud core project
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -186,7 +186,6 @@ Documentation
Here are some useful links about how to write unit tests with Jasmine and Sinon:
- Karma test runner: http://karma-runner.github.io
- Karma test runner: http://karma-runner.github.io
- Jasmine: http://pivotal.github.io/jasmine
- Sinon (for mocking and stubbing): http://sinonjs.org/
- Sinon (for mocking and stubbing): http://sinonjs.org/

View File

@@ -14,7 +14,7 @@ Process
We mostly consider bug fixes for back porting. Occasionally, important changes to the API can be backported to make it easier for developers to keep their apps working between major releases. If you think a pull request (PR) is relevant for the stable release, go through these steps:
1. Make sure the PR is merged to master
2. Ask Frank (**@karlitschek**) and Thomas (**@deepdiver1975**) if the code should be backported and add the label `backport-request <https://github.com/owncloud/core/labels/Backport-Request>`_ to the PR
2. Ask Frank (**@karlitschek**) and Thomas (**@deepdiver1975**) if the code should be backported and add the label `backport-request <https://github.com/nextcloud/server/labels/backport-request>`_ to the PR
3. If Frank or Thomas say yes then create a new branch based on the respective stable branch (stable7 for the 7.0.x series), cherry-pick the needed commits to that branch and create a PR on GitHub.
4. Specify the corresponding milestone for that series (7.0.x-next-maintenance for the 7.0.x series) to this PR and reference the original PR in there. This enables the QA team to find the backported items for testing and having the original PR with detailed description linked.

View File

@@ -6,8 +6,8 @@ Coding Style & General Guidelines
General
-------
* Ideally, discuss your plans on the `mailing list <https://mailman.owncloud.org/mailman/listinfo/devel>`_ to see if others want to work with you on it
* We use `Github <https://github.com/owncloud>`_, please get an account there and clone the repositories you want to work on
* Ideally, discuss your plans on the `forums <https://help.nextcloud.com>`_ to see if others want to work with you on it
* We use `Github <https://github.com/nextcloud>`_, please get an account there and clone the repositories you want to work on
* Fixes go directly to master, nevertheless they need to be tested thoroughly.
* New features are always developed in a branch and only merged to master once they are fully done.
* Software should work. We only put features into master when they are complete. It's better to not have a feature instead of having one that works poorly.
@@ -15,7 +15,6 @@ General
* When you are finished, use the merge request function on Github to create a pull request. The other developers will look at it and give you feedback. You can signify that your PR is ready for review by adding the label "5 - ready for review" to it. You can also post your merge request to the mailing list to let people know. See `the code review page for more information <../bugtracker/codereviews.html>`_
* It is key to keep changes separate and small. The bigger and more hairy a PR grows, the harder it is to get it in. So split things up where you can in smaller changes - if you need a small improvement like a API addition for a big feature addition, get it in first rather than adding it to the big piece of work!
* Decisions are made by consensus. We strive for making the best technical decisions and as nobody can know everything, we collaborate. That means a first negative comment might not be the final word, neither is positive feedback an immediate GO. Nextcloud is built out of modular pieces (apps) and maintainers have a strong influence. In case of disagreement we consult other seasoned contributors.
* We need a signed contributor agreement from you to commit into the core repository (apps don't need that). All the information is in our `Contributor agreement FAQ <https://owncloud.org/contribute/agreement/>`_.
Labels
------

View File

@@ -62,7 +62,7 @@ XDebug will now (when activated) try to connect to localhost on port 9000, and w
For further reading, see the XDebug documentation: http://xdebug.org/docs/remote
Once you are familiar with how your debugging client works, you can start debugging with XDebug. To test Nextcloud through the web interface or other HTTP requests, set the ``XDEBUG_SESSION_START`` cookie or POST parameter. Alternatively, there are browser extensions to make this easy:
Once you are familiar with how your debugging client works, you can start debugging with XDebug. To test Nextcloud through the web interface or other HTTP requests, set the ``XDEBUG_SESSION_START`` cookie or POST parameter. Alternatively, there are browser extensions to make this easy:
- The Easiest XDebug (Firefox): https://addons.mozilla.org/en-US/firefox/addon/the-easiest-xdebug/
- XDebug Helper (Chrome): https://chrome.google.com/extensions/detail/eadndfjplgieldjbigjakmdgkmoaaaoc

View File

@@ -18,7 +18,7 @@ First `set up your Web server and database <https://docs.nextcloud.org/server/9/
Get the source
==============
There are two ways to obtain Nextcloud sources:
There are two ways to obtain Nextcloud sources:
* Using the `stable version <https://docs.nextcloud.org/server/9/admin_manual/#installation>`_
.. TODO ON RELEASE: Update version number above on release
@@ -32,14 +32,14 @@ Gather information about server setup
To get started the basic git repositories need to cloned into the Web server's directory. Depending on the distribution this will either be
* **/var/www**
* **/var/www/html**
* **/srv/http**
* **/var/www/html**
* **/srv/http**
Then identify the user and group the Web server is running as and the Apache user and group for the **chown** command will either be
* **http**
* **www-data**
* **www-data**
* **apache**
* **wwwrun**
@@ -53,7 +53,7 @@ Install the `development tool <https://github.com/nextcloud/ncdev>`_
After the development tool installation make the directory writable::
sudo chmod o+rw /var/www
Then install Nextcloud from git::
ncdev setup --dir /var/www/<folder> server
@@ -108,6 +108,5 @@ or to prune all merged branches, you would execute this::
It is even easier if you create alias from these commands in case you want to avoid retyping those each time you need them.
.. _GitHub: https://github.com/owncloud
.. _GitHub: https://github.com/nextcloud
.. _GitHub Help Page: https://help.github.com/

View File

@@ -11,7 +11,7 @@ Database performance
--------------------
The database plays an important role in Nextcloud performance. The general rule is: database queries are very bad and should be avoided if possible. The reasons for that are:
* Roundtrips: Bigger Nextcloud installations have the database not installed on the application server but on a remote dedicated database server. The problem is that database queries then go over the network. These roundtrips can add up significantly if you have a lot of queries.
* Roundtrips: Bigger Nextcloud installations have the database not installed on the application server but on a remote dedicated database server. The problem is that database queries then go over the network. These roundtrips can add up significantly if you have a lot of queries.
* Speed. A lot of people think that databases are fast. This is not always true if you compare it with handling data internally in PHP or in the filesystem or even using key/value based storages. So every developer should always double check if the database is really the best place for the data.
* Scalability. If you have a big Nextcloud cluster setup you usually have several Nextcloud/Web servers in parallel and a central database and a central storage. This means that everything that happens on the Nextcloud/PHP side can parallelize and can be scaled. Stuff that is happening in the database and in the storage is critical because it only exists once and can't be scaled so easily.
@@ -29,9 +29,9 @@ With MySQL it is very easy with just a bit of configuration:
If you put this into your my.cnf file, every query that takes longer than one second is logged to a logfile::
log_slow_queries = 1
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time=1
log_slow_queries = 1
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time=1
If a query takes more than a second we have a serious problem of course. You can watch it with `tail -f /var/log/mysql/mysql-slow.log` while using Nextcloud.
@@ -61,4 +61,4 @@ The recommendation is to automatically do 10000 PROPFINDs or file uploads, measu
Getting help
------------
If you need help with performance or other issues please ask on our `mailing list <https://mailman.owncloud.org/mailman/listinfo/devel>`_ or on our IRC channel **#owncloud-dev** on **irc.freenode.net**.
If you need help with performance or other issues please ask on our `forums <https://help.nextcloud.com>`_ or on our IRC channel **#nextcloud-dev** on **irc.freenode.net**.

View File

@@ -207,7 +207,7 @@ Additionally always check if the user has the right to perform that action. (e.g
Sensitive data exposure
-----------------------
Always store user data or configuration files in safe locations, e.g. **owncloud/data/** and not in the webroot where they can be accessed by anyone using a web browser.
Always store user data or configuration files in safe locations, e.g. **nextcloud/data/** and not in the webroot where they can be accessed by anyone using a web browser.
Cross site request forgery
--------------------------
@@ -246,4 +246,4 @@ Always validate the URL before redirecting if the requested URL is on the same d
Getting help
------------
If you need help to ensure that a function is secure please ask on our `mailing list <https://mailman.owncloud.org/mailman/listinfo/devel>`_ or on our IRC channel **#owncloud-dev** on **irc.freenode.net**.
If you need help to ensure that a function is secure please ask on our `mailing list <https://mailman.owncloud.org/mailman/listinfo/devel>`_ or on our IRC channel **#nextcloud-dev** on **irc.freenode.net**.

View File

@@ -4,9 +4,9 @@
Nextcloud Developer Documentation
=================================
.. _ownCloud appstore: https://apps.owncloud.com/
.. _Translation: https://www.transifex.com/nextcloud/nextcloud/
.. _Documentation: https://github.com/nextcloud/documentation
.. _ownCloud Appstore: https://apps.owncloud.com/
.. _Translation: https://www.transifex.com/nextcloud/
.. _Documentation: https://github.com/nextcloud/documentation#nextcloud-documentation
Table of Contents
=================
@@ -20,5 +20,3 @@ Table of Contents
core/index
bugtracker/index
commun/index
.. test