Checkstyle: Fix the last 25 NoSpaceAfterComma

This commit is contained in:
Felix Moeller 2012-11-04 18:28:29 +01:00
parent 1205749f8c
commit 0e70ea9d8b
14 changed files with 25 additions and 25 deletions

View File

@ -92,7 +92,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
}elseif(self::shouldEncrypt($path) and $meta['mode']!='r' and $meta['mode']!='rb') {
if(OC_Filesystem::file_exists($path) and OC_Filesystem::filesize($path)>0) {
//first encrypt the target file so we don't end up with a half encrypted file
OCP\Util::writeLog('files_encryption','Decrypting '.$path.' before writing', OCP\Util::DEBUG);
OCP\Util::writeLog('files_encryption', 'Decrypting '.$path.' before writing', OCP\Util::DEBUG);
$tmp=fopen('php://temp');
OCP\Files::streamCopy($result, $tmp);
fclose($result);

View File

@ -24,7 +24,7 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{
if(!$this->root || $this->root[0]!='/') {
$this->root='/'.$this->root;
}
if(substr($this->root,-1, 1)!='/') {
if(substr($this->root, -1, 1)!='/') {
$this->root.='/';
}
if(!$this->share || $this->share[0]!='/') {
@ -41,7 +41,7 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{
}
public function constructUrl($path) {
if(substr($path,-1)=='/') {
if(substr($path, -1)=='/') {
$path=substr($path, 0, -1);
}
return 'smb://'.$this->user.':'.$this->password.'@'.$this->host.$this->share.$this->root.$path;

View File

@ -29,7 +29,7 @@
<p><label for="ldap_cache_ttl">Cache Time-To-Live</label><input type="text" id="ldap_cache_ttl" name="ldap_cache_ttl" value="<?php echo $_['ldap_cache_ttl']; ?>" title="<?php echo $l->t('in seconds. A change empties the cache.');?>" /></p>
<p><label for="home_folder_naming_rule">User Home Folder Naming Rule</label><input type="text" id="home_folder_naming_rule" name="home_folder_naming_rule" value="<?php echo $_['home_folder_naming_rule']; ?>" title="<?php echo $l->t('Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute.');?>" /></p>
</fieldset>
<input type="submit" value="Save" /> <button id="ldap_action_test_connection" name="ldap_action_test_connection">Test Configuration</button> <a href="http://owncloud.org/support/ldap-backend/" target="_blank"><img src="<?php echo OCP\Util::imagePath('','actions/info.png'); ?>" style="height:1.75ex" /> <?php echo $l->t('Help');?></a>
<input type="submit" value="Save" /> <button id="ldap_action_test_connection" name="ldap_action_test_connection">Test Configuration</button> <a href="http://owncloud.org/support/ldap-backend/" target="_blank"><img src="<?php echo OCP\Util::imagePath('', 'actions/info.png'); ?>" style="height:1.75ex" /> <?php echo $l->t('Help');?></a>
</div>
</form>

View File

@ -476,7 +476,7 @@ class MDB2_Driver_Reverse_sqlite3 extends MDB2_Driver_Reverse_Common
$definition['unique'] = true;
$count = count($column_names);
for ($i=0; $i<$count; ++$i) {
$column_name = strtok($column_names[$i]," ");
$column_name = strtok($column_names[$i], " ");
$collation = strtok(" ");
$definition['fields'][$column_name] = array(
'position' => $i+1

View File

@ -38,9 +38,9 @@ class OC_FileProxy_Quota extends OC_FileProxy{
if(in_array($user, $this->userQuota)) {
return $this->userQuota[$user];
}
$userQuota=OC_Preferences::getValue($user,'files','quota', 'default');
$userQuota=OC_Preferences::getValue($user, 'files', 'quota', 'default');
if($userQuota=='default') {
$userQuota=OC_AppConfig::getValue('files','default_quota', 'none');
$userQuota=OC_AppConfig::getValue('files', 'default_quota', 'none');
}
if($userQuota=='none') {
$this->userQuota[$user]=0;

View File

@ -6,7 +6,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
protected $datadir;
public function __construct($arguments) {
$this->datadir=$arguments['datadir'];
if(substr($this->datadir,-1)!=='/') {
if(substr($this->datadir, -1)!=='/') {
$this->datadir.='/';
}
}
@ -20,7 +20,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
return opendir($this->datadir.$path);
}
public function is_dir($path) {
if(substr($path,-1)=='/') {
if(substr($path, -1)=='/') {
$path=substr($path, 0, -1);
}
return is_dir($this->datadir.$path);
@ -86,11 +86,11 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{
}
public function rename($path1, $path2) {
if (!$this->isUpdatable($path1)) {
OC_Log::write('core','unable to rename, file is not writable : '.$path1, OC_Log::ERROR);
OC_Log::write('core', 'unable to rename, file is not writable : '.$path1, OC_Log::ERROR);
return false;
}
if(! $this->file_exists($path1)) {
OC_Log::write('core','unable to rename, file does not exists : '.$path1, OC_Log::ERROR);
OC_Log::write('core', 'unable to rename, file does not exists : '.$path1, OC_Log::ERROR);
return false;
}

View File

@ -246,7 +246,7 @@ class OC_Filesystem{
}
$mtime=filemtime(OC::$SERVERROOT.'/config/mount.php');
$previousMTime=OC_Appconfig::getValue('files','mountconfigmtime', 0);
$previousMTime=OC_Appconfig::getValue('files', 'mountconfigmtime', 0);
if($mtime>$previousMTime) {//mount config has changed, filecache needs to be updated
OC_FileCache::triggerUpdate();
OC_Appconfig::setValue('files', 'mountconfigmtime', $mtime);
@ -312,7 +312,7 @@ class OC_Filesystem{
return false;
}
}else{
OC_Log::write('core','storage backend '.$class.' not found', OC_Log::ERROR);
OC_Log::write('core', 'storage backend '.$class.' not found', OC_Log::ERROR);
return false;
}
}

View File

@ -57,7 +57,7 @@ class OC_Installer{
*/
public static function installApp( $data = array()) {
if(!isset($data['source'])) {
OC_Log::write('core','No source specified when installing app', OC_Log::ERROR);
OC_Log::write('core', 'No source specified when installing app', OC_Log::ERROR);
return false;
}
@ -65,13 +65,13 @@ class OC_Installer{
if($data['source']=='http') {
$path=OC_Helper::tmpFile();
if(!isset($data['href'])) {
OC_Log::write('core','No href specified when installing app from http', OC_Log::ERROR);
OC_Log::write('core', 'No href specified when installing app from http', OC_Log::ERROR);
return false;
}
copy($data['href'], $path);
}else{
if(!isset($data['path'])) {
OC_Log::write('core','No path specified when installing app from local file', OC_Log::ERROR);
OC_Log::write('core', 'No path specified when installing app from local file', OC_Log::ERROR);
return false;
}
$path=$data['path'];
@ -86,7 +86,7 @@ class OC_Installer{
rename($path, $path.'.tgz');
$path.='.tgz';
}else{
OC_Log::write('core','Archives of type '.$mime.' are not supported', OC_Log::ERROR);
OC_Log::write('core', 'Archives of type '.$mime.' are not supported', OC_Log::ERROR);
return false;
}

View File

@ -611,7 +611,7 @@ class OC_Migrate{
if( file_exists( $db ) ) {
// Connect to the db
if(!self::connectDB( $db )) {
OC_Log::write('migration','Failed to connect to migration.db', OC_Log::ERROR);
OC_Log::write('migration', 'Failed to connect to migration.db', OC_Log::ERROR);
return false;
}
} else {

View File

@ -205,7 +205,7 @@ class OC_Migration_Content{
}
closedir($dirhandle);
} else {
OC_Log::write('admin_export',"Was not able to open directory: " . $dir, OC_Log::ERROR);
OC_Log::write('admin_export', "Was not able to open directory: " . $dir, OC_Log::ERROR);
return false;
}
return true;

View File

@ -162,7 +162,7 @@ class OC_OCSClient{
$xml=OC_OCSClient::getOCSresponse($url);
if($xml==false) {
OC_Log::write('core','Unable to parse OCS content', OC_Log::FATAL);
OC_Log::write('core', 'Unable to parse OCS content', OC_Log::FATAL);
return null;
}
$data=simplexml_load_string($xml);
@ -200,7 +200,7 @@ class OC_OCSClient{
$xml=OC_OCSClient::getOCSresponse($url);
if($xml==false) {
OC_Log::write('core','Unable to parse OCS content', OC_Log::FATAL);
OC_Log::write('core', 'Unable to parse OCS content', OC_Log::FATAL);
return null;
}
$data=simplexml_load_string($xml);
@ -238,7 +238,7 @@ class OC_OCSClient{
$xml=OC_OCSClient::getOCSresponse($url);
if($xml==false) {
OC_Log::write('core','Unable to parse knowledgebase content', OC_Log::FATAL);
OC_Log::write('core', 'Unable to parse knowledgebase content', OC_Log::FATAL);
return null;
}
$data=simplexml_load_string($xml);

View File

@ -199,7 +199,7 @@ class OC_Template{
$mode='tablet';
}elseif(stripos($_SERVER['HTTP_USER_AGENT'], 'iphone')>0) {
$mode='mobile';
}elseif((stripos($_SERVER['HTTP_USER_AGENT'],'N9')>0) and (stripos($_SERVER['HTTP_USER_AGENT'], 'nokia')>0)) {
}elseif((stripos($_SERVER['HTTP_USER_AGENT'], 'N9')>0) and (stripos($_SERVER['HTTP_USER_AGENT'], 'nokia')>0)) {
$mode='mobile';
}else{
$mode='default';

View File

@ -133,7 +133,7 @@ class OC_User {
self::useBackend($backend);
$_setupedBackends[]=$i;
}else{
OC_Log::write('core','User backend '.$class.' not found.', OC_Log::ERROR);
OC_Log::write('core', 'User backend '.$class.' not found.', OC_Log::ERROR);
}
}
}

View File

@ -42,7 +42,7 @@ foreach( $accessiblegroups as $i ) {
$groups[] = array( "name" => $i );
}
$quotaPreset=OC_Appconfig::getValue('files', 'quota_preset', 'default,none,1 GB, 5 GB, 10 GB');
$quotaPreset=explode(',',$quotaPreset);
$quotaPreset=explode(',', $quotaPreset);
foreach($quotaPreset as &$preset) {
$preset=trim($preset);
}