[Pkg-owncloud-commits] [owncloud] 82/121: Make skeleton directory configurable.

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 16:44:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit cac56279c2fdbeab3877c64f4d2b2370a402907b
Author: Stefan Rado <owncloud at sradonia.net>
Date:   Sat Aug 16 01:07:42 2014 +0200

    Make skeleton directory configurable.
---
 config/config.sample.php | 5 +++++
 lib/private/util.php     | 5 ++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/config/config.sample.php b/config/config.sample.php
index 402c84f..a0f3e0a 100755
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -222,6 +222,11 @@ $CONFIG = array(
  */
 // "datadirectory" => "",
 
+/* The directory where the skeleton files are located. These files will be copied to the data
+ * directory of new users. Leave empty to not copy any skeleton files.
+ */
+// "skeletondirectory" => "",
+
 /* Enable maintenance mode to disable ownCloud
    If you want to prevent users to login to ownCloud before you start doing some maintenance work,
    you need to set the value of the maintenance parameter to true.
diff --git a/lib/private/util.php b/lib/private/util.php
index 896b076..0be6187 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -208,7 +208,10 @@ class OC_Util {
 	 * @param string $userDirectory
 	 */
 	public static function copySkeleton($userDirectory) {
-		OC_Util::copyr(\OC::$SERVERROOT.'/core/skeleton' , $userDirectory);
+		$skeletonDirectory = OC_Config::getValue('skeletondirectory', \OC::$SERVERROOT.'/core/skeleton');
+		if (!empty($skeletonDirectory)) {
+			OC_Util::copyr($skeletonDirectory , $userDirectory);
+		}
 	}
 
 	/**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list