|
|
@ -379,7 +379,20 @@ class OC_Util { |
|
|
*/ |
|
|
*/ |
|
|
public static function copySkeleton($userId, \OCP\Files\Folder $userDirectory) { |
|
|
public static function copySkeleton($userId, \OCP\Files\Folder $userDirectory) { |
|
|
|
|
|
|
|
|
$skeletonDirectory = \OC::$server->getConfig()->getSystemValue('skeletondirectory', \OC::$SERVERROOT . '/core/skeleton'); |
|
|
|
|
|
|
|
|
$plainSkeletonDirectory = \OC::$server->getConfig()->getSystemValue('skeletondirectory', \OC::$SERVERROOT . '/core/skeleton'); |
|
|
|
|
|
$userLang = \OC::$server->getL10NFactory()->findLanguage(); |
|
|
|
|
|
$skeletonDirectory = str_replace('{lang}', $userLang, $plainSkeletonDirectory); |
|
|
|
|
|
|
|
|
|
|
|
if (!file_exists($skeletonDirectory)) { |
|
|
|
|
|
$dialectStart = strpos($userLang, '_'); |
|
|
|
|
|
if ($dialectStart !== false) { |
|
|
|
|
|
$skeletonDirectory = str_replace('{lang}', substr($userLang, 0, $dialectStart), $plainSkeletonDirectory); |
|
|
|
|
|
} |
|
|
|
|
|
if ($dialectStart === false || !file_exists($skeletonDirectory)) { |
|
|
|
|
|
$skeletonDirectory = str_replace('{lang}', 'en', $plainSkeletonDirectory); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$instanceId = \OC::$server->getConfig()->getSystemValue('instanceid', ''); |
|
|
$instanceId = \OC::$server->getConfig()->getSystemValue('instanceid', ''); |
|
|
|
|
|
|
|
|
if ($instanceId === null) { |
|
|
if ($instanceId === null) { |
|
|
|