diff options
author | Philipp Kapfer <philipp.kapfer@gmx.at> | 2013-08-02 15:44:56 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-03 16:46:22 +0200 |
commit | 730bca98b48384816792423e97c53de112ac8aeb (patch) | |
tree | 2bce76284928b4bff783c336e5bb8464791b01dc /apps/files_external/lib/smb.php | |
parent | ff9a4a6d91b4a23be91a462806b8162543bb6c95 (diff) | |
download | nextcloud-server-730bca98b48384816792423e97c53de112ac8aeb.tar.gz nextcloud-server-730bca98b48384816792423e97c53de112ac8aeb.zip |
Moved dependency checks to end of class files
Dependency messages now appear below the configuration options instead of above
Reworked dependency check method to support consolidated messages for multiple backends
Conflicts:
apps/files_external/lib/google.php
apps/files_external/lib/swift.php
apps/files_external/templates/settings.php
Diffstat (limited to 'apps/files_external/lib/smb.php')
-rw-r--r-- | apps/files_external/lib/smb.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index 6fb262323ff..3ef13b633a9 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -17,20 +17,6 @@ class SMB extends \OC\Files\Storage\StreamWrapper{ private $root; private $share; - /** - * check if smbclient is installed - */ - public static function checkDependencies() { - if (function_exists('shell_exec')) { - $output = shell_exec('which smbclient'); - if (!empty($output)) { - return true; - } - } - $l = new \OC_L10N('files_external'); - return $l->t('<b>Note:</b> "smbclient" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it.'); - } - public function __construct($params) { if (isset($params['host']) && isset($params['user']) && isset($params['password']) && isset($params['share'])) { $this->host=$params['host']; @@ -148,4 +134,18 @@ class SMB extends \OC\Files\Storage\StreamWrapper{ } return $lastCtime; } + + /** + * check if smbclient is installed + */ + public static function checkDependencies() { + if (function_exists('shell_exec')) { + $output = shell_exec('which smbclient'); + if (!empty($output)) { + return true; + } + } + return array('smbclient'); + } + } |