diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-12-10 21:10:28 +0100 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-12-10 21:10:28 +0100 |
commit | f3bd6d14eee95fa81337410c429f1f83552fd766 (patch) | |
tree | 21169678030132ae93ddf2f7e1294d376ffb7df8 /apps/files_external/lib | |
parent | a444999a8c52d203cdc788eeb7e138356d2a3eb9 (diff) | |
download | nextcloud-server-f3bd6d14eee95fa81337410c429f1f83552fd766.tar.gz nextcloud-server-f3bd6d14eee95fa81337410c429f1f83552fd766.zip |
add some output why some of the external filesystems might not work
Diffstat (limited to 'apps/files_external/lib')
-rwxr-xr-x | apps/files_external/lib/config.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 87d6886c51e..fb61689db86 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -394,4 +394,35 @@ class OC_Mount_Config { return true; } + /** + * check if smbclient is installed + */ + public static function checksmbclient() { + $output=shell_exec('which smbclient'); + return (empty($output)?false:true); + } + + /** + * check if php-ftp is installed + */ + public static function checkphpftp() { + if(function_exists('ftp_login')) { + return(true); + }else{ + return(false); + } + } + + /** + * check dependencies + */ + public static function checkDependencies() { + $l= new OC_L10N; + $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::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 />'; + + return($txt); + } } |