summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-29 08:42:49 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-29 20:29:43 +0200
commit0e58800016419daf3b2d032136415a5fe9d6331f (patch)
treec842a8c9104b3c9f2ceab2d505fe01a25f7d0dda /apps/files_external
parent52f2e7112ea985203eca16aa787bd75a7cf92194 (diff)
downloadnextcloud-server-0e58800016419daf3b2d032136415a5fe9d6331f.tar.gz
nextcloud-server-0e58800016419daf3b2d032136415a5fe9d6331f.zip
Whitespace fixes in apps
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/ajax/addRootCertificate.php2
-rw-r--r--apps/files_external/js/settings.js4
-rw-r--r--apps/files_external/lib/amazons3.php4
-rw-r--r--apps/files_external/lib/ftp.php2
-rw-r--r--apps/files_external/lib/google.php18
-rw-r--r--apps/files_external/lib/swift.php8
-rw-r--r--apps/files_external/lib/webdav.php7
-rw-r--r--apps/files_external/templates/settings.php10
-rw-r--r--apps/files_external/tests/ftp.php3
-rw-r--r--apps/files_external/tests/google.php3
-rw-r--r--apps/files_external/tests/swift.php5
-rw-r--r--apps/files_external/tests/webdav.php1
12 files changed, 31 insertions, 36 deletions
diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php
index d28a7d24b2d..1aa40bd8aa4 100644
--- a/apps/files_external/ajax/addRootCertificate.php
+++ b/apps/files_external/ajax/addRootCertificate.php
@@ -14,7 +14,7 @@ $fh = fopen($to, 'r');
$data = fread($fh, filesize($to));
fclose($fh);
if (!strpos($data, 'BEGIN CERTIFICATE')) {
- $pem = chunk_split(base64_encode($data), 64, "\n");
+ $pem = chunk_split(base64_encode($data), 64, "\n");
$pem = "-----BEGIN CERTIFICATE-----\n".$pem."-----END CERTIFICATE-----\n";
$fh = fopen($to, 'w');
fwrite($fh, $pem);
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 23f02bbefcb..f3460070901 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -70,7 +70,7 @@ OC.MountConfig={
$(document).ready(function() {
$('.chzn-select').chosen();
-
+
$('#selectBackend').live('change', function() {
var tr = $(this).parent().parent();
$('#externalStorage tbody').append($(tr).clone());
@@ -133,7 +133,7 @@ $(document).ready(function() {
}
}
return defaultMountPoint+append;
- }
+ }
$('#externalStorage td').live('change', function() {
OC.MountConfig.saveStorage($(this).parent());
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 3c2e3330175..34f8ba25574 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -29,7 +29,7 @@ class OC_Filestorage_AmazonS3 extends OC_Filestorage_Common {
private $objects = array();
private static $tempFiles = array();
-
+
// TODO options: storage class, encryption server side, encrypt before upload?
public function __construct($params) {
@@ -216,7 +216,7 @@ class OC_Filestorage_AmazonS3 extends OC_Filestorage_Common {
}
public function free_space($path) {
- // Infinite?
+ // Infinite?
return false;
}
diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php
index 63f14a28777..818273f6c2d 100644
--- a/apps/files_external/lib/ftp.php
+++ b/apps/files_external/lib/ftp.php
@@ -14,7 +14,7 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
private $root;
private static $tempFiles=array();
-
+
public function __construct($params){
$this->host=$params['host'];
$this->user=$params['user'];
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 73317bbf714..9b83dcee537 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -119,7 +119,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common {
}
}
}
- return false;
+ return false;
}
private function getFeed($feedUri, $httpMethod, $postData = null) {
@@ -174,7 +174,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common {
return 'html';
}
}
-
+
public function mkdir($path) {
$collection = dirname($path);
@@ -254,7 +254,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common {
} else if ($entry = $this->getResource($path)) {
// NOTE: Native resources don't have a file size
$stat['size'] = $entry->getElementsByTagNameNS('http://schemas.google.com/g/2005', 'quotaBytesUsed')->item(0)->nodeValue;
-// if (isset($atime = $entry->getElementsByTagNameNS('http://schemas.google.com/g/2005', 'lastViewed')->item(0)->nodeValue))
+// if (isset($atime = $entry->getElementsByTagNameNS('http://schemas.google.com/g/2005', 'lastViewed')->item(0)->nodeValue))
// $stat['atime'] = strtotime($entry->getElementsByTagNameNS('http://schemas.google.com/g/2005', 'lastViewed')->item(0)->nodeValue);
$stat['mtime'] = strtotime($entry->getElementsByTagName('updated')->item(0)->nodeValue);
$stat['ctime'] = strtotime($entry->getElementsByTagName('published')->item(0)->nodeValue);
@@ -304,7 +304,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common {
}
return false;
}
-
+
public function file_exists($path) {
if ($path == '' || $path == '/') {
return true;
@@ -313,7 +313,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common {
}
return false;
}
-
+
public function unlink($path) {
// Get resource self link to trash resource
if ($entry = $this->getResource($path)) {
@@ -482,7 +482,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common {
// TODO Wait for resource entry
}
}
-
+
public function getMimeType($path, $entry = null) {
// Entry can be passed, because extension is required for opendir and the entry can't be cached without the extension
if ($entry == null) {
@@ -522,7 +522,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common {
}
return false;
}
-
+
public function free_space($path) {
if ($dom = $this->getFeed('https://docs.google.com/feeds/metadata/default', 'GET')) {
// NOTE: Native Google Docs resources don't count towards quota
@@ -532,9 +532,9 @@ class OC_Filestorage_Google extends OC_Filestorage_Common {
}
return false;
}
-
+
public function touch($path, $mtime = null) {
-
+
}
} \ No newline at end of file
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index 94ccde1ff8f..1868bc4ba77 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -274,7 +274,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
}
$this->auth = new CF_Authentication($this->user, $this->token, null, $this->host);
$this->auth->authenticate();
-
+
$this->conn = new CF_Connection($this->auth);
if(!$this->containerExists($this->root)){
@@ -303,7 +303,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
$parentContainer=$this->getContainer(dirname($path));
$this->removeSubContainer($parentContainer,basename($path));
}
-
+
$this->conn->delete_container($this->getContainerName($path));
unset($this->containers[$path]);
return true;
@@ -410,7 +410,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
case 'rb':
$fp = fopen('php://temp', 'r+');
$obj->stream($fp);
-
+
rewind($fp);
return $fp;
case 'w':
@@ -451,7 +451,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
if(is_null($mtime)){
$mtime=time();
}
-
+
//emulate setting mtime with metadata
$obj->metadata['Mtime']=$mtime;
$obj->sync_metadata();
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index e3f73c5c0a7..1b9c3e3333b 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -18,7 +18,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
private $client;
private static $tempFiles=array();
-
+
public function __construct($params){
$host = $params['host'];
//remove leading http[s], will be generated in createBaseUri()
@@ -35,7 +35,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
if(substr($this->root,-1,1)!='/'){
$this->root.='/';
}
-
+
$settings = array(
'baseUri' => $this->createBaseUri(),
'userName' => $this->user,
@@ -43,7 +43,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
);
$this->client = new OC_Connector_Sabre_Client($settings);
-
+
if($caview = \OCP\Files::getStorage('files_external')) {
$certPath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("").'rootcerts.crt';
if (file_exists($certPath)) {
@@ -296,4 +296,3 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
}
}
}
-
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 397f0d951b0..7da96135721 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -80,7 +80,7 @@
</tbody>
</table>
<br />
-
+
<?php if (!$_['isAdminPage']): ?>
<table id="sslCertificate" data-admin='<?php echo json_encode($_['isAdminPage']); ?>'>
<thead>
@@ -91,17 +91,17 @@
</thead>
<tbody width="100%">
<?php foreach ($_['certs'] as $rootCert): ?>
- <tr id="<?php echo $rootCert ?>">
+ <tr id="<?php echo $rootCert ?>">
<td class="rootCert"><?php echo $rootCert ?></td>
<td <?php echo ($rootCert != '') ? 'class="remove"' : 'style="visibility:hidden;"'; ?>><img alt="<?php echo $l->t('Delete'); ?>" title="<?php echo $l->t('Delete'); ?>" class="svg action" src="<?php echo image_path('core', 'actions/delete.svg'); ?>" /></td>
</tr>
<?php endforeach; ?>
</tbody>
- </table>
+ </table>
<input type="file" id="rootcert_import" name="rootcert_import" style="width:230px;">
- <input type="submit" name="cert_import" value="<?php echo $l->t('Import Root Certificate'); ?>" />
+ <input type="submit" name="cert_import" value="<?php echo $l->t('Import Root Certificate'); ?>" />
<?php endif; ?>
-
+
<?php if ($_['isAdminPage']): ?>
<br />
<input type="checkbox" name="allowUserMounting" id="allowUserMounting" value="1" <?php if ($_['allowUserMounting'] == 'yes') echo ' checked="checked"'; ?> />
diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php
index 97796bca128..3548880e834 100644
--- a/apps/files_external/tests/ftp.php
+++ b/apps/files_external/tests/ftp.php
@@ -5,7 +5,7 @@
* later.
* See the COPYING-README file.
*/
-
+
$config=include('apps/files_external/tests/config.php');
if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']){
abstract class Test_Filestorage_FTP extends Test_FileStorage{}
@@ -26,4 +26,3 @@ if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']){
}
}
}
-
diff --git a/apps/files_external/tests/google.php b/apps/files_external/tests/google.php
index 806db5a6aaa..b0bd9cbbeaf 100644
--- a/apps/files_external/tests/google.php
+++ b/apps/files_external/tests/google.php
@@ -26,7 +26,7 @@ if(!is_array($config) or !isset($config['google']) or !$config['google']['run'])
return;
}else{
class Test_Filestorage_Google extends Test_FileStorage {
-
+
private $config;
public function setUp(){
@@ -41,4 +41,3 @@ if(!is_array($config) or !isset($config['google']) or !$config['google']['run'])
}
}
}
-
diff --git a/apps/files_external/tests/swift.php b/apps/files_external/tests/swift.php
index 1520c9473d3..bfe7b77aac5 100644
--- a/apps/files_external/tests/swift.php
+++ b/apps/files_external/tests/swift.php
@@ -21,11 +21,10 @@ if(!is_array($config) or !isset($config['swift']) or !$config['swift']['run']){
$this->instance=new OC_Filestorage_SWIFT($this->config['swift']);
}
-
+
public function tearDown(){
$this->instance->rmdir('');
}
-
+
}
}
-
diff --git a/apps/files_external/tests/webdav.php b/apps/files_external/tests/webdav.php
index 14abbef2cbf..49c44124f3c 100644
--- a/apps/files_external/tests/webdav.php
+++ b/apps/files_external/tests/webdav.php
@@ -26,4 +26,3 @@ if(!is_array($config) or !isset($config['webdav']) or !$config['webdav']['run'])
}
}
}
-