]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix SpaceBeforeOpenBrace errors
authorBart Visscher <bartv@thisnet.nl>
Sat, 9 Feb 2013 15:46:55 +0000 (16:46 +0100)
committerBart Visscher <bartv@thisnet.nl>
Thu, 14 Feb 2013 07:36:26 +0000 (08:36 +0100)
19 files changed:
apps/files_external/ajax/addRootCertificate.php
apps/files_external/lib/streamwrapper.php
apps/files_external/lib/swift.php
apps/files_external/lib/webdav.php
apps/files_versions/lib/versions.php
apps/user_ldap/ajax/deleteConfiguration.php
apps/user_ldap/lib/connection.php
lib/api.php
lib/app.php
lib/base.php
lib/connector/sabre/request.php
lib/fileproxy/fileoperations.php
lib/fileproxy/quota.php
lib/files/cache/permissions.php
lib/files/storage/common.php
lib/installer.php
lib/ocs/privatedata.php
lib/util.php
settings/oauth.php

index ba8a14d2ea19ef4bfab2ee2a18b36191225cf8ba..7794238ab3619092042a149cc19c3dcfdde1426d 100644 (file)
@@ -14,7 +14,7 @@ fclose($fh);
 $filename = $_FILES['rootcert_import']['name'];
 
 $view = new \OC\Files\View('/'.\OCP\User::getUser().'/files_external/uploads');
-if (!$view->file_exists('')){
+if (!$view->file_exists('')) {
        $view->mkdir('');
 }
 
index 7c3ddcf8a2c2220f67a4302a932d59df25b49d21..ff7e2238bd11a965c8c9d1921105bfc6f906d906 100644 (file)
@@ -12,7 +12,7 @@ abstract class StreamWrapper extends \OC\Files\Storage\Common{
        private $ready = false;
 
        protected function init(){
-               if($this->ready){
+               if($this->ready) {
                        return;
                }
                $this->ready = true;
index cbf2007052bdafa9009a63ce15c9de9f9b4db679..8ffa9d8552d24addfeb6601cdc69dc24074b0a06 100644 (file)
@@ -290,7 +290,7 @@ class SWIFT extends \OC\Files\Storage\Common{
        }
 
        private function init(){
-               if($this->ready){
+               if($this->ready) {
                        return;
                }
                $this->ready = true;
index 2a953ac63f45756f11bbe1d55c96e0a195c49ed0..f54cdc062287615a1214b55869f776c6e3cb2a0d 100644 (file)
@@ -49,7 +49,7 @@ class DAV extends \OC\Files\Storage\Common{
        }
 
        private function init(){
-               if($this->ready){
+               if($this->ready) {
                        return;
                }
                $this->ready = true;
index b54bc4a4422969f8f8d74cee253c03faa60b6cb8..b4ef88a6e874a1249f4a09f75234a91ded172813 100644 (file)
@@ -94,7 +94,7 @@ class Storage {
                        // expire old revisions if necessary
                        $newSize = self::expire($filename, $versionsSize);
                        
-                       if ( $newSize != $versionsSize )  {
+                       if ( $newSize != $versionsSize ) {
                                \OCP\Config::setAppValue('files_versions', 'size', $versionsSize);
                        }
                }
index b7d633a049d275d7d88cd50e34600866f3b7d75d..ade57110d346b8986e724e5100d1f7e2b0064f1a 100644 (file)
@@ -27,9 +27,9 @@ OCP\JSON::checkAppEnabled('user_ldap');
 OCP\JSON::callCheck();
 
 $prefix = $_POST['ldap_serverconfig_chooser'];
-if(\OCA\user_ldap\lib\Helper::deleteServerConfiguration($prefix)){
+if(\OCA\user_ldap\lib\Helper::deleteServerConfiguration($prefix)) {
        OCP\JSON::success();
 } else {
        $l=OC_L10N::get('user_ldap');
        OCP\JSON::error(array('message' => $l->t('Failed to delete the server configuration')));
-}
\ No newline at end of file
+}
index 933f2f420749b018fd8c2a6d5bd7df76a6101154..9a37920e35dde2f07e8d2e26a6be96c695f525e5 100644 (file)
@@ -192,7 +192,7 @@ class Connection {
 
        private function getValue($varname) {
                static $defaults;
-               if(is_null($defaults)){
+               if(is_null($defaults)) {
                        $defaults = $this->getDefaults();
                }
                return \OCP\Config::getAppValue($this->configID,
@@ -336,7 +336,7 @@ class Connection {
                                case 'ldapBaseGroups':
                                case 'ldapAttributesForUserSearch':
                                case 'ldapAttributesForGroupSearch':
-                                       if(is_array($value)){
+                                       if(is_array($value)) {
                                                $value = implode("\n", $value);
                                        }
                                        break;
index abf1c3b003668b11c768c96030d330954441aac4..70e3028b68a95cfef127b71a6d990ce5a774acec 100644 (file)
@@ -82,7 +82,7 @@ class OC_API {
                // Prepare the request variables
                if($_SERVER['REQUEST_METHOD'] == 'PUT') {
                        parse_str(file_get_contents("php://input"), $parameters['_put']);
-               } else if($_SERVER['REQUEST_METHOD'] == 'DELETE'){
+               } else if($_SERVER['REQUEST_METHOD'] == 'DELETE') {
                        parse_str(file_get_contents("php://input"), $parameters['_delete']);
                }
                $name = $parameters['_route'];
index bf7eeef01813b86b9e37acb7422d55235fe55fbf..7eab14057810ca0c03cdbfd18bb8abdaf38db20b 100644 (file)
@@ -157,7 +157,7 @@ class OC_App{
         */
        public static function isShipped($appid){
                $info = self::getAppInfo($appid);
-               if(isset($info['shipped']) && $info['shipped']=='true'){
+               if(isset($info['shipped']) && $info['shipped']=='true') {
                        return true;
                } else {
                        return false;
@@ -247,7 +247,7 @@ class OC_App{
                OC_Appconfig::setValue( $app, 'enabled', 'no' );
 
                // check if app is a shipped app or not. if not delete
-               if(!OC_App::isShipped( $app )){
+               if(!OC_App::isShipped( $app )) {
                        OC_Installer::removeApp( $app );
                }
        }
@@ -726,7 +726,7 @@ class OC_App{
                                $app1[$i]['ocs_id'] = $app['id'];
                                $app1[$i]['internal'] = $app1[$i]['active'] = 0;
                                $app1[$i]['update'] = false;
-                               if($app['label']=='recommended'){
+                               if($app['label']=='recommended') {
                                        $app1[$i]['internallabel'] = 'Recommended';
                                        $app1[$i]['internalclass'] = 'recommendedapp';
                                }else{
index c60a97100f42859fa5d4a466f078c33d533f74e1..fea9e3ca3a6d4fc115e0fabcf8b783855ca9f99e 100644 (file)
@@ -550,7 +550,7 @@ class OC {
                }
 
                $request = OC_Request::getPathInfo();
-               if(substr($request, -3) !== '.js'){// we need these files during the upgrade
+               if(substr($request, -3) !== '.js') {// we need these files during the upgrade
                        self::checkMaintenanceMode();
                        self::checkUpgrade();
                }
index 97a27996bf364f165b11c69cdd0d4d2947ccb50c..d70c25c4e702b7b512ff2a8b17d63c099baf2e59 100644 (file)
@@ -40,7 +40,7 @@ class OC_Connector_Sabre_Request extends Sabre_HTTP_Request {
         * @return string
         */
        public function getRawServerValue($field) {
-               if($field == 'REQUEST_URI'){
+               if($field == 'REQUEST_URI') {
                        return $this->getUri();
                }
                else{
index 47ccd8f8c26241a51df49fec4af2c0da41c0babe..b2ff2e7e5e99b605a52f0baf2bfb10d5851e7f0c 100644 (file)
@@ -28,7 +28,7 @@ class OC_FileProxy_FileOperations extends OC_FileProxy{
        static $rootView;
 
        public function premkdir($path) {
-               if(!self::$rootView){
+               if(!self::$rootView) {
                        self::$rootView = new \OC\Files\View('');
                }
                return !self::$rootView->file_exists($path);
index 7e0f631c8fb1724ffbef157e36f2fa6f2fab5236..07d1d250e4d033bfc1537e3b1b0a61b3bf9175b2 100644 (file)
@@ -95,7 +95,7 @@ class OC_FileProxy_Quota extends OC_FileProxy{
        }
 
        public function preCopy($path1, $path2) {
-               if(!self::$rootView){
+               if(!self::$rootView) {
                        self::$rootView = new \OC\Files\View('');
                }
                return (self::$rootView->filesize($path1)<$this->getFreeSpace($path2) or $this->getFreeSpace($path2)==-1);
index d0968337f02cd62f02d175f3c4265ca58531e811..e24c05b10a3013a4a8150cf221bb3f5717d13989 100644 (file)
@@ -18,7 +18,7 @@ class Permissions {
         * @param \OC\Files\Storage\Storage|string $storage
         */
        public function __construct($storage){
-               if($storage instanceof \OC\Files\Storage\Storage){
+               if($storage instanceof \OC\Files\Storage\Storage) {
                        $this->storageId = $storage->getId();
                }else{
                        $this->storageId = $storage;
index ce9e7ead6d153251763cb76856034df28abec375..6935ba0095312fe4a67eab1687468d798ec630cc 100644 (file)
@@ -51,19 +51,19 @@ abstract class Common implements \OC\Files\Storage\Storage {
        }
        public function getPermissions($path){
                $permissions = 0;
-               if($this->isCreatable($path)){
+               if($this->isCreatable($path)) {
                        $permissions |= \OCP\PERMISSION_CREATE;
                }
-               if($this->isReadable($path)){
+               if($this->isReadable($path)) {
                        $permissions |= \OCP\PERMISSION_READ;
                }
-               if($this->isUpdatable($path)){
+               if($this->isUpdatable($path)) {
                        $permissions |= \OCP\PERMISSION_UPDATE;
                }
-               if($this->isDeletable($path)){
+               if($this->isDeletable($path)) {
                        $permissions |= \OCP\PERMISSION_DELETE;
                }
-               if($this->isSharable($path)){
+               if($this->isSharable($path)) {
                        $permissions |= \OCP\PERMISSION_SHARE;
                }
                return $permissions;
index c86f801b5fcf68cdb59045c59a284879021bdaba..aa192880af0ec4ae656a88f5e23f5b2e5c37e98b 100644 (file)
@@ -270,12 +270,12 @@ class OC_Installer{
        public static function isUpdateAvailable( $app ) {
                $ocsid=OC_Appconfig::getValue( $app, 'ocsid', '');
 
-               if($ocsid<>''){
+               if($ocsid<>'') {
 
                        $ocsdata=OC_OCSClient::getApplication($ocsid);
                        $ocsversion= (string) $ocsdata['version'];
                        $currentversion=OC_App::getAppVersion($app);
-                       if($ocsversion<>$currentversion){
+                       if($ocsversion<>$currentversion) {
                                return($ocsversion);
 
                        }else{
@@ -326,22 +326,22 @@ class OC_Installer{
         */
        public static function removeApp( $name, $options = array()) {
 
-               if(isset($options['keeppreferences']) and $options['keeppreferences']==false ){
+               if(isset($options['keeppreferences']) and $options['keeppreferences']==false ) {
                        // todo
                        // remove preferences
                }
 
-               if(isset($options['keepappconfig']) and $options['keepappconfig']==false ){
+               if(isset($options['keepappconfig']) and $options['keepappconfig']==false ) {
                        // todo
                        // remove app config
                }
 
-               if(isset($options['keeptables']) and $options['keeptables']==false ){
+               if(isset($options['keeptables']) and $options['keeptables']==false ) {
                        // todo
                        // remove app database tables
                }
 
-               if(isset($options['keepfiles']) and $options['keepfiles']==false ){
+               if(isset($options['keepfiles']) and $options['keepfiles']==false ) {
                        // todo
                        // remove user files
                }
index 311b24269dd3087bdf889d0be366977a55024641..971a5c2ad31053fe82f9f9592a300b4e1275100c 100644 (file)
@@ -46,7 +46,7 @@ class OC_OCS_Privatedata {
                $app = addslashes(strip_tags($parameters['app']));
                $key = addslashes(strip_tags($parameters['key']));
                $value = OC_OCS::readData('post', 'value', 'text');
-               if(OC_Preferences::setValue($user, $app, $key, $value)){
+               if(OC_Preferences::setValue($user, $app, $key, $value)) {
                        return new OC_OCS_Result(null, 100);
                }
        }
index a4e7271adcd1b2324c24b83e7d1f4bef1b33454a..59e67f2a5f1a6beaaeb8d4c6941f91c5c06dec8c 100755 (executable)
@@ -246,8 +246,8 @@ class OC_Util {
                $handler = ini_get("session.save_handler");
                if($handler == "files") {
                        $tmpDir = session_save_path();
-                       if($tmpDir != ""){
-                               if(!@is_writable($tmpDir)){
+                       if($tmpDir != "") {
+                               if(!@is_writable($tmpDir)) {
                                        $errors[]=array('error' => 'The temporary folder used by PHP to save the session data is either incorrect or not writable! Please check : '.session_save_path().'<br/>',
                                        'hint'=>'Please ask your server administrator to grant write access or define another temporary folder.');
                                }
index 8dba9b33a53b4faeb4c85022cb5363193b7d01eb..07b7ae5c31d0ef3c5915ceb35514f4e7efe6285b 100644 (file)
@@ -15,7 +15,7 @@ switch($operation){
        case 'register':
 
                // Here external apps can register with an ownCloud
-               if(empty($_GET['name']) || empty($_GET['url'])){
+               if(empty($_GET['name']) || empty($_GET['url'])) {
                        // Invalid request
                        echo 401;
                } else {
@@ -54,13 +54,13 @@ switch($operation){
                foreach($consumer['scopes'] as $requiredapp){
                        // App scopes are in this format: app_$appname
                        $requiredapp = end(explode('_', $requiredapp));
-                       if(!in_array($requiredapp, $apps)){
+                       if(!in_array($requiredapp, $apps)) {
                                $notfound[] = $requiredapp;
                        }
                }
-               if(!empty($notfound)){
+               if(!empty($notfound)) {
                        // We need more apps :( Show error
-                       if(count($notfound)==1){
+                       if(count($notfound)==1) {
                                $message = 'requires that you have an extra app installed on your ownCloud. Please contact your ownCloud administrator and ask them to install the app below.';
                        } else {
                                $message = 'requires that you have some extra apps installed on your ownCloud. Please contract your ownCloud administrator and ask them to install the apps below.';