diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-04-25 18:16:09 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-04-25 18:16:09 +0200 |
commit | bc9792910ae5d714daefd0840d702550b91bae41 (patch) | |
tree | cb290275c715d684e891284aa01e445b59188832 /lib | |
parent | 28d2379c43b31ec362f1e0b4d09fed3ac9812cd2 (diff) | |
parent | 80e91e1ac6f8c3c3daa0b8e65ab038ebb57b0794 (diff) | |
download | nextcloud-server-bc9792910ae5d714daefd0840d702550b91bae41.tar.gz nextcloud-server-bc9792910ae5d714daefd0840d702550b91bae41.zip |
Merge branch 'master' into doctrine
Conflicts:
3rdparty
lib/MDB2/Driver/sqlite3.php
lib/db.php
Diffstat (limited to 'lib')
78 files changed, 1157 insertions, 240 deletions
diff --git a/lib/base.php b/lib/base.php index eb44b5e2087..791cbb461f1 100644 --- a/lib/base.php +++ b/lib/base.php @@ -78,6 +78,8 @@ class OC { * SPL autoload */ public static function autoload($className) { + $className = trim($className, '\\'); + if (array_key_exists($className, OC::$CLASSPATH)) { $path = OC::$CLASSPATH[$className]; /** @TODO: Remove this when necessary @@ -95,8 +97,15 @@ class OC { $path = 'public/' . strtolower(str_replace('\\', '/', substr($className, 3)) . '.php'); } elseif (strpos($className, 'OCA\\') === 0) { foreach (self::$APPSROOTS as $appDir) { - $path = $appDir['path'] . '/' . strtolower(str_replace('\\', '/', substr($className, 3)) . '.php'); - $fullPath = stream_resolve_include_path($path); + $path = strtolower(str_replace('\\', '/', substr($className, 4)) . '.php'); + $fullPath = stream_resolve_include_path($appDir['path'] . '/' . $path); + if (file_exists($fullPath)) { + require_once $fullPath; + return false; + } + // If not found in the root of the app directory, insert '/lib' after app id and try again. + $libpath = substr($path, 0, strpos($path, '/')) . '/lib' . substr($path, strpos($path, '/')); + $fullPath = stream_resolve_include_path($appDir['path'] . '/' . $libpath); if (file_exists($fullPath)) { require_once $fullPath; return false; @@ -280,7 +289,7 @@ class OC { OC_Config::setValue('maintenance', true); OC_Log::write('core', 'starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, - OC_Log::DEBUG); + OC_Log::WARN); $minimizerCSS = new OC_Minimizer_CSS(); $minimizerCSS->clearCache(); $minimizerJS = new OC_Minimizer_JS(); @@ -325,6 +334,10 @@ class OC { // prevents javascript from accessing php session cookies ini_set('session.cookie_httponly', '1;'); + // set the cookie path to the ownCloud directory + $cookie_path = OC::$WEBROOT ?: '/'; + ini_set('session.cookie_path', $cookie_path); + // set the session name to the instance id - which is unique session_name(OC_Util::getInstanceId()); @@ -356,7 +369,7 @@ class OC { // session timeout if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 60*60*24)) { if (isset($_COOKIE[session_name()])) { - setcookie(session_name(), '', time() - 42000, '/'); + setcookie(session_name(), '', time() - 42000, $cookie_path); } session_unset(); session_destroy(); @@ -402,8 +415,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. @@ -465,11 +478,11 @@ class OC { stream_wrapper_register('close', 'OC\Files\Stream\Close'); stream_wrapper_register('oc', 'OC\Files\Stream\OC'); + self::initTemplateEngine(); self::checkConfig(); self::checkInstalled(); self::checkSSL(); self::initSession(); - self::initTemplateEngine(); $errors = OC_Util::checkServer(); if (count($errors) > 0) { @@ -629,8 +642,13 @@ class OC { // Handle redirect URL for logged in users if (isset($_REQUEST['redirect_url']) && OC_User::isLoggedIn()) { $location = OC_Helper::makeURLAbsolute(urldecode($_REQUEST['redirect_url'])); - header('Location: ' . $location); - return; + + // Deny the redirect if the URL contains a @ + // This prevents unvalidated redirects like ?redirect_url=:user@domain.com + if (strpos($location, '@') === FALSE) { + header('Location: ' . $location); + return; + } } // Handle WebDAV if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND') { diff --git a/lib/config.php b/lib/config.php index c94eb278159..9b87d4ce4e5 100644 --- a/lib/config.php +++ b/lib/config.php @@ -130,14 +130,24 @@ class OC_Config{ return true; } - if( !file_exists( OC::$SERVERROOT."/config/config.php" )) { - return false; - } + // read all file in config dir ending by config.php + $config_files = glob( OC::$SERVERROOT."/config/*.config.php"); + + //Filter only regular files + $config_files = array_filter($config_files, 'is_file'); + + //Sort array naturally : + natsort($config_files); + + // Add default config + array_unshift($config_files,OC::$SERVERROOT."/config/config.php"); - // Include the file, save the data from $CONFIG - include OC::$SERVERROOT."/config/config.php"; - if( isset( $CONFIG ) && is_array( $CONFIG )) { - self::$cache = $CONFIG; + //Include file and merge config + foreach($config_files as $file){ + include $file; + if( isset( $CONFIG ) && is_array( $CONFIG )) { + self::$cache = array_merge(self::$cache, $CONFIG); + } } // We cached everything diff --git a/lib/db.php b/lib/db.php index 3aff9cc68ae..7db7711b376 100644 --- a/lib/db.php +++ b/lib/db.php @@ -229,7 +229,9 @@ class OC_DB { // Optimize the query $query = self::processQuery( $query ); - + if(OC_Config::getValue( "log_query", false)) { + OC_Log::write('core', 'DB prepare : '.$query, OC_Log::DEBUG); + } self::connect(); // return the result if (self::$backend == self::BACKEND_DOCTRINE) { @@ -382,18 +384,19 @@ class OC_DB { $type = self::$type; $query = ''; + $inserts = array_values($input); // differences in escaping of table names ('`' for mysql) and getting the current timestamp if( $type == 'sqlite' || $type == 'sqlite3' ) { // NOTE: For SQLite we have to use this clumsy approach // otherwise all fieldnames used must have a unique key. - $query = 'SELECT * FROM "' . $table . '" WHERE '; + $query = 'SELECT * FROM `' . $table . '` WHERE '; foreach($input as $key => $value) { - $query .= $key . " = '" . $value . '\' AND '; + $query .= '`' . $key . '` = ? AND '; } $query = substr($query, 0, strlen($query) - 5); try { $stmt = self::prepare($query); - $result = $stmt->execute(); + $result = $stmt->execute($inserts); } catch(\Doctrine\DBAL\DBALException $e) { $entry = 'DB Error: "'.$e->getMessage() . '"<br />'; $entry .= 'Offending command was: ' . $query . '<br />'; @@ -403,28 +406,27 @@ class OC_DB { return false; } - if($result->numRows() == 0) { - $query = 'INSERT INTO "' . $table . '" ("' - . implode('","', array_keys($input)) . '") VALUES("' - . implode('","', array_values($input)) . '")'; + if((int)$result->numRows() === 0) { + $query = 'INSERT INTO `' . $table . '` (`' + . implode('`,`', array_keys($input)) . '`) VALUES(' + . str_repeat('?,', count($input)-1).'? ' . ')'; } else { return true; } } elseif( $type == 'pgsql' || $type == 'oci' || $type == 'mysql' || $type == 'mssql') { - $query = 'INSERT INTO `' .$table . '` (' - . implode(',', array_keys($input)) . ') SELECT \'' - . implode('\',\'', array_values($input)) . '\' FROM ' . $table . ' WHERE '; + $query = 'INSERT INTO `' .$table . '` (`' + . implode('`,`', array_keys($input)) . '`) SELECT ' + . str_repeat('?,', count($input)-1).'? ' // Is there a prettier alternative? + . 'FROM `' . $table . '` WHERE '; foreach($input as $key => $value) { - $query .= $key . " = '" . $value . '\' AND '; + $query .= '`' . $key . '` = ? AND '; } $query = substr($query, 0, strlen($query) - 5); $query .= ' HAVING COUNT(*) = 0'; + $inserts = array_merge($inserts, $inserts); } - // TODO: oci should be use " (quote) instead of ` (backtick). - //OC_Log::write('core', __METHOD__ . ', type: ' . $type . ', query: ' . $query, OC_Log::DEBUG); - try { $result = self::prepare($query); } catch(\Doctrine\DBAL\DBALException $e) { @@ -436,7 +438,7 @@ class OC_DB { return false; } - return $result->execute(); + return $result->execute($inserts); } /** @@ -668,7 +670,7 @@ class DoctrineStatementWrapper { $regex = '/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i'; $queryString = $this->statement->getWrappedStatement()->queryString; if (preg_match($regex, $queryString, $output) > 0) { - $query = OC_DB::prepare("SELECT COUNT(*) FROM {$output[1]}", PDO::FETCH_NUM); + $query = OC_DB::prepare("SELECT COUNT(*) FROM {$output[1]}"); return $query->execute($this->lastArguments)->fetchColumn(); }else{ return $this->statement->rowCount(); @@ -679,6 +681,10 @@ class DoctrineStatementWrapper { * make execute return the result instead of a bool */ public function execute($input=array()) { + if(OC_Config::getValue( "log_query", false)) { + $params_str = str_replace("\n"," ",var_export($input,true)); + OC_Log::write('core', 'DB execute with arguments : '.$params_str, OC_Log::DEBUG); + } $this->lastArguments = $input; if (count($input) > 0) { diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php index 91bcb73a55d..71b70abe3fe 100644 --- a/lib/files/cache/cache.php +++ b/lib/files/cache/cache.php @@ -343,9 +343,9 @@ class Cache { $query->execute(array($targetPath, md5($targetPath), $child['fileid'])); } - $query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET `path` = ?, `path_hash` = ?, `parent` =?' + $query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET `path` = ?, `path_hash` = ?, `name` = ?, `parent` =?' . ' WHERE `fileid` = ?'); - $query->execute(array($target, md5($target), $newParentId, $sourceId)); + $query->execute(array($target, md5($target), basename($target), $newParentId, $sourceId)); } /** diff --git a/lib/files/cache/legacy.php b/lib/files/cache/legacy.php index 2b8689fcbda..b8e2548639b 100644 --- a/lib/files/cache/legacy.php +++ b/lib/files/cache/legacy.php @@ -20,6 +20,11 @@ class Legacy { $this->user = $user; } + /** + * get the numbers of items in the legacy cache + * + * @return int + */ function getCount() { $query = \OC_DB::prepare('SELECT COUNT(`id`) AS `count` FROM `*PREFIX*fscache` WHERE `user` = ?'); $result = $query->execute(array($this->user)); @@ -62,6 +67,8 @@ class Legacy { } /** + * get an item from the legacy cache + * * @param string|int $path * @return array */ @@ -72,16 +79,59 @@ class Legacy { $query = \OC_DB::prepare('SELECT * FROM `*PREFIX*fscache` WHERE `path` = ?'); } $result = $query->execute(array($path)); - return $result->fetchRow(); + $data = $result->fetchRow(); + $data['etag'] = $this->getEtag($data['path'], $data['user']); + return $data; } /** + * Get the ETag for the given path + * + * @param type $path + * @return string + */ + function getEtag($path, $user = null) { + static $query = null; + + $pathDetails = explode('/', $path, 4); + if((!$user) && !isset($pathDetails[1])) { + //no user!? Too odd, return empty string. + return ''; + } else if(!$user) { + //guess user from path, if no user passed. + $user = $pathDetails[1]; + } + + if(!isset($pathDetails[3]) || is_null($pathDetails[3])) { + $relativePath = ''; + } else { + $relativePath = $pathDetails[3]; + } + + if(is_null($query)){ + $query = \OC_DB::prepare('SELECT `propertyvalue` FROM `*PREFIX*properties` WHERE `userid` = ? AND `propertypath` = ? AND `propertyname` = \'{DAV:}getetag\''); + } + $result = $query->execute(array($user, '/' . $relativePath)); + if ($row = $result->fetchRow()) { + return trim($row['propertyvalue'], '"'); + } else { + return ''; + } + } + + /** + * get all child items of an item from the legacy cache + * * @param int $id * @return array */ function getChildren($id) { $query = \OC_DB::prepare('SELECT * FROM `*PREFIX*fscache` WHERE `parent` = ?'); $result = $query->execute(array($id)); - return $result->fetchAll(); + $data = $result->fetchAll(); + foreach ($data as $i => $item) { + $data[$i]['etag'] = $this->getEtag($item['path'], $item['user']); + } + return $data; } } diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php index f285f3bed11..f019d4fc608 100644 --- a/lib/files/cache/scanner.php +++ b/lib/files/cache/scanner.php @@ -62,36 +62,42 @@ class Scanner { * @return array with metadata of the scanned file */ public function scanFile($file, $checkExisting = false) { - \OC_Hook::emit('\OC\Files\Cache\Scanner', 'scan_file', array('path' => $file, 'storage' => $this->storageId)); - $data = $this->getData($file); - if ($data) { - if ($file) { - $parent = dirname($file); - if ($parent === '.') { - $parent = ''; - } - if (!$this->cache->inCache($parent)) { - $this->scanFile($parent); + if (!self::isIgnoredFile($file)) { + \OC_Hook::emit('\OC\Files\Cache\Scanner', 'scan_file', array('path' => $file, 'storage' => $this->storageId)); + $data = $this->getData($file); + if ($data) { + if ($file) { + $parent = dirname($file); + if ($parent === '.') { + $parent = ''; + } + if (!$this->cache->inCache($parent)) { + $this->scanFile($parent); + } } - } - if ($checkExisting and $cacheData = $this->cache->get($file)) { - if ($data['size'] === -1) { - $data['size'] = $cacheData['size']; + if($cacheData = $this->cache->get($file)) { + if ($data['mtime'] === $cacheData['mtime'] && + $data['size'] === $cacheData['size']) { + $data['etag'] = $cacheData['etag']; + } } - if ($data['mtime'] === $cacheData['mtime']) { - $data['etag'] = $cacheData['etag']; + if ($checkExisting and $cacheData) { + if ($data['size'] === -1) { + $data['size'] = $cacheData['size']; + } } + $this->cache->put($file, $data); } - $this->cache->put($file, $data); + return $data; } - return $data; + return null; } /** * scan all the files in a folder and store them in the cache * * @param string $path - * @param SCAN_RECURSIVE/SCAN_SHALLOW $recursive + * @param bool $recursive * @param bool $onlyChilds * @return int the size of the scanned folder or -1 if the size is unknown at this stage */ @@ -106,8 +112,8 @@ class Scanner { if ($this->storage->is_dir($path) && ($dh = $this->storage->opendir($path))) { \OC_DB::beginTransaction(); while ($file = readdir($dh)) { - if (!$this->isIgnoredFile($file)) { - $child = ($path) ? $path . '/' . $file : $file; + $child = ($path) ? $path . '/' . $file : $file; + if (!$this->isIgnoredDir($file)) { $data = $this->scanFile($child, $recursive === self::SCAN_SHALLOW); if ($data) { if ($data['size'] === -1) { @@ -142,15 +148,26 @@ class Scanner { } /** + * @brief check if the directory should be ignored when scanning + * NOTE: the special directories . and .. would cause never ending recursion + * @param String $dir + * @return boolean + */ + private function isIgnoredDir($dir) { + if ($dir === '.' || $dir === '..') { + return true; + } + return false; + } + /** * @brief check if the file should be ignored when scanning * NOTE: files with a '.part' extension are ignored as well! * prevents unfinished put requests to be scanned * @param String $file * @return boolean */ - private function isIgnoredFile($file) { - if ($file === '.' || $file === '..' - || pathinfo($file, PATHINFO_EXTENSION) === 'part' + public static function isIgnoredFile($file) { + if (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 e760ba71bc6..92a16d9d9b6 100644 --- a/lib/files/cache/updater.php +++ b/lib/files/cache/updater.php @@ -16,7 +16,7 @@ class Updater { /** * resolve a path to a storage and internal path * - * @param string $path + * @param string $path the relative path * @return array consisting of the storage and the internal path */ static public function resolvePath($path) { @@ -24,6 +24,11 @@ class Updater { return $view->resolvePath($path); } + /** + * preform a write update + * + * @param string $path the relative path of the file + */ static public function writeUpdate($path) { /** * @var \OC\Files\Storage\Storage $storage @@ -39,6 +44,11 @@ class Updater { } } + /** + * preform a delete update + * + * @param string $path the relative path of the file + */ static public function deleteUpdate($path) { /** * @var \OC\Files\Storage\Storage $storage @@ -53,6 +63,12 @@ class Updater { } } + /** + * preform a rename update + * + * @param string $from the relative path of the source file + * @param string $to the relative path of the target file + */ static public function renameUpdate($from, $to) { /** * @var \OC\Files\Storage\Storage $storageFrom @@ -115,6 +131,13 @@ class Updater { /** * @param array $params */ + static public function touchHook($params) { + self::writeUpdate($params['path']); + } + + /** + * @param array $params + */ static public function renameHook($params) { self::renameUpdate($params['oldpath'], $params['newpath']); } diff --git a/lib/files/cache/upgrade.php b/lib/files/cache/upgrade.php index 230690d35c3..ca044ba81de 100644 --- a/lib/files/cache/upgrade.php +++ b/lib/files/cache/upgrade.php @@ -26,17 +26,16 @@ class Upgrade { } /** - * Preform a shallow upgrade + * Preform a upgrade a path and it's childs * * @param string $path - * @param int $mode + * @param bool $mode */ function upgradePath($path, $mode = Scanner::SCAN_RECURSIVE) { if (!$this->legacy->hasItems()) { return; } \OC_Hook::emit('\OC\Files\Cache\Upgrade', 'migrate_path', $path); - if ($row = $this->legacy->get($path)) { $data = $this->getNewData($row); if ($data) { @@ -47,7 +46,10 @@ class Upgrade { } /** + * upgrade all child elements of an item + * * @param int $id + * @param bool $mode */ function upgradeChilds($id, $mode = Scanner::SCAN_RECURSIVE) { $children = $this->legacy->getChildren($id); @@ -64,28 +66,37 @@ class Upgrade { } /** + * insert data into the new cache + * * @param array $data the data for the new cache */ function insert($data) { - if (!$this->inCache($data['storage'], $data['path_hash'], $data['id'])) { + static $insertQuery = null; + if(is_null($insertQuery)) { $insertQuery = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache` - ( `fileid`, `storage`, `path`, `path_hash`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted` ) - VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'); - + ( `fileid`, `storage`, `path`, `path_hash`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`, `encrypted`, `etag` ) + VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'); + } + if (!$this->inCache($data['storage'], $data['path_hash'], $data['id'])) { $insertQuery->execute(array($data['id'], $data['storage'], $data['path'], $data['path_hash'], $data['parent'], $data['name'], - $data['mimetype'], $data['mimepart'], $data['size'], $data['mtime'], $data['encrypted'])); + $data['mimetype'], $data['mimepart'], $data['size'], $data['mtime'], $data['encrypted'], $data['etag'])); } } /** + * check if an item is already in the new cache + * * @param string $storage * @param string $pathHash * @param string $id * @return bool */ function inCache($storage, $pathHash, $id) { - $query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE (`storage` = ? AND `path_hash` = ?) OR `fileid` = ?'); + static $query = null; + if(is_null($query)) { + $query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE (`storage` = ? AND `path_hash` = ?) OR `fileid` = ?'); + } $result = $query->execute(array($storage, $pathHash, $id)); return (bool)$result->fetchRow(); } @@ -94,9 +105,32 @@ class Upgrade { * get the new data array from the old one * * @param array $data the data from the old cache + * Example data array + * Array + * ( + * [id] => 418 + * [path] => /tina/files/picture.jpg //relative to datadir + * [path_hash] => 66d4547e372888deed80b24fec9b192b + * [parent] => 234 + * [name] => picture.jpg + * [user] => tina + * [size] => 1265283 + * [ctime] => 1363909709 + * [mtime] => 1363909709 + * [mimetype] => image/jpeg + * [mimepart] => image + * [encrypted] => 0 + * [versioned] => 0 + * [writable] => 1 + * ) + * * @return array */ function getNewData($data) { + //Make sure there is a path, otherwise we can do nothing. + if(!isset($data['path'])) { + return false; + } $newData = $data; /** * @var \OC\Files\Storage\Storage $storage @@ -104,6 +138,7 @@ class Upgrade { */ list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($data['path']); if ($storage) { + $newData['etag'] = $data['etag']; $newData['path_hash'] = md5($internalPath); $newData['path'] = $internalPath; $newData['storage'] = $this->getNumericId($storage); @@ -135,6 +170,8 @@ class Upgrade { } /** + * get the numeric id for a mimetype + * * @param string $mimetype * @param \OC\Files\Storage\Storage $storage * @return int @@ -166,4 +203,25 @@ class Upgrade { static function upgradeDone($user) { \OCP\Config::setUserValue($user, 'files', 'cache_version', 5); } + + /** + * Does a "silent" upgrade, i.e. without an Event-Source as triggered + * on User-Login via Ajax. This method is called within the regular + * ownCloud upgrade. + * + * @param string $user a User ID + */ + public static function doSilentUpgrade($user) { + if(!self::needUpgrade($user)) { + return; + } + $legacy = new \OC\Files\Cache\Legacy($user); + if ($legacy->hasItems()) { + \OC_DB::beginTransaction(); + $upgrade = new \OC\Files\Cache\Upgrade($legacy); + $upgrade->upgradePath('/' . $user . '/files'); + \OC_DB::commit(); + } + \OC\Files\Cache\Upgrade::upgradeDone($user); + } } diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index d32e082ade9..09732e67ac6 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -23,6 +23,7 @@ * post_rename(oldpath,newpath) * copy(oldpath,newpath, &run) (if the newpath doesn't exists yes, copy, create and write will be emitted in that order) * post_rename(oldpath,newpath) + * post_initMountPoints(user, user_dir) * * the &run parameter can be set to false to prevent the operation from occurring */ @@ -30,6 +31,7 @@ namespace OC\Files; const FREE_SPACE_UNKNOWN = -2; +const FREE_SPACE_UNLIMITED = -3; class Filesystem { public static $loaded = false; @@ -279,12 +281,15 @@ class Filesystem { } } } + + // Chance to mount for other storages + \OC_Hook::emit('OC_Filesystem', 'post_initMountPoints', array('user' => $user, 'user_dir' => $root)); } /** - * fill in the correct values for $user, and $password placeholders + * fill in the correct values for $user * - * @param string $input + * @param string $user * @param string $input * @return string */ @@ -306,6 +311,7 @@ class Filesystem { */ static public function tearDown() { self::clearMounts(); + self::$defaultInstance = null; } /** @@ -620,10 +626,11 @@ class Filesystem { * get the content of a directory * * @param string $directory path under datadirectory + * @param string $mimetype_filter limit returned content to this mimetype or mimepart * @return array */ - public static function getDirectoryContent($directory) { - return self::$defaultInstance->getDirectoryContent($directory); + public static function getDirectoryContent($directory, $mimetype_filter = '') { + return self::$defaultInstance->getDirectoryContent($directory, $mimetype_filter); } /** @@ -659,8 +666,4 @@ class Filesystem { } } -\OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Updater', 'writeHook'); -\OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Updater', 'deleteHook'); -\OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook'); - \OC_Util::setupFS(); diff --git a/lib/files/mapper.php b/lib/files/mapper.php index 179e28e5e76..15f5f0628b5 100644 --- a/lib/files/mapper.php +++ b/lib/files/mapper.php @@ -167,31 +167,40 @@ class Mapper $query->execute(array($logicPath, $physicalPath, md5($logicPath), md5($physicalPath))); } - private function slugifyPath($path, $index=null) { + public function slugifyPath($path, $index=null) { $path = $this->stripRootFolder($path, $this->unchangedPhysicalRoot); $pathElements = explode('/', $path); $sluggedElements = array(); + // rip off the extension ext from last element + $last= end($pathElements); + $parts = pathinfo($last); + $filename = $parts['filename']; + array_pop($pathElements); + array_push($pathElements, $filename); + foreach ($pathElements as $pathElement) { // remove empty elements if (empty($pathElement)) { continue; } - // TODO: remove file ext before slugify on last element $sluggedElements[] = self::slugify($pathElement); } - // - // TODO: add the index before the file extension - // + // apply index to file name if ($index !== null) { - $last= end($sluggedElements); - array_pop($sluggedElements); + $last= array_pop($sluggedElements); array_push($sluggedElements, $last.'-'.$index); } + // add back the extension + if (isset($parts['extension'])) { + $last= array_pop($sluggedElements); + array_push($sluggedElements, $last.'.'.$parts['extension']); + } + $sluggedPath = $this->unchangedPhysicalRoot.implode('/', $sluggedElements); return $this->stripLast($sluggedPath); } diff --git a/lib/files/mount.php b/lib/files/mount.php index 1c9382d78e7..0030d0ee7a6 100644 --- a/lib/files/mount.php +++ b/lib/files/mount.php @@ -90,7 +90,11 @@ class Mount { public function getStorageId() { if (!$this->storageId) { if (is_null($this->storage)) { - $this->storage = $this->createStorage(); + $storage = $this->createStorage(); //FIXME: start using exceptions + if (is_null($storage)) { + return null; + } + $this->storage = $storage; } $this->storageId = $this->storage->getId(); if (strlen($this->storageId) > 64) { @@ -132,6 +136,7 @@ class Mount { * @return Mount */ public static function find($path) { + \OC_Util::setupFS(); $path = self::formatPath($path); if (isset(self::$mounts[$path])) { return self::$mounts[$path]; @@ -159,6 +164,7 @@ class Mount { * @return Mount[] */ public static function findIn($path) { + \OC_Util::setupFS(); $path = self::formatPath($path); $result = array(); $pathLength = strlen($path); @@ -182,6 +188,7 @@ class Mount { * @return Mount[] */ public static function findByStorageId($id) { + \OC_Util::setupFS(); if (strlen($id) > 64) { $id = md5($id); } diff --git a/lib/files/storage/common.php b/lib/files/storage/common.php index 8aa227ec0b7..38fe5e546f6 100644 --- a/lib/files/storage/common.php +++ b/lib/files/storage/common.php @@ -21,6 +21,10 @@ namespace OC\Files\Storage; */ abstract class Common implements \OC\Files\Storage\Storage { + private $cache; + private $scanner; + private $permissioncache; + private $watcher; public function __construct($parameters) { } @@ -269,19 +273,31 @@ abstract class Common implements \OC\Files\Storage\Storage { } public function getCache($path = '') { - return new \OC\Files\Cache\Cache($this); + if (!isset($this->cache)) { + $this->cache = new \OC\Files\Cache\Cache($this); + } + return $this->cache; } public function getScanner($path = '') { - return new \OC\Files\Cache\Scanner($this); + if (!isset($this->scanner)) { + $this->scanner = new \OC\Files\Cache\Scanner($this); + } + return $this->scanner; } public function getPermissionsCache($path = '') { - return new \OC\Files\Cache\Permissions($this); + if (!isset($this->permissioncache)) { + $this->permissioncache = new \OC\Files\Cache\Permissions($this); + } + return $this->permissioncache; } public function getWatcher($path = '') { - return new \OC\Files\Cache\Watcher($this); + if (!isset($this->watcher)) { + $this->watcher = new \OC\Files\Cache\Watcher($this); + } + return $this->watcher; } /** diff --git a/lib/files/storage/local.php b/lib/files/storage/local.php index 7b637a97059..81e32587fca 100644 --- a/lib/files/storage/local.php +++ b/lib/files/storage/local.php @@ -95,6 +95,9 @@ class Local extends \OC\Files\Storage\Common{ // sets the modification time of the file to the given value. // If mtime is nil the current time is set. // note that the access time of the file always changes to the current time. + if($this->file_exists($path) and !$this->isUpdatable($path)) { + return false; + } if(!is_null($mtime)) { $result=touch( $this->datadir.$path, $mtime ); }else{ diff --git a/lib/files/storage/storage.php b/lib/files/storage/storage.php index 2cc835236ba..1da82da2163 100644 --- a/lib/files/storage/storage.php +++ b/lib/files/storage/storage.php @@ -10,73 +10,323 @@ namespace OC\Files\Storage; /** * Provide a common interface to all different storage options + * + * All paths passed to the storage are relative to the storage and should NOT have a leading slash. */ -interface Storage{ +interface Storage { + /** + * $parameters is a free form array with the configuration options needed to construct the storage + * + * @param array $parameters + */ public function __construct($parameters); + + /** + * Get the identifier for the storage, + * the returned id should be the same for every storage object that is created with the same parameters + * and two storage objects with the same id should refer to two storages that display the same files. + * + * @return string + */ public function getId(); + + /** + * see http://php.net/manual/en/function.mkdir.php + * + * @param string $path + * @return bool + */ public function mkdir($path); + + /** + * see http://php.net/manual/en/function.rmdir.php + * + * @param string $path + * @return bool + */ public function rmdir($path); + + /** + * see http://php.net/manual/en/function.opendir.php + * + * @param string $path + * @return resource + */ public function opendir($path); + + /** + * see http://php.net/manual/en/function.is_dir.php + * + * @param string $path + * @return bool + */ public function is_dir($path); + + /** + * see http://php.net/manual/en/function.is_file.php + * + * @param string $path + * @return bool + */ public function is_file($path); + + /** + * see http://php.net/manual/en/function.stat.php + * only the following keys are required in the result: size and mtime + * + * @param string $path + * @return array + */ public function stat($path); + + /** + * see http://php.net/manual/en/function.filetype.php + * + * @param string $path + * @return bool + */ public function filetype($path); + + /** + * see http://php.net/manual/en/function.filesize.php + * The result for filesize when called on a folder is required to be 0 + * + * @param string $path + * @return int + */ public function filesize($path); + + /** + * check if a file can be created in $path + * + * @param string $path + * @return bool + */ public function isCreatable($path); + + /** + * check if a file can be read + * + * @param string $path + * @return bool + */ public function isReadable($path); + + /** + * check if a file can be written to + * + * @param string $path + * @return bool + */ public function isUpdatable($path); + + /** + * check if a file can be deleted + * + * @param string $path + * @return bool + */ public function isDeletable($path); + + /** + * check if a file can be shared + * + * @param string $path + * @return bool + */ public function isSharable($path); + + /** + * get the full permissions of a path. + * Should return a combination of the PERMISSION_ constants defined in lib/public/constants.php + * + * @param string $path + * @return int + */ public function getPermissions($path); + + /** + * see http://php.net/manual/en/function.file_exists.php + * + * @param string $path + * @return bool + */ public function file_exists($path); + + /** + * see http://php.net/manual/en/function.filemtime.php + * + * @param string $path + * @return int + */ public function filemtime($path); + + /** + * see http://php.net/manual/en/function.file_get_contents.php + * + * @param string $path + * @return string + */ public function file_get_contents($path); - public function file_put_contents($path,$data); + + /** + * see http://php.net/manual/en/function.file_put_contents.php + * + * @param string $path + * @param string $data + * @return bool + */ + public function file_put_contents($path, $data); + + /** + * see http://php.net/manual/en/function.unlink.php + * + * @param string $path + * @return bool + */ public function unlink($path); - public function rename($path1,$path2); - public function copy($path1,$path2); - public function fopen($path,$mode); + + /** + * see http://php.net/manual/en/function.rename.php + * + * @param string $path1 + * @param string $path2 + * @return bool + */ + public function rename($path1, $path2); + + /** + * see http://php.net/manual/en/function.copy.php + * + * @param string $path1 + * @param string $path2 + * @return bool + */ + public function copy($path1, $path2); + + /** + * see http://php.net/manual/en/function.fopen.php + * + * @param string $path + * @param string $mode + * @return resource + */ + public function fopen($path, $mode); + + /** + * get the mimetype for a file or folder + * The mimetype for a folder is required to be "httpd/unix-directory" + * + * @param string $path + * @return string + */ public function getMimeType($path); - public function hash($type,$path,$raw = false); + + /** + * see http://php.net/manual/en/function.hash.php + * + * @param string $type + * @param string $path + * @param bool $raw + * @return string + */ + public function hash($type, $path, $raw = false); + + /** + * see http://php.net/manual/en/function.free_space.php + * + * @param string $path + * @return int + */ public function free_space($path); + + /** + * search for occurrences of $query in file names + * + * @param string $query + * @return array + */ public function search($query); - public function touch($path, $mtime=null); - public function getLocalFile($path);// get a path to a local version of the file, whether the original file is local or remote - public function getLocalFolder($path);// get a path to a local version of the folder, whether the original file is local or remote + + /** + * see http://php.net/manual/en/function.touch.php + * If the backend does not support the operation, false should be returned + * + * @param string $path + * @param int $mtime + * @return bool + */ + public function touch($path, $mtime = null); + + /** + * get the path to a local version of the file. + * The local version of the file can be temporary and doesn't have to be persistent across requests + * + * @param string $path + * @return string + */ + public function getLocalFile($path); + + /** + * get the path to a local version of the folder. + * The local version of the folder can be temporary and doesn't have to be persistent across requests + * + * @param string $path + * @return string + */ + public function getLocalFolder($path); /** * check if a file or folder has been updated since $time + * + * @param string $path * @param int $time * @return bool * * hasUpdated for folders should return at least true if a file inside the folder is add, removed or renamed. * returning true for other changes in the folder is optional */ - public function hasUpdated($path,$time); + public function hasUpdated($path, $time); /** + * get a cache instance for the storage + * * @param string $path * @return \OC\Files\Cache\Cache */ - public function getCache($path=''); + public function getCache($path = ''); + /** + * get a scanner instance for the storage + * * @param string $path * @return \OC\Files\Cache\Scanner */ - public function getScanner($path=''); + public function getScanner($path = ''); + + /** + * get the user id of the owner of a file or folder + * + * @param string $path + * @return string + */ public function getOwner($path); /** + * get a permissions cache instance for the cache + * * @param string $path * @return \OC\Files\Cache\Permissions */ - public function getPermissionsCache($path=''); + public function getPermissionsCache($path = ''); /** + * get a watcher instance for the cache + * * @param string $path * @return \OC\Files\Cache\Watcher */ - public function getWatcher($path=''); + public function getWatcher($path = ''); /** * get the ETag for a file or folder diff --git a/lib/files/view.php b/lib/files/view.php index 19f33ad64a2..0da104c107e 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -245,13 +245,13 @@ class View { if (!is_null($mtime) and !is_numeric($mtime)) { $mtime = strtotime($mtime); } - + $hooks = array('touch'); - + if (!$this->file_exists($path)) { $hooks[] = 'write'; } - + return $this->basicOperation('touch', $path, $hooks, $mtime); } @@ -263,11 +263,12 @@ class View { if (is_resource($data)) { //not having to deal with streams in file_put_contents makes life easier $absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path)); if (\OC_FileProxy::runPreProxies('file_put_contents', $absolutePath, $data) - && Filesystem::isValidPath($path)) { + && Filesystem::isValidPath($path) + ) { $path = $this->getRelativePath($absolutePath); $exists = $this->file_exists($path); $run = true; - if ($this->fakeRoot == Filesystem::getRoot()) { + if ($this->fakeRoot == Filesystem::getRoot() && !Cache\Scanner::isIgnoredFile($path)) { if (!$exists) { \OC_Hook::emit( Filesystem::CLASSNAME, @@ -295,7 +296,7 @@ class View { list ($count, $result) = \OC_Helper::streamCopy($data, $target); fclose($target); fclose($data); - if ($this->fakeRoot == Filesystem::getRoot()) { + if ($this->fakeRoot == Filesystem::getRoot() && !Cache\Scanner::isIgnoredFile($path)) { if (!$exists) { \OC_Hook::emit( Filesystem::CLASSNAME, @@ -335,8 +336,11 @@ class View { $postFix2 = (substr($path2, -1, 1) === '/') ? '/' : ''; $absolutePath1 = Filesystem::normalizePath($this->getAbsolutePath($path1)); $absolutePath2 = Filesystem::normalizePath($this->getAbsolutePath($path2)); - if (\OC_FileProxy::runPreProxies('rename', $absolutePath1, $absolutePath2) - and Filesystem::isValidPath($path2)) { + if ( + \OC_FileProxy::runPreProxies('rename', $absolutePath1, $absolutePath2) + and Filesystem::isValidPath($path2) + and Filesystem::isValidPath($path1) + ) { $path1 = $this->getRelativePath($absolutePath1); $path2 = $this->getRelativePath($absolutePath2); @@ -396,7 +400,11 @@ class View { $postFix2 = (substr($path2, -1, 1) === '/') ? '/' : ''; $absolutePath1 = Filesystem::normalizePath($this->getAbsolutePath($path1)); $absolutePath2 = Filesystem::normalizePath($this->getAbsolutePath($path2)); - if (\OC_FileProxy::runPreProxies('copy', $absolutePath1, $absolutePath2) and Filesystem::isValidPath($path2)) { + if ( + \OC_FileProxy::runPreProxies('copy', $absolutePath1, $absolutePath2) + and Filesystem::isValidPath($path2) + and Filesystem::isValidPath($path1) + ) { $path1 = $this->getRelativePath($absolutePath1); $path2 = $this->getRelativePath($absolutePath2); @@ -627,7 +635,7 @@ class View { private function runHooks($hooks, $path, $post = false) { $prefix = ($post) ? 'post_' : ''; $run = true; - if (Filesystem::$loaded and $this->fakeRoot == Filesystem::getRoot()) { + if (Filesystem::$loaded and $this->fakeRoot == Filesystem::getRoot() && !Cache\Scanner::isIgnoredFile($path)) { foreach ($hooks as $hook) { if ($hook != 'read') { \OC_Hook::emit( @@ -731,6 +739,7 @@ class View { * get the content of a directory * * @param string $directory path under datadirectory + * @param string $mimetype_filter limit returned content to this mimetype or mimepart * @return array */ public function getDirectoryContent($directory, $mimetype_filter = '') { @@ -930,11 +939,11 @@ class View { } /** - * Get the owner for a file or folder - * - * @param string $path - * @return string - */ + * Get the owner for a file or folder + * + * @param string $path + * @return string + */ public function getOwner($path) { return $this->basicOperation('getOwner', $path); } diff --git a/lib/helper.php b/lib/helper.php index 41985ca57a7..2ba70294f4b 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -159,7 +159,7 @@ class OC_Helper { */ public static function imagePath( $app, $image ) { // Read the selected theme from the config file - $theme=OC_Config::getValue( "theme" ); + $theme = OC_Util::getTheme(); // Check if the app is in the app folder if( file_exists( OC::$SERVERROOT."/themes/$theme/apps/$app/img/$image" )) { @@ -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/installer.php b/lib/installer.php index 251d115b76c..49ba4492632 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -134,8 +134,10 @@ class OC_Installer{ } // check if the app is compatible with this version of ownCloud - $version=OC_Util::getVersion(); - if(!isset($info['require']) or ($version[0]>$info['require'])) { + if( + !isset($info['require']) + or !OC_App::isAppVersionCompatible(OC_Util::getVersion(), $info['require']) + ) { OC_Log::write('core', 'App can\'t be installed because it is not compatible with this version of ownCloud', OC_Log::ERROR); diff --git a/lib/json.php b/lib/json.php index f929e958957..6ba0b13806b 100644 --- a/lib/json.php +++ b/lib/json.php @@ -14,7 +14,7 @@ class OC_JSON{ public static function setContentTypeHeader($type='application/json') { if (!self::$send_content_type_header) { // We send json data - header( 'Content-Type: '.$type ); + header( 'Content-Type: '.$type . '; charset=utf-8'); self::$send_content_type_header = true; } } diff --git a/lib/l10n.php b/lib/l10n.php index 1e07a9b9557..315e326b292 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -298,10 +298,16 @@ class OC_L10N{ $temp = explode(';', $i); $temp[0] = str_replace('-', '_', $temp[0]); if( ($key = array_search($temp[0], $available)) !== false) { + if (is_null($app)) { + self::$language = $available[$key]; + } return $available[$key]; } foreach($available as $l) { if ( $temp[0] == substr($l, 0, 2) ) { + if (is_null($app)) { + self::$language = $l; + } return $l; } } diff --git a/lib/l10n/ar.php b/lib/l10n/ar.php index 77e02dd77b1..ae8233f80da 100644 --- a/lib/l10n/ar.php +++ b/lib/l10n/ar.php @@ -3,10 +3,53 @@ "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." => "اعداد كلمة مرور للمدير", +"%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/bg_BG.php b/lib/l10n/bg_BG.php index d32e2aadfc5..2d4775a89f3 100644 --- a/lib/l10n/bg_BG.php +++ b/lib/l10n/bg_BG.php @@ -18,7 +18,6 @@ "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, не можете да ползвате точки в името на базата от данни", diff --git a/lib/l10n/ca.php b/lib/l10n/ca.php index 108bb5c09be..16dc74f40c4 100644 --- a/lib/l10n/ca.php +++ b/lib/l10n/ca.php @@ -18,7 +18,6 @@ "Images" => "Imatges", "Set an admin username." => "Establiu un nom d'usuari per l'administrador.", "Set an admin password." => "Establiu una contrasenya per l'administrador.", -"Specify a data folder." => "Especifiqueu una carpeta de dades.", "%s enter the database username." => "%s escriviu el nom d'usuari de la base de dades.", "%s enter the database name." => "%s escriviu el nom de la base de dades.", "%s you may not use dots in the database name" => "%s no podeu usar punts en el nom de la base de dades", diff --git a/lib/l10n/cs_CZ.php b/lib/l10n/cs_CZ.php index d9ec3d82cf7..79161c74e8e 100644 --- a/lib/l10n/cs_CZ.php +++ b/lib/l10n/cs_CZ.php @@ -18,7 +18,6 @@ "Images" => "Obrázky", "Set an admin username." => "Zadejte uživatelské jméno správce.", "Set an admin password." => "Zadejte heslo správce.", -"Specify a data folder." => "Určete složku dat.", "%s enter the database username." => "Zadejte uživatelské jméno %s databáze.", "%s enter the database name." => "Zadejte název databáze pro %s databáze.", "%s you may not use dots in the database name" => "V názvu databáze %s nesmíte používat tečky.", diff --git a/lib/l10n/cy_GB.php b/lib/l10n/cy_GB.php new file mode 100644 index 00000000000..6cf88c15ccc --- /dev/null +++ b/lib/l10n/cy_GB.php @@ -0,0 +1,55 @@ +<?php $TRANSLATIONS = array( +"Help" => "Cymorth", +"Personal" => "Personol", +"Settings" => "Gosodiadau", +"Users" => "Defnyddwyr", +"Apps" => "Pecynnau", +"Admin" => "Gweinyddu", +"ZIP download is turned off." => "Mae llwytho ZIP wedi ei ddiffodd.", +"Files need to be downloaded one by one." => "Mae angen llwytho ffeiliau i lawr fesul un.", +"Back to Files" => "Nôl i Ffeiliau", +"Selected files too large to generate zip file." => "Mae'r ffeiliau ddewiswyd yn rhy fawr i gynhyrchu ffeil zip.", +"couldn't be determined" => "methwyd pennu", +"Application is not enabled" => "Nid yw'r pecyn wedi'i alluogi", +"Authentication error" => "Gwall dilysu", +"Token expired. Please reload page." => "Tocyn wedi dod i ben. Ail-lwythwch y dudalen.", +"Files" => "Ffeiliau", +"Text" => "Testun", +"Images" => "Delweddau", +"Set an admin username." => "Creu enw defnyddiwr i'r gweinyddwr.", +"Set an admin password." => "Gosod cyfrinair y gweinyddwr.", +"%s enter the database username." => "%s rhowch enw defnyddiwr y gronfa ddata.", +"%s enter the database name." => "%s rhowch enw'r gronfa ddata.", +"%s you may not use dots in the database name" => "%s does dim hawl defnyddio dot yn enw'r gronfa ddata", +"%s set the database host." => "%s gosod gwesteiwr y gronfa ddata.", +"PostgreSQL username and/or password not valid" => "Enw a/neu gyfrinair PostgreSQL annilys", +"You need to enter either an existing account or the administrator." => "Rhaid i chi naill ai gyflwyno cyfrif presennol neu'r gweinyddwr.", +"Oracle username and/or password not valid" => "Enw a/neu gyfrinair Oracle annilys", +"MySQL username and/or password not valid" => "Enw a/neu gyfrinair MySQL annilys", +"DB Error: \"%s\"" => "Gwall DB: \"%s\"", +"Offending command was: \"%s\"" => "Y gorchymyn wnaeth beri tramgwydd oedd: \"%s\"", +"MySQL user '%s'@'localhost' exists already." => "Defnyddiwr MySQL '%s'@'localhost' yn bodoli eisoes.", +"Drop this user from MySQL" => "Gollwng y defnyddiwr hwn o MySQL", +"MySQL user '%s'@'%%' already exists" => "Defnyddiwr MySQL '%s'@'%%' eisoes yn bodoli", +"Drop this user from MySQL." => "Gollwng y defnyddiwr hwn o MySQL.", +"Offending command was: \"%s\", name: %s, password: %s" => "Y gorchymyn wnaeth beri tramgwydd oedd: \"%s\", enw: %s, cyfrinair: %s", +"MS SQL username and/or password not valid: %s" => "Enw a/neu gyfrinair MS SQL annilys: %s", +"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Nid yw eich gweinydd wedi'i gyflunio eto i ganiatáu cydweddu ffeiliau oherwydd bod y rhyngwyneb WebDAV wedi torri.", +"Please double check the <a href='%s'>installation guides</a>." => "Gwiriwch y <a href='%s'>canllawiau gosod</a> eto.", +"seconds ago" => "eiliad yn ôl", +"1 minute ago" => "1 munud yn ôl", +"%d minutes ago" => "%d munud yn ôl", +"1 hour ago" => "1 awr yn ôl", +"%d hours ago" => "%d awr yn ôl", +"today" => "heddiw", +"yesterday" => "ddoe", +"%d days ago" => "%d diwrnod yn ôl", +"last month" => "mis diwethaf", +"%d months ago" => "%d mis yn ôl", +"last year" => "y llynedd", +"years ago" => "blwyddyn yn ôl", +"%s is available. Get <a href=\"%s\">more information</a>" => "%s ar gael. <a href=\"%s\">Mwy o wybodaeth</a>", +"up to date" => "cyfredol", +"updates check is disabled" => "gwirio am ddiweddariadau wedi'i analluogi", +"Could not find category \"%s\"" => "Methu canfod categori \"%s\"" +); diff --git a/lib/l10n/da.php b/lib/l10n/da.php index 38ccbbe8e21..4850d0be19a 100644 --- a/lib/l10n/da.php +++ b/lib/l10n/da.php @@ -18,7 +18,6 @@ "Images" => "Billeder", "Set an admin username." => "Angiv et admin brugernavn.", "Set an admin password." => "Angiv et admin kodeord.", -"Specify a data folder." => "Specificer en data mappe.", "%s enter the database username." => "%s indtast database brugernavnet.", "%s enter the database name." => "%s indtast database navnet.", "%s you may not use dots in the database name" => "%s du må ikke bruge punktummer i databasenavnet.", diff --git a/lib/l10n/de.php b/lib/l10n/de.php index 3c2069d4637..7a680574bfa 100644 --- a/lib/l10n/de.php +++ b/lib/l10n/de.php @@ -18,7 +18,6 @@ "Images" => "Bilder", "Set an admin username." => "Setze Administrator Benutzername.", "Set an admin password." => "Setze Administrator Passwort", -"Specify a data folder." => "Datei-Verzeichnis angeben.", "%s enter the database username." => "%s gib den Datenbank-Benutzernamen an.", "%s enter the database name." => "%s gib den Datenbank-Namen an.", "%s you may not use dots in the database name" => "%s Der Datenbank-Name darf keine Punkte enthalten", @@ -36,7 +35,7 @@ "Offending command was: \"%s\", name: %s, password: %s" => "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s", "MS SQL username and/or password not valid: %s" => "MS SQL Benutzername und/oder Password ungültig: %s", "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Dein Web-Server ist noch nicht für Datei-Synchronisation bereit, weil die WebDAV-Schnittstelle vermutlich defekt ist.", -"Please double check the <a href='%s'>installation guides</a>." => "Bitte prüfe die <a href='%s'>Instalationsanleitungen</a>.", +"Please double check the <a href='%s'>installation guides</a>." => "Bitte prüfe die <a href='%s'>Installationsanleitungen</a>.", "seconds ago" => "Gerade eben", "1 minute ago" => "Vor einer Minute", "%d minutes ago" => "Vor %d Minuten", diff --git a/lib/l10n/de_DE.php b/lib/l10n/de_DE.php index 9978cdf8b31..eb002c97be2 100644 --- a/lib/l10n/de_DE.php +++ b/lib/l10n/de_DE.php @@ -18,7 +18,6 @@ "Images" => "Bilder", "Set an admin username." => "Setze Administrator Benutzername.", "Set an admin password." => "Setze Administrator Passwort", -"Specify a data folder." => "Datei-Verzeichnis angeben", "%s enter the database username." => "%s geben Sie den Datenbank-Benutzernamen an.", "%s enter the database name." => "%s geben Sie den Datenbank-Namen an.", "%s you may not use dots in the database name" => "%s Der Datenbank-Name darf keine Punkte enthalten", @@ -36,7 +35,7 @@ "Offending command was: \"%s\", name: %s, password: %s" => "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s", "MS SQL username and/or password not valid: %s" => "MS SQL Benutzername und/oder Passwort ungültig: %s", "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Ihr Web-Server ist noch nicht für Datei-Synchronisation bereit, weil die WebDAV-Schnittstelle vermutlich defekt ist.", -"Please double check the <a href='%s'>installation guides</a>." => "Bitte prüfen Sie die <a href='%s'>Instalationsanleitungen</a>.", +"Please double check the <a href='%s'>installation guides</a>." => "Bitte prüfen Sie die <a href='%s'>Installationsanleitungen</a>.", "seconds ago" => "Gerade eben", "1 minute ago" => "Vor einer Minute", "%d minutes ago" => "Vor %d Minuten", diff --git a/lib/l10n/el.php b/lib/l10n/el.php index c17a33dfee1..63f5d8eb836 100644 --- a/lib/l10n/el.php +++ b/lib/l10n/el.php @@ -18,19 +18,22 @@ "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" => "δευτερόλεπτα πριν", diff --git a/lib/l10n/es.php b/lib/l10n/es.php index 37b15a375c4..5b868e2d451 100644 --- a/lib/l10n/es.php +++ b/lib/l10n/es.php @@ -18,7 +18,6 @@ "Images" => "Imágenes", "Set an admin username." => "Configurar un nombre de usuario del administrador", "Set an admin password." => "Configurar la contraseña del administrador.", -"Specify a data folder." => "Especificar la carpeta de datos.", "%s enter the database username." => "%s ingresar el usuario de la base de datos.", "%s enter the database name." => "%s ingresar el nombre de la base de datos", "%s you may not use dots in the database name" => "%s no se puede utilizar puntos en el nombre de la base de datos", diff --git a/lib/l10n/es_AR.php b/lib/l10n/es_AR.php index ff3d47285fc..fc25cd6b1d8 100644 --- a/lib/l10n/es_AR.php +++ b/lib/l10n/es_AR.php @@ -18,7 +18,6 @@ "Images" => "Imágenes", "Set an admin username." => "Configurar un nombre de administrador", "Set an admin password." => "Configurar una palabra clave de administrador", -"Specify a data folder." => "Especificar un directorio de datos", "%s enter the database username." => "%s Entre el Usuario de la Base de Datos", "%s enter the database name." => "%s Entre el Nombre de la Base de Datos", "%s you may not use dots in the database name" => "%s no puede usar puntos en el nombre de la Base de Datos", diff --git a/lib/l10n/et_EE.php b/lib/l10n/et_EE.php index cdcf762d9a6..25909e1555e 100644 --- a/lib/l10n/et_EE.php +++ b/lib/l10n/et_EE.php @@ -9,6 +9,7 @@ "Files need to be downloaded one by one." => "Failid tuleb alla laadida ükshaaval.", "Back to Files" => "Tagasi failide juurde", "Selected files too large to generate zip file." => "Valitud failid on ZIP-faili loomiseks liiga suured.", +"couldn't be determined" => "Ei suuda tuvastada", "Application is not enabled" => "Rakendus pole sisse lülitatud", "Authentication error" => "Autentimise viga", "Token expired. Please reload page." => "Kontrollkood aegus. Paelun lae leht uuesti.", @@ -17,10 +18,24 @@ "Images" => "Pildid", "Set an admin username." => "Määra admin kasutajanimi.", "Set an admin password." => "Määra admini parool.", -"Specify a data folder." => "Määra andmete kaust.", +"%s enter the database username." => "%s sisesta andmebaasi kasutajatunnus", +"%s enter the database name." => "%s sisesta andmebaasi nimi.", +"%s you may not use dots in the database name" => "%s punktide kasutamine andmebaasi nimes pole lubatud", +"%s set the database host." => "%s määra andmebaasi server.", +"PostgreSQL username and/or password not valid" => "PostgreSQL kasutajatunnus ja/või parool pole õiged", +"You need to enter either an existing account or the administrator." => "Sisesta kas juba olemasolev konto või administrator.", +"Oracle username and/or password not valid" => "Oracle kasutajatunnus ja/või parool pole õiged", +"MySQL username and/or password not valid" => "MySQL kasutajatunnus ja/või parool pole õiged", "DB Error: \"%s\"" => "Andmebaasi viga: \"%s\"", +"Offending command was: \"%s\"" => "Tõrkuv käsk oli: \"%s\"", +"MySQL user '%s'@'localhost' exists already." => "MySQL kasutaja '%s'@'localhost' on juba olemas.", "Drop this user from MySQL" => "Kustuta see kasutaja MySQL-ist", +"MySQL user '%s'@'%%' already exists" => "MySQL kasutaja '%s'@'%%' on juba olemas", "Drop this user from MySQL." => "Kustuta see kasutaja MySQL-ist.", +"Offending command was: \"%s\", name: %s, password: %s" => "Tõrkuv käsk oli: \"%s\", nimi: %s, parool: %s", +"MS SQL username and/or password not valid: %s" => "MS SQL kasutajatunnus ja/või parool pole õiged: %s", +"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Veebiserveri ei ole veel korralikult seadistatud võimaldamaks failide sünkroniseerimist, kuna WebDAV liides näib olevat mittetoimiv.", +"Please double check the <a href='%s'>installation guides</a>." => "Palun tutvu veelkord <a href='%s'>paigalduse juhenditega</a>.", "seconds ago" => "sekundit tagasi", "1 minute ago" => "1 minut tagasi", "%d minutes ago" => "%d minutit tagasi", @@ -35,5 +50,6 @@ "years ago" => "aastat tagasi", "%s is available. Get <a href=\"%s\">more information</a>" => "%s on saadaval. Vaata <a href=\"%s\">lisainfot</a>", "up to date" => "ajakohane", -"updates check is disabled" => "uuenduste kontrollimine on välja lülitatud" +"updates check is disabled" => "uuenduste kontrollimine on välja lülitatud", +"Could not find category \"%s\"" => "Ei leia kategooriat \"%s\"" ); diff --git a/lib/l10n/eu.php b/lib/l10n/eu.php index 36eb397e425..fde65572d8a 100644 --- a/lib/l10n/eu.php +++ b/lib/l10n/eu.php @@ -18,7 +18,6 @@ "Images" => "Irudiak", "Set an admin username." => "Ezarri administraziorako erabiltzaile izena.", "Set an admin password." => "Ezarri administraziorako pasahitza.", -"Specify a data folder." => "Zehaztu data karpeta.", "%s enter the database username." => "%s sartu datu basearen erabiltzaile izena.", "%s enter the database name." => "%s sartu datu basearen izena.", "%s you may not use dots in the database name" => "%s ezin duzu punturik erabili datu basearen izenean.", diff --git a/lib/l10n/fa.php b/lib/l10n/fa.php index 282a8a56cdc..b0d423421df 100644 --- a/lib/l10n/fa.php +++ b/lib/l10n/fa.php @@ -14,7 +14,8 @@ "Files" => "پروندهها", "Text" => "متن", "Images" => "تصاویر", -"Specify a data folder." => "پوشه ای برای داده ها مشخص کنید.", +"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" => "1 دقیقه پیش", "%d minutes ago" => "%d دقیقه پیش", diff --git a/lib/l10n/fi.php b/lib/l10n/fi.php new file mode 100644 index 00000000000..daaddb25e48 --- /dev/null +++ b/lib/l10n/fi.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"Settings" => "asetukset" +); diff --git a/lib/l10n/fi_FI.php b/lib/l10n/fi_FI.php index 89a584d389d..201cae19536 100644 --- a/lib/l10n/fi_FI.php +++ b/lib/l10n/fi_FI.php @@ -18,7 +18,6 @@ "Images" => "Kuvat", "Set an admin username." => "Aseta ylläpitäjän käyttäjätunnus.", "Set an admin password." => "Aseta ylläpitäjän salasana.", -"Specify a data folder." => "Määritä datakansio.", "%s enter the database username." => "%s anna tietokannan käyttäjätunnus.", "%s enter the database name." => "%s anna tietokannan nimi.", "%s you may not use dots in the database name" => "%s et voi käyttää pisteitä tietokannan nimessä", @@ -27,7 +26,9 @@ "MySQL username and/or password not valid" => "MySQL:n käyttäjätunnus ja/tai salasana on väärin", "DB Error: \"%s\"" => "Tietokantavirhe: \"%s\"", "MySQL user '%s'@'localhost' exists already." => "MySQL-käyttäjä '%s'@'localhost' on jo olemassa.", +"Drop this user from MySQL" => "Pudota tämä käyttäjä MySQL:stä", "MySQL user '%s'@'%%' already exists" => "MySQL-käyttäjä '%s'@'%%' on jo olemassa", +"Drop this user from MySQL." => "Pudota tämä käyttäjä MySQL:stä.", "MS SQL username and/or password not valid: %s" => "MS SQL -käyttäjätunnus ja/tai -salasana on väärin: %s", "Please double check the <a href='%s'>installation guides</a>." => "Lue tarkasti <a href='%s'>asennusohjeet</a>.", "seconds ago" => "sekuntia sitten", diff --git a/lib/l10n/fr.php b/lib/l10n/fr.php index 9448502df6a..ffc29450461 100644 --- a/lib/l10n/fr.php +++ b/lib/l10n/fr.php @@ -18,7 +18,6 @@ "Images" => "Images", "Set an admin username." => "Spécifiez un nom d'utilisateur pour l'administrateur.", "Set an admin password." => "Spécifiez un mot de passe administrateur.", -"Specify a data folder." => "Spécifiez un répertoire pour les données.", "%s enter the database username." => "%s entrez le nom d'utilisateur de la base de données.", "%s enter the database name." => "%s entrez le nom de la base de données.", "%s you may not use dots in the database name" => "%s vous nez pouvez pas utiliser de points dans le nom de la base de données", diff --git a/lib/l10n/gl.php b/lib/l10n/gl.php index a11724fef43..d38bf8329d1 100644 --- a/lib/l10n/gl.php +++ b/lib/l10n/gl.php @@ -18,7 +18,6 @@ "Images" => "Imaxes", "Set an admin username." => "Estabeleza un nome de usuario administrador", "Set an admin password." => "Estabeleza un contrasinal de administrador", -"Specify a data folder." => "Especifique un cartafol de datos.", "%s enter the database username." => "%s introduza o nome de usuario da base de datos", "%s enter the database name." => "%s introduza o nome da base de datos", "%s you may not use dots in the database name" => "%s non se poden empregar puntos na base de datos", diff --git a/lib/l10n/hr.php b/lib/l10n/hr.php index 62305c15711..8b0dd6de0a1 100644 --- a/lib/l10n/hr.php +++ b/lib/l10n/hr.php @@ -3,6 +3,7 @@ "Personal" => "Osobno", "Settings" => "Postavke", "Users" => "Korisnici", +"Admin" => "Administrator", "Authentication error" => "Greška kod autorizacije", "Files" => "Datoteke", "Text" => "Tekst", diff --git a/lib/l10n/hu_HU.php b/lib/l10n/hu_HU.php index 537066c6fea..4621c5074b8 100644 --- a/lib/l10n/hu_HU.php +++ b/lib/l10n/hu_HU.php @@ -18,7 +18,6 @@ "Images" => "Képek", "Set an admin username." => "Állítson be egy felhasználói nevet az adminisztrációhoz.", "Set an admin password." => "Állítson be egy jelszót az adminisztrációhoz.", -"Specify a data folder." => "Adja meg az adatokat tartalmazó könyvtár nevét.", "%s enter the database username." => "%s adja meg az adatbázist elérő felhasználó login nevét.", "%s enter the database name." => "%s adja meg az adatbázis nevét.", "%s you may not use dots in the database name" => "%s az adatbázis neve nem tartalmazhat pontot", diff --git a/lib/l10n/ia.php b/lib/l10n/ia.php index 05b2c88e1ed..e790c41d072 100644 --- a/lib/l10n/ia.php +++ b/lib/l10n/ia.php @@ -3,6 +3,7 @@ "Personal" => "Personal", "Settings" => "Configurationes", "Users" => "Usatores", +"Admin" => "Administration", "Files" => "Files", "Text" => "Texto" ); diff --git a/lib/l10n/id.php b/lib/l10n/id.php index 8f0e38123b6..7eb26c5eb86 100644 --- a/lib/l10n/id.php +++ b/lib/l10n/id.php @@ -1,34 +1,55 @@ <?php $TRANSLATIONS = array( -"Help" => "bantu", -"Personal" => "perseorangan", -"Settings" => "pengaturan", -"Users" => "pengguna", -"Apps" => "aplikasi", -"Admin" => "admin", -"ZIP download is turned off." => "download ZIP sedang dimatikan", -"Files need to be downloaded one by one." => "file harus di unduh satu persatu", -"Back to Files" => "kembali ke daftar file", -"Selected files too large to generate zip file." => "file yang dipilih terlalu besar untuk membuat file zip", -"Application is not enabled" => "aplikasi tidak diaktifkan", -"Authentication error" => "autentikasi bermasalah", -"Token expired. Please reload page." => "token kadaluarsa.mohon perbaharui laman.", +"Help" => "Bantuan", +"Personal" => "Pribadi", +"Settings" => "Setelan", +"Users" => "Pengguna", +"Apps" => "Aplikasi", +"Admin" => "Admin", +"ZIP download is turned off." => "Pengunduhan ZIP dimatikan.", +"Files need to be downloaded one by one." => "Berkas harus diunduh satu persatu.", +"Back to Files" => "Kembali ke Daftar Berkas", +"Selected files too large to generate zip file." => "Berkas yang dipilih terlalu besar untuk dibuat berkas zip-nya.", +"couldn't be determined" => "tidak dapat ditentukan", +"Application is not enabled" => "Aplikasi tidak diaktifkan", +"Authentication error" => "Galat saat autentikasi", +"Token expired. Please reload page." => "Token kedaluwarsa. Silakan muat ulang halaman.", "Files" => "Berkas", -"Text" => "teks", +"Text" => "Teks", "Images" => "Gambar", +"Set an admin username." => "Setel nama pengguna admin.", +"Set an admin password." => "Setel sandi admin.", +"%s enter the database username." => "%s masukkan nama pengguna basis data.", +"%s enter the database name." => "%s masukkan nama basis data.", +"%s you may not use dots in the database name" => "%sAnda tidak boleh menggunakan karakter titik pada nama basis data", +"%s set the database host." => "%s setel host basis data.", +"PostgreSQL username and/or password not valid" => "Nama pengguna dan/atau sandi PostgreSQL tidak valid", +"You need to enter either an existing account or the administrator." => "Anda harus memasukkan akun yang sudah ada atau administrator.", +"Oracle username and/or password not valid" => "Nama pengguna dan/atau sandi Oracle tidak valid", +"MySQL username and/or password not valid" => "Nama pengguna dan/atau sandi MySQL tidak valid", +"DB Error: \"%s\"" => "Galat Basis Data: \"%s\"", +"Offending command was: \"%s\"" => "Perintah yang bermasalah: \"%s\"", +"MySQL user '%s'@'localhost' exists already." => "Pengguna MySQL '%s'@'localhost' sudah ada.", +"Drop this user from MySQL" => "Hapus pengguna ini dari MySQL", +"MySQL user '%s'@'%%' already exists" => "Pengguna MySQL '%s'@'%%' sudah ada.", +"Drop this user from MySQL." => "Hapus pengguna ini dari MySQL.", +"Offending command was: \"%s\", name: %s, password: %s" => "Perintah yang bermasalah: \"%s\", nama pengguna: %s, sandi: %s", +"MS SQL username and/or password not valid: %s" => "Nama pengguna dan/atau sandi MySQL tidak valid: %s", +"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Web server Anda belum dikonfigurasikan dengan baik untuk mengizinkan sinkronisasi berkas karena tampaknya antarmuka WebDAV rusak.", +"Please double check the <a href='%s'>installation guides</a>." => "Silakan periksa ulang <a href='%s'>panduan instalasi</a>.", "seconds ago" => "beberapa detik yang lalu", -"1 minute ago" => "1 menit lalu", -"%d minutes ago" => "%d menit lalu", +"1 minute ago" => "1 menit yang lalu", +"%d minutes ago" => "%d menit yang lalu", "1 hour ago" => "1 jam yang lalu", "%d hours ago" => "%d jam yang lalu", "today" => "hari ini", "yesterday" => "kemarin", -"%d days ago" => "%d hari lalu", +"%d days ago" => "%d hari yang lalu", "last month" => "bulan kemarin", "%d months ago" => "%d bulan yang lalu", "last year" => "tahun kemarin", "years ago" => "beberapa tahun lalu", -"%s is available. Get <a href=\"%s\">more information</a>" => "%s tersedia. dapatkan <a href=\"%s\"> info lebih lanjut</a>", +"%s is available. Get <a href=\"%s\">more information</a>" => "%s tersedia. Dapatkan <a href=\"%s\">info lebih lanjut</a>", "up to date" => "terbaru", -"updates check is disabled" => "pengecekan pembaharuan sedang non-aktifkan", +"updates check is disabled" => "Pemeriksaan pembaruan dinonaktifkan.", "Could not find category \"%s\"" => "Tidak dapat menemukan kategori \"%s\"" ); diff --git a/lib/l10n/it.php b/lib/l10n/it.php index 297f1efde05..847f767fa76 100644 --- a/lib/l10n/it.php +++ b/lib/l10n/it.php @@ -18,7 +18,6 @@ "Images" => "Immagini", "Set an admin username." => "Imposta un nome utente di amministrazione.", "Set an admin password." => "Imposta una password di amministrazione.", -"Specify a data folder." => "Specifica una cartella dei dati.", "%s enter the database username." => "%s digita il nome utente del database.", "%s enter the database name." => "%s digita il nome del database.", "%s you may not use dots in the database name" => "%s non dovresti utilizzare punti nel nome del database", diff --git a/lib/l10n/ja_JP.php b/lib/l10n/ja_JP.php index 529eec3ac52..18d0833792d 100644 --- a/lib/l10n/ja_JP.php +++ b/lib/l10n/ja_JP.php @@ -18,7 +18,6 @@ "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 ではデータベース名にドットを利用できないかもしれません。", @@ -37,7 +36,7 @@ "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インタフェースが動作していないと考えられるため、あなたのWEBサーバはまだファイルの同期を許可するように適切な設定がされていません。", "Please double check the <a href='%s'>installation guides</a>." => "<a href='%s'>インストールガイド</a>をよく確認してください。", -"seconds ago" => "秒前", +"seconds ago" => "数秒前", "1 minute ago" => "1分前", "%d minutes ago" => "%d 分前", "1 hour ago" => "1 時間前", diff --git a/lib/l10n/ka_GE.php b/lib/l10n/ka_GE.php index ff623827216..ffdf549f480 100644 --- a/lib/l10n/ka_GE.php +++ b/lib/l10n/ka_GE.php @@ -5,16 +5,51 @@ "Users" => "მომხმარებელი", "Apps" => "აპლიკაციები", "Admin" => "ადმინისტრატორი", +"ZIP download is turned off." => "ZIP download–ი გათიშულია", +"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." => "Token–ს ვადა გაუვიდა. გთხოვთ განაახლოთ გვერდი.", "Files" => "ფაილები", "Text" => "ტექსტი", +"Images" => "სურათები", +"Set an admin username." => "დააყენეთ ადმინისტრატორის სახელი.", +"Set an admin password." => "დააყენეთ ადმინისტრატორის პაროლი.", +"%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\"" => "DB შეცდომა: \"%s\"", +"Offending command was: \"%s\"" => "Offending ბრძანება იყო: \"%s\"", +"MySQL user '%s'@'localhost' exists already." => "MySQL მომხმარებელი '%s'@'localhost' უკვე არსებობს.", +"Drop this user from MySQL" => "წაშალე ეს მომხამრებელი MySQL–იდან", +"MySQL user '%s'@'%%' already exists" => "MySQL მომხმარებელი '%s'@'%%' უკვე არსებობს", +"Drop this user from MySQL." => "წაშალე ეს მომხამრებელი MySQL–იდან", +"Offending command was: \"%s\", name: %s, password: %s" => "Offending ბრძანება იყო: \"%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 წუთის წინ", +"1 hour ago" => "1 საათის წინ", +"%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" => "განახლების ძებნა გათიშულია" +"updates check is disabled" => "განახლების ძებნა გათიშულია", +"Could not find category \"%s\"" => "\"%s\" კატეგორიის მოძებნა ვერ მოხერხდა" ); diff --git a/lib/l10n/ku_IQ.php b/lib/l10n/ku_IQ.php index f89871f23c9..f3165b8586b 100644 --- a/lib/l10n/ku_IQ.php +++ b/lib/l10n/ku_IQ.php @@ -1,5 +1,6 @@ <?php $TRANSLATIONS = array( "Help" => "یارمەتی", "Settings" => "دهستكاری", -"Users" => "بهكارهێنهر" +"Users" => "بهكارهێنهر", +"Admin" => "بهڕێوهبهری سهرهكی" ); diff --git a/lib/l10n/lb.php b/lib/l10n/lb.php index 06e8b2ca094..16f1f674e95 100644 --- a/lib/l10n/lb.php +++ b/lib/l10n/lb.php @@ -2,6 +2,7 @@ "Help" => "Hëllef", "Personal" => "Perséinlech", "Settings" => "Astellungen", +"Admin" => "Admin", "Authentication error" => "Authentifikatioun's Fehler", "Files" => "Dateien", "Text" => "SMS", diff --git a/lib/l10n/lv.php b/lib/l10n/lv.php index c73d306ca0a..38793914073 100644 --- a/lib/l10n/lv.php +++ b/lib/l10n/lv.php @@ -18,7 +18,6 @@ "Images" => "Attēli", "Set an admin username." => "Iestatiet administratora lietotājvārdu.", "Set an admin password." => "Iestatiet administratora paroli.", -"Specify a data folder." => "Norādiet datu mapi.", "%s enter the database username." => "%s ievadiet datubāzes lietotājvārdu.", "%s enter the database name." => "%s ievadiet datubāzes nosaukumu.", "%s you may not use dots in the database name" => "%s datubāžu nosaukumos nedrīkst izmantot punktus", diff --git a/lib/l10n/ms_MY.php b/lib/l10n/ms_MY.php index 5afee1cb5a8..732ea96c6b7 100644 --- a/lib/l10n/ms_MY.php +++ b/lib/l10n/ms_MY.php @@ -3,6 +3,7 @@ "Personal" => "Peribadi", "Settings" => "Tetapan", "Users" => "Pengguna", +"Admin" => "Admin", "Authentication error" => "Ralat pengesahan", "Files" => "Fail-fail", "Text" => "Teks" diff --git a/lib/l10n/nl.php b/lib/l10n/nl.php index e26a663e9cc..f7cc6ad899c 100644 --- a/lib/l10n/nl.php +++ b/lib/l10n/nl.php @@ -18,7 +18,6 @@ "Images" => "Afbeeldingen", "Set an admin username." => "Stel de gebruikersnaam van de beheerder in.", "Set an admin password." => "Stel een beheerderswachtwoord in.", -"Specify a data folder." => "Geef een datamap op.", "%s enter the database username." => "%s opgeven database gebruikersnaam.", "%s enter the database name." => "%s opgeven databasenaam.", "%s you may not use dots in the database name" => "%s er mogen geen puntjes in de databasenaam voorkomen", @@ -36,7 +35,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/nn_NO.php b/lib/l10n/nn_NO.php index faf7440320a..4de21cd9c23 100644 --- a/lib/l10n/nn_NO.php +++ b/lib/l10n/nn_NO.php @@ -3,6 +3,7 @@ "Personal" => "Personleg", "Settings" => "Innstillingar", "Users" => "Brukarar", +"Admin" => "Administrer", "Authentication error" => "Feil i autentisering", "Files" => "Filer", "Text" => "Tekst" diff --git a/lib/l10n/pl.php b/lib/l10n/pl.php index 9a1a5e836c9..c508794c42a 100644 --- a/lib/l10n/pl.php +++ b/lib/l10n/pl.php @@ -18,7 +18,6 @@ "Images" => "Obrazy", "Set an admin username." => "Ustaw nazwę administratora.", "Set an admin password." => "Ustaw hasło administratora.", -"Specify a data folder." => "Określ folder danych.", "%s enter the database username." => "%s wpisz nazwę użytkownika do bazy", "%s enter the database name." => "%s wpisz nazwę bazy.", "%s you may not use dots in the database name" => "%s nie można używać kropki w nazwie bazy danych", diff --git a/lib/l10n/pt_BR.php b/lib/l10n/pt_BR.php index d4f410d8885..8196b43be23 100644 --- a/lib/l10n/pt_BR.php +++ b/lib/l10n/pt_BR.php @@ -18,7 +18,6 @@ "Images" => "Imagens", "Set an admin username." => "Defina um nome de usuário de administrador.", "Set an admin password." => "Defina uma senha de administrador.", -"Specify a data folder." => "Especifique uma pasta de dados.", "%s enter the database username." => "%s insira o nome de usuário do banco de dados.", "%s enter the database name." => "%s insira o nome do banco de dados.", "%s you may not use dots in the database name" => "%s você não pode usar pontos no nome do banco de dados", diff --git a/lib/l10n/pt_PT.php b/lib/l10n/pt_PT.php index 2c813f5b07c..12470686e7e 100644 --- a/lib/l10n/pt_PT.php +++ b/lib/l10n/pt_PT.php @@ -18,7 +18,6 @@ "Images" => "Imagens", "Set an admin username." => "Definir um nome de utilizador de administrador", "Set an admin password." => "Definiar uma password de administrador", -"Specify a data folder." => "Especificar a pasta para os dados.", "%s enter the database username." => "%s introduza o nome de utilizador da base de dados", "%s enter the database name." => "%s introduza o nome da base de dados", "%s you may not use dots in the database name" => "%s não é permitido utilizar pontos (.) no nome da base de dados", diff --git a/lib/l10n/ru.php b/lib/l10n/ru.php index 25a88d5efc2..6f351cd4584 100644 --- a/lib/l10n/ru.php +++ b/lib/l10n/ru.php @@ -18,7 +18,6 @@ "Images" => "Изображения", "Set an admin username." => "Установить имя пользователя для admin.", "Set an admin password." => "становит пароль для admin.", -"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 Вы не можете использовать точки в имени базы данных", diff --git a/lib/l10n/sk_SK.php b/lib/l10n/sk_SK.php index 8c9ce61622c..2ab255ef8fe 100644 --- a/lib/l10n/sk_SK.php +++ b/lib/l10n/sk_SK.php @@ -18,7 +18,6 @@ "Images" => "Obrázky", "Set an admin username." => "Zadajte používateľské meno administrátora.", "Set an admin password." => "Zadajte heslo administrátora.", -"Specify a data folder." => "Zadajte priečinok pre dáta.", "%s enter the database username." => "Zadajte používateľské meno %s databázy..", "%s enter the database name." => "Zadajte názov databázy pre %s databázy.", "%s you may not use dots in the database name" => "V názve databázy %s nemôžete používať bodky", diff --git a/lib/l10n/sl.php b/lib/l10n/sl.php index c0363031979..8775cdd0303 100644 --- a/lib/l10n/sl.php +++ b/lib/l10n/sl.php @@ -18,15 +18,14 @@ "Images" => "Slike", "Set an admin username." => "Nastavi uporabniško ime skrbnika.", "Set an admin password." => "Nastavi geslo skrbnika.", -"Specify a data folder." => "Določi podatkovno mapo.", "%s enter the database username." => "%s - vnos uporabniškega imena podatkovne zbirke.", "%s enter the database name." => "%s - vnos imena podatkovne zbirke.", -"%s you may not use dots in the database name" => "%s - v imenu podatkovne zbirke ni dovoljeno vpisati pik.", +"%s you may not use dots in the database name" => "%s - v imenu podatkovne zbirke ni dovoljeno uporabljati pik.", "%s set the database host." => "%s - vnos gostitelja podatkovne zbirke.", -"PostgreSQL username and/or password not valid" => "Uporabniško ime ali geslo PostgreSQL ni pravilno", +"PostgreSQL username and/or password not valid" => "Uporabniško ime ali geslo PostgreSQL ni veljavno", "You need to enter either an existing account or the administrator." => "Prijaviti se je treba v obstoječi ali pa skrbniški račun.", -"Oracle username and/or password not valid" => "Uporabniško ime ali geslo Oracle ni pravilno", -"MySQL username and/or password not valid" => "Uporabniško ime ali geslo MySQL ni pravilno", +"Oracle username and/or password not valid" => "Uporabniško ime ali geslo Oracle ni veljavno", +"MySQL username and/or password not valid" => "Uporabniško ime ali geslo MySQL ni veljavno", "DB Error: \"%s\"" => "Napaka podatkovne zbirke: \"%s\"", "Offending command was: \"%s\"" => "Napačni ukaz je: \"%s\"", "MySQL user '%s'@'localhost' exists already." => "Uporabnik MySQL '%s'@'localhost' že obstaja.", @@ -34,7 +33,7 @@ "MySQL user '%s'@'%%' already exists" => "Uporabnik MySQL '%s'@'%%' že obstaja.", "Drop this user from MySQL." => "Odstrani uporabnika s podatkovne zbirke MySQL", "Offending command was: \"%s\", name: %s, password: %s" => "Napačni ukaz je: \"%s\", ime: %s, geslo: %s", -"MS SQL username and/or password not valid: %s" => "Uporabniško ime ali geslo MS SQL ni pravilno: %s", +"MS SQL username and/or password not valid: %s" => "Uporabniško ime ali geslo MS SQL ni veljavno: %s", "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Spletni stražnik še ni ustrezno nastavljen in ne omogoča usklajevanja, saj je nastavitev WebDAV okvarjena.", "Please double check the <a href='%s'>installation guides</a>." => "Preverite <a href='%s'>navodila namestitve</a>.", "seconds ago" => "pred nekaj sekundami", diff --git a/lib/l10n/sq.php b/lib/l10n/sq.php new file mode 100644 index 00000000000..649af3c5c25 --- /dev/null +++ b/lib/l10n/sq.php @@ -0,0 +1,55 @@ +<?php $TRANSLATIONS = array( +"Help" => "Ndihmë", +"Personal" => "Personale", +"Settings" => "Parametrat", +"Users" => "Përdoruesit", +"Apps" => "App", +"Admin" => "Admin", +"ZIP download is turned off." => "Shkarimi i skedarëve ZIP është i çaktivizuar.", +"Files need to be downloaded one by one." => "Skedarët duhet të shkarkohen një nga një.", +"Back to Files" => "Kthehu tek skedarët", +"Selected files too large to generate zip file." => "Skedarët e selektuar janë shumë të mëdhenj për të krijuar një skedar ZIP.", +"couldn't be determined" => "nuk u vendos dot", +"Application is not enabled" => "Programi nuk është i aktivizuar.", +"Authentication error" => "Veprim i gabuar gjatë vërtetimit të identitetit", +"Token expired. Please reload page." => "Përmbajtja ka skaduar. Ju lutemi ringarkoni faqen.", +"Files" => "Skedarët", +"Text" => "Tekst", +"Images" => "Foto", +"Set an admin username." => "Cakto emrin e administratorit.", +"Set an admin password." => "Cakto kodin e administratorit.", +"%s enter the database username." => "% shkruani përdoruesin e database-it.", +"%s enter the database name." => "%s shkruani emrin e database-it.", +"%s you may not use dots in the database name" => "%s nuk mund të përdorni pikat tek emri i database-it", +"%s set the database host." => "%s caktoni pozicionin (host) e database-it.", +"PostgreSQL username and/or password not valid" => "Përdoruesi dhe/apo kodi i PostgreSQL i pavlefshëm", +"You need to enter either an existing account or the administrator." => "Duhet të përdorni një llogari ekzistuese ose llogarinë e administratorit.", +"Oracle username and/or password not valid" => "Përdoruesi dhe/apo kodi i Oracle-it i pavlefshëm", +"MySQL username and/or password not valid" => "Përdoruesi dhe/apo kodi i MySQL-it i pavlefshëm.", +"DB Error: \"%s\"" => "Veprim i gabuar i DB-it: \"%s\"", +"Offending command was: \"%s\"" => "Komanda e gabuar ishte: \"%s\"", +"MySQL user '%s'@'localhost' exists already." => "Përdoruesi MySQL '%s'@'localhost' ekziston.", +"Drop this user from MySQL" => "Eliminoni këtë përdorues nga MySQL", +"MySQL user '%s'@'%%' already exists" => "Përdoruesi MySQL '%s'@'%%' ekziston", +"Drop this user from MySQL." => "Eliminoni këtë përdorues nga MySQL.", +"Offending command was: \"%s\", name: %s, password: %s" => "Komanda e gabuar ishte: \"%s\", përdoruesi: %s, kodi: %s", +"MS SQL username and/or password not valid: %s" => "Përdoruesi dhe/apo kodi i MS SQL i pavlefshëm: %s", +"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Serveri web i juaji nuk është konfiguruar akoma për të lejuar sinkronizimin e skedarëve sepse ndërfaqja WebDAV mund të jetë e dëmtuar.", +"Please double check the <a href='%s'>installation guides</a>." => "Ju lutemi kontrolloni mirë <a href='%s'>shoqëruesin e instalimit</a>.", +"seconds ago" => "sekonda më parë", +"1 minute ago" => "1 minutë më parë", +"%d minutes ago" => "%d minuta më parë", +"1 hour ago" => "1 orë më parë", +"%d hours ago" => "%d orë më parë", +"today" => "sot", +"yesterday" => "dje", +"%d days ago" => "%d ditë më parë", +"last month" => "muajin e shkuar", +"%d months ago" => "%d muaj më parë", +"last year" => "vitin e shkuar", +"years ago" => "vite më parë", +"%s is available. Get <a href=\"%s\">more information</a>" => "%s është i disponueshëm. <a href=\"%s\">Informohuni këtu</a>", +"up to date" => "i azhornuar", +"updates check is disabled" => "kontrollimi i azhurnimeve është i çaktivizuar", +"Could not find category \"%s\"" => "Kategoria \"%s\" nuk u gjet" +); diff --git a/lib/l10n/sr.php b/lib/l10n/sr.php index 1161b0a44b7..5c6620f82ba 100644 --- a/lib/l10n/sr.php +++ b/lib/l10n/sr.php @@ -16,6 +16,8 @@ "Files" => "Датотеке", "Text" => "Текст", "Images" => "Слике", +"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" => "пре 1 минут", "%d minutes ago" => "пре %d минута", diff --git a/lib/l10n/sr@latin.php b/lib/l10n/sr@latin.php index 3fc1f61eafa..2f0a97fd77f 100644 --- a/lib/l10n/sr@latin.php +++ b/lib/l10n/sr@latin.php @@ -3,6 +3,7 @@ "Personal" => "Lično", "Settings" => "Podešavanja", "Users" => "Korisnici", +"Admin" => "Adninistracija", "Authentication error" => "Greška pri autentifikaciji", "Files" => "Fajlovi", "Text" => "Tekst" diff --git a/lib/l10n/te.php b/lib/l10n/te.php new file mode 100644 index 00000000000..87c73d790e2 --- /dev/null +++ b/lib/l10n/te.php @@ -0,0 +1,13 @@ +<?php $TRANSLATIONS = array( +"Help" => "సహాయం", +"Settings" => "అమరికలు", +"Users" => "వాడుకరులు", +"seconds ago" => "క్షణాల క్రితం", +"1 minute ago" => "1 నిమిషం క్రితం", +"1 hour ago" => "1 గంట క్రితం", +"today" => "ఈరోజు", +"yesterday" => "నిన్న", +"last month" => "పోయిన నెల", +"last year" => "పోయిన సంవత్సరం", +"years ago" => "సంవత్సరాల క్రితం" +); diff --git a/lib/l10n/tr.php b/lib/l10n/tr.php index ab237cfe2e7..4a8292989ab 100644 --- a/lib/l10n/tr.php +++ b/lib/l10n/tr.php @@ -16,7 +16,18 @@ "Files" => "Dosyalar", "Text" => "Metin", "Images" => "Resimler", +"Set an admin username." => "Bir adi kullanici vermek. ", +"Set an admin password." => "Parola yonetici birlemek. ", +"PostgreSQL username and/or password not valid" => "PostgreSQL adi kullanici ve/veya parola yasal degildir. ", +"You need to enter either an existing account or the administrator." => "Bir konto veya kullanici birlemek ihtiyacin. ", +"Oracle username and/or password not valid" => "Adi klullanici ve/veya parola Oracle mantikli değildir. ", +"DB Error: \"%s\"" => "DB Hata: ''%s''", +"Offending command was: \"%s\"" => "Komut rahasiz ''%s''. ", +"MySQL user '%s'@'localhost' exists already." => "MySQL kullanici '%s @local host zatan var. ", +"Drop this user from MySQL" => "Bu kullanici MySQLden list disari koymak. ", +"MySQL user '%s'@'%%' already exists" => "MySQL kullanici '%s @ % % zaten var (zaten yazili)", "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.", +"Please double check the <a href='%s'>installation guides</a>." => "Lütfen <a href='%s'>kurulum kılavuzlarını</a> iki kez kontrol edin.", "seconds ago" => "saniye önce", "1 minute ago" => "1 dakika önce", "%d minutes ago" => "%d dakika önce", diff --git a/lib/l10n/uk.php b/lib/l10n/uk.php index 68f7151d15e..9dfc16c3464 100644 --- a/lib/l10n/uk.php +++ b/lib/l10n/uk.php @@ -18,7 +18,6 @@ "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 не можна використовувати крапки в назві бази даних", diff --git a/lib/l10n/zh_CN.GB2312.php b/lib/l10n/zh_CN.GB2312.php index 08975e44598..16487339421 100644 --- a/lib/l10n/zh_CN.GB2312.php +++ b/lib/l10n/zh_CN.GB2312.php @@ -15,9 +15,12 @@ "Files" => "文件", "Text" => "文本", "Images" => "图片", +"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" => "1 分钟前", "%d minutes ago" => "%d 分钟前", +"1 hour ago" => "1小时前", "today" => "今天", "yesterday" => "昨天", "%d days ago" => "%d 天前", diff --git a/lib/l10n/zh_CN.php b/lib/l10n/zh_CN.php index b79fdfcca1d..2dea94dec36 100644 --- a/lib/l10n/zh_CN.php +++ b/lib/l10n/zh_CN.php @@ -18,7 +18,6 @@ "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 您不能在数据库名称中使用英文句号。", diff --git a/lib/l10n/zh_TW.php b/lib/l10n/zh_TW.php index 91b0329e246..fbcf81ad3a4 100644 --- a/lib/l10n/zh_TW.php +++ b/lib/l10n/zh_TW.php @@ -5,10 +5,10 @@ "Users" => "使用者", "Apps" => "應用程式", "Admin" => "管理", -"ZIP download is turned off." => "ZIP 下載已關閉", -"Files need to be downloaded one by one." => "檔案需要逐一下載", +"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." => "選擇的檔案太大以致於無法產生壓縮檔", +"Selected files too large to generate zip file." => "選擇的檔案太大以致於無法產生壓縮檔。", "couldn't be determined" => "無法判斷", "Application is not enabled" => "應用程式未啟用", "Authentication error" => "認證錯誤", @@ -16,6 +16,24 @@ "Files" => "檔案", "Text" => "文字", "Images" => "圖片", +"Set an admin username." => "設定管理員帳號。", +"Set an admin password." => "設定管理員密碼。", +"%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 移除這個使用者", +"MySQL user '%s'@'%%' already exists" => "MySQL 使用者 '%s'@'%%' 已經存在", +"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" => "幾秒前", @@ -32,6 +50,6 @@ "years ago" => "幾年前", "%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/log/owncloud.php b/lib/log/owncloud.php index 20df52c27bb..7a11a588330 100644 --- a/lib/log/owncloud.php +++ b/lib/log/owncloud.php @@ -49,7 +49,8 @@ class OC_Log_Owncloud { public static function write($app, $message, $level) { $minLevel=min(OC_Config::getValue( "loglevel", OC_Log::WARN ), OC_Log::ERROR); if($level>=$minLevel) { - $entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=>time()); + $time = date("F d, Y H:i:s", time()); + $entry=array('app'=>$app, 'message'=>$message, 'level'=>$level, 'time'=> $time); $handle = @fopen(self::$logFile, 'a'); if ($handle) { fwrite($handle, json_encode($entry)."\n"); diff --git a/lib/mimetypes.list.php b/lib/mimetypes.list.php index 86ce9c6c237..9135a7e3af2 100644 --- a/lib/mimetypes.list.php +++ b/lib/mimetypes.list.php @@ -98,5 +98,9 @@ return array( 'epub' => 'application/epub+zip', 'mobi' => 'application/x-mobipocket-ebook', 'exe' => 'application', - 'msi' => 'application' + 'msi' => 'application', + 'md' => 'text/markdown', + 'markdown' => 'text/markdown', + 'mdown' => 'text/markdown', + 'mdwn' => 'text/markdown' ); diff --git a/lib/public/files.php b/lib/public/files.php index 700bf574537..4975bbb7dfa 100644 --- a/lib/public/files.php +++ b/lib/public/files.php @@ -56,6 +56,16 @@ class Files { } /** + * search for files by mimetype + * + * @param string $query + * @return array + */ + public function searchByMime($mimetype) { + return(\OC\Files\Filesystem::searchByMime( $mimetype )); + } + + /** * copy the contents of one stream to another * @param resource source * @param resource target diff --git a/lib/public/share.php b/lib/public/share.php index 8b8a41d47c0..4b337530be8 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -661,6 +661,7 @@ class Share { } } $backend = self::getBackend($itemType); + $collectionTypes = false; // Get filesystem root to add it to the file target and remove from the // file source, match file_source with the file cache if ($itemType == 'file' || $itemType == 'folder') { @@ -1145,7 +1146,7 @@ class Share { 'itemTarget' => $groupItemTarget, 'parent' => $parent, 'shareType' => $shareType, - 'shareWith' => $uid, + 'shareWith' => $shareWith['group'], 'uidOwner' => $uidOwner, 'permissions' => $permissions, 'fileSource' => $fileSource, diff --git a/lib/public/util.php b/lib/public/util.php index db07cbcfff3..6744c2d37bd 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -217,6 +217,7 @@ class Util { */ public static function getDefaultEmailAddress($user_part) { $host_name = self::getServerHostName(); + $host_name = \OC_Config::getValue('mail_domain', $host_name); $defaultEmailAddress = $user_part.'@'.$host_name; if (\OC_Mail::ValidateAddress($defaultEmailAddress)) { diff --git a/lib/setup.php b/lib/setup.php index bee70e7ebcc..81621c10146 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -37,7 +37,7 @@ class OC_Setup { $error[] = $l->t('Set an admin password.'); } if(empty($options['directory'])) { - $error[] = $l->t('Specify a data folder.'); + $options['directory'] = OC::$SERVERROOT."/data"; } if($dbtype == 'mysql' or $dbtype == 'pgsql' or $dbtype == 'oci' or $dbtype == 'mssql') { //mysql and postgresql needs more config options @@ -70,6 +70,10 @@ class OC_Setup { $password = htmlspecialchars_decode($options['adminpass']); $datadir = htmlspecialchars_decode($options['directory']); + if (OC_Util::runningOnWindows()) { + $datadir = rtrim(realpath($datadir), '\\'); + } + //use sqlite3 when available, otherise sqlite2 will be used. if($dbtype=='sqlite' and class_exists('SQLite3')) { $dbtype='sqlite3'; @@ -183,6 +187,7 @@ class OC_Setup { unlink("$datadir/owncloud.db"); } //in case of sqlite, we can always fill the database + error_log("creating sqlite db"); OC_DB::createDbFromStructure('db_structure.xml'); } @@ -191,7 +196,7 @@ class OC_Setup { OC_User::createUser($username, $password); } catch(Exception $exception) { - $error[] = $exception->getMessage(); + $error[] = 'Error while trying to create admin user: ' . $exception->getMessage(); } if(count($error) == 0) { @@ -239,7 +244,7 @@ class OC_Setup { $dbusername=substr('oc_'.$username, 0, 16); if($dbusername!=$oldUser) { //hash the password so we don't need to store the admin config in the config file - $dbpassword=md5(time().$dbpass); + $dbpassword=OC_Util::generate_random_bytes(30); self::createDBUser($dbusername, $dbpassword, $connection); @@ -329,7 +334,7 @@ class OC_Setup { //add prefix to the postgresql user name to prevent collisions $dbusername='oc_'.$username; //create a new password so we don't need to store the admin config in the config file - $dbpassword=md5(time()); + $dbpassword=OC_Util::generate_random_bytes(30); self::pg_createDBUser($dbusername, $dbpassword, $connection); @@ -472,7 +477,7 @@ class OC_Setup { //add prefix to the oracle user name to prevent collisions $dbusername='oc_'.$username; //create a new password so we don't need to store the admin config in the config file - $dbpassword=md5(time().$dbpass); + $dbpassword=OC_Util::generate_random_bytes(30); //oracle passwords are treated as identifiers: // must start with aphanumeric char @@ -823,6 +828,10 @@ class OC_Setup { $content.= "AddType image/svg+xml svg svgz\n"; $content.= "AddEncoding gzip svgz\n"; $content.= "</IfModule>\n"; + $content.= "<IfModule dir_module>\n"; + $content.= "DirectoryIndex index.php index.html\n"; + $content.= "</IfModule>\n"; + $content.= "AddDefaultCharset utf-8\n"; $content.= "Options -Indexes\n"; @file_put_contents(OC::$SERVERROOT.'/.htaccess', $content); //supress errors in case we don't have permissions for it diff --git a/lib/template.php b/lib/template.php index 434c1e9e990..2f535335648 100644 --- a/lib/template.php +++ b/lib/template.php @@ -186,10 +186,15 @@ class OC_Template{ $this->l10n = OC_L10N::get($parts[0]); // Some headers to enhance security - header('X-Frame-Options: Sameorigin'); // Disallow iFraming from other domains header('X-XSS-Protection: 1; mode=block'); // Enforce browser based XSS filters header('X-Content-Type-Options: nosniff'); // Disable sniffing the content type for IE + // iFrame Restriction Policy + $xFramePolicy = OC_Config::getValue('xframe_restriction', true); + if($xFramePolicy) { + header('X-Frame-Options: Sameorigin'); // Disallow iFraming from other domains + } + // Content Security Policy // If you change the standard policy, please also change it in config.sample.php $policy = OC_Config::getValue('custom_csp_policy', @@ -198,7 +203,8 @@ class OC_Template{ .'style-src \'self\' \'unsafe-inline\'; ' .'frame-src *; ' .'img-src *; ' - .'font-src \'self\' data:'); + .'font-src \'self\' data:; ' + .'media-src *'); header('Content-Security-Policy:'.$policy); // Standard $this->findTemplate($name); @@ -272,7 +278,7 @@ class OC_Template{ protected function findTemplate($name) { // Read the selected theme from the config file - $theme=OC_Config::getValue( "theme" ); + $theme = OC_Util::getTheme(); // Read the detected formfactor and use the right file name. $fext = self::getFormFactorExtension(); diff --git a/lib/templatelayout.php b/lib/templatelayout.php index 29f120a6041..3c496f56e41 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 = '?v=' . 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); @@ -102,7 +103,7 @@ class OC_TemplateLayout extends OC_Template { static public function findStylesheetFiles($styles) { // Read the selected theme from the config file - $theme=OC_Config::getValue( 'theme' ); + $theme = OC_Util::getTheme(); // Read the detected formfactor and use the right file name. $fext = self::getFormFactorExtension(); @@ -110,7 +111,8 @@ class OC_TemplateLayout extends OC_Template { $files = array(); foreach($styles as $style) { // is it in 3rdparty? - if(self::appendIfExist($files, OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $style.'.css')) { + if(strpos($style, '3rdparty') === 0 && + self::appendIfExist($files, OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $style.'.css')) { // or in the owncloud root? }elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, "$style$fext.css" )) { @@ -160,7 +162,7 @@ class OC_TemplateLayout extends OC_Template { static public function findJavascriptFiles($scripts) { // Read the selected theme from the config file - $theme=OC_Config::getValue( 'theme' ); + $theme = OC_Util::getTheme(); // Read the detected formfactor and use the right file name. $fext = self::getFormFactorExtension(); @@ -168,7 +170,8 @@ class OC_TemplateLayout extends OC_Template { $files = array(); foreach($scripts as $script) { // Is it in 3rd party? - if(self::appendIfExist($files, OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $script.'.js')) { + if(strpos($script, '3rdparty') === 0 && + self::appendIfExist($files, OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $script.'.js')) { // Is it in apps and overwritten by the theme? }elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/apps/$script$fext.js" )) { diff --git a/lib/user.php b/lib/user.php index 6144f0f6bf9..b19af940795 100644 --- a/lib/user.php +++ b/lib/user.php @@ -386,7 +386,7 @@ class OC_User { * generates a password */ public static function generatePassword() { - return uniqId(); + return OC_Util::generate_random_bytes(30); } /** @@ -633,9 +633,9 @@ class OC_User { public static function setMagicInCookie($username, $token) { $secure_cookie = OC_Config::getValue("forcessl", false); $expires = time() + OC_Config::getValue('remember_login_cookie_lifetime', 60*60*24*15); - setcookie("oc_username", $username, $expires, '', '', $secure_cookie); - setcookie("oc_token", $token, $expires, '', '', $secure_cookie, true); - setcookie("oc_remember_login", true, $expires, '', '', $secure_cookie); + setcookie("oc_username", $username, $expires, OC::$WEBROOT, '', $secure_cookie); + setcookie("oc_token", $token, $expires, OC::$WEBROOT, '', $secure_cookie, true); + setcookie("oc_remember_login", true, $expires, OC::$WEBROOT, '', $secure_cookie); } /** diff --git a/lib/user/database.php b/lib/user/database.php index 210c7f3e1eb..ea938790d22 100644 --- a/lib/user/database.php +++ b/lib/user/database.php @@ -237,13 +237,13 @@ class OC_User_Database extends OC_User_Backend { * @return boolean */ public function userExists($uid) { - $query = OC_DB::prepare( 'SELECT * FROM `*PREFIX*users` WHERE LOWER(`uid`) = LOWER(?)' ); + $query = OC_DB::prepare( 'SELECT COUNT(*) FROM `*PREFIX*users` WHERE LOWER(`uid`) = LOWER(?)' ); $result = $query->execute( array( $uid )); if (OC_DB::isError($result)) { OC_Log::write('core', OC_DB::getErrorMessage($result), OC_Log::ERROR); return false; } - return $result->numRows() > 0; + return $result->fetchOne() > 0; } /** diff --git a/lib/util.php b/lib/util.php index e79daae8a0a..810593358a5 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, 02); } /** @@ -278,7 +278,10 @@ class OC_Util { 'hint'=>'Please ask your server administrator to install the module.'); $web_server_restart= false; } - if(ini_get('safe_mode')) { + if (((strtolower(@ini_get('safe_mode')) == 'on') + || (strtolower(@ini_get('safe_mode')) == 'yes') + || (strtolower(@ini_get('safe_mode')) == 'true') + || (ini_get("safe_mode") == 1 ))) { $errors[]=array('error'=>'PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly.', 'hint'=>'PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config.'); $web_server_restart= false; @@ -408,18 +411,19 @@ class OC_Util { exit(); } - /** - * get an id unqiue for this instance - * @return string - */ - public static function getInstanceId() { - $id=OC_Config::getValue('instanceid', null); - if(is_null($id)) { - $id=uniqid(); - OC_Config::setValue('instanceid', $id); - } - return $id; - } + /** + * get an id unique for this instance + * @return string + */ + public static function getInstanceId() { + $id = OC_Config::getValue('instanceid', null); + if(is_null($id)) { + // We need to guarantee at least one letter in instanceid so it can be used as the session_name + $id = 'oc' . OC_Util::generate_random_bytes(10); + OC_Config::setValue('instanceid', $id); + } + return $id; + } /** * @brief Static lifespan (in seconds) when a request token expires. @@ -591,7 +595,7 @@ class OC_Util { } catch(\Sabre_DAV_Exception_NotAuthenticated $e) { $return = true; } catch(\Exception $e) { - OC_Log::write('core', 'isWebDAVWorking: NO - Reason: '.$e, OC_Log::WARN); + OC_Log::write('core', 'isWebDAVWorking: NO - Reason: '.$e->getMessage(). ' ('.get_class($e).')', OC_Log::WARN); $return = false; } @@ -614,8 +618,8 @@ class OC_Util { $result = setlocale(LC_ALL, 'en_US.UTF-8', 'en_US.UTF8'); if($result == false) { return false; - } - return true; + } + return true; } /** @@ -631,6 +635,11 @@ class OC_Util { */ public static function isinternetconnectionworking() { + // in case there is no internet connection on purpose there is no need to display a warning + if (!\OC_Config::getValue("has_internet_connection", true)) { + return true; + } + // try to connect to owncloud.org to see if http connections to the internet are possible. $connected = @fsockopen("www.owncloud.org", 80); if ($connected) { @@ -786,4 +795,25 @@ class OC_Util { return (substr(PHP_OS, 0, 3) === "WIN"); } + + /** + * Handles the case that there may not be a theme, then check if a "default" + * theme exists and take that one + * @return string the theme + */ + public static function getTheme() { + $theme = OC_Config::getValue("theme"); + + if(is_null($theme)) { + + if(is_dir(OC::$SERVERROOT . '/themes/default')) { + $theme = 'default'; + } + + } + + return $theme; + } + + } diff --git a/lib/vcategories.php b/lib/vcategories.php index 2f990c5d2d2..5975e688b75 100644 --- a/lib/vcategories.php +++ b/lib/vcategories.php @@ -536,23 +536,31 @@ class OC_VCategories { /** * @brief Delete category/object relations from the db - * @param int $id The id of the object + * @param array $ids The ids of the objects * @param string $type The type of object (event/contact/task/journal). * Defaults to the type set in the instance * @returns boolean Returns false on error. */ - public function purgeObject($id, $type = null) { + public function purgeObjects(array $ids, $type = null) { $type = is_null($type) ? $this->type : $type; + if(count($ids) === 0) { + // job done ;) + return true; + } + $updates = $ids; try { - $stmt = OCP\DB::prepare('DELETE FROM `' . self::RELATION_TABLE . '` ' - . 'WHERE `objid` = ? AND `type`= ?'); - $result = $stmt->execute(array($id, $type)); + $query = 'DELETE FROM `' . self::RELATION_TABLE . '` '; + $query .= 'WHERE `objid` IN (' . str_repeat('?,', count($ids)-1) . '?) '; + $query .= 'AND `type`= ?'; + $updates[] = $type; + $stmt = OCP\DB::prepare($query); + $result = $stmt->execute($updates); if (OC_DB::isError($result)) { OC_Log::write('core', __METHOD__. 'DB error: ' . OC_DB::getErrorMessage($result), OC_Log::ERROR); return false; } } catch(Exception $e) { - OCP\Util::writeLog('core', __METHOD__.', exception: '.$e->getMessage(), + OCP\Util::writeLog('core', __METHOD__.', exception: ' . $e->getMessage(), OCP\Util::ERROR); return false; } diff --git a/lib/vobject/stringproperty.php b/lib/vobject/stringproperty.php new file mode 100644 index 00000000000..b98a8f26c2b --- /dev/null +++ b/lib/vobject/stringproperty.php @@ -0,0 +1,80 @@ +<?php +/** + * ownCloud - VObject String Property + * + * This class adds escaping of simple string properties. + * + * @author Thomas Tanghus + * @author Evert Pot (http://www.rooftopsolutions.nl/) + * + * 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/>. + * + */ + +namespace OC\VObject; + +/** + * This class overrides \Sabre\VObject\Property::serialize() properly + * escape commas and semi-colons in string properties. +*/ +class StringProperty extends \Sabre\VObject\Property { + + /** + * Turns the object back into a serialized blob. + * + * @return string + */ + public function serialize() { + + $str = $this->name; + if ($this->group) { + $str = $this->group . '.' . $this->name; + } + + foreach($this->parameters as $param) { + $str.=';' . $param->serialize(); + } + + $src = array( + '\\', + "\n", + ';', + ',', + ); + $out = array( + '\\\\', + '\n', + '\;', + '\,', + ); + $value = strtr($this->value, array('\,' => ',', '\;' => ';', '\\\\' => '\\')); + $str.=':' . str_replace($src, $out, $value); + + $out = ''; + while(strlen($str) > 0) { + if (strlen($str) > 75) { + $out .= mb_strcut($str, 0, 75, 'utf-8') . "\r\n"; + $str = ' ' . mb_strcut($str, 75, strlen($str), 'utf-8'); + } else { + $out .= $str . "\r\n"; + $str = ''; + break; + } + } + + return $out; + + } + +}
\ No newline at end of file |