Merge pull request #346 from diederikdehaas/patch-checkstyle-build1341

Patch checkstyle issues from jenkins build1341
This commit is contained in:
Thomas Müller 2012-11-10 02:22:28 -08:00
commit a7f26b6b40
7 changed files with 12 additions and 12 deletions

View File

@ -19,8 +19,8 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
$this->host=$params['host'];
$this->user=$params['user'];
$this->password=$params['password'];
if(isset($params['secure'])){
if(is_string($params['secure'])){
if(isset($params['secure'])) {
if(is_string($params['secure'])) {
$this->secure = ($params['secure'] === 'true');
}else{
$this->secure = (bool)$params['secure'];

View File

@ -271,8 +271,8 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
$this->host=$params['host'];
$this->user=$params['user'];
$this->root=isset($params['root'])?$params['root']:'/';
if(isset($params['secure'])){
if(is_string($params['secure'])){
if(isset($params['secure'])) {
if(is_string($params['secure'])) {
$this->secure = ($params['secure'] === 'true');
}else{
$this->secure = (bool)$params['secure'];

View File

@ -27,8 +27,8 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
$this->host=$host;
$this->user=$params['user'];
$this->password=$params['password'];
if(isset($params['secure'])){
if(is_string($params['secure'])){
if(isset($params['secure'])) {
if(is_string($params['secure'])) {
$this->secure = ($params['secure'] === 'true');
}else{
$this->secure = (bool)$params['secure'];

View File

@ -238,13 +238,13 @@ class OC_Migrate{
$userfolder = $extractpath . $json->exporteduser;
$newuserfolder = $datadir . '/' . self::$uid;
foreach(scandir($userfolder) as $file){
if($file !== '.' && $file !== '..' && is_dir($file)){
if($file !== '.' && $file !== '..' && is_dir($file)) {
// Then copy the folder over
OC_Helper::copyr($userfolder.'/'.$file, $newuserfolder.'/'.$file);
}
}
// 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 ) ) {
return json_encode( array( 'success' => false ) );
}

View File

@ -592,14 +592,14 @@ class OC_Util {
// try to connect to owncloud.org to see if http connections to the internet are possible.
$connected = @fsockopen("www.owncloud.org", 80);
if ($connected){
if ($connected) {
fclose($connected);
return true;
}else{
// second try in case one server is down
$connected = @fsockopen("apps.owncloud.com", 80);
if ($connected){
if ($connected) {
fclose($connected);
return true;
}else{

View File

@ -40,7 +40,7 @@ if(is_array($catagoryNames)) {
if(!$local) {
if($app['preview']=='') {
$pre=OC_Helper::imagePath('settings','trans.png');
$pre=OC_Helper::imagePath('settings', 'trans.png');
} else {
$pre=$app['preview'];
}

View File

@ -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);