Merge branch 'master' of github.com:owncloud/core into vcategories_db

remotes/origin/stable5
Thomas Tanghus 13 years ago
commit 7d25443937
  1. 2
      apps/files/css/files.css
  2. 9
      apps/files_sharing/l10n/pt_PT.php
  3. 20
      apps/files_sharing/public.php
  4. 1
      apps/files_versions/l10n/pt_PT.php
  5. 2
      apps/user_ldap/group_ldap.php
  6. 8
      apps/user_ldap/lib/access.php
  7. 8
      core/js/share.js
  8. 2
      core/l10n/el.php
  9. 6
      core/l10n/fr.php
  10. 6
      core/l10n/ja_JP.php
  11. 6
      core/l10n/th_TH.php
  12. 10
      l10n/el/core.po
  13. 24
      l10n/fr/core.po
  14. 24
      l10n/ja_JP/core.po
  15. 21
      l10n/pt_PT/files_sharing.po
  16. 6
      l10n/pt_PT/files_versions.po
  17. 2
      l10n/templates/core.pot
  18. 2
      l10n/templates/files.pot
  19. 2
      l10n/templates/files_encryption.pot
  20. 2
      l10n/templates/files_external.pot
  21. 2
      l10n/templates/files_sharing.pot
  22. 2
      l10n/templates/files_versions.pot
  23. 2
      l10n/templates/lib.pot
  24. 2
      l10n/templates/settings.pot
  25. 2
      l10n/templates/user_ldap.pot
  26. 24
      l10n/th_TH/core.po
  27. 14
      lib/filecache.php
  28. 13
      lib/filecache/update.php
  29. 4
      lib/filesystem.php
  30. 6
      lib/search/provider/file.php
  31. 4
      lib/util.php
  32. 116
      tests/lib/filesystem.php

@ -10,7 +10,7 @@
.file_upload_form, #file_newfolder_form { display:inline; float: left; margin-left:0; }
#fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; }
.file_upload_wrapper, #file_newfolder_name { background-repeat:no-repeat; background-position:.5em .5em; padding-left:2em; }
.file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:inline-block; padding-left:0; overflow:hidden; position:relative; margin:0;}
.file_upload_wrapper { font-weight:bold; display:-moz-inline-box; /* fallback for older firefox versions*/ display:block; float:left; padding-left:0; overflow:hidden; position:relative; margin:0;}
.file_upload_wrapper .file_upload_button_wrapper { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; z-index:1000; }
#new { background-color:#5bb75b; float:left; border-top-right-radius:0; border-bottom-right-radius:0; margin:0 0 0 1em; border-right:none; z-index:1010; height:1.3em; }
#new:hover, a.file_upload_button_wrapper:hover + button.file_upload_filename { background-color:#4b964b; }

@ -0,0 +1,9 @@
<?php $TRANSLATIONS = array(
"Password" => "Palavra-Passe",
"Submit" => "Submeter",
"%s shared the folder %s with you" => "%s partilhou a pasta %s consigo",
"%s shared the file %s with you" => "%s partilhou o ficheiro %s consigo",
"Download" => "Descarregar",
"No preview available for" => "Não há pré-visualização para",
"web services under your control" => "serviços web sob o seu controlo"
);

@ -1,6 +1,26 @@
<?php
// Load other apps for file previews
OC_App::loadApps();
// Compatibility with shared-by-link items from ownCloud 4.0
// requires old Sharing table !
// support will be removed in OC 5.0,a
if (isset($_GET['token'])) {
unset($_GET['file']);
$qry = \OC_DB::prepare('SELECT `source` FROM `*PREFIX*sharing` WHERE `target` = ? LIMIT 1');
$filepath = $qry->execute(array($_GET['token']))->fetchOne();
if(isset($filepath)) {
$info = OC_FileCache_Cached::get($filepath, '');
if(strtolower($info['mimetype']) == 'httpd/unix-directory') {
$_GET['dir'] = $filepath;
} else {
$_GET['file'] = $filepath;
}
\OCP\Util::writeLog('files_sharing', 'You have files that are shared by link originating from ownCloud 4.0. Redistribute the new links, because backwards compatibility will be removed in ownCloud 5.', \OCP\Util::WARN);
}
}
// Enf of backward compatibility
if (isset($_GET['file']) || isset($_GET['dir'])) {
if (isset($_GET['dir'])) {
$type = 'folder';

@ -3,5 +3,6 @@
"History" => "Histórico",
"Versions" => "Versões",
"This will delete all existing backup versions of your files" => "Isto irá apagar todas as versões de backup do seus ficheiros",
"Files Versioning" => "Versionamento de Ficheiros",
"Enable" => "Activar"
);

@ -237,7 +237,7 @@ class GROUP_LDAP extends lib\Access implements \OCP\GroupInterface {
}
//getting dn, if false the group does not exist. If dn, it may be mapped only, requires more checking.
$dn = $this->username2dn($gid);
$dn = $this->groupname2dn($gid);
if(!$dn) {
$this->connection->writeToCache('groupExists'.$gid, false);
return false;

@ -123,7 +123,13 @@ abstract class Access {
* returns the LDAP DN for the given internal ownCloud name of the group
*/
public function groupname2dn($name) {
return $this->ocname2dn($name, false);
$dn = $this->ocname2dn($name, false);
if($dn) {
return $dn;
}
return false;
}
/**

@ -267,9 +267,13 @@ OC.Share={
if (permissions & OC.PERMISSION_SHARE) {
shareChecked = 'checked="checked"';
}
var html = '<li style="clear: both;" data-share-type="'+shareType+'" data-share-with="'+shareWith+'">';
var html = '<li style="clear: both;" data-share-type="'+shareType+'" data-share-with="'+shareWith+'" title="' + shareWith + '">';
html += '<a href="#" class="unshare" style="display:none;"><img class="svg" alt="'+t('core', 'Unshare')+'" src="'+OC.imagePath('core', 'actions/delete')+'"/></a>';
html += shareWith;
if(shareWith.length > 14){
html += shareWith.substr(0,11) + '...';
}else{
html += shareWith;
}
if (possiblePermissions & OC.PERMISSION_CREATE || possiblePermissions & OC.PERMISSION_UPDATE || possiblePermissions & OC.PERMISSION_DELETE) {
if (editChecked == '') {
html += '<label style="display:none;">';

@ -27,6 +27,7 @@
"Error while changing permissions" => "Σφάλμα κατά την αλλαγή των δικαιωμάτων",
"Shared with you and the group" => "Διαμοιρασμένο με εσένα και την ομάδα",
"by" => "από",
"Shared with you by" => "Μοιράστηκε μαζί σας από ",
"Share with" => "Διαμοιρασμός με",
"Share with link" => "Διαμοιρασμός με σύνδεσμο",
"Password protect" => "Προστασία κωδικού",
@ -36,6 +37,7 @@
"Share via email:" => "Διαμοιρασμός μέσω email:",
"No people found" => "Δεν βρέθηκε άνθρωπος",
"Resharing is not allowed" => "Ξαναμοιρασμός δεν επιτρέπεται",
"Shared in" => "Διαμοιράστηκε με",
"with" => "με",
"Unshare" => "Σταμάτημα μοιράσματος",
"can edit" => "δυνατότητα αλλαγής",

@ -25,14 +25,20 @@
"Error while sharing" => "Erreur lors de la mise en partage",
"Error while unsharing" => "Erreur lors de l'annulation du partage",
"Error while changing permissions" => "Erreur lors du changement des permissions",
"Shared with you and the group" => "Partagé avec vous ainsi qu'avec le groupe",
"by" => "par",
"Shared with you by" => "Partagé avec vous par",
"Share with" => "Partager avec",
"Share with link" => "Partager via lien",
"Password protect" => "Protéger par un mot de passe",
"Password" => "Mot de passe",
"Set expiration date" => "Spécifier la date d'expiration",
"Expiration date" => "Date d'expiration",
"Share via email:" => "Partager via e-mail :",
"No people found" => "Aucun utilisateur trouvé",
"Resharing is not allowed" => "Le repartage n'est pas autorisé",
"Shared in" => "Partagé dans",
"with" => "avec",
"Unshare" => "Ne plus partager",
"can edit" => "édition autorisée",
"access control" => "contrôle des accès",

@ -25,14 +25,20 @@
"Error while sharing" => "共有でエラー発生",
"Error while unsharing" => "共有解除でエラー発生",
"Error while changing permissions" => "権限変更でエラー発生",
"Shared with you and the group" => "あなたとグループで共有中",
"by" => "により",
"Shared with you by" => "あなたと共有",
"Share with" => "共有者",
"Share with link" => "URLリンクで共有",
"Password protect" => "パスワード保護",
"Password" => "パスワード",
"Set expiration date" => "有効期限を設定",
"Expiration date" => "有効期限",
"Share via email:" => "メール経由で共有: %s",
"No people found" => "ユーザーが見つかりません",
"Resharing is not allowed" => "再共有は許可されていません",
"Shared in" => "の中で共有中",
"with" => "と",
"Unshare" => "共有解除",
"can edit" => "編集可能",
"access control" => "アクセス権限",

@ -25,14 +25,20 @@
"Error while sharing" => "เกดขอผดพลาดในระหวางการแชรอมล",
"Error while unsharing" => "เกดขอผดพลาดในการยกเลกการแชรอมล",
"Error while changing permissions" => "เกดขอผดพลาดในการเปลยนสทธการเขาใชงาน",
"Shared with you and the group" => "แชรใหณและกลม",
"by" => "โดย",
"Shared with you by" => "แชรใหณโดย",
"Share with" => "แชรใหบ",
"Share with link" => "แชรวยลงก",
"Password protect" => "ใสรหสผานไว",
"Password" => "รหสผาน",
"Set expiration date" => "กำหนดวนทหมดอาย",
"Expiration date" => "วนทหมดอาย",
"Share via email:" => "แชรานทางอเมล",
"No people found" => "ไมพบบคคลทองการ",
"Resharing is not allowed" => "ไมอนญาตใหแชรอมลซำได",
"Shared in" => "แชรไวใน",
"with" => "ดวย",
"Unshare" => "ยกเลกการแชร",
"can edit" => "สามารถแกไข",
"access control" => "ระดบควบคมการเขาใชงาน",

@ -12,9 +12,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-09-30 02:02+0200\n"
"PO-Revision-Date: 2012-09-29 19:12+0000\n"
"Last-Translator: Efstathios Iosifidis <diamond_gr@freemail.gr>\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\n"
"PO-Revision-Date: 2012-09-30 17:27+0000\n"
"Last-Translator: Dimitris M. <monopatis@gmail.com>\n"
"Language-Team: Greek (http://www.transifex.com/projects/p/owncloud/language/el/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -137,7 +137,7 @@ msgstr "από"
#: js/share.js:132
msgid "Shared with you by"
msgstr ""
msgstr "Μοιράστηκε μαζί σας από "
#: js/share.js:137
msgid "Share with"
@ -177,7 +177,7 @@ msgstr "Ξαναμοιρασμός δεν επιτρέπεται"
#: js/share.js:250
msgid "Shared in"
msgstr ""
msgstr "Διαμοιράστηκε με"
#: js/share.js:250
msgid "with"

@ -14,9 +14,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-09-28 23:34+0200\n"
"PO-Revision-Date: 2012-09-28 21:34+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\n"
"PO-Revision-Date: 2012-09-30 15:52+0000\n"
"Last-Translator: Romain DEP. <rom1dep@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/projects/p/owncloud/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -131,15 +131,15 @@ msgstr "Erreur lors du changement des permissions"
#: js/share.js:130
msgid "Shared with you and the group"
msgstr ""
msgstr "Partagé avec vous ainsi qu'avec le groupe"
#: js/share.js:130
msgid "by"
msgstr ""
msgstr "par"
#: js/share.js:132
msgid "Shared with you by"
msgstr ""
msgstr "Partagé avec vous par"
#: js/share.js:137
msgid "Share with"
@ -167,7 +167,7 @@ msgstr "Date d'expiration"
#: js/share.js:185
msgid "Share via email:"
msgstr ""
msgstr "Partager via e-mail :"
#: js/share.js:187
msgid "No people found"
@ -179,11 +179,11 @@ msgstr "Le repartage n'est pas autorisé"
#: js/share.js:250
msgid "Shared in"
msgstr ""
msgstr "Partagé dans"
#: js/share.js:250
msgid "with"
msgstr ""
msgstr "avec"
#: js/share.js:271
msgid "Unshare"
@ -250,7 +250,7 @@ msgstr "Nom d'utilisateur ou e-mail invalide"
msgid "Username"
msgstr "Nom d'utilisateur"
#: lostpassword/templates/lostpassword.php:15
#: lostpassword/templates/lostpassword.php:14
msgid "Request reset"
msgstr "Demander la réinitialisation"
@ -363,11 +363,11 @@ msgstr "Se déconnecter"
msgid "Lost your password?"
msgstr "Mot de passe perdu ?"
#: templates/login.php:17
#: templates/login.php:16
msgid "remember"
msgstr "se souvenir de moi"
#: templates/login.php:18
#: templates/login.php:17
msgid "Log in"
msgstr "Connexion"

@ -9,9 +9,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-09-28 23:34+0200\n"
"PO-Revision-Date: 2012-09-28 21:34+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\n"
"PO-Revision-Date: 2012-09-30 12:40+0000\n"
"Last-Translator: ttyn <tetuyano+transi@gmail.com>\n"
"Language-Team: Japanese (Japan) (http://www.transifex.com/projects/p/owncloud/language/ja_JP/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -126,15 +126,15 @@ msgstr "権限変更でエラー発生"
#: js/share.js:130
msgid "Shared with you and the group"
msgstr ""
msgstr "あなたとグループで共有中"
#: js/share.js:130
msgid "by"
msgstr ""
msgstr "により"
#: js/share.js:132
msgid "Shared with you by"
msgstr ""
msgstr "あなたと共有"
#: js/share.js:137
msgid "Share with"
@ -162,7 +162,7 @@ msgstr "有効期限"
#: js/share.js:185
msgid "Share via email:"
msgstr ""
msgstr "メール経由で共有: %s"
#: js/share.js:187
msgid "No people found"
@ -174,11 +174,11 @@ msgstr "再共有は許可されていません"
#: js/share.js:250
msgid "Shared in"
msgstr ""
msgstr "の中で共有中"
#: js/share.js:250
msgid "with"
msgstr ""
msgstr ""
#: js/share.js:271
msgid "Unshare"
@ -245,7 +245,7 @@ msgstr "ログインに失敗しました!"
msgid "Username"
msgstr "ユーザ名"
#: lostpassword/templates/lostpassword.php:15
#: lostpassword/templates/lostpassword.php:14
msgid "Request reset"
msgstr "リセットを要求します。"
@ -358,11 +358,11 @@ msgstr "ログアウト"
msgid "Lost your password?"
msgstr "パスワードを忘れましたか?"
#: templates/login.php:17
#: templates/login.php:16
msgid "remember"
msgstr "パスワードを記憶する"
#: templates/login.php:18
#: templates/login.php:17
msgid "Log in"
msgstr "ログイン"

@ -3,13 +3,14 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Duarte Velez Grilo <duartegrilo@gmail.com>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-09-22 01:14+0200\n"
"PO-Revision-Date: 2012-09-21 23:15+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\n"
"PO-Revision-Date: 2012-09-30 22:25+0000\n"
"Last-Translator: Duarte Velez Grilo <duartegrilo@gmail.com>\n"
"Language-Team: Portuguese (Portugal) (http://www.transifex.com/projects/p/owncloud/language/pt_PT/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -19,30 +20,30 @@ msgstr ""
#: templates/authenticate.php:4
msgid "Password"
msgstr ""
msgstr "Palavra-Passe"
#: templates/authenticate.php:6
msgid "Submit"
msgstr ""
msgstr "Submeter"
#: templates/public.php:9
#, php-format
msgid "%s shared the folder %s with you"
msgstr ""
msgstr "%s partilhou a pasta %s consigo"
#: templates/public.php:11
#, php-format
msgid "%s shared the file %s with you"
msgstr ""
msgstr "%s partilhou o ficheiro %s consigo"
#: templates/public.php:14 templates/public.php:30
msgid "Download"
msgstr ""
msgstr "Descarregar"
#: templates/public.php:29
msgid "No preview available for"
msgstr ""
msgstr "Não há pré-visualização para"
#: templates/public.php:37
msgid "web services under your control"
msgstr ""
msgstr "serviços web sob o seu controlo"

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-09-27 02:01+0200\n"
"PO-Revision-Date: 2012-09-26 13:15+0000\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\n"
"PO-Revision-Date: 2012-09-30 22:21+0000\n"
"Last-Translator: Duarte Velez Grilo <duartegrilo@gmail.com>\n"
"Language-Team: Portuguese (Portugal) (http://www.transifex.com/projects/p/owncloud/language/pt_PT/)\n"
"MIME-Version: 1.0\n"
@ -36,7 +36,7 @@ msgstr "Isto irá apagar todas as versões de backup do seus ficheiros"
#: templates/settings.php:3
msgid "Files Versioning"
msgstr ""
msgstr "Versionamento de Ficheiros"
#: templates/settings.php:4
msgid "Enable"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-30 02:02+0200\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-30 02:02+0200\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-30 02:02+0200\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-30 02:02+0200\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-30 02:02+0200\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-30 02:02+0200\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-30 02:03+0200\n"
"POT-Creation-Date: 2012-10-01 02:05+0200\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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-30 02:03+0200\n"
"POT-Creation-Date: 2012-10-01 02:05+0200\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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-09-30 02:02+0200\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\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"

@ -9,9 +9,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-09-28 23:34+0200\n"
"PO-Revision-Date: 2012-09-28 21:34+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n"
"POT-Creation-Date: 2012-10-01 02:04+0200\n"
"PO-Revision-Date: 2012-09-30 07:07+0000\n"
"Last-Translator: AriesAnywhere Anywhere <ariesanywhere@gmail.com>\n"
"Language-Team: Thai (Thailand) (http://www.transifex.com/projects/p/owncloud/language/th_TH/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -126,15 +126,15 @@ msgstr "เกดขอผดพลาดในการเปล
#: js/share.js:130
msgid "Shared with you and the group"
msgstr ""
msgstr "แชรใหณและกล"
#: js/share.js:130
msgid "by"
msgstr ""
msgstr "โดย"
#: js/share.js:132
msgid "Shared with you by"
msgstr ""
msgstr "แชรใหณโดย"
#: js/share.js:137
msgid "Share with"
@ -162,7 +162,7 @@ msgstr "วนทหมดอาย"
#: js/share.js:185
msgid "Share via email:"
msgstr ""
msgstr "แชรานทางอเมล"
#: js/share.js:187
msgid "No people found"
@ -174,11 +174,11 @@ msgstr "ไมอนญาตใหแชรอมลซ
#: js/share.js:250
msgid "Shared in"
msgstr ""
msgstr "แชรไวใน"
#: js/share.js:250
msgid "with"
msgstr ""
msgstr "วย"
#: js/share.js:271
msgid "Unshare"
@ -245,7 +245,7 @@ msgstr "ไมสามารถเขาสระบบได!"
msgid "Username"
msgstr "ชอผใชงาน"
#: lostpassword/templates/lostpassword.php:15
#: lostpassword/templates/lostpassword.php:14
msgid "Request reset"
msgstr "ขอเปลยนรหสใหม"
@ -358,11 +358,11 @@ msgstr "ออกจากระบบ"
msgid "Lost your password?"
msgstr "ลมรหสผาน?"
#: templates/login.php:17
#: templates/login.php:16
msgid "remember"
msgstr "จำรหสผาน"
#: templates/login.php:18
#: templates/login.php:17
msgid "Log in"
msgstr "เขาสระบบ"

@ -488,6 +488,20 @@ class OC_FileCache{
$query->execute();
}
}
/**
* trigger an update for the cache by setting the mtimes to 0
* @param string $user (optional)
*/
public static function triggerUpdate($user=''){
if($user) {
$query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 WHERE `user`=? AND `mimetype`="httpd/unix-directory"');
$query->execute(array($user));
}else{
$query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 AND `mimetype`="httpd/unix-directory"');
$query->execute();
}
}
}
//watch for changes and try to keep the cache up to date

@ -81,10 +81,13 @@ class OC_FileCache_Update{
$dh=$view->opendir($path.'/');
if($dh) {//check for changed/new files
while (($filename = readdir($dh)) !== false) {
if($filename != '.' and $filename != '..') {
if($filename != '.' and $filename != '..' and $filename != '') {
$file=$path.'/'.$filename;
if(self::hasUpdated($file, $root)) {
if($root===false) {//filesystem hooks are only valid for the default root
$isDir=$view->is_dir($file);
if(self::hasUpdated($file, $root, $isDir)) {
if($isDir){
self::updateFolder($file, $root);
}elseif($root===false) {//filesystem hooks are only valid for the default root
OC_Hook::emit('OC_Filesystem', 'post_write', array('path'=>$file));
}else{
self::update($file, $root);
@ -136,7 +139,7 @@ class OC_FileCache_Update{
}
/**
* update the filecache according to changes to the fileysystem
* update the filecache according to changes to the filesystem
* @param string path
* @param string root (optional)
*/
@ -211,4 +214,4 @@ class OC_FileCache_Update{
OC_FileCache::increaseSize(dirname($newPath), $oldSize, $root);
OC_FileCache::move($oldPath, $newPath);
}
}
}

@ -240,7 +240,7 @@ class OC_Filesystem{
$mtime=filemtime(OC::$SERVERROOT.'/config/mount.php');
$previousMTime=OC_Appconfig::getValue('files','mountconfigmtime',0);
if($mtime>$previousMTime) {//mount config has changed, filecache needs to be updated
OC_FileCache::clear();
OC_FileCache::triggerUpdate();
OC_Appconfig::setValue('files','mountconfigmtime',$mtime);
}
}
@ -531,7 +531,7 @@ class OC_Filesystem{
if ($root) { // reduce path to the required part of it (no 'username/files')
$fakeRootView = new OC_FilesystemView($root);
$count = 1;
$path=str_replace(OC_App::getStorage("files")->getAbsolutePath(), "", $fakeRootView->getAbsolutePath($path), $count);
$path=str_replace(OC_App::getStorage("files")->getAbsolutePath($path), "", $fakeRootView->getAbsolutePath($path), $count);
}
$path = self::normalizePath($path);

@ -10,6 +10,7 @@ class OC_Search_Provider_File extends OC_Search_Provider{
$name = basename($path);
$text = '';
$skip = false;
if($mime=='httpd/unix-directory') {
$link = OC_Helper::linkTo( 'files', 'index.php', array('dir' => $path));
$type = 'Files';
@ -18,6 +19,7 @@ class OC_Search_Provider_File extends OC_Search_Provider{
$mimeBase = $fileData['mimepart'];
switch($mimeBase) {
case 'audio':
$skip = true;
break;
case 'text':
$type = 'Text';
@ -33,7 +35,9 @@ class OC_Search_Provider_File extends OC_Search_Provider{
}
}
}
$results[] = new OC_Search_Result($name, $text, $link, $type);
if(!$skip) {
$results[] = new OC_Search_Result($name, $text, $link, $type);
}
}
return $results;
}

@ -62,7 +62,7 @@ class OC_Util {
$mtime=filemtime($user_root.'/mount.php');
$previousMTime=OC_Preferences::getValue($user,'files','mountconfigmtime',0);
if($mtime>$previousMTime) {//mount config has changed, filecache needs to be updated
OC_FileCache::clear($user);
OC_FileCache::triggerUpdate($user);
OC_Preferences::setValue($user,'files','mountconfigmtime',$mtime);
}
}
@ -574,4 +574,4 @@ class OC_Util {
}
return $pseudo_byte;
}
}
}

@ -1,26 +1,26 @@
<?php
/**
* ownCloud
*
* @author Robin Appelman
* @copyright 2012 Robin Appelman icewind@owncloud.com
*
* 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
* 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/>.
*
*/
* ownCloud
*
* @author Robin Appelman
* @copyright 2012 Robin Appelman icewind@owncloud.com
*
* 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
* 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/>.
*
*/
class Test_Filesystem extends UnitTestCase{
class Test_Filesystem extends UnitTestCase {
/**
* @var array tmpDirs
*/
@ -30,47 +30,71 @@ class Test_Filesystem extends UnitTestCase{
* @return array
*/
private function getStorageData() {
$dir=OC_Helper::tmpFolder();
$this->tmpDirs[]=$dir;
return array('datadir'=>$dir);
$dir = OC_Helper::tmpFolder();
$this->tmpDirs[] = $dir;
return array('datadir' => $dir);
}
public function tearDown() {
foreach($this->tmpDirs as $dir) {
foreach ($this->tmpDirs as $dir) {
OC_Helper::rmdirr($dir);
}
}
public function setUp() {
OC_Filesystem::clearMounts();
}
public function testMount() {
OC_Filesystem::mount('OC_Filestorage_Local',self::getStorageData(),'/');
$this->assertEqual('/',OC_Filesystem::getMountPoint('/'));
$this->assertEqual('/',OC_Filesystem::getMountPoint('/some/folder'));
$this->assertEqual('',OC_Filesystem::getInternalPath('/'));
$this->assertEqual('some/folder',OC_Filesystem::getInternalPath('/some/folder'));
OC_Filesystem::mount('OC_Filestorage_Local', self::getStorageData(), '/');
$this->assertEqual('/', OC_Filesystem::getMountPoint('/'));
$this->assertEqual('/', OC_Filesystem::getMountPoint('/some/folder'));
$this->assertEqual('', OC_Filesystem::getInternalPath('/'));
$this->assertEqual('some/folder', OC_Filesystem::getInternalPath('/some/folder'));
OC_Filesystem::mount('OC_Filestorage_Local',self::getStorageData(),'/some');
$this->assertEqual('/',OC_Filesystem::getMountPoint('/'));
$this->assertEqual('/some/',OC_Filesystem::getMountPoint('/some/folder'));
$this->assertEqual('/some/',OC_Filesystem::getMountPoint('/some/'));
$this->assertEqual('/',OC_Filesystem::getMountPoint('/some'));
$this->assertEqual('folder',OC_Filesystem::getInternalPath('/some/folder'));
OC_Filesystem::mount('OC_Filestorage_Local', self::getStorageData(), '/some');
$this->assertEqual('/', OC_Filesystem::getMountPoint('/'));
$this->assertEqual('/some/', OC_Filesystem::getMountPoint('/some/folder'));
$this->assertEqual('/some/', OC_Filesystem::getMountPoint('/some/'));
$this->assertEqual('/', OC_Filesystem::getMountPoint('/some'));
$this->assertEqual('folder', OC_Filesystem::getInternalPath('/some/folder'));
}
public function testNormalize() {
$this->assertEqual('/path',OC_Filesystem::normalizePath('/path/'));
$this->assertEqual('/path/',OC_Filesystem::normalizePath('/path/',false));
$this->assertEqual('/path',OC_Filesystem::normalizePath('path'));
$this->assertEqual('/path',OC_Filesystem::normalizePath('\path'));
$this->assertEqual('/foo/bar',OC_Filesystem::normalizePath('/foo//bar/'));
$this->assertEqual('/foo/bar',OC_Filesystem::normalizePath('/foo////bar'));
if(class_exists('Normalizer')) {
$this->assertEqual("/foo/bar\xC3\xBC",OC_Filesystem::normalizePath("/foo/baru\xCC\x88"));
$this->assertEqual('/path', OC_Filesystem::normalizePath('/path/'));
$this->assertEqual('/path/', OC_Filesystem::normalizePath('/path/', false));
$this->assertEqual('/path', OC_Filesystem::normalizePath('path'));
$this->assertEqual('/path', OC_Filesystem::normalizePath('\path'));
$this->assertEqual('/foo/bar', OC_Filesystem::normalizePath('/foo//bar/'));
$this->assertEqual('/foo/bar', OC_Filesystem::normalizePath('/foo////bar'));
if (class_exists('Normalizer')) {
$this->assertEqual("/foo/bar\xC3\xBC", OC_Filesystem::normalizePath("/foo/baru\xCC\x88"));
}
}
}
?>
public function testHooks() {
$user = OC_User::getUser();
OC_Hook::clear('OC_Filesystem');
OC_Hook::connect('OC_Filesystem', 'post_write', $this, 'dummyHook');
OC_Filesystem::mount('OC_Filestorage_Temporary', array(), '/');
$rootView=new OC_FilesystemView('');
$rootView->mkdir('/'.$user);
$rootView->mkdir('/'.$user.'/files');
OC_Filesystem::file_put_contents('/foo', 'foo');
OC_Filesystem::mkdir('/bar');
OC_Filesystem::file_put_contents('/bar//foo', 'foo');
$tmpFile = OC_Helper::tmpFile();
file_put_contents($tmpFile, 'foo');
$fh = fopen($tmpFile, 'r');
OC_Filesystem::file_put_contents('/bar//foo', $fh);
}
public function dummyHook($arguments) {
$path = $arguments['path'];
$this->assertEqual($path, OC_Filesystem::normalizePath($path)); //the path passed to the hook should already be normalized
}
}

Loading…
Cancel
Save