From a4b2ea586dea5e02a91a873d16a20144db7292a0 Mon Sep 17 00:00:00 2001 From: Felix Moeller Date: Sun, 4 Nov 2012 22:16:04 +0100 Subject: [PATCH] Style: Remove all the dangling white spaces --- apps/files_sharing/public.php | 2 +- lib/backgroundjob.php | 2 +- lib/base.php | 4 ++-- lib/connector/sabre/quotaplugin.php | 16 ++++++++-------- lib/log.php | 2 +- lib/public/backgroundjob.php | 2 +- lib/public/share.php | 2 +- ocs/providers.php | 16 ++++++++-------- ocs/v1.php | 16 ++++++++-------- settings/ajax/createuser.php | 6 +++--- settings/ajax/getlog.php | 2 +- settings/ajax/userlist.php | 10 +++++----- settings/apps.php | 8 ++++---- settings/languageCodes.php | 2 +- settings/templates/help.php | 2 +- settings/templates/users.php | 2 +- settings/users.php | 2 +- tests/lib/share/share.php | 4 ++-- tests/lib/user/backend.php | 4 ++-- tests/lib/util.php | 6 +++--- tests/preseed-config.php | 6 +++--- 21 files changed, 58 insertions(+), 58 deletions(-) diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index dca87cd687..295273d842 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -22,7 +22,7 @@ if (isset($_GET['token'])) { // Enf of backward compatibility function getID($path) { - // use the share table from the db to find the item source if the file was reshared because shared files + // use the share table from the db to find the item source if the file was reshared because shared files //are not stored in the file cache. if (substr(OC_Filesystem::getMountPoint($path), -7, 6) == "Shared") { $path_parts = explode('/', $path, 5); diff --git a/lib/backgroundjob.php b/lib/backgroundjob.php index f486519bf0..28b5ce3af2 100644 --- a/lib/backgroundjob.php +++ b/lib/backgroundjob.php @@ -40,7 +40,7 @@ class OC_BackgroundJob{ * @param $type execution type * @return boolean * - * This method sets the execution type of the background jobs. Possible types + * This method sets the execution type of the background jobs. Possible types * are "none", "ajax", "webcron", "cron" */ public static function setExecutionType( $type ) { diff --git a/lib/base.php b/lib/base.php index 084cca92e8..d4eeac82da 100644 --- a/lib/base.php +++ b/lib/base.php @@ -619,9 +619,9 @@ class OC{ OC_Util::redirectToDefaultPage(); // doesn't return } - // if you reach this point you have changed your password + // if you reach this point you have changed your password // or you are an attacker - // we can not delete tokens here because users may reach + // we can not delete tokens here because users may reach // this point multiple times after a password change OC_Log::write('core', 'Authentication cookie rejected for user '.$_COOKIE['oc_username'], OC_Log::WARN); } diff --git a/lib/connector/sabre/quotaplugin.php b/lib/connector/sabre/quotaplugin.php index 5b8ef94171..a56a65ad86 100644 --- a/lib/connector/sabre/quotaplugin.php +++ b/lib/connector/sabre/quotaplugin.php @@ -2,7 +2,7 @@ /** * This plugin check user quota and deny creating files when they exceeds the quota. - * + * * @copyright Copyright (C) 2012 entreCables S.L. All rights reserved. * @author Sergio Cambra * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License @@ -10,9 +10,9 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { /** - * Reference to main server object - * - * @var Sabre_DAV_Server + * Reference to main server object + * + * @var Sabre_DAV_Server */ private $server; @@ -23,8 +23,8 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { * addPlugin is called. * * This method should set up the requires event subscriptions. - * - * @param Sabre_DAV_Server $server + * + * @param Sabre_DAV_Server $server * @return void */ public function initialize(Sabre_DAV_Server $server) { @@ -37,10 +37,10 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { /** * This method is called before any HTTP method and forces users to be authenticated - * + * * @param string $method * @throws Sabre_DAV_Exception - * @return bool + * @return bool */ public function checkQuota($uri, $data = null) { $expected = $this->server->httpRequest->getHeader('X-Expected-Entity-Length'); diff --git a/lib/log.php b/lib/log.php index b5e8e1b06a..e9cededa5c 100644 --- a/lib/log.php +++ b/lib/log.php @@ -47,7 +47,7 @@ class OC_Log { //ob_end_clean(); self::write('PHP', $error['message'] . ' at ' . $error['file'] . '#' . $error['line'], self::FATAL); } else { - return true; + return true; } } diff --git a/lib/public/backgroundjob.php b/lib/public/backgroundjob.php index 24a17836f7..601046fe69 100644 --- a/lib/public/backgroundjob.php +++ b/lib/public/backgroundjob.php @@ -62,7 +62,7 @@ class BackgroundJob { * @param $type execution type * @return boolean * - * This method sets the execution type of the background jobs. Possible types + * This method sets the execution type of the background jobs. Possible types * are "none", "ajax", "webcron", "cron" */ public static function setExecutionType( $type ) { diff --git a/lib/public/share.php b/lib/public/share.php index da1c061639..071304ec24 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -28,7 +28,7 @@ namespace OCP; /** * This class provides the ability for apps to share their content between users. * Apps must create a backend class that implements OCP\Share_Backend and register it with this class. -* +* * It provides the following hooks: * - post_shared */ diff --git a/ocs/providers.php b/ocs/providers.php index 4c68ded914..bdbfe0c4ee 100644 --- a/ocs/providers.php +++ b/ocs/providers.php @@ -3,22 +3,22 @@ /** * ownCloud * -* @author Frank Karlitschek -* @copyright 2012 Frank Karlitschek frank@owncloud.org -* +* @author Frank Karlitschek +* @copyright 2012 Frank Karlitschek frank@owncloud.org +* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either +* License as published by the Free Software Foundation; either * version 3 of the License, or any later version. -* +* * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see . * +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see . +* */ require_once '../lib/base.php'; diff --git a/ocs/v1.php b/ocs/v1.php index b12ea5ef18..3593f1822c 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -3,22 +3,22 @@ /** * ownCloud * -* @author Frank Karlitschek -* @copyright 2012 Frank Karlitschek frank@owncloud.org -* +* @author Frank Karlitschek +* @copyright 2012 Frank Karlitschek frank@owncloud.org +* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either +* License as published by the Free Software Foundation; either * version 3 of the License, or any later version. -* +* * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. If not, see . * +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see . +* */ require_once '../lib/base.php'; diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php index c87ff422f6..16b48c8a9c 100644 --- a/settings/ajax/createuser.php +++ b/settings/ajax/createuser.php @@ -43,9 +43,9 @@ try { } OC_Group::addToGroup( $username, $i ); } - OC_JSON::success(array("data" => - array( - "username" => $username, + OC_JSON::success(array("data" => + array( + "username" => $username, "groups" => implode( ", ", OC_Group::getUserGroups( $username ))))); } catch (Exception $exception) { OC_JSON::error(array("data" => array( "message" => $exception->getMessage()))); diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php index 273b02e382..043124fa17 100644 --- a/settings/ajax/getlog.php +++ b/settings/ajax/getlog.php @@ -12,5 +12,5 @@ $offset=(isset($_GET['offset']))?$_GET['offset']:0; $entries=OC_Log_Owncloud::getEntries($count, $offset); OC_JSON::success(array( - "data" => OC_Util::sanitizeHTML($entries), + "data" => OC_Util::sanitizeHTML($entries), "remain"=>(count(OC_Log_Owncloud::getEntries(1, $offset + $offset)) != 0) ? true : false)); diff --git a/settings/ajax/userlist.php b/settings/ajax/userlist.php index 61b1a388fc..eaeade60a3 100644 --- a/settings/ajax/userlist.php +++ b/settings/ajax/userlist.php @@ -32,9 +32,9 @@ if (OC_Group::inGroup(OC_User::getUser(), 'admin')) { $batch = OC_User::getUsers('', 10, $offset); foreach ($batch as $user) { $users[] = array( - 'name' => $user, - 'groups' => join(', ', OC_Group::getUserGroups($user)), - 'subadmin' => join(', ', OC_SubAdmin::getSubAdminsGroups($user)), + 'name' => $user, + 'groups' => join(', ', OC_Group::getUserGroups($user)), + 'subadmin' => join(', ', OC_SubAdmin::getSubAdminsGroups($user)), 'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default')); } } else { @@ -42,8 +42,8 @@ if (OC_Group::inGroup(OC_User::getUser(), 'admin')) { $batch = OC_Group::usersInGroups($groups, '', 10, $offset); foreach ($batch as $user) { $users[] = array( - 'name' => $user, - 'groups' => join(', ', OC_Group::getUserGroups($user)), + 'name' => $user, + 'groups' => join(', ', OC_Group::getUserGroups($user)), 'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default')); } } diff --git a/settings/apps.php b/settings/apps.php index 8134b44143..155291333f 100644 --- a/settings/apps.php +++ b/settings/apps.php @@ -95,11 +95,11 @@ if ( $remoteApps ) { foreach ( $remoteApps AS $key => $remote ) { - if ( + if ( $app['name'] == $remote['name'] - // To set duplicate detection to use OCS ID instead of string name, - // enable this code, remove the line of code above, - // and add [ID] to info.xml of each 3rd party app: + // To set duplicate detection to use OCS ID instead of string name, + // enable this code, remove the line of code above, + // and add [ID] to info.xml of each 3rd party app: // OR $app['ocs_id'] == $remote['ocs_id'] ) { diff --git a/settings/languageCodes.php b/settings/languageCodes.php index 221aa13cf6..7165580085 100644 --- a/settings/languageCodes.php +++ b/settings/languageCodes.php @@ -3,7 +3,7 @@ * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */ - + return array( 'bg_BG'=>'български език', 'ca'=>'Català', diff --git a/settings/templates/help.php b/settings/templates/help.php index 56d4385344..9bb46740f5 100644 --- a/settings/templates/help.php +++ b/settings/templates/help.php @@ -1,4 +1,4 @@ -; - + diff --git a/settings/users.php b/settings/users.php index 395712dbd5..93a259f1cd 100644 --- a/settings/users.php +++ b/settings/users.php @@ -31,7 +31,7 @@ if($isadmin) { foreach($accessibleusers as $i) { $users[] = array( - "name" => $i, + "name" => $i, "groups" => join( ", ", /*array_intersect(*/OC_Group::getUserGroups($i)/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/), 'quota'=>OC_Preferences::getValue($i, 'files', 'quota', 'default'), 'subadmin'=>implode(', ', OC_SubAdmin::getSubAdminsGroups($i))); diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php index 3cad3a2868..2cb6f7417d 100644 --- a/tests/lib/share/share.php +++ b/tests/lib/share/share.php @@ -181,7 +181,7 @@ class Test_Share extends UnitTestCase { $this->assertEquals($message, $exception->getMessage()); } - // Owner grants share and update permission + // Owner grants share and update permission OC_User::setUserId($this->user1); $this->assertTrue(OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_UPDATE | OCP\Share::PERMISSION_SHARE)); @@ -375,7 +375,7 @@ class Test_Share extends UnitTestCase { $this->assertTrue(in_array('test.txt', $to_test)); $this->assertTrue(in_array('test1.txt', $to_test)); - // Valid reshare + // Valid reshare $this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_USER, $this->user4, OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_SHARE)); OC_User::setUserId($this->user4); $this->assertEquals(array('test1.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET)); diff --git a/tests/lib/user/backend.php b/tests/lib/user/backend.php index 79653481f9..0b744770ea 100644 --- a/tests/lib/user/backend.php +++ b/tests/lib/user/backend.php @@ -23,10 +23,10 @@ /** * Abstract class to provide the basis of backend-specific unit test classes. * - * All subclasses MUST assign a backend property in setUp() which implements + * All subclasses MUST assign a backend property in setUp() which implements * user operations (add, remove, etc.). Test methods in this class will then be * run on each separate subclass and backend therein. - * + * * For an example see /tests/lib/user/dummy.php */ diff --git a/tests/lib/util.php b/tests/lib/util.php index a8e5b81026..27635cb805 100644 --- a/tests/lib/util.php +++ b/tests/lib/util.php @@ -10,7 +10,7 @@ class Test_Util extends UnitTestCase { // Constructor function Test_Util() { - date_default_timezone_set("UTC"); + date_default_timezone_set("UTC"); } function testFormatDate() { @@ -36,10 +36,10 @@ class Test_Util extends UnitTestCase { $goodString = "This is an harmless string."; $result = OC_Util::sanitizeHTML($goodString); $this->assertEquals("This is an harmless string.", $result); - } + } function testGenerate_random_bytes() { $result = strlen(OC_Util::generate_random_bytes(59)); $this->assertEquals(59, $result); - } + } } \ No newline at end of file diff --git a/tests/preseed-config.php b/tests/preseed-config.php index 7eadccbe76..9791e713da 100644 --- a/tests/preseed-config.php +++ b/tests/preseed-config.php @@ -1,15 +1,15 @@ false, - 'apps_paths' => + 'apps_paths' => array ( - 0 => + 0 => array ( 'path' => OC::$SERVERROOT.'/apps', 'url' => '/apps', 'writable' => false, ), - 1 => + 1 => array ( 'path' => OC::$SERVERROOT.'/apps2', 'url' => '/apps2',