aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-12-06 18:27:46 +0100
committerRobin Appelman <icewind@owncloud.com>2013-12-06 18:27:46 +0100
commit9eca2471b3e8b75c21a1a8fd2a88c20c577c07bc (patch)
tree082f05cc105e5540c6ef642d9b3d6daaa64fd749 /lib
parente888bdda30589d4d8c20bca3c1f962436794bf10 (diff)
parentb5939324b0053b6447423ebc8b269e9f773f7f02 (diff)
downloadnextcloud-server-9eca2471b3e8b75c21a1a8fd2a88c20c577c07bc.tar.gz
nextcloud-server-9eca2471b3e8b75c21a1a8fd2a88c20c577c07bc.zip
Merge branch 'master' into backgroundscan-reuse-etag
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php1
-rw-r--r--lib/l10n/pt_PT.php7
-rw-r--r--lib/l10n/uk.php10
-rw-r--r--lib/public/share.php35
4 files changed, 34 insertions, 19 deletions
diff --git a/lib/base.php b/lib/base.php
index 2feedd81d8c..baf73b2fb9f 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -866,7 +866,6 @@ class OC {
OC_User::setMagicInCookie($_COOKIE['oc_username'], $token);
// login
OC_User::setUserId($_COOKIE['oc_username']);
- OC_User::setDisplayName($_COOKIE['oc_username'], $_COOKIE['display_name']);
OC_Util::redirectToDefaultPage();
// doesn't return
}
diff --git a/lib/l10n/pt_PT.php b/lib/l10n/pt_PT.php
index 2b12b4d8a17..55845cf2ae9 100644
--- a/lib/l10n/pt_PT.php
+++ b/lib/l10n/pt_PT.php
@@ -16,10 +16,17 @@ $TRANSLATIONS = array(
"Files need to be downloaded one by one." => "Os ficheiros precisam de ser descarregados um por um.",
"Back to Files" => "Voltar a Ficheiros",
"Selected files too large to generate zip file." => "Os ficheiros seleccionados são grandes demais para gerar um ficheiro zip.",
+"Please download the files separately in smaller chunks or kindly ask your administrator." => "Por favor descarregue os ficheiros divididos em partes mais pequenas ou peça ajuda ao seu administrador.",
+"No source specified when installing app" => "Não foi especificada uma fonte de instalação desta aplicação",
+"No href specified when installing app from http" => "Não foi especificada uma href http para instalar esta aplicação",
+"No path specified when installing app from local file" => "Não foi especificado o caminho de instalação desta aplicação",
"Archives of type %s are not supported" => "Arquivos do tipo %s não são suportados",
+"Failed to open archive when installing app" => "Ocorreu um erro ao abrir o ficheiro de instalação desta aplicação",
"App does not provide an info.xml file" => "A aplicação não disponibiliza um ficheiro info.xml",
"App can't be installed because of not allowed code in the App" => "A aplicação não pode ser instalado devido a código não permitido dentro da aplicação",
"App can't be installed because it is not compatible with this version of ownCloud" => "A aplicação não pode ser instalada por não ser compatível com esta versão do ownCloud",
+"App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" => "Esta aplicação não pode ser instalada por que contém o tag <shipped>true</shipped> que só é permitido para aplicações nativas",
+"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" => "Esta aplicação não pode ser instalada porque a versão no info.xml/version não coincide com a reportada na loja de aplicações",
"App directory already exists" => "A directoria da aplicação já existe",
"Can't create app folder. Please fix permissions. %s" => "Não foi possível criar a pasta da aplicação. Por favor verifique as permissões. %s",
"Application is not enabled" => "A aplicação não está activada",
diff --git a/lib/l10n/uk.php b/lib/l10n/uk.php
index 906c93b567a..32e010f1d40 100644
--- a/lib/l10n/uk.php
+++ b/lib/l10n/uk.php
@@ -5,6 +5,8 @@ $TRANSLATIONS = array(
"Settings" => "Налаштування",
"Users" => "Користувачі",
"Admin" => "Адмін",
+"Unknown filetype" => "Невідомий тип файлу",
+"Invalid image" => "Невірне зображення",
"web services under your control" => "підконтрольні Вам веб-сервіси",
"ZIP download is turned off." => "ZIP завантаження вимкнено.",
"Files need to be downloaded one by one." => "Файли повинні бути завантаженні послідовно.",
@@ -37,13 +39,13 @@ $TRANSLATIONS = array(
"Please double check the <a href='%s'>installation guides</a>." => "Будь ласка, перевірте <a href='%s'>інструкції по встановленню</a>.",
"Could not find category \"%s\"" => "Не вдалося знайти категорію \"%s\"",
"seconds ago" => "секунди тому",
-"_%n minute ago_::_%n minutes ago_" => array("","",""),
-"_%n hour ago_::_%n hours ago_" => array("","",""),
+"_%n minute ago_::_%n minutes ago_" => array("","","%n хвилин тому"),
+"_%n hour ago_::_%n hours ago_" => array("","","%n годин тому"),
"today" => "сьогодні",
"yesterday" => "вчора",
-"_%n day go_::_%n days ago_" => array("","",""),
+"_%n day go_::_%n days ago_" => array("","","%n днів тому"),
"last month" => "минулого місяця",
-"_%n month ago_::_%n months ago_" => array("","",""),
+"_%n month ago_::_%n months ago_" => array("","","%n місяців тому"),
"last year" => "минулого року",
"years ago" => "роки тому"
);
diff --git a/lib/public/share.php b/lib/public/share.php
index 6dbcd5b67bf..6b3397c85c6 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -423,11 +423,13 @@ class Share {
* @param string Item source
* @param string Owner
* @param bool Include collections
+ * @praram bool check expire date
* @return Return array of users
*/
- public static function getUsersItemShared($itemType, $itemSource, $uidOwner, $includeCollections = false) {
+ public static function getUsersItemShared($itemType, $itemSource, $uidOwner, $includeCollections = false, $checkExpireDate = true) {
+
$users = array();
- $items = self::getItems($itemType, $itemSource, null, null, $uidOwner, self::FORMAT_NONE, null, -1, $includeCollections);
+ $items = self::getItems($itemType, $itemSource, null, null, $uidOwner, self::FORMAT_NONE, null, -1, $includeCollections, false, $checkExpireDate);
if ($items) {
foreach ($items as $item) {
if ((int)$item['share_type'] === self::SHARE_TYPE_USER) {
@@ -866,12 +868,14 @@ class Share {
protected static function unshareItem(array $item) {
// Pass all the vars we have for now, they may be useful
$hookParams = array(
- 'itemType' => $item['item_type'],
- 'itemSource' => $item['item_source'],
- 'shareType' => $item['share_type'],
- 'shareWith' => $item['share_with'],
- 'itemParent' => $item['parent'],
+ 'itemType' => $item['item_type'],
+ 'itemSource' => $item['item_source'],
+ 'shareType' => $item['share_type'],
+ 'shareWith' => $item['share_with'],
+ 'itemParent' => $item['parent'],
+ 'uidOwner' => $item['uid_owner'],
);
+
\OC_Hook::emit('OCP\Share', 'pre_unshare', $hookParams + array(
'fileSource' => $item['file_source'],
));
@@ -961,6 +965,7 @@ class Share {
* @param int Number of items to return, -1 to return all matches (optional)
* @param bool Include collection item types (optional)
* @param bool TODO (optional)
+ * @prams bool check expire date
* @return mixed
*
* See public functions getItem(s)... for parameter usage
@@ -968,7 +973,7 @@ class Share {
*/
private static function getItems($itemType, $item = null, $shareType = null, $shareWith = null,
$uidOwner = null, $format = self::FORMAT_NONE, $parameters = null, $limit = -1,
- $includeCollections = false, $itemShareWithBySource = false) {
+ $includeCollections = false, $itemShareWithBySource = false, $checkExpireDate = true) {
if (!self::isEnabled()) {
if ($limit == 1 || (isset($uidOwner) && isset($item))) {
return false;
@@ -1108,19 +1113,19 @@ class Share {
if ($format == self::FORMAT_STATUSES) {
if ($itemType == 'file' || $itemType == 'folder') {
$select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `*PREFIX*share`.`parent`,'
- .' `share_type`, `file_source`, `path`, `expiration`, `storage`, `mail_send`';
+ .' `share_type`, `file_source`, `path`, `expiration`, `storage`, `share_with`, `mail_send`, `uid_owner`';
} else {
- $select = '`id`, `item_type`, `item_source`, `parent`, `share_type`, `expiration`, `mail_send`';
+ $select = '`id`, `item_type`, `item_source`, `parent`, `share_type`, `share_with`, `expiration`, `mail_send`, `uid_owner`';
}
} else {
if (isset($uidOwner)) {
if ($itemType == 'file' || $itemType == 'folder') {
$select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `*PREFIX*share`.`parent`,'
.' `share_type`, `share_with`, `file_source`, `path`, `permissions`, `stime`,'
- .' `expiration`, `token`, `storage`, `mail_send`';
+ .' `expiration`, `token`, `storage`, `mail_send`, `uid_owner`';
} else {
$select = '`id`, `item_type`, `item_source`, `parent`, `share_type`, `share_with`, `permissions`,'
- .' `stime`, `file_source`, `expiration`, `token`, `mail_send`';
+ .' `stime`, `file_source`, `expiration`, `token`, `mail_send`, `uid_owner`';
}
} else {
if ($fileDependent) {
@@ -1234,8 +1239,10 @@ class Share {
}
}
}
- if (self::expireItem($row)) {
- continue;
+ if($checkExpireDate) {
+ if (self::expireItem($row)) {
+ continue;
+ }
}
// Check if resharing is allowed, if not remove share permission
if (isset($row['permissions']) && !self::isResharingAllowed()) {