Skip to content
Snippets Groups Projects
Commit ca7882a7 authored by Frank Karlitschek's avatar Frank Karlitschek
Browse files

disable not available external filesystems. Restructure the configuration a bit and improve naming

parent f3bd6d14
No related branches found
No related tags found
No related merge requests found
...@@ -38,66 +38,74 @@ class OC_Mount_Config { ...@@ -38,66 +38,74 @@ class OC_Mount_Config {
* @return array * @return array
*/ */
public static function getBackends() { public static function getBackends() {
return array(
'OC_Filestorage_Local' => array( $backends['OC_Filestorage_Local']=array(
'backend' => 'Local', 'backend' => 'Local',
'configuration' => array( 'configuration' => array(
'datadir' => 'Location')), 'datadir' => 'Location'));
'OC_Filestorage_AmazonS3' => array(
'backend' => 'Amazon S3', $backends['OC_Filestorage_AmazonS3']=array(
'configuration' => array( 'backend' => 'Amazon S3',
'key' => 'Key', 'configuration' => array(
'secret' => '*Secret', 'key' => 'Key',
'bucket' => 'Bucket')), 'secret' => '*Secret',
'OC_Filestorage_Dropbox' => array( 'bucket' => 'Bucket'));
'backend' => 'Dropbox',
'configuration' => array( $backends['OC_Filestorage_Dropbox']=array(
'configured' => '#configured', 'backend' => 'Dropbox',
'app_key' => 'App key', 'configuration' => array(
'app_secret' => 'App secret', 'configured' => '#configured',
'token' => '#token', 'app_key' => 'App key',
'token_secret' => '#token_secret'), 'app_secret' => 'App secret',
'custom' => 'dropbox'), 'token' => '#token',
'OC_Filestorage_FTP' => array( 'token_secret' => '#token_secret'),
'backend' => 'FTP', 'custom' => 'dropbox');
'configuration' => array(
'host' => 'URL', if(OC_Mount_Config::checkphpftp()) $backends['OC_Filestorage_FTP']=array(
'user' => 'Username', 'backend' => 'FTP',
'password' => '*Password', 'configuration' => array(
'root' => '&Root', 'host' => 'URL',
'secure' => '!Secure ftps://')), 'user' => 'Username',
'OC_Filestorage_Google' => array( 'password' => '*Password',
'backend' => 'Google Drive', 'root' => '&Root',
'configuration' => array( 'secure' => '!Secure ftps://'));
'configured' => '#configured',
'token' => '#token', $backends['OC_Filestorage_Google']=array(
'token_secret' => '#token secret'), 'backend' => 'Google Drive',
'custom' => 'google'), 'configuration' => array(
'OC_Filestorage_SWIFT' => array( 'configured' => '#configured',
'backend' => 'OpenStack Swift', 'token' => '#token',
'configuration' => array( 'token_secret' => '#token secret'),
'host' => 'URL', 'custom' => 'google');
'user' => 'Username',
'token' => '*Token', $backends['OC_Filestorage_SWIFT']=array(
'root' => '&Root', 'backend' => 'OpenStack Swift',
'secure' => '!Secure ftps://')), 'configuration' => array(
'OC_Filestorage_SMB' => array( 'host' => 'URL',
'backend' => 'SMB', 'user' => 'Username',
'configuration' => array( 'token' => '*Token',
'host' => 'URL', 'root' => '&Root',
'user' => 'Username', 'secure' => '!Secure ftps://'));
'password' => '*Password',
'share' => 'Share', if(OC_Mount_Config::checksmbclient()) $backends['OC_Filestorage_SMB']=array(
'root' => '&Root')), 'backend' => 'SMB / CIFS',
'OC_Filestorage_DAV' => array( 'configuration' => array(
'backend' => 'WebDAV', 'host' => 'URL',
'configuration' => array( 'user' => 'Username',
'host' => 'URL', 'password' => '*Password',
'user' => 'Username', 'share' => 'Share',
'password' => '*Password', 'root' => '&Root'));
'root' => '&Root',
'secure' => '!Secure https://')) $backends['OC_Filestorage_DAV']=array(
); 'backend' => 'ownCloud / WebDAV',
'configuration' => array(
'host' => 'URL',
'user' => 'Username',
'password' => '*Password',
'root' => '&Root',
'secure' => '!Secure https://'));
return($backends);
} }
/** /**
...@@ -419,7 +427,6 @@ class OC_Mount_Config { ...@@ -419,7 +427,6 @@ class OC_Mount_Config {
public static function checkDependencies() { public static function checkDependencies() {
$l= new OC_L10N; $l= new OC_L10N;
$txt=''; $txt='';
if(!OC_Mount_Config::checksmbclient()) $txt.=$l->t('<b>Warning:</b> "smbclient" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it.').'<br />'; if(!OC_Mount_Config::checksmbclient()) $txt.=$l->t('<b>Warning:</b> "smbclient" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it.').'<br />';
if(!OC_Mount_Config::checkphpftp()) $txt.=$l->t('<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it.').'<br />'; if(!OC_Mount_Config::checkphpftp()) $txt.=$l->t('<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it.').'<br />';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment