Style: Remove all the dangling white spaces
This commit is contained in:
parent
1e33ad9cbc
commit
a4b2ea586d
|
@ -22,7 +22,7 @@ if (isset($_GET['token'])) {
|
||||||
// Enf of backward compatibility
|
// Enf of backward compatibility
|
||||||
|
|
||||||
function getID($path) {
|
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.
|
//are not stored in the file cache.
|
||||||
if (substr(OC_Filesystem::getMountPoint($path), -7, 6) == "Shared") {
|
if (substr(OC_Filesystem::getMountPoint($path), -7, 6) == "Shared") {
|
||||||
$path_parts = explode('/', $path, 5);
|
$path_parts = explode('/', $path, 5);
|
||||||
|
|
|
@ -40,7 +40,7 @@ class OC_BackgroundJob{
|
||||||
* @param $type execution type
|
* @param $type execution type
|
||||||
* @return boolean
|
* @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"
|
* are "none", "ajax", "webcron", "cron"
|
||||||
*/
|
*/
|
||||||
public static function setExecutionType( $type ) {
|
public static function setExecutionType( $type ) {
|
||||||
|
|
|
@ -619,9 +619,9 @@ class OC{
|
||||||
OC_Util::redirectToDefaultPage();
|
OC_Util::redirectToDefaultPage();
|
||||||
// doesn't return
|
// 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
|
// 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
|
// this point multiple times after a password change
|
||||||
OC_Log::write('core', 'Authentication cookie rejected for user '.$_COOKIE['oc_username'], OC_Log::WARN);
|
OC_Log::write('core', 'Authentication cookie rejected for user '.$_COOKIE['oc_username'], OC_Log::WARN);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This plugin check user quota and deny creating files when they exceeds the quota.
|
* This plugin check user quota and deny creating files when they exceeds the quota.
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2012 entreCables S.L. All rights reserved.
|
* @copyright Copyright (C) 2012 entreCables S.L. All rights reserved.
|
||||||
* @author Sergio Cambra
|
* @author Sergio Cambra
|
||||||
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
|
* @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 {
|
class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to main server object
|
* Reference to main server object
|
||||||
*
|
*
|
||||||
* @var Sabre_DAV_Server
|
* @var Sabre_DAV_Server
|
||||||
*/
|
*/
|
||||||
private $server;
|
private $server;
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin {
|
||||||
* addPlugin is called.
|
* addPlugin is called.
|
||||||
*
|
*
|
||||||
* This method should set up the requires event subscriptions.
|
* This method should set up the requires event subscriptions.
|
||||||
*
|
*
|
||||||
* @param Sabre_DAV_Server $server
|
* @param Sabre_DAV_Server $server
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function initialize(Sabre_DAV_Server $server) {
|
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
|
* This method is called before any HTTP method and forces users to be authenticated
|
||||||
*
|
*
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @throws Sabre_DAV_Exception
|
* @throws Sabre_DAV_Exception
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function checkQuota($uri, $data = null) {
|
public function checkQuota($uri, $data = null) {
|
||||||
$expected = $this->server->httpRequest->getHeader('X-Expected-Entity-Length');
|
$expected = $this->server->httpRequest->getHeader('X-Expected-Entity-Length');
|
||||||
|
|
|
@ -47,7 +47,7 @@ class OC_Log {
|
||||||
//ob_end_clean();
|
//ob_end_clean();
|
||||||
self::write('PHP', $error['message'] . ' at ' . $error['file'] . '#' . $error['line'], self::FATAL);
|
self::write('PHP', $error['message'] . ' at ' . $error['file'] . '#' . $error['line'], self::FATAL);
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ class BackgroundJob {
|
||||||
* @param $type execution type
|
* @param $type execution type
|
||||||
* @return boolean
|
* @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"
|
* are "none", "ajax", "webcron", "cron"
|
||||||
*/
|
*/
|
||||||
public static function setExecutionType( $type ) {
|
public static function setExecutionType( $type ) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace OCP;
|
||||||
/**
|
/**
|
||||||
* This class provides the ability for apps to share their content between users.
|
* 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.
|
* Apps must create a backend class that implements OCP\Share_Backend and register it with this class.
|
||||||
*
|
*
|
||||||
* It provides the following hooks:
|
* It provides the following hooks:
|
||||||
* - post_shared
|
* - post_shared
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,22 +3,22 @@
|
||||||
/**
|
/**
|
||||||
* ownCloud
|
* ownCloud
|
||||||
*
|
*
|
||||||
* @author Frank Karlitschek
|
* @author Frank Karlitschek
|
||||||
* @copyright 2012 Frank Karlitschek frank@owncloud.org
|
* @copyright 2012 Frank Karlitschek frank@owncloud.org
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
* 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.
|
* version 3 of the License, or any later version.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
* 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once '../lib/base.php';
|
require_once '../lib/base.php';
|
||||||
|
|
16
ocs/v1.php
16
ocs/v1.php
|
@ -3,22 +3,22 @@
|
||||||
/**
|
/**
|
||||||
* ownCloud
|
* ownCloud
|
||||||
*
|
*
|
||||||
* @author Frank Karlitschek
|
* @author Frank Karlitschek
|
||||||
* @copyright 2012 Frank Karlitschek frank@owncloud.org
|
* @copyright 2012 Frank Karlitschek frank@owncloud.org
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
* 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.
|
* version 3 of the License, or any later version.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
* 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once '../lib/base.php';
|
require_once '../lib/base.php';
|
||||||
|
|
|
@ -43,9 +43,9 @@ try {
|
||||||
}
|
}
|
||||||
OC_Group::addToGroup( $username, $i );
|
OC_Group::addToGroup( $username, $i );
|
||||||
}
|
}
|
||||||
OC_JSON::success(array("data" =>
|
OC_JSON::success(array("data" =>
|
||||||
array(
|
array(
|
||||||
"username" => $username,
|
"username" => $username,
|
||||||
"groups" => implode( ", ", OC_Group::getUserGroups( $username )))));
|
"groups" => implode( ", ", OC_Group::getUserGroups( $username )))));
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
OC_JSON::error(array("data" => array( "message" => $exception->getMessage())));
|
OC_JSON::error(array("data" => array( "message" => $exception->getMessage())));
|
||||||
|
|
|
@ -12,5 +12,5 @@ $offset=(isset($_GET['offset']))?$_GET['offset']:0;
|
||||||
|
|
||||||
$entries=OC_Log_Owncloud::getEntries($count, $offset);
|
$entries=OC_Log_Owncloud::getEntries($count, $offset);
|
||||||
OC_JSON::success(array(
|
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));
|
"remain"=>(count(OC_Log_Owncloud::getEntries(1, $offset + $offset)) != 0) ? true : false));
|
||||||
|
|
|
@ -32,9 +32,9 @@ if (OC_Group::inGroup(OC_User::getUser(), 'admin')) {
|
||||||
$batch = OC_User::getUsers('', 10, $offset);
|
$batch = OC_User::getUsers('', 10, $offset);
|
||||||
foreach ($batch as $user) {
|
foreach ($batch as $user) {
|
||||||
$users[] = array(
|
$users[] = array(
|
||||||
'name' => $user,
|
'name' => $user,
|
||||||
'groups' => join(', ', OC_Group::getUserGroups($user)),
|
'groups' => join(', ', OC_Group::getUserGroups($user)),
|
||||||
'subadmin' => join(', ', OC_SubAdmin::getSubAdminsGroups($user)),
|
'subadmin' => join(', ', OC_SubAdmin::getSubAdminsGroups($user)),
|
||||||
'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default'));
|
'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default'));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -42,8 +42,8 @@ if (OC_Group::inGroup(OC_User::getUser(), 'admin')) {
|
||||||
$batch = OC_Group::usersInGroups($groups, '', 10, $offset);
|
$batch = OC_Group::usersInGroups($groups, '', 10, $offset);
|
||||||
foreach ($batch as $user) {
|
foreach ($batch as $user) {
|
||||||
$users[] = array(
|
$users[] = array(
|
||||||
'name' => $user,
|
'name' => $user,
|
||||||
'groups' => join(', ', OC_Group::getUserGroups($user)),
|
'groups' => join(', ', OC_Group::getUserGroups($user)),
|
||||||
'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default'));
|
'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,11 +95,11 @@ if ( $remoteApps ) {
|
||||||
|
|
||||||
foreach ( $remoteApps AS $key => $remote ) {
|
foreach ( $remoteApps AS $key => $remote ) {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$app['name'] == $remote['name']
|
$app['name'] == $remote['name']
|
||||||
// To set duplicate detection to use OCS ID instead of string name,
|
// To set duplicate detection to use OCS ID instead of string name,
|
||||||
// enable this code, remove the line of code above,
|
// enable this code, remove the line of code above,
|
||||||
// and add <ocs_id>[ID]</ocs_id> to info.xml of each 3rd party app:
|
// and add <ocs_id>[ID]</ocs_id> to info.xml of each 3rd party app:
|
||||||
// OR $app['ocs_id'] == $remote['ocs_id']
|
// OR $app['ocs_id'] == $remote['ocs_id']
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* This file is licensed under the Affero General Public License version 3 or later.
|
* This file is licensed under the Affero General Public License version 3 or later.
|
||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'bg_BG'=>'български език',
|
'bg_BG'=>'български език',
|
||||||
'ca'=>'Català',
|
'ca'=>'Català',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* 2012 Frank Karlitschek frank@owncloud.org
|
* 2012 Frank Karlitschek frank@owncloud.org
|
||||||
* This file is licensed under the Affero General Public License version 3 or later.
|
* This file is licensed under the Affero General Public License version 3 or later.
|
||||||
|
|
|
@ -142,7 +142,7 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="remove">
|
<td class="remove">
|
||||||
<?php if($user['name']!=OC_User::getUser()):?>
|
<?php if($user['name']!=OC_User::getUser()):?>
|
||||||
<a href="#" class="action delete" original-title="<?php echo $l->t('Delete')?>">
|
<a href="#" class="action delete" original-title="<?php echo $l->t('Delete')?>">
|
||||||
<img src="<?php echo image_path('core', 'actions/delete.svg') ?>" />
|
<img src="<?php echo image_path('core', 'actions/delete.svg') ?>" />
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -31,7 +31,7 @@ if($isadmin) {
|
||||||
|
|
||||||
foreach($accessibleusers as $i) {
|
foreach($accessibleusers as $i) {
|
||||||
$users[] = array(
|
$users[] = array(
|
||||||
"name" => $i,
|
"name" => $i,
|
||||||
"groups" => join( ", ", /*array_intersect(*/OC_Group::getUserGroups($i)/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/),
|
"groups" => join( ", ", /*array_intersect(*/OC_Group::getUserGroups($i)/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/),
|
||||||
'quota'=>OC_Preferences::getValue($i, 'files', 'quota', 'default'),
|
'quota'=>OC_Preferences::getValue($i, 'files', 'quota', 'default'),
|
||||||
'subadmin'=>implode(', ', OC_SubAdmin::getSubAdminsGroups($i)));
|
'subadmin'=>implode(', ', OC_SubAdmin::getSubAdminsGroups($i)));
|
||||||
|
|
|
@ -181,7 +181,7 @@ class Test_Share extends UnitTestCase {
|
||||||
$this->assertEquals($message, $exception->getMessage());
|
$this->assertEquals($message, $exception->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Owner grants share and update permission
|
// Owner grants share and update permission
|
||||||
OC_User::setUserId($this->user1);
|
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));
|
$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('test.txt', $to_test));
|
||||||
$this->assertTrue(in_array('test1.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));
|
$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);
|
OC_User::setUserId($this->user4);
|
||||||
$this->assertEquals(array('test1.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET));
|
$this->assertEquals(array('test1.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET));
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
/**
|
/**
|
||||||
* Abstract class to provide the basis of backend-specific unit test classes.
|
* 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
|
* user operations (add, remove, etc.). Test methods in this class will then be
|
||||||
* run on each separate subclass and backend therein.
|
* run on each separate subclass and backend therein.
|
||||||
*
|
*
|
||||||
* For an example see /tests/lib/user/dummy.php
|
* For an example see /tests/lib/user/dummy.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Test_Util extends UnitTestCase {
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
function Test_Util() {
|
function Test_Util() {
|
||||||
date_default_timezone_set("UTC");
|
date_default_timezone_set("UTC");
|
||||||
}
|
}
|
||||||
|
|
||||||
function testFormatDate() {
|
function testFormatDate() {
|
||||||
|
@ -36,10 +36,10 @@ class Test_Util extends UnitTestCase {
|
||||||
$goodString = "This is an harmless string.";
|
$goodString = "This is an harmless string.";
|
||||||
$result = OC_Util::sanitizeHTML($goodString);
|
$result = OC_Util::sanitizeHTML($goodString);
|
||||||
$this->assertEquals("This is an harmless string.", $result);
|
$this->assertEquals("This is an harmless string.", $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testGenerate_random_bytes() {
|
function testGenerate_random_bytes() {
|
||||||
$result = strlen(OC_Util::generate_random_bytes(59));
|
$result = strlen(OC_Util::generate_random_bytes(59));
|
||||||
$this->assertEquals(59, $result);
|
$this->assertEquals(59, $result);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,15 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
$CONFIG = array (
|
$CONFIG = array (
|
||||||
"appstoreenabled" => false,
|
"appstoreenabled" => false,
|
||||||
'apps_paths' =>
|
'apps_paths' =>
|
||||||
array (
|
array (
|
||||||
0 =>
|
0 =>
|
||||||
array (
|
array (
|
||||||
'path' => OC::$SERVERROOT.'/apps',
|
'path' => OC::$SERVERROOT.'/apps',
|
||||||
'url' => '/apps',
|
'url' => '/apps',
|
||||||
'writable' => false,
|
'writable' => false,
|
||||||
),
|
),
|
||||||
1 =>
|
1 =>
|
||||||
array (
|
array (
|
||||||
'path' => OC::$SERVERROOT.'/apps2',
|
'path' => OC::$SERVERROOT.'/apps2',
|
||||||
'url' => '/apps2',
|
'url' => '/apps2',
|
||||||
|
|
Loading…
Reference in New Issue