Skip to content
Snippets Groups Projects
Commit 56166905 authored by Bart Visscher's avatar Bart Visscher
Browse files

Style cleanup files_external

parent cd310add
No related branches found
No related tags found
No related merge requests found
...@@ -310,7 +310,9 @@ class OC_Mount_Config { ...@@ -310,7 +310,9 @@ class OC_Mount_Config {
foreach ($data[self::MOUNT_TYPE_GROUP] as $group => $mounts) { foreach ($data[self::MOUNT_TYPE_GROUP] as $group => $mounts) {
$content .= "\t\t'".$group."' => array (\n"; $content .= "\t\t'".$group."' => array (\n";
foreach ($mounts as $mountPoint => $mount) { foreach ($mounts as $mountPoint => $mount) {
$content .= "\t\t\t'".addcslashes($mountPoint, "'")."' => ".str_replace("\n", '', var_export($mount, true)).", \n"; $content .= "\t\t\t'".addcslashes($mountPoint, "'")
."' => "
.str_replace("\n", '', var_export($mount, true)).", \n";
} }
$content .= "\t\t),\n"; $content .= "\t\t),\n";
...@@ -322,7 +324,9 @@ class OC_Mount_Config { ...@@ -322,7 +324,9 @@ class OC_Mount_Config {
foreach ($data[self::MOUNT_TYPE_USER] as $user => $mounts) { foreach ($data[self::MOUNT_TYPE_USER] as $user => $mounts) {
$content .= "\t\t'".$user."' => array (\n"; $content .= "\t\t'".$user."' => array (\n";
foreach ($mounts as $mountPoint => $mount) { foreach ($mounts as $mountPoint => $mount) {
$content .= "\t\t\t'".addcslashes($mountPoint, "'")."' => ".str_replace("\n", '', var_export($mount, true)).",\n"; $content .= "\t\t\t'".addcslashes($mountPoint, "'")
."' => "
.str_replace("\n", '', var_export($mount, true)).",\n";
} }
$content .= "\t\t),\n"; $content .= "\t\t),\n";
} }
...@@ -410,8 +414,16 @@ class OC_Mount_Config { ...@@ -410,8 +414,16 @@ class OC_Mount_Config {
public static function checkDependencies() { public static function checkDependencies() {
$l= new OC_L10N('files_external'); $l= new OC_L10N('files_external');
$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()) {
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 />'; $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); return($txt);
} }
......
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
*/ */
namespace OC\Files\Storage; namespace OC\Files\Storage;
set_include_path(get_include_path() . PATH_SEPARATOR . \OC_App::getAppPath('files_external') . '/3rdparty/phpseclib/phpseclib'); set_include_path(get_include_path() . PATH_SEPARATOR .
require('Net/SFTP.php'); \OC_App::getAppPath('files_external') . '/3rdparty/phpseclib/phpseclib');
require 'Net/SFTP.php';
class SFTP extends \OC\Files\Storage\Common { class SFTP extends \OC\Files\Storage\Common {
private $host; private $host;
......
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