// 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);
* @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 ) {
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);
}
/**
* 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
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;
* 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) {
/**
* 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');
//ob_end_clean();
self::write('PHP', $error['message'] . ' at ' . $error['file'] . '#' . $error['line'], self::FATAL);
} else {
- return true;
+ return true;
}
}
* @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 ) {
/**
* 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
*/
/**
* 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 <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';
/**
* 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 <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';
}
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())));
$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));
$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 {
$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'));
}
}
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 <ocs_id>[ID]</ocs_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 <ocs_id>[ID]</ocs_id> to info.xml of each 3rd party app:
// OR $app['ocs_id'] == $remote['ocs_id']
) {
* 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à',
-<?php
+<?php
/**
* 2012 Frank Karlitschek frank@owncloud.org
* This file is licensed under the Affero General Public License version 3 or later.
</div>
</td>
<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')?>">
<img src="<?php echo image_path('core', 'actions/delete.svg') ?>" />
</a>
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)));
$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));
$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));
/**
* 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
*/
// Constructor
function Test_Util() {
- date_default_timezone_set("UTC");
+ date_default_timezone_set("UTC");
}
function testFormatDate() {
$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
<?php
$CONFIG = array (
"appstoreenabled" => 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',