Merge pull request #346 from diederikdehaas/patch-checkstyle-build1341
Patch checkstyle issues from jenkins build1341
This commit is contained in:
commit
a7f26b6b40
|
@ -19,8 +19,8 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
|
||||||
$this->host=$params['host'];
|
$this->host=$params['host'];
|
||||||
$this->user=$params['user'];
|
$this->user=$params['user'];
|
||||||
$this->password=$params['password'];
|
$this->password=$params['password'];
|
||||||
if(isset($params['secure'])){
|
if(isset($params['secure'])) {
|
||||||
if(is_string($params['secure'])){
|
if(is_string($params['secure'])) {
|
||||||
$this->secure = ($params['secure'] === 'true');
|
$this->secure = ($params['secure'] === 'true');
|
||||||
}else{
|
}else{
|
||||||
$this->secure = (bool)$params['secure'];
|
$this->secure = (bool)$params['secure'];
|
||||||
|
|
|
@ -271,8 +271,8 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
|
||||||
$this->host=$params['host'];
|
$this->host=$params['host'];
|
||||||
$this->user=$params['user'];
|
$this->user=$params['user'];
|
||||||
$this->root=isset($params['root'])?$params['root']:'/';
|
$this->root=isset($params['root'])?$params['root']:'/';
|
||||||
if(isset($params['secure'])){
|
if(isset($params['secure'])) {
|
||||||
if(is_string($params['secure'])){
|
if(is_string($params['secure'])) {
|
||||||
$this->secure = ($params['secure'] === 'true');
|
$this->secure = ($params['secure'] === 'true');
|
||||||
}else{
|
}else{
|
||||||
$this->secure = (bool)$params['secure'];
|
$this->secure = (bool)$params['secure'];
|
||||||
|
|
|
@ -27,8 +27,8 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
|
||||||
$this->host=$host;
|
$this->host=$host;
|
||||||
$this->user=$params['user'];
|
$this->user=$params['user'];
|
||||||
$this->password=$params['password'];
|
$this->password=$params['password'];
|
||||||
if(isset($params['secure'])){
|
if(isset($params['secure'])) {
|
||||||
if(is_string($params['secure'])){
|
if(is_string($params['secure'])) {
|
||||||
$this->secure = ($params['secure'] === 'true');
|
$this->secure = ($params['secure'] === 'true');
|
||||||
}else{
|
}else{
|
||||||
$this->secure = (bool)$params['secure'];
|
$this->secure = (bool)$params['secure'];
|
||||||
|
|
|
@ -238,13 +238,13 @@ class OC_Migrate{
|
||||||
$userfolder = $extractpath . $json->exporteduser;
|
$userfolder = $extractpath . $json->exporteduser;
|
||||||
$newuserfolder = $datadir . '/' . self::$uid;
|
$newuserfolder = $datadir . '/' . self::$uid;
|
||||||
foreach(scandir($userfolder) as $file){
|
foreach(scandir($userfolder) as $file){
|
||||||
if($file !== '.' && $file !== '..' && is_dir($file)){
|
if($file !== '.' && $file !== '..' && is_dir($file)) {
|
||||||
// Then copy the folder over
|
// Then copy the folder over
|
||||||
OC_Helper::copyr($userfolder.'/'.$file, $newuserfolder.'/'.$file);
|
OC_Helper::copyr($userfolder.'/'.$file, $newuserfolder.'/'.$file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Import user app data
|
// Import user app data
|
||||||
if(file_exists($extractpath . $json->exporteduser . '/migration.db')){
|
if(file_exists($extractpath . $json->exporteduser . '/migration.db')) {
|
||||||
if( !$appsimported = self::importAppData( $extractpath . $json->exporteduser . '/migration.db', $json, self::$uid ) ) {
|
if( !$appsimported = self::importAppData( $extractpath . $json->exporteduser . '/migration.db', $json, self::$uid ) ) {
|
||||||
return json_encode( array( 'success' => false ) );
|
return json_encode( array( 'success' => false ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -592,14 +592,14 @@ class OC_Util {
|
||||||
|
|
||||||
// try to connect to owncloud.org to see if http connections to the internet are possible.
|
// try to connect to owncloud.org to see if http connections to the internet are possible.
|
||||||
$connected = @fsockopen("www.owncloud.org", 80);
|
$connected = @fsockopen("www.owncloud.org", 80);
|
||||||
if ($connected){
|
if ($connected) {
|
||||||
fclose($connected);
|
fclose($connected);
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
// second try in case one server is down
|
// second try in case one server is down
|
||||||
$connected = @fsockopen("apps.owncloud.com", 80);
|
$connected = @fsockopen("apps.owncloud.com", 80);
|
||||||
if ($connected){
|
if ($connected) {
|
||||||
fclose($connected);
|
fclose($connected);
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -40,7 +40,7 @@ if(is_array($catagoryNames)) {
|
||||||
|
|
||||||
if(!$local) {
|
if(!$local) {
|
||||||
if($app['preview']=='') {
|
if($app['preview']=='') {
|
||||||
$pre=OC_Helper::imagePath('settings','trans.png');
|
$pre=OC_Helper::imagePath('settings', 'trans.png');
|
||||||
} else {
|
} else {
|
||||||
$pre=$app['preview'];
|
$pre=$app['preview'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ foreach ( $installedApps as $app ) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$info['preview'] = OC_Helper::imagePath('settings','trans.png');
|
$info['preview'] = OC_Helper::imagePath('settings', 'trans.png');
|
||||||
|
|
||||||
$info['version'] = OC_App::getAppVersion($app);
|
$info['version'] = OC_App::getAppVersion($app);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue