[Pkg-owncloud-commits] [SCM] owncloud.git branch, master, updated. debian/4.0.8debian-1.6-45-ga96c8a8
David Prévot
taffit at debian.org
Sun Mar 24 22:53:22 UTC 2013
The following commit has been merged in the master branch:
commit 3b130b125ee2f7d9186390e3dd7212592a858a05
Author: David Prévot <taffit at debian.org>
Date: Sun Mar 24 18:09:35 2013 -0400
Fix more OC::$SERVERROOT…/config
diff --git a/debian/patches/01_fix_data_path.diff b/debian/patches/01_fix_data_path.diff
index 4cc4a5a..9f6eee0 100644
--- a/debian/patches/01_fix_data_path.diff
+++ b/debian/patches/01_fix_data_path.diff
@@ -8,7 +8,7 @@ Author: Thomas Mueller <thomas.mueller at tmit.eu>
Bug-Debian: http://bugs.debian.org/648674
Forwarded: not-needed
Reviewed-by: David Prévot <taffit at debian.org>
-Last-Update: 2013-03-23
+Last-Update: 2013-03-24
--- a/lib/config.php
+++ b/lib/config.php
@@ -47,6 +47,15 @@ Last-Update: 2013-03-23
//first set up the local "root" storage
if(!self::$rootMounted) {
\OC\Files\Filesystem::mount('\OC\Files\Storage\Local', array('datadir'=>$CONFIG_DATADIRECTORY), '/');
+@@ -182,7 +182,7 @@
+ .' to the ownCloud directory';
+
+ // Check if config folder is writable.
+- if(!is_writable(OC::$SERVERROOT."/config/") or !is_readable(OC::$SERVERROOT."/config/")) {
++ if(!is_writable("/etc/owncloud/") or !is_readable("/etc/owncloud/")) {
+ $errors[]=array('error'=>"Can't write into config directory 'config'",
+ 'hint'=>'You can usually fix this by giving the webserver user write access'
+ .' to the config directory in owncloud');
@@ -198,7 +198,7 @@
.' to the apps directory in owncloud or disabling the appstore in the config file.');
}
@@ -177,6 +186,15 @@ Last-Update: 2013-03-23
return $homedir;
--- a/core/setup.php
+++ b/core/setup.php
+@@ -1,7 +1,7 @@
+ <?php
+
+ // Check for autosetup:
+-$autosetup_file = OC::$SERVERROOT."/config/autoconfig.php";
++$autosetup_file = "/etc/owncloud/autoconfig.php";
+ if( file_exists( $autosetup_file )) {
+ OC_Log::write('core', 'Autoconfig file found, setting up owncloud...', OC_Log::INFO);
+ include $autosetup_file;
@@ -17,7 +17,7 @@
$hasPostgreSQL = is_callable('pg_connect');
$hasOracle = is_callable('oci_connect');
@@ -210,7 +228,7 @@ Last-Update: 2013-03-23
if(!self::$PDO) {
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
-@@ -221,7 +221,7 @@
+@@ -221,18 +221,18 @@
$root = \OC_User::getHome($user);
self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user);
@@ -218,7 +236,23 @@ Last-Update: 2013-03-23
+ $datadir = \OC_Config::getValue("datadirectory", \"/var/lib/owncloud/data");
//move config file to it's new position
- if (is_file(\OC::$SERVERROOT . '/config/mount.json')) {
+- if (is_file(\OC::$SERVERROOT . '/config/mount.json')) {
+- rename(\OC::$SERVERROOT . '/config/mount.json', $datadir . '/mount.json');
++ if (is_file('/etc/owncloud/mount.json')) {
++ rename('/etc/owncloud/mount.json', $datadir . '/mount.json');
+ }
+ // Load system mount points
+- if (is_file(\OC::$SERVERROOT . '/config/mount.php') or is_file($datadir . '/mount.json')) {
++ if (is_file('/etc/owncloud/mount.php') or is_file($datadir . '/mount.json')) {
+ if (is_file($datadir . '/mount.json')) {
+ $mountConfig = json_decode(file_get_contents($datadir . '/mount.json'), true);
+- } elseif (is_file(\OC::$SERVERROOT . '/config/mount.php')) {
+- $mountConfig = $parser->parsePHP(file_get_contents(\OC::$SERVERROOT . '/config/mount.php'));
++ } elseif (is_file('/etc/owncloud/mount.php')) {
++ $mountConfig = $parser->parsePHP(file_get_contents('/etc/owncloud/mount.php'));
+ }
+ if (isset($mountConfig['global'])) {
+ foreach ($mountConfig['global'] as $mountPoint => $options) {
--- a/lib/log/owncloud.php
+++ b/lib/log/owncloud.php
@@ -33,7 +33,7 @@
@@ -254,3 +288,14 @@ Last-Update: 2013-03-23
}
public static function getSource($url, $version) {
+--- a/apps/updater/lib/updater.php
++++ b/apps/updater/lib/updater.php
+@@ -122,7 +122,7 @@
+ // move old config files
+ $backupConfigPath = $backupBase . "/" . Helper::CORE_DIRNAME . "/config/";
+ foreach (glob($backupConfigPath . "*.php") as $configFile){
+- $target = \OC::$SERVERROOT . "/config/" . basename($configFile);
++ $target = "/etc/owncloud/" . basename($configFile);
+ if (!file_exists($target)){
+ copy($configFile, $target);
+ }
--
owncloud.git
More information about the Pkg-owncloud-commits
mailing list