diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-03-19 14:43:55 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-03-19 14:43:55 +0100 |
commit | 9dd3dcc5cda3b99fda45dc4ae4721afabaef9695 (patch) | |
tree | 7b584763adbe8ce4f687e754fa38eee1d94c7a67 /lib | |
parent | 7a2396208fad5a28fd504df3ff6f15d92323e503 (diff) | |
parent | aa3973d365a5cefccbf42bcc445d1fce6cad033e (diff) | |
download | nextcloud-server-9dd3dcc5cda3b99fda45dc4ae4721afabaef9695.tar.gz nextcloud-server-9dd3dcc5cda3b99fda45dc4ae4721afabaef9695.zip |
Merge branch 'master' into fixing-windows-datadir-master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 4 | ||||
-rw-r--r-- | lib/config.php | 6 | ||||
-rw-r--r-- | lib/db.php | 6 | ||||
-rw-r--r-- | lib/files.php | 2 | ||||
-rw-r--r-- | lib/files/cache/cache.php | 5 | ||||
-rw-r--r-- | lib/files/cache/scanner.php | 1 | ||||
-rw-r--r-- | lib/files/cache/updater.php | 43 | ||||
-rw-r--r-- | lib/files/cache/upgrade.php | 40 | ||||
-rw-r--r-- | lib/files/filesystem.php | 1 | ||||
-rw-r--r-- | lib/files/mapper.php | 18 | ||||
-rw-r--r-- | lib/files/storage/local.php | 6 | ||||
-rw-r--r-- | lib/files/storage/mappedlocal.php | 9 | ||||
-rw-r--r-- | lib/helper.php | 22 | ||||
-rw-r--r-- | lib/l10n/ar.php | 46 | ||||
-rw-r--r-- | lib/l10n/fa.php | 1 | ||||
-rw-r--r-- | lib/l10n/nl.php | 2 | ||||
-rw-r--r-- | lib/l10n/tr.php | 1 | ||||
-rw-r--r-- | lib/l10n/zh_CN.php | 34 | ||||
-rw-r--r-- | lib/l10n/zh_HK.php | 13 | ||||
-rw-r--r-- | lib/templatelayout.php | 9 | ||||
-rwxr-xr-x | lib/util.php | 2 |
21 files changed, 208 insertions, 63 deletions
diff --git a/lib/base.php b/lib/base.php index 59b861ffce1..0d33dbb163e 100644 --- a/lib/base.php +++ b/lib/base.php @@ -398,8 +398,8 @@ class OC { ini_set('arg_separator.output', '&'); // try to switch magic quotes off. - if (get_magic_quotes_gpc()) { - @set_magic_quotes_runtime(false); + if (get_magic_quotes_gpc()==1) { + ini_set('magic_quotes_runtime', 0); } //try to configure php to enable big file uploads. diff --git a/lib/config.php b/lib/config.php index 0bd497b8e50..c94eb278159 100644 --- a/lib/config.php +++ b/lib/config.php @@ -155,7 +155,11 @@ class OC_Config{ */ public static function writeData() { // Create a php file ... - $content = "<?php\n\$CONFIG = "; + $content = "<?php\n "; + if (defined('DEBUG') && DEBUG) { + $content .= "define('DEBUG',true);\n"; + } + $content .= "\$CONFIG = "; $content .= var_export(self::$cache, true); $content .= ";\n"; diff --git a/lib/db.php b/lib/db.php index 347deac8519..9699b216f6f 100644 --- a/lib/db.php +++ b/lib/db.php @@ -292,8 +292,10 @@ class OC_DB { 'username' => $user, 'password' => $pass, 'hostspec' => $host, - 'database' => $name - ); + 'database' => $name, + 'charset' => 'UTF-8' + ); + $options['portability'] = $options['portability'] - MDB2_PORTABILITY_EMPTY_TO_NULL; break; default: return false; diff --git a/lib/files.php b/lib/files.php index 2433502444c..04ba51d9d24 100644 --- a/lib/files.php +++ b/lib/files.php @@ -50,7 +50,7 @@ class OC_Files { $xsendfile = true; } - if (count($files) == 1) { + if (is_array($files) && count($files) == 1) { $files = $files[0]; } diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php index f288919df74..91bcb73a55d 100644 --- a/lib/files/cache/cache.php +++ b/lib/files/cache/cache.php @@ -203,7 +203,10 @@ class Cache { $query = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache`(' . implode(', ', $queryParts) . ')' . ' VALUES(' . implode(', ', $valuesPlaceholder) . ')'); - $query->execute($params); + $result = $query->execute($params); + if (\OC_DB::isError($result)) { + \OCP\Util::writeLog('cache', 'Insert to cache failed: '.$result, \OCP\Util::ERROR); + } return (int)\OC_DB::insertid('*PREFIX*filecache'); } diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php index 88f208547f6..f285f3bed11 100644 --- a/lib/files/cache/scanner.php +++ b/lib/files/cache/scanner.php @@ -151,6 +151,7 @@ class Scanner { private function isIgnoredFile($file) { if ($file === '.' || $file === '..' || pathinfo($file, PATHINFO_EXTENSION) === 'part' + || \OC\Files\Filesystem::isFileBlacklisted($file) ) { return true; } diff --git a/lib/files/cache/updater.php b/lib/files/cache/updater.php index d04541c219f..e760ba71bc6 100644 --- a/lib/files/cache/updater.php +++ b/lib/files/cache/updater.php @@ -53,12 +53,36 @@ class Updater { } } + static public function renameUpdate($from, $to) { + /** + * @var \OC\Files\Storage\Storage $storageFrom + * @var \OC\Files\Storage\Storage $storageTo + * @var string $internalFrom + * @var string $internalTo + */ + list($storageFrom, $internalFrom) = self::resolvePath($from); + list($storageTo, $internalTo) = self::resolvePath($to); + if ($storageFrom && $storageTo) { + if ($storageFrom === $storageTo) { + $cache = $storageFrom->getCache($internalFrom); + $cache->move($internalFrom, $internalTo); + $cache->correctFolderSize($internalFrom); + $cache->correctFolderSize($internalTo); + self::correctFolder($from, time()); + self::correctFolder($to, time()); + } else { + self::deleteUpdate($from); + self::writeUpdate($to); + } + } + } + /** - * Update the mtime and ETag of all parent folders - * - * @param string $path - * @param string $time - */ + * Update the mtime and ETag of all parent folders + * + * @param string $path + * @param string $time + */ static public function correctFolder($path, $time) { if ($path !== '' && $path !== '/') { $parent = dirname($path); @@ -66,9 +90,9 @@ class Updater { $parent = ''; } /** - * @var \OC\Files\Storage\Storage $storage - * @var string $internalPath - */ + * @var \OC\Files\Storage\Storage $storage + * @var string $internalPath + */ list($storage, $internalPath) = self::resolvePath($parent); if ($storage) { $cache = $storage->getCache(); @@ -92,8 +116,7 @@ class Updater { * @param array $params */ static public function renameHook($params) { - self::deleteUpdate($params['oldpath']); - self::writeUpdate($params['newpath']); + self::renameUpdate($params['oldpath'], $params['newpath']); } /** diff --git a/lib/files/cache/upgrade.php b/lib/files/cache/upgrade.php index 811d82d7437..230690d35c3 100644 --- a/lib/files/cache/upgrade.php +++ b/lib/files/cache/upgrade.php @@ -39,9 +39,10 @@ class Upgrade { if ($row = $this->legacy->get($path)) { $data = $this->getNewData($row); - $this->insert($data); - - $this->upgradeChilds($data['id'], $mode); + if ($data) { + $this->insert($data); + $this->upgradeChilds($data['id'], $mode); + } } } @@ -53,9 +54,11 @@ class Upgrade { foreach ($children as $child) { $childData = $this->getNewData($child); \OC_Hook::emit('\OC\Files\Cache\Upgrade', 'migrate_path', $child['path']); - $this->insert($childData); - if ($mode == Scanner::SCAN_RECURSIVE) { - $this->upgradeChilds($child['id']); + if ($childData) { + $this->insert($childData); + if ($mode == Scanner::SCAN_RECURSIVE) { + $this->upgradeChilds($child['id']); + } } } } @@ -95,20 +98,25 @@ class Upgrade { */ function getNewData($data) { $newData = $data; - list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($data['path']); /** * @var \OC\Files\Storage\Storage $storage * @var string $internalPath; */ - $newData['path_hash'] = md5($internalPath); - $newData['path'] = $internalPath; - $newData['storage'] = $this->getNumericId($storage); - $newData['parent'] = ($internalPath === '') ? -1 : $data['parent']; - $newData['permissions'] = ($data['writable']) ? \OCP\PERMISSION_ALL : \OCP\PERMISSION_READ; - $newData['storage_object'] = $storage; - $newData['mimetype'] = $this->getMimetypeId($newData['mimetype'], $storage); - $newData['mimepart'] = $this->getMimetypeId($newData['mimepart'], $storage); - return $newData; + list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($data['path']); + if ($storage) { + $newData['path_hash'] = md5($internalPath); + $newData['path'] = $internalPath; + $newData['storage'] = $this->getNumericId($storage); + $newData['parent'] = ($internalPath === '') ? -1 : $data['parent']; + $newData['permissions'] = ($data['writable']) ? \OCP\PERMISSION_ALL : \OCP\PERMISSION_READ; + $newData['storage_object'] = $storage; + $newData['mimetype'] = $this->getMimetypeId($newData['mimetype'], $storage); + $newData['mimepart'] = $this->getMimetypeId($newData['mimepart'], $storage); + return $newData; + } else { + \OC_Log::write('core', 'Unable to migrate data from old cache for '.$data['path'].' because the storage was not found', \OC_Log::ERROR); + return false; + } } /** diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index d32e082ade9..5c3a0cf93e1 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -30,6 +30,7 @@ namespace OC\Files; const FREE_SPACE_UNKNOWN = -2; +const FREE_SPACE_UNLIMITED = -3; class Filesystem { public static $loaded = false; diff --git a/lib/files/mapper.php b/lib/files/mapper.php index 520fadbd8c6..179e28e5e76 100644 --- a/lib/files/mapper.php +++ b/lib/files/mapper.php @@ -77,7 +77,9 @@ class Mapper $result = $query->execute(array($path1.'%')); $updateQuery = \OC_DB::prepare('UPDATE `*PREFIX*file_map`' .' SET `logic_path` = ?' - .' AND `physic_path` = ?' + .' , `logic_path_hash` = ?' + .' , `physic_path` = ?' + .' , `physic_path_hash` = ?' .' WHERE `logic_path` = ?'); while( $row = $result->fetchRow()) { $currentLogic = $row['logic_path']; @@ -86,7 +88,7 @@ class Mapper $newPhysic = $physicPath2.$this->stripRootFolder($currentPhysic, $physicPath1); if ($path1 !== $currentLogic) { try { - $updateQuery->execute(array($newLogic, $newPhysic, $currentLogic)); + $updateQuery->execute(array($newLogic, md5($newLogic), $newPhysic, md5($newPhysic), $currentLogic)); } catch (\Exception $e) { error_log('Mapper::Copy failed '.$currentLogic.' -> '.$newLogic.'\n'.$e); throw $e; @@ -149,7 +151,7 @@ class Mapper // detect duplicates while ($this->resolvePhysicalPath($physicalPath) !== null) { - $physicalPath = $this->slugifyPath($physicalPath, $index++); + $physicalPath = $this->slugifyPath($logicPath, $index++); } // insert the new path mapping if requested @@ -190,7 +192,7 @@ class Mapper array_push($sluggedElements, $last.'-'.$index); } - $sluggedPath = $this->unchangedPhysicalRoot.implode(DIRECTORY_SEPARATOR, $sluggedElements); + $sluggedPath = $this->unchangedPhysicalRoot.implode('/', $sluggedElements); return $this->stripLast($sluggedPath); } @@ -210,7 +212,7 @@ class Mapper // transliterate if (function_exists('iconv')) { - $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); + $text = iconv('utf-8', 'us-ascii//TRANSLIT//IGNORE', $text); } // lowercase @@ -219,10 +221,8 @@ class Mapper // remove unwanted characters $text = preg_replace('~[^-\w]+~', '', $text); - if (empty($text)) - { - // TODO: we better generate a guid in this case - return 'n-a'; + if (empty($text)) { + return uniqid(); } return $text; diff --git a/lib/files/storage/local.php b/lib/files/storage/local.php index da6597c8057..7b637a97059 100644 --- a/lib/files/storage/local.php +++ b/lib/files/storage/local.php @@ -218,7 +218,11 @@ class Local extends \OC\Files\Storage\Common{ } public function free_space($path) { - return @disk_free_space($this->datadir.$path); + $space = @disk_free_space($this->datadir.$path); + if($space === false){ + return \OC\Files\FREE_SPACE_UNKNOWN; + } + return $space; } public function search($query) { diff --git a/lib/files/storage/mappedlocal.php b/lib/files/storage/mappedlocal.php index 434c10bcbf7..ba3fcdc5c9e 100644 --- a/lib/files/storage/mappedlocal.php +++ b/lib/files/storage/mappedlocal.php @@ -50,7 +50,7 @@ class MappedLocal extends \OC\Files\Storage\Common{ continue; } - $logicalFilePath = $this->mapper->physicalToLogic($physicalPath.DIRECTORY_SEPARATOR.$file); + $logicalFilePath = $this->mapper->physicalToLogic($physicalPath.'/'.$file); $file= $this->mapper->stripRootFolder($logicalFilePath, $logicalPath); $file = $this->stripLeading($file); @@ -130,7 +130,7 @@ class MappedLocal extends \OC\Files\Storage\Common{ public function file_get_contents($path) { return file_get_contents($this->buildPath($path)); } - public function file_put_contents($path, $data) {//trigger_error("$path = ".var_export($path, 1)); + public function file_put_contents($path, $data) { return file_put_contents($this->buildPath($path), $data); } public function unlink($path) { @@ -280,7 +280,7 @@ class MappedLocal extends \OC\Files\Storage\Common{ foreach (scandir($physicalDir) as $item) { if ($item == '.' || $item == '..') continue; - $physicalItem = $this->mapper->physicalToLogic($physicalDir.DIRECTORY_SEPARATOR.$item); + $physicalItem = $this->mapper->physicalToLogic($physicalDir.'/'.$item); $item = substr($physicalItem, strlen($physicalDir)+1); if(strstr(strtolower($item), strtolower($query)) !== false) { @@ -331,6 +331,9 @@ class MappedLocal extends \OC\Files\Storage\Common{ if(strpos($path, '/') === 0) { $path = substr($path, 1); } + if(strpos($path, '\\') === 0) { + $path = substr($path, 1); + } if ($path === false) { return ''; } diff --git a/lib/helper.php b/lib/helper.php index 41985ca57a7..73484ad913f 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -764,9 +764,15 @@ class OC_Helper { public static function maxUploadFilesize($dir) { $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')); $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); - $maxUploadFilesize = min($upload_max_filesize, $post_max_size); - $freeSpace = \OC\Files\Filesystem::free_space($dir); + if ($upload_max_filesize == 0 and $post_max_size == 0) { + $maxUploadFilesize = \OC\Files\FREE_SPACE_UNLIMITED; + } elseif ($upload_max_filesize === 0 or $post_max_size === 0) { + $maxUploadFilesize = max($upload_max_filesize, $post_max_size); //only the non 0 value counts + } else { + $maxUploadFilesize = min($upload_max_filesize, $post_max_size); + } + if($freeSpace !== \OC\Files\FREE_SPACE_UNKNOWN){ $freeSpace = max($freeSpace, 0); @@ -806,11 +812,19 @@ class OC_Helper { $used = 0; } $free = \OC\Files\Filesystem::free_space(); - $total = $free + $used; + if ($free >= 0){ + $total = $free + $used; + } else { + $total = $free; //either unknown or unlimited + } if ($total == 0) { $total = 1; // prevent division by zero } - $relative = round(($used / $total) * 10000) / 100; + if ($total >= 0){ + $relative = round(($used / $total) * 10000) / 100; + } else { + $relative = 0; + } return array('free' => $free, 'used' => $used, 'total' => $total, 'relative' => $relative); } diff --git a/lib/l10n/ar.php b/lib/l10n/ar.php index 77e02dd77b1..8b7324f3ff4 100644 --- a/lib/l10n/ar.php +++ b/lib/l10n/ar.php @@ -3,10 +3,54 @@ "Personal" => "شخصي", "Settings" => "تعديلات", "Users" => "المستخدمين", +"Apps" => "التطبيقات", +"Admin" => "المدير", +"ZIP download is turned off." => "تحميل ملفات ZIP متوقف", +"Files need to be downloaded one by one." => "الملفات بحاجة الى ان يتم تحميلها واحد تلو الاخر", +"Back to Files" => "العودة الى الملفات", +"Selected files too large to generate zip file." => "الملفات المحددة كبيرة جدا ليتم ضغطها في ملف zip", +"couldn't be determined" => "تعذّر تحديده", +"Application is not enabled" => "التطبيق غير مفعّل", "Authentication error" => "لم يتم التأكد من الشخصية بنجاح", +"Token expired. Please reload page." => "انتهت صلاحية الكلمة , يرجى اعادة تحميل الصفحة", "Files" => "الملفات", "Text" => "معلومات إضافية", +"Images" => "صور", +"Set an admin username." => "اعداد اسم مستخدم للمدير", +"Set an admin password." => "اعداد كلمة مرور للمدير", +"Specify a data folder." => "تحديد مجلد ", +"%s enter the database username." => "%s ادخل اسم المستخدم الخاص بقاعدة البيانات.", +"%s enter the database name." => "%s ادخل اسم فاعدة البيانات", +"%s you may not use dots in the database name" => "%s لا يسمح لك باستخدام نقطه (.) في اسم قاعدة البيانات", +"%s set the database host." => "%s ادخل اسم خادم قاعدة البيانات", +"PostgreSQL username and/or password not valid" => "اسم المستخدم / أو كلمة المرور الخاصة بـPostgreSQL غير صحيحة", +"You need to enter either an existing account or the administrator." => "انت بحاجة لكتابة اسم مستخدم موجود أو حساب المدير.", +"Oracle username and/or password not valid" => "اسم المستخدم و/أو كلمة المرور لنظام Oracle غير صحيح", +"MySQL username and/or password not valid" => "اسم المستخدم و/أو كلمة المرور لنظام MySQL غير صحيح", +"DB Error: \"%s\"" => "خطأ في قواعد البيانات : \"%s\"", +"Offending command was: \"%s\"" => "الأمر المخالف كان : \"%s\"", +"MySQL user '%s'@'localhost' exists already." => "أسم المستخدم '%s'@'localhost' الخاص بـ MySQL موجود مسبقا", +"Drop this user from MySQL" => "احذف اسم المستخدم هذا من الـ MySQL", +"MySQL user '%s'@'%%' already exists" => "أسم المستخدم '%s'@'%%' الخاص بـ MySQL موجود مسبقا", +"Drop this user from MySQL." => "احذف اسم المستخدم هذا من الـ MySQL.", +"Offending command was: \"%s\", name: %s, password: %s" => "الأمر المخالف كان : \"%s\", اسم المستخدم : %s, كلمة المرور: %s", +"MS SQL username and/or password not valid: %s" => "اسم المستخدم و/أو كلمة المرور لنظام MS SQL غير صحيح : %s", +"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "اعدادات خادمك غير صحيحة بشكل تسمح لك بمزامنة ملفاتك وذلك بسبب أن واجهة WebDAV تبدو معطلة", +"Please double check the <a href='%s'>installation guides</a>." => "الرجاء التحقق من <a href='%s'>دليل التنصيب</a>.", "seconds ago" => "منذ ثواني", "1 minute ago" => "منذ دقيقة", -"today" => "اليوم" +"%d minutes ago" => "%d دقيقة مضت", +"1 hour ago" => "قبل ساعة مضت", +"%d hours ago" => "%d ساعة مضت", +"today" => "اليوم", +"yesterday" => "يوم أمس", +"%d days ago" => "%d يوم مضى", +"last month" => "الشهر الماضي", +"%d months ago" => "%d شهر مضت", +"last year" => "السنةالماضية", +"years ago" => "سنة مضت", +"%s is available. Get <a href=\"%s\">more information</a>" => "%s متاح . احصل على <a href=\"%s\">المزيد من المعلومات </a>", +"up to date" => "محدّث", +"updates check is disabled" => "فحص التحديثات معطّل", +"Could not find category \"%s\"" => "تعذر العثور على المجلد \"%s\"" ); diff --git a/lib/l10n/fa.php b/lib/l10n/fa.php index bbb04290a5c..282a8a56cdc 100644 --- a/lib/l10n/fa.php +++ b/lib/l10n/fa.php @@ -14,6 +14,7 @@ "Files" => "پروندهها", "Text" => "متن", "Images" => "تصاویر", +"Specify a data folder." => "پوشه ای برای داده ها مشخص کنید.", "seconds ago" => "ثانیهها پیش", "1 minute ago" => "1 دقیقه پیش", "%d minutes ago" => "%d دقیقه پیش", diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php index e26a663e9cc..10a4060e119 100644 --- a/lib/l10n/nl.php +++ b/lib/l10n/nl.php @@ -36,7 +36,7 @@ "Offending command was: \"%s\", name: %s, password: %s" => "Onjuiste commando was: \"%s\", naam: %s, wachtwoord: %s", "MS SQL username and/or password not valid: %s" => "MS SQL gebruikersnaam en/of wachtwoord niet geldig: %s", "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Uw webserver is nog niet goed ingesteld voor bestandssynchronisatie omdat de WebDAV interface verbroken lijkt.", -"Please double check the <a href='%s'>installation guides</a>." => "Conntroleer de <a href='%s'>installatie handleiding</a> goed.", +"Please double check the <a href='%s'>installation guides</a>." => "Controleer de <a href='%s'>installatiehandleiding</a> goed.", "seconds ago" => "seconden geleden", "1 minute ago" => "1 minuut geleden", "%d minutes ago" => "%d minuten geleden", diff --git a/lib/l10n/tr.php b/lib/l10n/tr.php index e55caa15972..ab237cfe2e7 100644 --- a/lib/l10n/tr.php +++ b/lib/l10n/tr.php @@ -16,6 +16,7 @@ "Files" => "Dosyalar", "Text" => "Metin", "Images" => "Resimler", +"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Web sunucunuz dosya transferi için düzgün bir şekilde yapılandırılmamış. WevDAV arabirimini sorunlu gözüküyor.", "seconds ago" => "saniye önce", "1 minute ago" => "1 dakika önce", "%d minutes ago" => "%d dakika önce", diff --git a/lib/l10n/zh_CN.php b/lib/l10n/zh_CN.php index c3af288b727..b79fdfcca1d 100644 --- a/lib/l10n/zh_CN.php +++ b/lib/l10n/zh_CN.php @@ -9,12 +9,34 @@ "Files need to be downloaded one by one." => "需要逐一下载文件", "Back to Files" => "回到文件", "Selected files too large to generate zip file." => "选择的文件太大,无法生成 zip 文件。", -"Application is not enabled" => "不需要程序", -"Authentication error" => "认证错误", +"couldn't be determined" => "无法确定", +"Application is not enabled" => "应用程序未启用", +"Authentication error" => "认证出错", "Token expired. Please reload page." => "Token 过期,请刷新页面。", "Files" => "文件", "Text" => "文本", -"Images" => "图像", +"Images" => "图片", +"Set an admin username." => "请设置一个管理员用户名。", +"Set an admin password." => "请设置一个管理员密码。", +"Specify a data folder." => "请指定一个数据目录。", +"%s enter the database username." => "%s 输入数据库用户名。", +"%s enter the database name." => "%s 输入数据库名称。", +"%s you may not use dots in the database name" => "%s 您不能在数据库名称中使用英文句号。", +"%s set the database host." => "%s 设置数据库所在主机。", +"PostgreSQL username and/or password not valid" => "PostgreSQL 数据库用户名和/或密码无效", +"You need to enter either an existing account or the administrator." => "你需要输入一个数据库中已有的账户或管理员账户。", +"Oracle username and/or password not valid" => "Oracle 数据库用户名和/或密码无效", +"MySQL username and/or password not valid" => "MySQL 数据库用户名和/或密码无效", +"DB Error: \"%s\"" => "数据库错误:\"%s\"", +"Offending command was: \"%s\"" => "冲突命令为:\"%s\"", +"MySQL user '%s'@'localhost' exists already." => "MySQL 用户 '%s'@'localhost' 已存在。", +"Drop this user from MySQL" => "建议从 MySQL 数据库中丢弃 Drop 此用户", +"MySQL user '%s'@'%%' already exists" => "MySQL 用户 '%s'@'%%' 已存在", +"Drop this user from MySQL." => "建议从 MySQL 数据库中丢弃 Drop 此用户。", +"Offending command was: \"%s\", name: %s, password: %s" => "冲突命令为:\"%s\",名称:%s,密码:%s", +"MS SQL username and/or password not valid: %s" => "MS SQL 用户名和/或密码无效:%s", +"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "您的Web服务器尚未正确设置以允许文件同步, 因为WebDAV的接口似乎已损坏.", +"Please double check the <a href='%s'>installation guides</a>." => "请认真检查<a href='%s'>安装指南</a>.", "seconds ago" => "几秒前", "1 minute ago" => "1分钟前", "%d minutes ago" => "%d 分钟前", @@ -25,10 +47,10 @@ "%d days ago" => "%d 天前", "last month" => "上月", "%d months ago" => "%d 月前", -"last year" => "上年", +"last year" => "去年", "years ago" => "几年前", -"%s is available. Get <a href=\"%s\">more information</a>" => "%s 已存在. 点此 <a href=\"%s\">获取更多信息</a>", +"%s is available. Get <a href=\"%s\">more information</a>" => "%s 已存在。点此 <a href=\"%s\">获取更多信息</a>", "up to date" => "已更新。", -"updates check is disabled" => "检查更新功能被关闭。", +"updates check is disabled" => "更新检查功能被禁用。", "Could not find category \"%s\"" => "无法找到分类 \"%s\"" ); diff --git a/lib/l10n/zh_HK.php b/lib/l10n/zh_HK.php new file mode 100644 index 00000000000..cfa33ec36f5 --- /dev/null +++ b/lib/l10n/zh_HK.php @@ -0,0 +1,13 @@ +<?php $TRANSLATIONS = array( +"Help" => "幫助", +"Personal" => "個人", +"Settings" => "設定", +"Users" => "用戶", +"Apps" => "軟件", +"Admin" => "管理", +"Files" => "文件", +"Text" => "文字", +"today" => "今日", +"yesterday" => "昨日", +"last month" => "前一月" +); diff --git a/lib/templatelayout.php b/lib/templatelayout.php index 29f120a6041..225830704a9 100644 --- a/lib/templatelayout.php +++ b/lib/templatelayout.php @@ -37,6 +37,7 @@ class OC_TemplateLayout extends OC_Template { } else { parent::__construct('core', 'layout.base'); } + $versionParameter = '?' . md5(implode(OC_Util::getVersion())); // Add the js files $jsfiles = self::findJavascriptFiles(OC_Util::$scripts); $this->assign('jsfiles', array(), false); @@ -44,20 +45,20 @@ class OC_TemplateLayout extends OC_Template { $this->append( 'jsfiles', OC_Helper::linkToRoute('js_config')); } if (!empty(OC_Util::$core_scripts)) { - $this->append( 'jsfiles', OC_Helper::linkToRemoteBase('core.js', false)); + $this->append( 'jsfiles', OC_Helper::linkToRemoteBase('core.js', false) . $versionParameter); } foreach($jsfiles as $info) { $root = $info[0]; $web = $info[1]; $file = $info[2]; - $this->append( 'jsfiles', $web.'/'.$file); + $this->append( 'jsfiles', $web.'/'.$file . $versionParameter); } // Add the css files $cssfiles = self::findStylesheetFiles(OC_Util::$styles); $this->assign('cssfiles', array()); if (!empty(OC_Util::$core_styles)) { - $this->append( 'cssfiles', OC_Helper::linkToRemoteBase('core.css', false)); + $this->append( 'cssfiles', OC_Helper::linkToRemoteBase('core.css', false) . $versionParameter); } foreach($cssfiles as $info) { $root = $info[0]; @@ -77,7 +78,7 @@ class OC_TemplateLayout extends OC_Template { $app = $paths[0]; unset($paths[0]); $path = implode('/', $paths); - $this->append( 'cssfiles', OC_Helper::linkTo($app, $path)); + $this->append( 'cssfiles', OC_Helper::linkTo($app, $path) . $versionParameter); } else { $this->append( 'cssfiles', $web.'/'.$file); diff --git a/lib/util.php b/lib/util.php index e79daae8a0a..fad49ac5ab2 100755 --- a/lib/util.php +++ b/lib/util.php @@ -75,7 +75,7 @@ class OC_Util { public static function getVersion() { // hint: We only can count up. Reset minor/patchlevel when // updating major/minor version number. - return array(5, 80, 00); + return array(5, 80, 01); } /** |