aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/files.js2
-rw-r--r--apps/files_versions/l10n/zh_TW.php1
-rw-r--r--core/l10n/zh_TW.php7
-rw-r--r--l10n/de/files.po6
-rw-r--r--l10n/de_DE/files.po6
-rw-r--r--l10n/templates/core.pot2
-rw-r--r--l10n/templates/files.pot2
-rw-r--r--l10n/templates/files_encryption.pot2
-rw-r--r--l10n/templates/files_external.pot2
-rw-r--r--l10n/templates/files_sharing.pot2
-rw-r--r--l10n/templates/files_versions.pot2
-rw-r--r--l10n/templates/lib.pot2
-rw-r--r--l10n/templates/settings.pot2
-rw-r--r--l10n/templates/user_ldap.pot2
-rw-r--r--l10n/templates/user_webdavauth.pot2
-rw-r--r--l10n/zh_TW/core.po18
-rw-r--r--l10n/zh_TW/files_versions.po6
-rw-r--r--lib/connector/sabre/node.php36
-rw-r--r--tests/lib/group.php68
19 files changed, 120 insertions, 50 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index dbd9a647151..d29732f9b3f 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -730,7 +730,7 @@ function updateBreadcrumb(breadcrumbHtml) {
//options for file drag/dropp
var dragOptions={
- distance: 20, revert: 'invalid', opacity: 0.7,
+ distance: 20, revert: 'invalid', opacity: 0.7, helper: 'clone',
stop: function(event, ui) {
$('#fileList tr td.filename').addClass('ui-draggable');
}
diff --git a/apps/files_versions/l10n/zh_TW.php b/apps/files_versions/l10n/zh_TW.php
index 6f8fdefad0c..a21fdc85f8d 100644
--- a/apps/files_versions/l10n/zh_TW.php
+++ b/apps/files_versions/l10n/zh_TW.php
@@ -2,5 +2,6 @@
"Expire all versions" => "所有逾期的版本",
"History" => "歷史",
"Versions" => "版本",
+"Files Versioning" => "檔案版本化中...",
"Enable" => "啟用"
);
diff --git a/core/l10n/zh_TW.php b/core/l10n/zh_TW.php
index a86dc1235b6..2d5bb407087 100644
--- a/core/l10n/zh_TW.php
+++ b/core/l10n/zh_TW.php
@@ -16,17 +16,22 @@
"months ago" => "幾個月前",
"last year" => "去年",
"years ago" => "幾年前",
+"Choose" => "選擇",
"Cancel" => "取消",
"No" => "No",
"Yes" => "Yes",
"Ok" => "Ok",
"Error" => "錯誤",
"Error while sharing" => "分享時發生錯誤",
+"Shared with you by {owner}" => "{owner} 已經和您分享",
+"Share with" => "與分享",
+"Share with link" => "使用連結分享",
"Password protect" => "密碼保護",
"Password" => "密碼",
"Set expiration date" => "設置到期日",
"Expiration date" => "到期日",
"Share via email:" => "透過email分享:",
+"Shared in {item} with {user}" => "已和 {user} 分享 {item}",
"Unshare" => "取消共享",
"can edit" => "可編輯",
"access control" => "存取控制",
@@ -39,6 +44,8 @@
"ownCloud password reset" => "ownCloud 密碼重設",
"Use the following link to reset your password: {link}" => "請循以下聯結重設你的密碼: (聯結) ",
"You will receive a link to reset your password via Email." => "重設密碼的連結將會寄到你的電子郵件信箱",
+"Reset email send." => "重設郵件已送出.",
+"Request failed!" => "請求失敗!",
"Username" => "使用者名稱",
"Request reset" => "要求重設",
"Your password was reset" => "你的密碼已重設",
diff --git a/l10n/de/files.po b/l10n/de/files.po
index 1a69a4a4cf6..5f5f61307b9 100644
--- a/l10n/de/files.po
+++ b/l10n/de/files.po
@@ -24,9 +24,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
-"POT-Creation-Date: 2012-11-26 00:01+0100\n"
-"PO-Revision-Date: 2012-11-25 00:10+0000\n"
-"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
+"PO-Revision-Date: 2012-11-28 12:56+0000\n"
+"Last-Translator: Mirodin <blobbyjj@ymail.com>\n"
"Language-Team: German (http://www.transifex.com/projects/p/owncloud/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
diff --git a/l10n/de_DE/files.po b/l10n/de_DE/files.po
index 336308b77b1..a705358c48c 100644
--- a/l10n/de_DE/files.po
+++ b/l10n/de_DE/files.po
@@ -25,9 +25,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
-"POT-Creation-Date: 2012-11-26 00:01+0100\n"
-"PO-Revision-Date: 2012-11-25 00:13+0000\n"
-"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
+"PO-Revision-Date: 2012-11-28 12:56+0000\n"
+"Last-Translator: Mirodin <blobbyjj@ymail.com>\n"
"Language-Team: German (Germany) (http://www.transifex.com/projects/p/owncloud/language/de_DE/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot
index ad4af347120..8a1c04a06db 100644
--- a/l10n/templates/core.pot
+++ b/l10n/templates/core.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files.pot b/l10n/templates/files.pot
index 801c9a04eb7..707c8bc8180 100644
--- a/l10n/templates/files.pot
+++ b/l10n/templates/files.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_encryption.pot b/l10n/templates/files_encryption.pot
index 3fb67466264..8b46389c37c 100644
--- a/l10n/templates/files_encryption.pot
+++ b/l10n/templates/files_encryption.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_external.pot b/l10n/templates/files_external.pot
index 12569fba509..6b17fb87324 100644
--- a/l10n/templates/files_external.pot
+++ b/l10n/templates/files_external.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_sharing.pot b/l10n/templates/files_sharing.pot
index 74f89b67607..9f034486ce5 100644
--- a/l10n/templates/files_sharing.pot
+++ b/l10n/templates/files_sharing.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/files_versions.pot b/l10n/templates/files_versions.pot
index 62ec6692189..28fab4affde 100644
--- a/l10n/templates/files_versions.pot
+++ b/l10n/templates/files_versions.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/lib.pot b/l10n/templates/lib.pot
index 9d0e0dd1d2e..3b6a9cf92e2 100644
--- a/l10n/templates/lib.pot
+++ b/l10n/templates/lib.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot
index c6d312fe502..d19a566b062 100644
--- a/l10n/templates/settings.pot
+++ b/l10n/templates/settings.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/user_ldap.pot b/l10n/templates/user_ldap.pot
index 4ccfa1b35b3..13058208a15 100644
--- a/l10n/templates/user_ldap.pot
+++ b/l10n/templates/user_ldap.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/templates/user_webdavauth.pot b/l10n/templates/user_webdavauth.pot
index bea089c0055..dc48ca4e7a7 100644
--- a/l10n/templates/user_webdavauth.pot
+++ b/l10n/templates/user_webdavauth.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/l10n/zh_TW/core.po b/l10n/zh_TW/core.po
index f6f204e212f..ae5dc301b3c 100644
--- a/l10n/zh_TW/core.po
+++ b/l10n/zh_TW/core.po
@@ -10,8 +10,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
-"PO-Revision-Date: 2012-11-27 14:16+0000\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
+"PO-Revision-Date: 2012-11-28 01:36+0000\n"
"Last-Translator: dw4dev <dw4dev@gmail.com>\n"
"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/owncloud/language/zh_TW/)\n"
"MIME-Version: 1.0\n"
@@ -116,7 +116,7 @@ msgstr "幾年前"
#: js/oc-dialogs.js:126
msgid "Choose"
-msgstr ""
+msgstr "選擇"
#: js/oc-dialogs.js:146 js/oc-dialogs.js:166
msgid "Cancel"
@@ -171,15 +171,15 @@ msgstr ""
#: js/share.js:153
msgid "Shared with you by {owner}"
-msgstr ""
+msgstr "{owner} 已經和您分享"
#: js/share.js:158
msgid "Share with"
-msgstr ""
+msgstr "與分享"
#: js/share.js:163
msgid "Share with link"
-msgstr ""
+msgstr "使用連結分享"
#: js/share.js:164
msgid "Password protect"
@@ -212,7 +212,7 @@ msgstr ""
#: js/share.js:271
msgid "Shared in {item} with {user}"
-msgstr ""
+msgstr "已和 {user} 分享 {item}"
#: js/share.js:292
msgid "Unshare"
@@ -268,11 +268,11 @@ msgstr "重設密碼的連結將會寄到你的電子郵件信箱"
#: lostpassword/templates/lostpassword.php:5
msgid "Reset email send."
-msgstr ""
+msgstr "重設郵件已送出."
#: lostpassword/templates/lostpassword.php:8
msgid "Request failed!"
-msgstr ""
+msgstr "請求失敗!"
#: lostpassword/templates/lostpassword.php:11 templates/installation.php:38
#: templates/login.php:20
diff --git a/l10n/zh_TW/files_versions.po b/l10n/zh_TW/files_versions.po
index 3e9e1fb8241..de8f1475443 100644
--- a/l10n/zh_TW/files_versions.po
+++ b/l10n/zh_TW/files_versions.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
-"POT-Creation-Date: 2012-11-28 00:10+0100\n"
-"PO-Revision-Date: 2012-11-27 14:25+0000\n"
+"POT-Creation-Date: 2012-11-29 00:04+0100\n"
+"PO-Revision-Date: 2012-11-28 01:33+0000\n"
"Last-Translator: dw4dev <dw4dev@gmail.com>\n"
"Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/owncloud/language/zh_TW/)\n"
"MIME-Version: 1.0\n"
@@ -36,7 +36,7 @@ msgstr ""
#: templates/settings.php:3
msgid "Files Versioning"
-msgstr ""
+msgstr "檔案版本化中..."
#: templates/settings.php:4
msgid "Enable"
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php
index 9fffa108d2a..52350072fb2 100644
--- a/lib/connector/sabre/node.php
+++ b/lib/connector/sabre/node.php
@@ -50,8 +50,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
protected $property_cache = null;
/**
- * Sets up the node, expects a full path name
- *
+ * @brief Sets up the node, expects a full path name
* @param string $path
* @return void
*/
@@ -62,8 +61,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
/**
- * Returns the name of the node
- *
+ * @brief Returns the name of the node
* @return string
*/
public function getName() {
@@ -74,8 +72,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
/**
- * Renames the node
- *
+ * @brief Renames the node
* @param string $name The new name
* @return void
*/
@@ -102,7 +99,8 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
/**
- * Make sure the fileinfo cache is filled. Uses OC_FileCache or a direct stat
+ * @brief Ensure that the fileinfo cache is filled
+ & @note Uses OC_FileCache or a direct stat
*/
protected function getFileinfoCache() {
if (!isset($this->fileinfo_cache)) {
@@ -121,8 +119,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
/**
- * Returns the last modification time, as a unix timestamp
- *
+ * @brief Returns the last modification time, as a unix timestamp
* @return int
*/
public function getLastModified() {
@@ -141,8 +138,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
/**
- * Updates properties on this node,
- *
+ * @brief Updates properties on this node,
* @param array $mutations
* @see Sabre_DAV_IProperties::updateProperties
* @return bool|array
@@ -177,15 +173,13 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
/**
- * Returns a list of properties for this nodes.;
- *
- * The properties list is a list of propertynames the client requested,
- * encoded as xmlnamespace#tagName, for example:
- * http://www.example.org/namespace#author
- * If the array is empty, all properties should be returned
- *
+ * @brief Returns a list of properties for this nodes.;
* @param array $properties
* @return array
+ * @note The properties list is a list of propertynames the client
+ * requested, encoded as xmlnamespace#tagName, for example:
+ * http://www.example.org/namespace#author If the array is empty, all
+ * properties should be returned
*/
public function getProperties($properties) {
if (is_null($this->property_cache)) {
@@ -211,7 +205,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
/**
- * Creates a ETag for this path.
+ * @brief Creates a ETag for this path.
* @param string $path Path of the file
* @return string|null Returns null if the ETag can not effectively be determined
*/
@@ -225,7 +219,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
/**
- * Returns the ETag surrounded by double-quotes for this path.
+ * @brief Returns the ETag surrounded by double-quotes for this path.
* @param string $path Path of the file
* @return string|null Returns null if the ETag can not effectively be determined
*/
@@ -241,7 +235,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
/**
- * Remove the ETag from the cache.
+ * @brief Remove the ETag from the cache.
* @param string $path Path of the file
*/
static public function removeETagPropertyForPath($path) {
diff --git a/tests/lib/group.php b/tests/lib/group.php
index 7b9ca3414b0..28264b0f168 100644
--- a/tests/lib/group.php
+++ b/tests/lib/group.php
@@ -3,7 +3,9 @@
* ownCloud
*
* @author Robin Appelman
+* @author Bernhard Posselt
* @copyright 2012 Robin Appelman icewind@owncloud.com
+* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
@@ -62,6 +64,72 @@ class Test_Group extends UnitTestCase {
$this->assertFalse(OC_Group::inGroup($user1, $group1));
}
+
+ public function testNoEmptyGIDs(){
+ OC_Group::useBackend(new OC_Group_Dummy());
+ $emptyGroup = null;
+
+ $this->assertEqual(false, OC_Group::createGroup($emptyGroup));
+ }
+
+
+ public function testNoGroupsTwice(){
+ OC_Group::useBackend(new OC_Group_Dummy());
+ $group = uniqid();
+ OC_Group::createGroup($group);
+
+ $groupCopy = $group;
+
+ $this->assertEqual(false, OC_Group::createGroup($groupCopy));
+ $this->assertEqual(array($group), OC_Group::getGroups());
+ }
+
+
+ public function testDontDeleteAdminGroup(){
+ OC_Group::useBackend(new OC_Group_Dummy());
+ $adminGroup = 'admin';
+ OC_Group::createGroup($adminGroup);
+
+ $this->assertEqual(false, OC_Group::deleteGroup($adminGroup));
+ $this->assertEqual(array($adminGroup), OC_Group::getGroups());
+ }
+
+
+ public function testDontAddUserToNonexistentGroup(){
+ OC_Group::useBackend(new OC_Group_Dummy());
+ $groupNonExistent = 'notExistent';
+ $user = uniqid();
+
+ $this->assertEqual(false, OC_Group::addToGroup($user, $groupNonExistent));
+ $this->assertEqual(array(), OC_Group::getGroups());
+ }
+
+
+ public function testUsersInGroup(){
+ OC_Group::useBackend(new OC_Group_Dummy());
+ $group1 = uniqid();
+ $group2 = uniqid();
+ $group3 = uniqid();
+ $user1 = uniqid();
+ $user2 = uniqid();
+ $user3 = uniqid();
+ OC_Group::createGroup($group1);
+ OC_Group::createGroup($group2);
+ OC_Group::createGroup($group3);
+
+ OC_Group::addToGroup($user1, $group1);
+ OC_Group::addToGroup($user2, $group1);
+ OC_Group::addToGroup($user3, $group1);
+ OC_Group::addToGroup($user3, $group2);
+
+ $this->assertEqual(array($user1, $user2, $user3),
+ OC_Group::usersInGroups(array($group1, $group2, $group3)));
+
+ // FIXME: needs more parameter variation
+ }
+
+
+
function testMultiBackend() {
$backend1=new OC_Group_Dummy();
$backend2=new OC_Group_Dummy();