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

remotes/origin/stable5
Thomas Tanghus 13 years ago
commit 972ba89bc2
  1. 23
      apps/files/js/files.js
  2. 1
      apps/files/l10n/pl.php
  3. 4
      apps/files_sharing/public.php
  4. 12
      apps/user_ldap/lib/access.php
  5. 2
      apps/user_ldap/lib/connection.php
  6. 5
      apps/user_ldap/user_ldap.php
  7. 1
      core/css/styles.css
  8. 26
      core/js/js.js
  9. 10
      l10n/pl/files.po
  10. 20
      l10n/si_LK/settings.po
  11. 2
      l10n/templates/core.pot
  12. 2
      l10n/templates/files.pot
  13. 2
      l10n/templates/files_encryption.pot
  14. 2
      l10n/templates/files_external.pot
  15. 2
      l10n/templates/files_sharing.pot
  16. 2
      l10n/templates/files_versions.pot
  17. 10
      l10n/templates/lib.pot
  18. 2
      l10n/templates/settings.pot
  19. 2
      l10n/templates/user_ldap.pot
  20. 8
      lib/filecache.php
  21. 17
      lib/files.php
  22. 4
      lib/filesystem.php
  23. 5
      settings/l10n/si_LK.php

@ -722,7 +722,7 @@ var folderDropOptions={
}
var crumbDropOptions={
drop: function( event, ui ) {
var file=ui.draggable.text().trim();
var file=ui.draggable.parent().data('file');
var target=$(this).data('dir');
var dir=$('#dir').val();
while(dir.substr(0,1)=='/'){//remove extra leading /'s
@ -829,27 +829,6 @@ function getSelectedFiles(property){
return files;
}
function relative_modified_date(timestamp) {
var timediff = Math.round((new Date()).getTime() / 1000) - timestamp;
var diffminutes = Math.round(timediff/60);
var diffhours = Math.round(diffminutes/60);
var diffdays = Math.round(diffhours/24);
var diffmonths = Math.round(diffdays/31);
if(timediff < 60) { return t('files','seconds ago'); }
else if(timediff < 120) { return t('files','1 minute ago'); }
else if(timediff < 3600) { return t('files','{minutes} minutes ago',{minutes: diffminutes}); }
//else if($timediff < 7200) { return '1 hour ago'; }
//else if($timediff < 86400) { return $diffhours.' hours ago'; }
else if(timediff < 86400) { return t('files','today'); }
else if(timediff < 172800) { return t('files','yesterday'); }
else if(timediff < 2678400) { return t('files','{days} days ago',{days: diffdays}); }
else if(timediff < 5184000) { return t('files','last month'); }
//else if($timediff < 31556926) { return $diffmonths.' months ago'; }
else if(timediff < 31556926) { return t('files','months ago'); }
else if(timediff < 63113852) { return t('files','last year'); }
else { return t('files','years ago'); }
}
function getMimeIcon(mime, ready){
if(getMimeIcon.cache[mime]){
ready(getMimeIcon.cache[mime]);

@ -58,6 +58,7 @@
"New" => "Nowy",
"Text file" => "Plik tekstowy",
"Folder" => "Katalog",
"From link" => "Z linku",
"Upload" => "Prześlij",
"Cancel upload" => "Przestań wysyłać",
"Nothing in here. Upload something!" => "Brak zawartości. Proszę wysłać pliki!",

@ -70,9 +70,9 @@ if (isset($_GET['file']) || isset($_GET['dir'])) {
if (isset($linkItem['share_with'])) {
// Check password
if (isset($_GET['file'])) {
$url = OCP\Util::linkToPublic('files').'&file='.$_GET['file'];
$url = OCP\Util::linkToPublic('files').'&file='.urlencode($_GET['file']);
} else {
$url = OCP\Util::linkToPublic('files').'&dir='.$_GET['dir'];
$url = OCP\Util::linkToPublic('files').'&dir='.urlencode($_GET['dir']);
}
if (isset($_POST['password'])) {
$password = $_POST['password'];

@ -40,9 +40,11 @@ abstract class Access {
* @brief reads a given attribute for an LDAP record identified by a DN
* @param $dn the record in question
* @param $attr the attribute that shall be retrieved
* @returns the values in an array on success, false otherwise
* if empty, just check the record's existence
* @returns an array of values on success or an empty
* array if $attr is empty, false otherwise
*
* Reads an attribute from an LDAP entry
* Reads an attribute from an LDAP entry or check if entry exists
*/
public function readAttribute($dn, $attr, $filter = 'objectClass=*') {
if(!$this->checkConnection()) {
@ -57,10 +59,14 @@ abstract class Access {
}
$rr = @ldap_read($cr, $dn, $filter, array($attr));
if(!is_resource($rr)) {
\OCP\Util::writeLog('user_ldap', 'readAttribute '.$attr.' failed for DN '.$dn, \OCP\Util::DEBUG);
\OCP\Util::writeLog('user_ldap', 'readAttribute failed for DN '.$dn, \OCP\Util::DEBUG);
//in case an error occurs , e.g. object does not exist
return false;
}
if (empty($attr)) {
\OCP\Util::writeLog('user_ldap', 'readAttribute: '.$dn.' found', \OCP\Util::DEBUG);
return array();
}
$er = ldap_first_entry($cr, $rr);
if(!is_resource($er)) {
//did not match the filter, return false

@ -89,7 +89,7 @@ class Connection {
\OCP\Util::writeLog('user_ldap', 'Set config ldapUuidAttribute to '.$value, \OCP\Util::DEBUG);
$this->config[$name] = $value;
if(!empty($this->configID)) {
\OCP\Config::getAppValue($this->configID, 'ldap_uuid_attribute', $value);
\OCP\Config::setAppValue($this->configID, 'ldap_uuid_attribute', $value);
}
$changed = true;
}

@ -149,9 +149,8 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
return false;
}
//if user really still exists, we will be able to read his objectclass
$objcs = $this->readAttribute($dn, 'objectclass');
if(!$objcs || empty($objcs)) {
//check if user really still exists by reading its entry
if(!is_array($this->readAttribute($dn, ''))) {
$this->connection->writeToCache('userExists'.$uid, false);
return false;
}

@ -44,6 +44,7 @@ textarea:hover, textarea:focus, textarea:active { background-color:#fff; color:#
input[type="submit"], input[type="button"], button, .button, #quota, div.jp-progress, select, .pager li a { width:auto; padding:.4em; border:1px solid #ddd; font-weight:bold; cursor:pointer; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
input[type="submit"]:hover, input[type="submit"]:focus, input[type="button"]:hover, select:hover, select:focus, select:active, input[type="button"]:focus, .button:hover { background:#fff; color:#333; }
input[type="submit"] img, input[type="button"] img, button img, .button img { cursor:pointer; }
input[type="checkbox"] { width:auto; }
#quota { cursor:default; }

@ -649,7 +649,7 @@ $.fn.filterAttr = function(attr_name, attr_value) {
function humanFileSize(size) {
var humanList = ['B', 'kB', 'MB', 'GB', 'TB'];
// Calculate Log with base 1024: size = 1024 ** order
var order = Math.floor(Math.log(size) / Math.log(1024));
var order = size?Math.floor(Math.log(size) / Math.log(1024)):0;
// Stay in range of the byte sizes that are defined
order = Math.min(humanList.length - 1, order);
var readableFormat = humanList[order];
@ -675,6 +675,30 @@ function formatDate(date){
return $.datepicker.formatDate(datepickerFormatDate, date)+' '+date.getHours()+':'+((date.getMinutes()<10)?'0':'')+date.getMinutes();
}
/* takes an absolute timestamp and return a string with a human-friendly relative date
* @param int a Unix timestamp
*/
function relative_modified_date(timestamp) {
var timediff = Math.round((new Date()).getTime() / 1000) - timestamp;
var diffminutes = Math.round(timediff/60);
var diffhours = Math.round(diffminutes/60);
var diffdays = Math.round(diffhours/24);
var diffmonths = Math.round(diffdays/31);
if(timediff < 60) { return t('core','seconds ago'); }
else if(timediff < 120) { return t('core','1 minute ago'); }
else if(timediff < 3600) { return t('core','{minutes} minutes ago',{minutes: diffminutes}); }
//else if($timediff < 7200) { return '1 hour ago'; }
//else if($timediff < 86400) { return $diffhours.' hours ago'; }
else if(timediff < 86400) { return t('core','today'); }
else if(timediff < 172800) { return t('core','yesterday'); }
else if(timediff < 2678400) { return t('core','{days} days ago',{days: diffdays}); }
else if(timediff < 5184000) { return t('core','last month'); }
//else if($timediff < 31556926) { return $diffmonths.' months ago'; }
else if(timediff < 31556926) { return t('core','months ago'); }
else if(timediff < 63113852) { return t('core','last year'); }
else { return t('core','years ago'); }
}
/**
* get a variable by name
* @param string name

@ -13,9 +13,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-11-03 00:00+0100\n"
"PO-Revision-Date: 2012-11-01 23:21+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n"
"POT-Creation-Date: 2012-11-07 00:01+0100\n"
"PO-Revision-Date: 2012-11-05 23:19+0000\n"
"Last-Translator: emc <mplichta@gmail.com>\n"
"Language-Team: Polish (http://www.transifex.com/projects/p/owncloud/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -65,7 +65,7 @@ msgstr "Nie udostępniaj"
msgid "Delete"
msgstr "Usuwa element"
#: js/fileactions.js:178
#: js/fileactions.js:172
msgid "Rename"
msgstr "Zmień nazwę"
@ -264,7 +264,7 @@ msgstr "Katalog"
#: templates/index.php:11
msgid "From link"
msgstr ""
msgstr "Z linku"
#: templates/index.php:22
msgid "Upload"

@ -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-02 00:04+0100\n"
"PO-Revision-Date: 2012-11-01 08:56+0000\n"
"POT-Creation-Date: 2012-11-07 00:01+0100\n"
"PO-Revision-Date: 2012-11-06 05:39+0000\n"
"Last-Translator: Anushke Guneratne <anushke@gmail.com>\n"
"Language-Team: Sinhala (Sri Lanka) (http://www.transifex.com/projects/p/owncloud/language/si_LK/)\n"
"MIME-Version: 1.0\n"
@ -46,7 +46,7 @@ msgstr "අවල-තල"
#: ajax/openid.php:13
msgid "OpenID Changed"
msgstr ""
msgstr "ත හම නතහ OpenID වනසය."
#: ajax/openid.php:15 ajax/setlanguage.php:17 ajax/setlanguage.php:20
msgid "Invalid request"
@ -58,7 +58,7 @@ msgstr "කණයම මමට නක"
#: ajax/removeuser.php:15 ajax/setquota.php:15 ajax/togglegroups.php:12
msgid "Authentication error"
msgstr ""
msgstr "සතපන දෂයක"
#: ajax/removeuser.php:24
msgid "Unable to delete user"
@ -105,7 +105,7 @@ msgid ""
"strongly suggest that you configure your webserver in a way that the data "
"directory is no longer accessible or you move the data directory outside the"
" webserver document root."
msgstr ""
msgstr "ඔබග දතත ඩටරය හවලට අනතරලයය හක. ownCloud සපය ඇත .htaccess ගව කකරනත. අප තරය නම, මම දතත හ එසමට න වන ලස ඔබයකයස කරන ලස හ එම ඩටරය වලයටතට ගනයන ලසය."
#: templates/admin.php:31
msgid "Cron"
@ -213,15 +213,15 @@ msgstr "වල ග කළමණකරනය"
msgid "Ask a question"
msgstr "පරශණයක අසනන"
#: templates/help.php:23
#: templates/help.php:22
msgid "Problems connecting to help database."
msgstr "උදව දතත ගබඩව හ සමබනධවටළ ඇතය."
#: templates/help.php:24
#: templates/help.php:23
msgid "Go there manually."
msgstr ""
msgstr "වශක එතනට යන"
#: templates/help.php:32
#: templates/help.php:31
msgid "Answer"
msgstr "පර"
@ -284,7 +284,7 @@ msgstr "පරවරථන සහය"
#: templates/personal.php:51
msgid "use this address to connect to your ownCloud in your file manager"
msgstr ""
msgstr "ඔබග කළමනකර ownCloudයට සමබනධ කමට මම ලනය භ කරන"
#: templates/users.php:21 templates/users.php:76
msgid "Name"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-06 00:00+0100\n"
"POT-Creation-Date: 2012-11-07 00:01+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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-06 00:00+0100\n"
"POT-Creation-Date: 2012-11-07 00:01+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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-06 00:00+0100\n"
"POT-Creation-Date: 2012-11-07 00:01+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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-06 00:00+0100\n"
"POT-Creation-Date: 2012-11-07 00:01+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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-06 00:00+0100\n"
"POT-Creation-Date: 2012-11-07 00:01+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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-06 00:00+0100\n"
"POT-Creation-Date: 2012-11-07 00:01+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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-06 00:00+0100\n"
"POT-Creation-Date: 2012-11-07 00:01+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"
@ -41,19 +41,19 @@ msgstr ""
msgid "Admin"
msgstr ""
#: files.php:328
#: files.php:331
msgid "ZIP download is turned off."
msgstr ""
#: files.php:329
#: files.php:332
msgid "Files need to be downloaded one by one."
msgstr ""
#: files.php:329 files.php:354
#: files.php:332 files.php:357
msgid "Back to Files"
msgstr ""
#: files.php:353
#: files.php:356
msgid "Selected files too large to generate zip file."
msgstr ""

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-06 00:00+0100\n"
"POT-Creation-Date: 2012-11-07 00:01+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"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-06 00:00+0100\n"
"POT-Creation-Date: 2012-11-07 00:01+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"

@ -502,11 +502,11 @@ class OC_FileCache{
*/
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));
$query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 WHERE `user`=? AND `mimetype`= ? ');
$query->execute(array($user,'httpd/unix-directory'));
}else{
$query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 AND `mimetype`="httpd/unix-directory"');
$query->execute();
$query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 AND `mimetype`= ? ');
$query->execute(array('httpd/unix-directory'));
}
}
}

@ -45,13 +45,16 @@ class OC_Files {
if (($path == '/Shared' || substr($path, 0, 8) == '/Shared/') && OC_App::isEnabled('files_sharing')) {
if ($path == '/Shared') {
list($info) = OCP\Share::getItemsSharedWith('file', OC_Share_Backend_File::FORMAT_FILE_APP_ROOT);
}else{
$info['size'] = OC_Filesystem::filesize($path);
$info['mtime'] = OC_Filesystem::filemtime($path);
$info['ctime'] = OC_Filesystem::filectime($path);
$info['mimetype'] = OC_Filesystem::getMimeType($path);
$info['encrypted'] = false;
$info['versioned'] = false;
} else {
$info = array();
if (OC_Filesystem::file_exists($path)) {
$info['size'] = OC_Filesystem::filesize($path);
$info['mtime'] = OC_Filesystem::filemtime($path);
$info['ctime'] = OC_Filesystem::filectime($path);
$info['mimetype'] = OC_Filesystem::getMimeType($path);
$info['encrypted'] = false;
$info['versioned'] = false;
}
}
} else {
$info = OC_FileCache::get($path);

@ -232,8 +232,8 @@ class OC_Filesystem{
}
if(isset($mountConfig['user'])) {
foreach($mountConfig['user'] as $user=>$mounts) {
if($user==='all' or strtolower($user)===strtolower($user)) {
foreach($mountConfig['user'] as $mountUser=>$mounts) {
if($user==='all' or strtolower($mountUser)===strtolower($user)) {
foreach($mounts as $mountPoint=>$options) {
$mountPoint=self::setUserVars($mountPoint, $user);
foreach($options as &$option) {

@ -4,8 +4,10 @@
"Could not enable app. " => "යම සකය කළ නය.",
"Email saved" => "ව-තල සරකන ලද",
"Invalid email" => "අවල-තල",
"OpenID Changed" => "වත හම නතහ OpenID වනසය.",
"Invalid request" => "අවල අයදම",
"Unable to delete group" => "කණයම මමට නක",
"Authentication error" => "සතපන දෂයක",
"Unable to delete user" => "පරලකයමට නක",
"Language changed" => "භවනසම",
"Unable to add user to group %s" => "පරලකය %s කණයමට එකත කළ නක",
@ -14,6 +16,7 @@
"Enable" => "කයතමක කරනන",
"Saving..." => "ස පවත...",
"Security Warning" => "ආරකෂක නදනයක",
"Your data directory and your files are probably accessible from the internet. The .htaccess file that ownCloud provides is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." => "ඔබග දතත ඩටරය හවලට අනතරලයය හක. ownCloud සපය ඇත .htaccess ගව කකරනත. අප තරය නම, මම දතත හ එසමට න වන ලස ඔබයකයස කරන ලස හ එම ඩටරය වලයටතට ගනයන ලසය.",
"Sharing" => "හවමම",
"Allow links" => "ය සලසනන",
"Allow resharing" => "යළ යළවමවට අවසර ද",
@ -29,6 +32,7 @@
"Managing Big Files" => "වල ග කළමණකරනය",
"Ask a question" => "පරශණයක අසනන",
"Problems connecting to help database." => "උදව දතත ගබඩව හ සමබනධවටළ ඇතය.",
"Go there manually." => "සවශක එතනට යනන",
"Answer" => "පර",
"You have used <strong>%s</strong> of the available <strong>%s<strong>" => "ඔබ <strong>%s</strong> කර ඇත. මරමණය <strong>%s</strong>",
"Download" => "භගත කරනන",
@ -43,6 +47,7 @@
"Fill in an email address to enable password recovery" => "මරපද පරතපනය සඳහතර ලබන",
"Language" => "භව",
"Help translate" => "පරවරථන සහය",
"use this address to connect to your ownCloud in your file manager" => "ඔබග කළමනකර ownCloudයට සමබනධ කමට මම ලනය භ කරනන",
"Name" => "නමය",
"Password" => "මරපදය",
"Groups" => "සමහය",

Loading…
Cancel
Save