|
@@ 635-639 (lines=5) @@
|
| 632 |
|
if (isset($user)) { |
| 633 |
|
$phpFile = OC_User::getHome($user) . '/mount.php'; |
| 634 |
|
$jsonFile = OC_User::getHome($user) . '/mount.json'; |
| 635 |
|
} else { |
| 636 |
|
$phpFile = OC::$SERVERROOT . '/config/mount.php'; |
| 637 |
|
$datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data/'); |
| 638 |
|
$jsonFile = \OC_Config::getValue('mount_file', $datadir . '/mount.json'); |
| 639 |
|
} |
| 640 |
|
if (is_file($jsonFile)) { |
| 641 |
|
$mountPoints = json_decode(file_get_contents($jsonFile), true); |
| 642 |
|
if (is_array($mountPoints)) { |
|
@@ 661-666 (lines=6) @@
|
| 658 |
|
* @param array $data Mount points |
| 659 |
|
*/ |
| 660 |
|
private static function writeData($user, $data) { |
| 661 |
|
if (isset($user)) { |
| 662 |
|
$file = OC_User::getHome($user) . '/mount.json'; |
| 663 |
|
} else { |
| 664 |
|
$datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data/'); |
| 665 |
|
$file = \OC_Config::getValue('mount_file', $datadir . '/mount.json'); |
| 666 |
|
} |
| 667 |
|
|
| 668 |
|
foreach ($data as &$applicables) { |
| 669 |
|
foreach ($applicables as &$mountPoints) { |