From 53bfb7e71c9f4502245284d276e60fa5b15d5bda Mon Sep 17 00:00:00 2001 From: Sam Tuke Date: Sun, 28 Oct 2012 15:41:55 +0000 Subject: [PATCH] Added two new man pages: debugging, and configfile; Added pages to TOC; Improved intro paragraph --- developer_manual/configfile.rst | 27 +++++++++++++++++ developer_manual/debugging.rst | 53 +++++++++++++++++++++++++++++++++ developer_manual/index.rst | 4 ++- 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 developer_manual/configfile.rst create mode 100644 developer_manual/debugging.rst diff --git a/developer_manual/configfile.rst b/developer_manual/configfile.rst new file mode 100644 index 000000000..4a42acacf --- /dev/null +++ b/developer_manual/configfile.rst @@ -0,0 +1,27 @@ +Config file +=========== + +Using alternative app directories +--------------------------------- + +ownCloud can be set to use a custom app directory in /config/config.php. Customise the following code and add it to your config file: + +.. code-block:: php + + 'apps_paths' => + array ( + 0 => + array ( + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => true, + ), + 1 => + array ( + 'path' => OC::$SERVERROOT.'/apps2', + 'url' => '/apps2', + 'writable' => false, + ), + ), + +ownCloud will use the first app directory which it finds in the array with 'writable' set to true. \ No newline at end of file diff --git a/developer_manual/debugging.rst b/developer_manual/debugging.rst new file mode 100644 index 000000000..423e5393c --- /dev/null +++ b/developer_manual/debugging.rst @@ -0,0 +1,53 @@ +Debugging +========= + +Debug mode +---------- + +When debug mode is enabled ownCloud, a variety of debugging features are enabled - see debugging documentation. Add the following to the very end of /config/config.php to enable it:: + + define( "DEBUG", 1); + + +Identifying errors +------------------ + +ownCloud uses custom error PHP handling that prevents errors being printed to webserver log files or command line output. Instead, errors are generally stored in ownCloud's own log file, located at: **/data/owncloud.log** + + +Debugging variables +------------------- + +You should use exceptions if you need to debug variable values manually, and not alternatives like trigger_error() (which may not be logged). + +e.g.: + +.. code-block:: php + + + +not: + +.. code-block:: php + + + +To disable custom error handling in ownCloud (and have PHP and your webserver handle errors instead), see Debug mode. + + +Debugging Javascript +-------------------- + +By default all Javascript files in ownCloud are minified (compressed) into a single file without whitespace. To prevent this, see Debug mode. + + +Debugging HTML and templates +---------------------------- + +By default ownCloud caches HTML generated by templates. This may prevent changes to app templates, for example, from being applied on page refresh. To disable caching, see Debug mode. + + +Using alternative app directories +--------------------------------- + +It may be useful to have multiple app directories for testing purposes, so you can conveniently switch between different versions of applications. See the configuration file documentation for details. \ No newline at end of file diff --git a/developer_manual/index.rst b/developer_manual/index.rst index deb83e847..a51c9df1f 100644 --- a/developer_manual/index.rst +++ b/developer_manual/index.rst @@ -1,7 +1,7 @@ ownCloud Developers Manual ************************** -Short synopsis of the manual goes here. +This is the ownCloud documentation. More information and source code is at the `Git repository `_. Contents ======== @@ -10,6 +10,8 @@ Contents :maxdepth: 2 introduction + debugging + configfile unittests