From 1205749f8cec19c30c9f58f7f97832fac9a4c502 Mon Sep 17 00:00:00 2001 From: Felix Moeller Date: Sun, 4 Nov 2012 18:18:03 +0100 Subject: [PATCH 01/34] Checkstyle: Fix the last two SpaceBeforeOpenBrace --- apps/files_external/lib/webdav.php | 2 +- lib/util.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 2503fb80b1b..02fe540d061 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -46,7 +46,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ if($caview = \OCP\Files::getStorage('files_external')) { $certPath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("").'rootcerts.crt'; - if (file_exists($certPath)) { + if (file_exists($certPath)) { $this->client->addTrustedCertificates($certPath); } } diff --git a/lib/util.php b/lib/util.php index d16424ce4e1..40b44bf9d6e 100755 --- a/lib/util.php +++ b/lib/util.php @@ -559,7 +559,7 @@ class OC_Util { // creating a test file $testfile = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ).'/'.$filename; - if(file_exists($testfile)){// already running this test, possible recursive call + if(file_exists($testfile)) {// already running this test, possible recursive call return false; } From 0e70ea9d8baa449ee3c8309f2b6a59ce06a55926 Mon Sep 17 00:00:00 2001 From: Felix Moeller Date: Sun, 4 Nov 2012 18:28:29 +0100 Subject: [PATCH 02/34] Checkstyle: Fix the last 25 NoSpaceAfterComma --- apps/files_encryption/lib/proxy.php | 2 +- apps/files_external/lib/smb.php | 4 ++-- apps/user_ldap/templates/settings.php | 2 +- lib/MDB2/Driver/Reverse/sqlite3.php | 2 +- lib/fileproxy/quota.php | 4 ++-- lib/filestorage/local.php | 8 ++++---- lib/filesystem.php | 4 ++-- lib/installer.php | 8 ++++---- lib/migrate.php | 2 +- lib/migration/content.php | 2 +- lib/ocsclient.php | 6 +++--- lib/template.php | 2 +- lib/user.php | 2 +- settings/users.php | 2 +- 14 files changed, 25 insertions(+), 25 deletions(-) diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index cacf7d7920a..4a390013d20 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -92,7 +92,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ }elseif(self::shouldEncrypt($path) and $meta['mode']!='r' and $meta['mode']!='rb') { if(OC_Filesystem::file_exists($path) and OC_Filesystem::filesize($path)>0) { //first encrypt the target file so we don't end up with a half encrypted file - OCP\Util::writeLog('files_encryption','Decrypting '.$path.' before writing', OCP\Util::DEBUG); + OCP\Util::writeLog('files_encryption', 'Decrypting '.$path.' before writing', OCP\Util::DEBUG); $tmp=fopen('php://temp'); OCP\Files::streamCopy($result, $tmp); fclose($result); diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index d7636894347..802d80d8d1f 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -24,7 +24,7 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ if(!$this->root || $this->root[0]!='/') { $this->root='/'.$this->root; } - if(substr($this->root,-1, 1)!='/') { + if(substr($this->root, -1, 1)!='/') { $this->root.='/'; } if(!$this->share || $this->share[0]!='/') { @@ -41,7 +41,7 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{ } public function constructUrl($path) { - if(substr($path,-1)=='/') { + if(substr($path, -1)=='/') { $path=substr($path, 0, -1); } return 'smb://'.$this->user.':'.$this->password.'@'.$this->host.$this->share.$this->root.$path; diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index 3a653ad7208..d10062c1d9d 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -29,7 +29,7 @@

- t('Help');?> + t('Help');?> diff --git a/lib/MDB2/Driver/Reverse/sqlite3.php b/lib/MDB2/Driver/Reverse/sqlite3.php index 36626478ce8..97037809549 100644 --- a/lib/MDB2/Driver/Reverse/sqlite3.php +++ b/lib/MDB2/Driver/Reverse/sqlite3.php @@ -476,7 +476,7 @@ class MDB2_Driver_Reverse_sqlite3 extends MDB2_Driver_Reverse_Common $definition['unique'] = true; $count = count($column_names); for ($i=0; $i<$count; ++$i) { - $column_name = strtok($column_names[$i]," "); + $column_name = strtok($column_names[$i], " "); $collation = strtok(" "); $definition['fields'][$column_name] = array( 'position' => $i+1 diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php index 81376fb6fca..46bc8dc16d8 100644 --- a/lib/fileproxy/quota.php +++ b/lib/fileproxy/quota.php @@ -38,9 +38,9 @@ class OC_FileProxy_Quota extends OC_FileProxy{ if(in_array($user, $this->userQuota)) { return $this->userQuota[$user]; } - $userQuota=OC_Preferences::getValue($user,'files','quota', 'default'); + $userQuota=OC_Preferences::getValue($user, 'files', 'quota', 'default'); if($userQuota=='default') { - $userQuota=OC_AppConfig::getValue('files','default_quota', 'none'); + $userQuota=OC_AppConfig::getValue('files', 'default_quota', 'none'); } if($userQuota=='none') { $this->userQuota[$user]=0; diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php index 2dde0093d4b..6fe45acf8c5 100644 --- a/lib/filestorage/local.php +++ b/lib/filestorage/local.php @@ -6,7 +6,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{ protected $datadir; public function __construct($arguments) { $this->datadir=$arguments['datadir']; - if(substr($this->datadir,-1)!=='/') { + if(substr($this->datadir, -1)!=='/') { $this->datadir.='/'; } } @@ -20,7 +20,7 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{ return opendir($this->datadir.$path); } public function is_dir($path) { - if(substr($path,-1)=='/') { + if(substr($path, -1)=='/') { $path=substr($path, 0, -1); } return is_dir($this->datadir.$path); @@ -86,11 +86,11 @@ class OC_Filestorage_Local extends OC_Filestorage_Common{ } public function rename($path1, $path2) { if (!$this->isUpdatable($path1)) { - OC_Log::write('core','unable to rename, file is not writable : '.$path1, OC_Log::ERROR); + OC_Log::write('core', 'unable to rename, file is not writable : '.$path1, OC_Log::ERROR); return false; } if(! $this->file_exists($path1)) { - OC_Log::write('core','unable to rename, file does not exists : '.$path1, OC_Log::ERROR); + OC_Log::write('core', 'unable to rename, file does not exists : '.$path1, OC_Log::ERROR); return false; } diff --git a/lib/filesystem.php b/lib/filesystem.php index aeafb149395..e4c0e2e1eb5 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -246,7 +246,7 @@ class OC_Filesystem{ } $mtime=filemtime(OC::$SERVERROOT.'/config/mount.php'); - $previousMTime=OC_Appconfig::getValue('files','mountconfigmtime', 0); + $previousMTime=OC_Appconfig::getValue('files', 'mountconfigmtime', 0); if($mtime>$previousMTime) {//mount config has changed, filecache needs to be updated OC_FileCache::triggerUpdate(); OC_Appconfig::setValue('files', 'mountconfigmtime', $mtime); @@ -312,7 +312,7 @@ class OC_Filesystem{ return false; } }else{ - OC_Log::write('core','storage backend '.$class.' not found', OC_Log::ERROR); + OC_Log::write('core', 'storage backend '.$class.' not found', OC_Log::ERROR); return false; } } diff --git a/lib/installer.php b/lib/installer.php index 266c07d5c2b..7dc8b0cef8d 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -57,7 +57,7 @@ class OC_Installer{ */ public static function installApp( $data = array()) { if(!isset($data['source'])) { - OC_Log::write('core','No source specified when installing app', OC_Log::ERROR); + OC_Log::write('core', 'No source specified when installing app', OC_Log::ERROR); return false; } @@ -65,13 +65,13 @@ class OC_Installer{ if($data['source']=='http') { $path=OC_Helper::tmpFile(); if(!isset($data['href'])) { - OC_Log::write('core','No href specified when installing app from http', OC_Log::ERROR); + OC_Log::write('core', 'No href specified when installing app from http', OC_Log::ERROR); return false; } copy($data['href'], $path); }else{ if(!isset($data['path'])) { - OC_Log::write('core','No path specified when installing app from local file', OC_Log::ERROR); + OC_Log::write('core', 'No path specified when installing app from local file', OC_Log::ERROR); return false; } $path=$data['path']; @@ -86,7 +86,7 @@ class OC_Installer{ rename($path, $path.'.tgz'); $path.='.tgz'; }else{ - OC_Log::write('core','Archives of type '.$mime.' are not supported', OC_Log::ERROR); + OC_Log::write('core', 'Archives of type '.$mime.' are not supported', OC_Log::ERROR); return false; } diff --git a/lib/migrate.php b/lib/migrate.php index 616417a2271..96f5a0001f7 100644 --- a/lib/migrate.php +++ b/lib/migrate.php @@ -611,7 +611,7 @@ class OC_Migrate{ if( file_exists( $db ) ) { // Connect to the db if(!self::connectDB( $db )) { - OC_Log::write('migration','Failed to connect to migration.db', OC_Log::ERROR); + OC_Log::write('migration', 'Failed to connect to migration.db', OC_Log::ERROR); return false; } } else { diff --git a/lib/migration/content.php b/lib/migration/content.php index 54982b3c847..00df62f0c7f 100644 --- a/lib/migration/content.php +++ b/lib/migration/content.php @@ -205,7 +205,7 @@ class OC_Migration_Content{ } closedir($dirhandle); } else { - OC_Log::write('admin_export',"Was not able to open directory: " . $dir, OC_Log::ERROR); + OC_Log::write('admin_export', "Was not able to open directory: " . $dir, OC_Log::ERROR); return false; } return true; diff --git a/lib/ocsclient.php b/lib/ocsclient.php index ceeb78570fd..b6b5ad8f0a9 100644 --- a/lib/ocsclient.php +++ b/lib/ocsclient.php @@ -162,7 +162,7 @@ class OC_OCSClient{ $xml=OC_OCSClient::getOCSresponse($url); if($xml==false) { - OC_Log::write('core','Unable to parse OCS content', OC_Log::FATAL); + OC_Log::write('core', 'Unable to parse OCS content', OC_Log::FATAL); return null; } $data=simplexml_load_string($xml); @@ -200,7 +200,7 @@ class OC_OCSClient{ $xml=OC_OCSClient::getOCSresponse($url); if($xml==false) { - OC_Log::write('core','Unable to parse OCS content', OC_Log::FATAL); + OC_Log::write('core', 'Unable to parse OCS content', OC_Log::FATAL); return null; } $data=simplexml_load_string($xml); @@ -238,7 +238,7 @@ class OC_OCSClient{ $xml=OC_OCSClient::getOCSresponse($url); if($xml==false) { - OC_Log::write('core','Unable to parse knowledgebase content', OC_Log::FATAL); + OC_Log::write('core', 'Unable to parse knowledgebase content', OC_Log::FATAL); return null; } $data=simplexml_load_string($xml); diff --git a/lib/template.php b/lib/template.php index efcc6e82c4c..3d3589abd1e 100644 --- a/lib/template.php +++ b/lib/template.php @@ -199,7 +199,7 @@ class OC_Template{ $mode='tablet'; }elseif(stripos($_SERVER['HTTP_USER_AGENT'], 'iphone')>0) { $mode='mobile'; - }elseif((stripos($_SERVER['HTTP_USER_AGENT'],'N9')>0) and (stripos($_SERVER['HTTP_USER_AGENT'], 'nokia')>0)) { + }elseif((stripos($_SERVER['HTTP_USER_AGENT'], 'N9')>0) and (stripos($_SERVER['HTTP_USER_AGENT'], 'nokia')>0)) { $mode='mobile'; }else{ $mode='default'; diff --git a/lib/user.php b/lib/user.php index be0e525d868..801ab7f608d 100644 --- a/lib/user.php +++ b/lib/user.php @@ -133,7 +133,7 @@ class OC_User { self::useBackend($backend); $_setupedBackends[]=$i; }else{ - OC_Log::write('core','User backend '.$class.' not found.', OC_Log::ERROR); + OC_Log::write('core', 'User backend '.$class.' not found.', OC_Log::ERROR); } } } diff --git a/settings/users.php b/settings/users.php index 6eaae474538..395712dbd59 100644 --- a/settings/users.php +++ b/settings/users.php @@ -42,7 +42,7 @@ foreach( $accessiblegroups as $i ) { $groups[] = array( "name" => $i ); } $quotaPreset=OC_Appconfig::getValue('files', 'quota_preset', 'default,none,1 GB, 5 GB, 10 GB'); -$quotaPreset=explode(',',$quotaPreset); +$quotaPreset=explode(',', $quotaPreset); foreach($quotaPreset as &$preset) { $preset=trim($preset); } From bc4382c5c5649c3ad0e9e3be18a747815473f9fe Mon Sep 17 00:00:00 2001 From: Felix Moeller Date: Sun, 4 Nov 2012 18:31:44 +0100 Subject: [PATCH 03/34] Checkstyle: fix the last NoSpaceAfterEquals --- lib/public/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/public/util.php b/lib/public/util.php index 6ce79715b6f..7b5b1abbded 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -61,7 +61,7 @@ class Util { */ public static function sendMail( $toaddress, $toname, $subject, $mailtext, $fromaddress, $fromname, $html=0, $altbody='', $ccaddress='', $ccname='', $bcc='') { // call the internal mail class - \OC_MAIL::send( $toaddress, $toname, $subject, $mailtext, $fromaddress, $fromname, $html=0, $altbody='', $ccaddress='', $ccname='', $bcc=''); + \OC_MAIL::send($toaddress, $toname, $subject, $mailtext, $fromaddress, $fromname, $html = 0, $altbody = '', $ccaddress = '', $ccname = '', $bcc = ''); } /** From 27ab0357ae00541bbcff52453c2d86e723a992e0 Mon Sep 17 00:00:00 2001 From: Felix Moeller Date: Sun, 4 Nov 2012 18:36:16 +0100 Subject: [PATCH 04/34] Checkstyle: Fix last six NewlineBeforeOpenBrace --- lib/MDB2/Driver/sqlite3.php | 3 +-- lib/archive/tar.php | 3 +-- lib/base.php | 6 ++---- settings/ajax/changepassword.php | 3 +-- settings/templates/help.php | 3 +-- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/MDB2/Driver/sqlite3.php b/lib/MDB2/Driver/sqlite3.php index bccb8cbbf01..fa4c91c1269 100644 --- a/lib/MDB2/Driver/sqlite3.php +++ b/lib/MDB2/Driver/sqlite3.php @@ -397,8 +397,7 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common } if ($this->fix_assoc_fields_names || - $this->options['portability'] & MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES) - { + $this->options['portability'] & MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES) { $this->connection->exec("PRAGMA short_column_names = 1"); $this->fix_assoc_fields_names = true; } diff --git a/lib/archive/tar.php b/lib/archive/tar.php index 6c264686991..0fa633c6038 100644 --- a/lib/archive/tar.php +++ b/lib/archive/tar.php @@ -130,8 +130,7 @@ class OC_Archive_TAR extends OC_Archive{ if( $file == $header['filename'] or $file.'/' == $header['filename'] or '/'.$file.'/' == $header['filename'] - or '/'.$file == $header['filename']) - { + or '/'.$file == $header['filename']) { return $header; } } diff --git a/lib/base.php b/lib/base.php index f494716bd87..084cca92e8d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -524,8 +524,7 @@ class OC{ } $file_ext = substr($param['file'], -3); if ($file_ext != 'php' - || !self::loadAppScriptFile($param)) - { + || !self::loadAppScriptFile($param)) { header('HTTP/1.0 404 Not Found'); } } @@ -595,8 +594,7 @@ class OC{ if(!isset($_COOKIE["oc_remember_login"]) || !isset($_COOKIE["oc_token"]) || !isset($_COOKIE["oc_username"]) - || !$_COOKIE["oc_remember_login"]) - { + || !$_COOKIE["oc_remember_login"]) { return false; } OC_App::loadApps(array('authentication')); diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index a0fe5947b6d..b2db2611518 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -16,8 +16,7 @@ if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) { $userstatus = 'subadmin'; } if(OC_User::getUser() === $username) { - if (OC_User::checkPassword($username, $oldPassword)) - { + if (OC_User::checkPassword($username, $oldPassword)) { $userstatus = 'user'; } else { if (!OC_Util::isUserVerified()) { diff --git a/settings/templates/help.php b/settings/templates/help.php index b2a78ff8512..56d43853444 100644 --- a/settings/templates/help.php +++ b/settings/templates/help.php @@ -12,8 +12,7 @@ printPage(); } ?> From 9795bc19bfbe7ebaffd1f88c0ccd47df94504b2e Mon Sep 17 00:00:00 2001 From: Felix Moeller Date: Sun, 4 Nov 2012 18:42:18 +0100 Subject: [PATCH 05/34] Checkstyle: Fix the last two InvalidEOLChar --- apps/files_sharing/public.php | 446 ++++++++++----------- apps/files_versions/lib/versions.php | 554 +++++++++++++-------------- 2 files changed, 500 insertions(+), 500 deletions(-) diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 105e94f1140..dca87cd6876 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -1,223 +1,223 @@ -execute(array($_GET['token']))->fetchOne(); - if(isset($filepath)) { - $info = OC_FileCache_Cached::get($filepath, ''); - if(strtolower($info['mimetype']) == 'httpd/unix-directory') { - $_GET['dir'] = $filepath; - } else { - $_GET['file'] = $filepath; - } - \OCP\Util::writeLog('files_sharing', 'You have files that are shared by link originating from ownCloud 4.0. Redistribute the new links, because backwards compatibility will be removed in ownCloud 5.', \OCP\Util::WARN); - } -} -// Enf of backward compatibility - -function getID($path) { - // use the share table from the db to find the item source if the file was reshared because shared files - //are not stored in the file cache. - if (substr(OC_Filesystem::getMountPoint($path), -7, 6) == "Shared") { - $path_parts = explode('/', $path, 5); - $user = $path_parts[1]; - $intPath = '/'.$path_parts[4]; - $query = \OC_DB::prepare('SELECT item_source FROM *PREFIX*share WHERE uid_owner = ? AND file_target = ? '); - $result = $query->execute(array($user, $intPath)); - $row = $result->fetchRow(); - $fileSource = $row['item_source']; - } else { - $fileSource = OC_Filecache::getId($path, ''); - } - - return $fileSource; -} - -if (isset($_GET['file']) || isset($_GET['dir'])) { - if (isset($_GET['dir'])) { - $type = 'folder'; - $path = $_GET['dir']; - if(strlen($path)>1 and substr($path, -1, 1)==='/') { - $path=substr($path, 0, -1); - } - $baseDir = $path; - $dir = $baseDir; - } else { - $type = 'file'; - $path = $_GET['file']; - if(strlen($path)>1 and substr($path, -1, 1)==='/') { - $path=substr($path, 0, -1); - } - } - $uidOwner = substr($path, 1, strpos($path, '/', 1) - 1); - if (OCP\User::userExists($uidOwner)) { - OC_Util::setupFS($uidOwner); - $fileSource = getId($path); - if ($fileSource != -1 && ($linkItem = OCP\Share::getItemSharedWithByLink($type, $fileSource, $uidOwner))) { - // TODO Fix in the getItems - if (!isset($linkItem['item_type']) || $linkItem['item_type'] != $type) { - header('HTTP/1.0 404 Not Found'); - $tmpl = new OCP\Template('', '404', 'guest'); - $tmpl->printPage(); - exit(); - } - if (isset($linkItem['share_with'])) { - // Check password - if (isset($_GET['file'])) { - $url = OCP\Util::linkToPublic('files').'&file='.$_GET['file']; - } else { - $url = OCP\Util::linkToPublic('files').'&dir='.$_GET['dir']; - } - if (isset($_POST['password'])) { - $password = $_POST['password']; - $storedHash = $linkItem['share_with']; - $forcePortable = (CRYPT_BLOWFISH != 1); - $hasher = new PasswordHash(8, $forcePortable); - if (!($hasher->CheckPassword($password.OC_Config::getValue('passwordsalt', ''), $storedHash))) { - $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); - $tmpl->assign('URL', $url); - $tmpl->assign('error', true); - $tmpl->printPage(); - exit(); - } else { - // Save item id in session for future requests - $_SESSION['public_link_authenticated'] = $linkItem['id']; - } - // Check if item id is set in session - } else if (!isset($_SESSION['public_link_authenticated']) || $_SESSION['public_link_authenticated'] !== $linkItem['id']) { - // Prompt for password - $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); - $tmpl->assign('URL', $url); - $tmpl->printPage(); - exit(); - } - } - $path = $linkItem['path']; - if (isset($_GET['path'])) { - $path .= $_GET['path']; - $dir .= $_GET['path']; - if (!OC_Filesystem::file_exists($path)) { - header('HTTP/1.0 404 Not Found'); - $tmpl = new OCP\Template('', '404', 'guest'); - $tmpl->printPage(); - exit(); - } - } - // Download the file - if (isset($_GET['download'])) { - if (isset($_GET['dir'])) { - if ( isset($_GET['files']) ) { // download selected files - OC_Files::get($path, $_GET['files'], $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); - } else if (isset($_GET['path']) && $_GET['path'] != '' ) { // download a file from a shared directory - OC_Files::get('', $path, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); - } else { // download the whole shared directory - OC_Files::get($path, '', $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); - } - } else { // download a single shared file - OC_Files::get("", $path, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); - } - - } else { - OCP\Util::addStyle('files_sharing', 'public'); - OCP\Util::addScript('files_sharing', 'public'); - OCP\Util::addScript('files', 'fileactions'); - $tmpl = new OCP\Template('files_sharing', 'public', 'base'); - $tmpl->assign('owner', $uidOwner); - // Show file list - if (OC_Filesystem::is_dir($path)) { - OCP\Util::addStyle('files', 'files'); - OCP\Util::addScript('files', 'files'); - OCP\Util::addScript('files', 'filelist'); - $files = array(); - $rootLength = strlen($baseDir) + 1; - foreach (OC_Files::getDirectoryContent($path) as $i) { - $i['date'] = OCP\Util::formatDate($i['mtime']); - if ($i['type'] == 'file') { - $fileinfo = pathinfo($i['name']); - $i['basename'] = $fileinfo['filename']; - $i['extension'] = isset($fileinfo['extension']) ? ('.'.$fileinfo['extension']) : ''; - } - $i['directory'] = '/'.substr('/'.$uidOwner.'/files'.$i['directory'], $rootLength); - if ($i['directory'] == '/') { - $i['directory'] = ''; - } - $i['permissions'] = OCP\Share::PERMISSION_READ; - $files[] = $i; - } - // Make breadcrumb - $breadcrumb = array(); - $pathtohere = ''; - $count = 1; - foreach (explode('/', $dir) as $i) { - if ($i != '') { - if ($i != $baseDir) { - $pathtohere .= '/'.$i; - } - if ( strlen($pathtohere) < strlen($_GET['dir'])) { - continue; - } - $breadcrumb[] = array('dir' => str_replace($_GET['dir'], "", $pathtohere, $count), 'name' => $i); - } - } - $list = new OCP\Template('files', 'part.list', ''); - $list->assign('files', $files, false); - $list->assign('publicListView', true); - $list->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.urlencode($_GET['dir']).'&path=', false); - $list->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.urlencode($_GET['dir']).'&path=', false); - $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '' ); - $breadcrumbNav->assign('breadcrumb', $breadcrumb, false); - $breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.urlencode($_GET['dir']).'&path=', false); - $folder = new OCP\Template('files', 'index', ''); - $folder->assign('fileList', $list->fetchPage(), false); - $folder->assign('breadcrumb', $breadcrumbNav->fetchPage(), false); - $folder->assign('dir', basename($dir)); - $folder->assign('isCreatable', false); - $folder->assign('permissions', 0); - $folder->assign('files', $files); - $folder->assign('uploadMaxFilesize', 0); - $folder->assign('uploadMaxHumanFilesize', 0); - $folder->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); - $tmpl->assign('folder', $folder->fetchPage(), false); - $tmpl->assign('uidOwner', $uidOwner); - $tmpl->assign('dir', basename($dir)); - $tmpl->assign('filename', basename($path)); - $tmpl->assign('mimetype', OC_Filesystem::getMimeType($path)); - $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); - if (isset($_GET['path'])) { - $getPath = $_GET['path']; - } else { - $getPath = ''; - } - $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.urlencode($_GET['dir']).'&path='.urlencode($getPath), false); - } else { - // Show file preview if viewer is available - $tmpl->assign('uidOwner', $uidOwner); - $tmpl->assign('dir', dirname($path)); - $tmpl->assign('filename', basename($path)); - $tmpl->assign('mimetype', OC_Filesystem::getMimeType($path)); - if ($type == 'file') { - $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&file='.urlencode($_GET['file']).'&download', false); - } else { - if (isset($_GET['path'])) { - $getPath = $_GET['path']; - } else { - $getPath = ''; - } - $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.urlencode($_GET['dir']).'&path='.urlencode($getPath), false); - } - } - $tmpl->printPage(); - } - exit(); - } - } -} -header('HTTP/1.0 404 Not Found'); -$tmpl = new OCP\Template('', '404', 'guest'); -$tmpl->printPage(); +execute(array($_GET['token']))->fetchOne(); + if(isset($filepath)) { + $info = OC_FileCache_Cached::get($filepath, ''); + if(strtolower($info['mimetype']) == 'httpd/unix-directory') { + $_GET['dir'] = $filepath; + } else { + $_GET['file'] = $filepath; + } + \OCP\Util::writeLog('files_sharing', 'You have files that are shared by link originating from ownCloud 4.0. Redistribute the new links, because backwards compatibility will be removed in ownCloud 5.', \OCP\Util::WARN); + } +} +// Enf of backward compatibility + +function getID($path) { + // use the share table from the db to find the item source if the file was reshared because shared files + //are not stored in the file cache. + if (substr(OC_Filesystem::getMountPoint($path), -7, 6) == "Shared") { + $path_parts = explode('/', $path, 5); + $user = $path_parts[1]; + $intPath = '/'.$path_parts[4]; + $query = \OC_DB::prepare('SELECT item_source FROM *PREFIX*share WHERE uid_owner = ? AND file_target = ? '); + $result = $query->execute(array($user, $intPath)); + $row = $result->fetchRow(); + $fileSource = $row['item_source']; + } else { + $fileSource = OC_Filecache::getId($path, ''); + } + + return $fileSource; +} + +if (isset($_GET['file']) || isset($_GET['dir'])) { + if (isset($_GET['dir'])) { + $type = 'folder'; + $path = $_GET['dir']; + if(strlen($path)>1 and substr($path, -1, 1)==='/') { + $path=substr($path, 0, -1); + } + $baseDir = $path; + $dir = $baseDir; + } else { + $type = 'file'; + $path = $_GET['file']; + if(strlen($path)>1 and substr($path, -1, 1)==='/') { + $path=substr($path, 0, -1); + } + } + $uidOwner = substr($path, 1, strpos($path, '/', 1) - 1); + if (OCP\User::userExists($uidOwner)) { + OC_Util::setupFS($uidOwner); + $fileSource = getId($path); + if ($fileSource != -1 && ($linkItem = OCP\Share::getItemSharedWithByLink($type, $fileSource, $uidOwner))) { + // TODO Fix in the getItems + if (!isset($linkItem['item_type']) || $linkItem['item_type'] != $type) { + header('HTTP/1.0 404 Not Found'); + $tmpl = new OCP\Template('', '404', 'guest'); + $tmpl->printPage(); + exit(); + } + if (isset($linkItem['share_with'])) { + // Check password + if (isset($_GET['file'])) { + $url = OCP\Util::linkToPublic('files').'&file='.$_GET['file']; + } else { + $url = OCP\Util::linkToPublic('files').'&dir='.$_GET['dir']; + } + if (isset($_POST['password'])) { + $password = $_POST['password']; + $storedHash = $linkItem['share_with']; + $forcePortable = (CRYPT_BLOWFISH != 1); + $hasher = new PasswordHash(8, $forcePortable); + if (!($hasher->CheckPassword($password.OC_Config::getValue('passwordsalt', ''), $storedHash))) { + $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); + $tmpl->assign('URL', $url); + $tmpl->assign('error', true); + $tmpl->printPage(); + exit(); + } else { + // Save item id in session for future requests + $_SESSION['public_link_authenticated'] = $linkItem['id']; + } + // Check if item id is set in session + } else if (!isset($_SESSION['public_link_authenticated']) || $_SESSION['public_link_authenticated'] !== $linkItem['id']) { + // Prompt for password + $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); + $tmpl->assign('URL', $url); + $tmpl->printPage(); + exit(); + } + } + $path = $linkItem['path']; + if (isset($_GET['path'])) { + $path .= $_GET['path']; + $dir .= $_GET['path']; + if (!OC_Filesystem::file_exists($path)) { + header('HTTP/1.0 404 Not Found'); + $tmpl = new OCP\Template('', '404', 'guest'); + $tmpl->printPage(); + exit(); + } + } + // Download the file + if (isset($_GET['download'])) { + if (isset($_GET['dir'])) { + if ( isset($_GET['files']) ) { // download selected files + OC_Files::get($path, $_GET['files'], $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } else if (isset($_GET['path']) && $_GET['path'] != '' ) { // download a file from a shared directory + OC_Files::get('', $path, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } else { // download the whole shared directory + OC_Files::get($path, '', $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } + } else { // download a single shared file + OC_Files::get("", $path, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); + } + + } else { + OCP\Util::addStyle('files_sharing', 'public'); + OCP\Util::addScript('files_sharing', 'public'); + OCP\Util::addScript('files', 'fileactions'); + $tmpl = new OCP\Template('files_sharing', 'public', 'base'); + $tmpl->assign('owner', $uidOwner); + // Show file list + if (OC_Filesystem::is_dir($path)) { + OCP\Util::addStyle('files', 'files'); + OCP\Util::addScript('files', 'files'); + OCP\Util::addScript('files', 'filelist'); + $files = array(); + $rootLength = strlen($baseDir) + 1; + foreach (OC_Files::getDirectoryContent($path) as $i) { + $i['date'] = OCP\Util::formatDate($i['mtime']); + if ($i['type'] == 'file') { + $fileinfo = pathinfo($i['name']); + $i['basename'] = $fileinfo['filename']; + $i['extension'] = isset($fileinfo['extension']) ? ('.'.$fileinfo['extension']) : ''; + } + $i['directory'] = '/'.substr('/'.$uidOwner.'/files'.$i['directory'], $rootLength); + if ($i['directory'] == '/') { + $i['directory'] = ''; + } + $i['permissions'] = OCP\Share::PERMISSION_READ; + $files[] = $i; + } + // Make breadcrumb + $breadcrumb = array(); + $pathtohere = ''; + $count = 1; + foreach (explode('/', $dir) as $i) { + if ($i != '') { + if ($i != $baseDir) { + $pathtohere .= '/'.$i; + } + if ( strlen($pathtohere) < strlen($_GET['dir'])) { + continue; + } + $breadcrumb[] = array('dir' => str_replace($_GET['dir'], "", $pathtohere, $count), 'name' => $i); + } + } + $list = new OCP\Template('files', 'part.list', ''); + $list->assign('files', $files, false); + $list->assign('publicListView', true); + $list->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.urlencode($_GET['dir']).'&path=', false); + $list->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.urlencode($_GET['dir']).'&path=', false); + $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '' ); + $breadcrumbNav->assign('breadcrumb', $breadcrumb, false); + $breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.urlencode($_GET['dir']).'&path=', false); + $folder = new OCP\Template('files', 'index', ''); + $folder->assign('fileList', $list->fetchPage(), false); + $folder->assign('breadcrumb', $breadcrumbNav->fetchPage(), false); + $folder->assign('dir', basename($dir)); + $folder->assign('isCreatable', false); + $folder->assign('permissions', 0); + $folder->assign('files', $files); + $folder->assign('uploadMaxFilesize', 0); + $folder->assign('uploadMaxHumanFilesize', 0); + $folder->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); + $tmpl->assign('folder', $folder->fetchPage(), false); + $tmpl->assign('uidOwner', $uidOwner); + $tmpl->assign('dir', basename($dir)); + $tmpl->assign('filename', basename($path)); + $tmpl->assign('mimetype', OC_Filesystem::getMimeType($path)); + $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); + if (isset($_GET['path'])) { + $getPath = $_GET['path']; + } else { + $getPath = ''; + } + $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.urlencode($_GET['dir']).'&path='.urlencode($getPath), false); + } else { + // Show file preview if viewer is available + $tmpl->assign('uidOwner', $uidOwner); + $tmpl->assign('dir', dirname($path)); + $tmpl->assign('filename', basename($path)); + $tmpl->assign('mimetype', OC_Filesystem::getMimeType($path)); + if ($type == 'file') { + $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&file='.urlencode($_GET['file']).'&download', false); + } else { + if (isset($_GET['path'])) { + $getPath = $_GET['path']; + } else { + $getPath = ''; + } + $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.urlencode($_GET['dir']).'&path='.urlencode($getPath), false); + } + } + $tmpl->printPage(); + } + exit(); + } + } +} +header('HTTP/1.0 404 Not Found'); +$tmpl = new OCP\Template('', '404', 'guest'); +$tmpl->printPage(); diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 8f807187467..dc83ab12af0 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -1,278 +1,278 @@ - - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -/** - * Versions - * - * A class to handle the versioning of files. - */ - -namespace OCA_Versions; - -class Storage { - - - // config.php configuration: - // - files_versions - // - files_versionsfolder - // - files_versionsblacklist - // - files_versionsmaxfilesize - // - files_versionsinterval - // - files_versionmaxversions - // - // todo: - // - finish porting to OC_FilesystemView to enable network transparency - // - add transparent compression. first test if it´s worth it. - - const DEFAULTENABLED=true; - const DEFAULTBLACKLIST='avi mp3 mpg mp4 ctmp'; - const DEFAULTMAXFILESIZE=1048576; // 10MB - const DEFAULTMININTERVAL=60; // 1 min - const DEFAULTMAXVERSIONS=50; - - private static function getUidAndFilename($filename) - { - if (\OCP\App::isEnabled('files_sharing') - && substr($filename, 0, 7) == '/Shared' - && $source = \OCP\Share::getItemSharedWith('file', - substr($filename, 7), - \OC_Share_Backend_File::FORMAT_SHARED_STORAGE)) { - $filename = $source['path']; - $pos = strpos($filename, '/files', 1); - $uid = substr($filename, 1, $pos - 1); - $filename = substr($filename, $pos + 6); - } else { - $uid = \OCP\User::getUser(); - } - return array($uid, $filename); - } - - /** - * store a new version of a file. - */ - public function store($filename) { - if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { - list($uid, $filename) = self::getUidAndFilename($filename); - $files_view = new \OC_FilesystemView('/'.\OCP\User::getUser() .'/files'); - $users_view = new \OC_FilesystemView('/'.\OCP\User::getUser()); - - //check if source file already exist as version to avoid recursions. - // todo does this check work? - if ($users_view->file_exists($filename)) { - return false; - } - - // check if filename is a directory - if($files_view->is_dir($filename)) { - return false; - } - - // check filetype blacklist - $blacklist=explode(' ', \OCP\Config::getSystemValue('files_versionsblacklist', Storage::DEFAULTBLACKLIST)); - foreach($blacklist as $bl) { - $parts=explode('.', $filename); - $ext=end($parts); - if(strtolower($ext)==$bl) { - return false; - } - } - // we should have a source file to work with - if (!$files_view->file_exists($filename)) { - return false; - } - - // check filesize - if($files_view->filesize($filename)>\OCP\Config::getSystemValue('files_versionsmaxfilesize', Storage::DEFAULTMAXFILESIZE)) { - return false; - } - - - // check mininterval if the file is being modified by the owner (all shared files should be versioned despite mininterval) - if ($uid == \OCP\User::getUser()) { - $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions'); - $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); - $versionsFolderName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath(''); - $matches=glob($versionsName.'.v*'); - sort($matches); - $parts=explode('.v', end($matches)); - if((end($parts)+Storage::DEFAULTMININTERVAL)>time()) { - return false; - } - } - - - // create all parent folders - $info=pathinfo($filename); - if(!file_exists($versionsFolderName.'/'.$info['dirname'])) { - mkdir($versionsFolderName.'/'.$info['dirname'], 0750, true); - } - - // store a new version of a file - $users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.time()); - - // expire old revisions if necessary - Storage::expire($filename); - } - } - - - /** - * rollback to an old version of a file. - */ - public static function rollback($filename, $revision) { - - if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { - list($uid, $filename) = self::getUidAndFilename($filename); - $users_view = new \OC_FilesystemView('/'.\OCP\User::getUser()); - - // rollback - if( @$users_view->copy('files_versions'.$filename.'.v'.$revision, 'files'.$filename) ) { - - return true; - - }else{ - - return false; - - } - - } - - } - - /** - * check if old versions of a file exist. - */ - public static function isversioned($filename) { - if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { - list($uid, $filename) = self::getUidAndFilename($filename); - $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions'); - - $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); - - // check for old versions - $matches=glob($versionsName.'.v*'); - if(count($matches)>0) { - return true; - }else{ - return false; - } - }else{ - return(false); - } - } - - - - /** - * @brief get a list of all available versions of a file in descending chronological order - * @param $filename file to find versions of, relative to the user files dir - * @param $count number of versions to return - * @returns array - */ - public static function getVersions( $filename, $count = 0 ) { - if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) { - list($uid, $filename) = self::getUidAndFilename($filename); - $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions'); - - $versionsName = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); - $versions = array(); - // fetch for old versions - $matches = glob( $versionsName.'.v*' ); - - sort( $matches ); - - $i = 0; - - $files_view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files'); - $local_file = $files_view->getLocalFile($filename); - foreach( $matches as $ma ) { - - $i++; - $versions[$i]['cur'] = 0; - $parts = explode( '.v', $ma ); - $versions[$i]['version'] = ( end( $parts ) ); - - // if file with modified date exists, flag it in array as currently enabled version - ( \md5_file( $ma ) == \md5_file( $local_file ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 ); - - } - - $versions = array_reverse( $versions ); - - foreach( $versions as $key => $value ) { - - // flag the first matched file in array (which will have latest modification date) as current version - if ( $value['fileMatch'] ) { - - $value['cur'] = 1; - break; - - } - - } - - $versions = array_reverse( $versions ); - - // only show the newest commits - if( $count != 0 and ( count( $versions )>$count ) ) { - - $versions = array_slice( $versions, count( $versions ) - $count ); - - } - - return( $versions ); - - - } else { - - // if versioning isn't enabled then return an empty array - return( array() ); - - } - - } - - /** - * @brief Erase a file's versions which exceed the set quota - */ - public static function expire($filename) { - if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { - list($uid, $filename) = self::getUidAndFilename($filename); - $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions'); - - $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); - - // check for old versions - $matches = glob( $versionsName.'.v*' ); - - if( count( $matches ) > \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS ) ) { - - $numberToDelete = count($matches) - \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS ); - - // delete old versions of a file - $deleteItems = array_slice( $matches, 0, $numberToDelete ); - - foreach( $deleteItems as $de ) { - - unlink( $versionsName.'.v'.$de ); - - } - } - } - } - - /** - * @brief Erase all old versions of all user files - * @return true/false - */ - public function expireAll() { - $view = \OCP\Files::getStorage('files_versions'); - return $view->deleteAll('', true); - } + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +/** + * Versions + * + * A class to handle the versioning of files. + */ + +namespace OCA_Versions; + +class Storage { + + + // config.php configuration: + // - files_versions + // - files_versionsfolder + // - files_versionsblacklist + // - files_versionsmaxfilesize + // - files_versionsinterval + // - files_versionmaxversions + // + // todo: + // - finish porting to OC_FilesystemView to enable network transparency + // - add transparent compression. first test if it´s worth it. + + const DEFAULTENABLED=true; + const DEFAULTBLACKLIST='avi mp3 mpg mp4 ctmp'; + const DEFAULTMAXFILESIZE=1048576; // 10MB + const DEFAULTMININTERVAL=60; // 1 min + const DEFAULTMAXVERSIONS=50; + + private static function getUidAndFilename($filename) + { + if (\OCP\App::isEnabled('files_sharing') + && substr($filename, 0, 7) == '/Shared' + && $source = \OCP\Share::getItemSharedWith('file', + substr($filename, 7), + \OC_Share_Backend_File::FORMAT_SHARED_STORAGE)) { + $filename = $source['path']; + $pos = strpos($filename, '/files', 1); + $uid = substr($filename, 1, $pos - 1); + $filename = substr($filename, $pos + 6); + } else { + $uid = \OCP\User::getUser(); + } + return array($uid, $filename); + } + + /** + * store a new version of a file. + */ + public function store($filename) { + if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + list($uid, $filename) = self::getUidAndFilename($filename); + $files_view = new \OC_FilesystemView('/'.\OCP\User::getUser() .'/files'); + $users_view = new \OC_FilesystemView('/'.\OCP\User::getUser()); + + //check if source file already exist as version to avoid recursions. + // todo does this check work? + if ($users_view->file_exists($filename)) { + return false; + } + + // check if filename is a directory + if($files_view->is_dir($filename)) { + return false; + } + + // check filetype blacklist + $blacklist=explode(' ', \OCP\Config::getSystemValue('files_versionsblacklist', Storage::DEFAULTBLACKLIST)); + foreach($blacklist as $bl) { + $parts=explode('.', $filename); + $ext=end($parts); + if(strtolower($ext)==$bl) { + return false; + } + } + // we should have a source file to work with + if (!$files_view->file_exists($filename)) { + return false; + } + + // check filesize + if($files_view->filesize($filename)>\OCP\Config::getSystemValue('files_versionsmaxfilesize', Storage::DEFAULTMAXFILESIZE)) { + return false; + } + + + // check mininterval if the file is being modified by the owner (all shared files should be versioned despite mininterval) + if ($uid == \OCP\User::getUser()) { + $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions'); + $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); + $versionsFolderName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath(''); + $matches=glob($versionsName.'.v*'); + sort($matches); + $parts=explode('.v', end($matches)); + if((end($parts)+Storage::DEFAULTMININTERVAL)>time()) { + return false; + } + } + + + // create all parent folders + $info=pathinfo($filename); + if(!file_exists($versionsFolderName.'/'.$info['dirname'])) { + mkdir($versionsFolderName.'/'.$info['dirname'], 0750, true); + } + + // store a new version of a file + $users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.time()); + + // expire old revisions if necessary + Storage::expire($filename); + } + } + + + /** + * rollback to an old version of a file. + */ + public static function rollback($filename, $revision) { + + if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + list($uid, $filename) = self::getUidAndFilename($filename); + $users_view = new \OC_FilesystemView('/'.\OCP\User::getUser()); + + // rollback + if( @$users_view->copy('files_versions'.$filename.'.v'.$revision, 'files'.$filename) ) { + + return true; + + }else{ + + return false; + + } + + } + + } + + /** + * check if old versions of a file exist. + */ + public static function isversioned($filename) { + if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + list($uid, $filename) = self::getUidAndFilename($filename); + $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions'); + + $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); + + // check for old versions + $matches=glob($versionsName.'.v*'); + if(count($matches)>0) { + return true; + }else{ + return false; + } + }else{ + return(false); + } + } + + + + /** + * @brief get a list of all available versions of a file in descending chronological order + * @param $filename file to find versions of, relative to the user files dir + * @param $count number of versions to return + * @returns array + */ + public static function getVersions( $filename, $count = 0 ) { + if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) { + list($uid, $filename) = self::getUidAndFilename($filename); + $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions'); + + $versionsName = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); + $versions = array(); + // fetch for old versions + $matches = glob( $versionsName.'.v*' ); + + sort( $matches ); + + $i = 0; + + $files_view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files'); + $local_file = $files_view->getLocalFile($filename); + foreach( $matches as $ma ) { + + $i++; + $versions[$i]['cur'] = 0; + $parts = explode( '.v', $ma ); + $versions[$i]['version'] = ( end( $parts ) ); + + // if file with modified date exists, flag it in array as currently enabled version + ( \md5_file( $ma ) == \md5_file( $local_file ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 ); + + } + + $versions = array_reverse( $versions ); + + foreach( $versions as $key => $value ) { + + // flag the first matched file in array (which will have latest modification date) as current version + if ( $value['fileMatch'] ) { + + $value['cur'] = 1; + break; + + } + + } + + $versions = array_reverse( $versions ); + + // only show the newest commits + if( $count != 0 and ( count( $versions )>$count ) ) { + + $versions = array_slice( $versions, count( $versions ) - $count ); + + } + + return( $versions ); + + + } else { + + // if versioning isn't enabled then return an empty array + return( array() ); + + } + + } + + /** + * @brief Erase a file's versions which exceed the set quota + */ + public static function expire($filename) { + if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { + list($uid, $filename) = self::getUidAndFilename($filename); + $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions'); + + $versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename); + + // check for old versions + $matches = glob( $versionsName.'.v*' ); + + if( count( $matches ) > \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS ) ) { + + $numberToDelete = count($matches) - \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS ); + + // delete old versions of a file + $deleteItems = array_slice( $matches, 0, $numberToDelete ); + + foreach( $deleteItems as $de ) { + + unlink( $versionsName.'.v'.$de ); + + } + } + } + } + + /** + * @brief Erase all old versions of all user files + * @return true/false + */ + public function expireAll() { + $view = \OCP\Files::getStorage('files_versions'); + return $view->deleteAll('', true); + } } From 1e33ad9cbcd2282db5cb64b933bfe8844d582acf Mon Sep 17 00:00:00 2001 From: Felix Moeller Date: Sun, 4 Nov 2012 19:11:53 +0100 Subject: [PATCH 06/34] Style: Different line endings in one file are bad for sure I think Checkstyle did not find this occurence, however consistant line endings are preferred. @DeepDiver can Checkstyle find this? --- lib/filesystem.php | 84 +++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/lib/filesystem.php b/lib/filesystem.php index e4c0e2e1eb5..4635f8b4f30 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -209,48 +209,48 @@ class OC_Filesystem{ } static private function loadSystemMountPoints($user) { - if(is_file(OC::$SERVERROOT.'/config/mount.php')) { - $mountConfig=include OC::$SERVERROOT.'/config/mount.php'; - if(isset($mountConfig['global'])) { - foreach($mountConfig['global'] as $mountPoint=>$options) { - self::mount($options['class'], $options['options'], $mountPoint); - } - } - - if(isset($mountConfig['group'])) { - foreach($mountConfig['group'] as $group=>$mounts) { - if(OC_Group::inGroup($user, $group)) { - foreach($mounts as $mountPoint=>$options) { - $mountPoint=self::setUserVars($mountPoint, $user); - foreach($options as &$option) { - $option=self::setUserVars($option, $user); - } - self::mount($options['class'], $options['options'], $mountPoint); - } - } - } - } - - if(isset($mountConfig['user'])) { - foreach($mountConfig['user'] as $user=>$mounts) { - if($user==='all' or strtolower($user)===strtolower($user)) { - foreach($mounts as $mountPoint=>$options) { - $mountPoint=self::setUserVars($mountPoint, $user); - foreach($options as &$option) { - $option=self::setUserVars($option, $user); - } - self::mount($options['class'], $options['options'], $mountPoint); - } - } - } - } - - $mtime=filemtime(OC::$SERVERROOT.'/config/mount.php'); - $previousMTime=OC_Appconfig::getValue('files', 'mountconfigmtime', 0); - if($mtime>$previousMTime) {//mount config has changed, filecache needs to be updated - OC_FileCache::triggerUpdate(); - OC_Appconfig::setValue('files', 'mountconfigmtime', $mtime); - } + if(is_file(OC::$SERVERROOT.'/config/mount.php')) { + $mountConfig=include OC::$SERVERROOT.'/config/mount.php'; + if(isset($mountConfig['global'])) { + foreach($mountConfig['global'] as $mountPoint=>$options) { + self::mount($options['class'], $options['options'], $mountPoint); + } + } + + if(isset($mountConfig['group'])) { + foreach($mountConfig['group'] as $group=>$mounts) { + if(OC_Group::inGroup($user, $group)) { + foreach($mounts as $mountPoint=>$options) { + $mountPoint=self::setUserVars($mountPoint, $user); + foreach($options as &$option) { + $option=self::setUserVars($option, $user); + } + self::mount($options['class'], $options['options'], $mountPoint); + } + } + } + } + + if(isset($mountConfig['user'])) { + foreach($mountConfig['user'] as $user=>$mounts) { + if($user==='all' or strtolower($user)===strtolower($user)) { + foreach($mounts as $mountPoint=>$options) { + $mountPoint=self::setUserVars($mountPoint, $user); + foreach($options as &$option) { + $option=self::setUserVars($option, $user); + } + self::mount($options['class'], $options['options'], $mountPoint); + } + } + } + } + + $mtime=filemtime(OC::$SERVERROOT.'/config/mount.php'); + $previousMTime=OC_Appconfig::getValue('files', 'mountconfigmtime', 0); + if($mtime>$previousMTime) {//mount config has changed, filecache needs to be updated + OC_FileCache::triggerUpdate(); + OC_Appconfig::setValue('files', 'mountconfigmtime', $mtime); + } } } From f187aa6c93ecc7538875e38629f4efb2c25c3155 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 4 Nov 2012 20:48:38 +0100 Subject: [PATCH 07/34] some more code reuse for fileactions also fixes an issue where some fileactions always worked on the last file in the list --- apps/files/js/fileactions.js | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 82d990bf780..0b547502bcf 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -70,6 +70,16 @@ var FileActions = { } parent.children('a.name').append(''); var defaultAction = FileActions.getDefault(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions()); + var actionHandler = function (parent, action, event) { + event.stopPropagation(); + event.preventDefault(); + if(action) + FileActions.currentFile = parent; + file = FileActions.getCurrentFile(); + console.log(file); + console.log(file); + action(file); + }; for (name in actions) { // NOTE: Temporary fix to prevent rename action in root of Shared directory if (name === 'Rename' && $('#dir').val() === '/Shared') { @@ -87,14 +97,7 @@ var FileActions = { html += t('files', name) + ''; var element = $(html); element.data('action', name); - element.click(function (event) { - FileActions.currentFile = $(this).parent().parent().parent(); - event.stopPropagation(); - event.preventDefault(); - var action = actions[$(this).data('action')]; - var currentFile = FileActions.getCurrentFile(); - action(currentFile); - }); + element.click(actionHandler.bind(null, parent, actions[name])); parent.find('a.name>span.fileactions').append(element); } } @@ -113,14 +116,8 @@ var FileActions = { if (img) { element.append($('')); } - element.data('action', 'Delete'); - element.click(function (event) { - event.stopPropagation(); - event.preventDefault(); - var action = actions[$(this).data('action')]; - var currentFile = FileActions.getCurrentFile(); - action(currentFile); - }); + element.data('action', actions['Delete']); + element.click(actionHandler.bind(null, parent, actions['Delete'])); parent.parent().children().last().append(element); } }, From 4f32f49fb1d4a247558bc44733ed8443974c1701 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 4 Nov 2012 21:00:36 +0100 Subject: [PATCH 08/34] this line shouldn't be here --- apps/files/js/fileactions.js | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 0b547502bcf..d09979fc765 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -73,7 +73,6 @@ var FileActions = { var actionHandler = function (parent, action, event) { event.stopPropagation(); event.preventDefault(); - if(action) FileActions.currentFile = parent; file = FileActions.getCurrentFile(); console.log(file); From a4b2ea586dea5e02a91a873d16a20144db7292a0 Mon Sep 17 00:00:00 2001 From: Felix Moeller Date: Sun, 4 Nov 2012 22:16:04 +0100 Subject: [PATCH 09/34] Style: Remove all the dangling white spaces --- apps/files_sharing/public.php | 2 +- lib/backgroundjob.php | 2 +- lib/base.php | 4 ++-- lib/connector/sabre/quotaplugin.php | 16 ++++++++-------- lib/log.php | 2 +- lib/public/backgroundjob.php | 2 +- lib/public/share.php | 2 +- ocs/providers.php | 16 ++++++++-------- ocs/v1.php | 16 ++++++++-------- settings/ajax/createuser.php | 6 +++--- settings/ajax/getlog.php | 2 +- settings/ajax/userlist.php | 10 +++++----- settings/apps.php | 8 ++++---- settings/languageCodes.php | 2 +- settings/templates/help.php | 2 +- settings/templates/users.php | 2 +- settings/users.php | 2 +- tests/lib/share/share.php | 4 ++-- tests/lib/user/backend.php | 4 ++-- tests/lib/util.php | 6 +++--- tests/preseed-config.php | 6 +++--- 21 files changed, 58 insertions(+), 58 deletions(-) diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index dca87cd6876..295273d842b 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -22,7 +22,7 @@ if (isset($_GET['token'])) { // Enf of backward compatibility function getID($path) { - // use the share table from the db to find the item source if the file was reshared because shared files + // use the share table from the db to find the item source if the file was reshared because shared files //are not stored in the file cache. if (substr(OC_Filesystem::getMountPoint($path), -7, 6) == "Shared") { $path_parts = explode('/', $path, 5); diff --git a/lib/backgroundjob.php b/lib/backgroundjob.php index f486519bf09..28b5ce3af20 100644 --- a/lib/backgroundjob.php +++ b/lib/backgroundjob.php @@ -40,7 +40,7 @@ class OC_BackgroundJob{ * @param $type execution type * @return boolean * - * This method sets the execution type of the background jobs. Possible types + * This method sets the execution type of the background jobs. Possible types * are "none", "ajax", "webcron", "cron" */ public static function setExecutionType( $type ) { diff --git a/lib/base.php b/lib/base.php index 084cca92e8d..d4eeac82daa 100644 --- a/lib/base.php +++ b/lib/base.php @@ -619,9 +619,9 @@ class OC{ OC_Util::redirectToDefaultPage(); // doesn't return } - // if you reach this point you have changed your password + // if you reach this point you have changed your password // or you are an attacker - // we can not delete tokens here because users may reach + // we can not delete tokens here because users may reach // this point multiple times after a password change OC_Log::write('core', 'Authentication cookie rejected for user '.$_COOKIE['oc_username'], OC_Log::WARN); } diff --git a/lib/connector/sabre/quotaplugin.php b/lib/connector/sabre/quotaplugin.php index 5b8ef941710..a56a65ad863 100644 --- a/lib/connector/sabre/quotaplugin.php +++ b/lib/connector/sabre/quotaplugin.php @@ -2,7 +2,7 @@ /** * This plugin check user quota and deny creating files when they exceeds the quota. - * + * * @copyright Copyright (C) 2012 entreCables S.L. All rights reserved. * @author Sergio Cambra * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License @@ -10,9 +10,9 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { /** - * Reference to main server object - * - * @var Sabre_DAV_Server + * Reference to main server object + * + * @var Sabre_DAV_Server */ private $server; @@ -23,8 +23,8 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { * addPlugin is called. * * This method should set up the requires event subscriptions. - * - * @param Sabre_DAV_Server $server + * + * @param Sabre_DAV_Server $server * @return void */ public function initialize(Sabre_DAV_Server $server) { @@ -37,10 +37,10 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin { /** * This method is called before any HTTP method and forces users to be authenticated - * + * * @param string $method * @throws Sabre_DAV_Exception - * @return bool + * @return bool */ public function checkQuota($uri, $data = null) { $expected = $this->server->httpRequest->getHeader('X-Expected-Entity-Length'); diff --git a/lib/log.php b/lib/log.php index b5e8e1b06a1..e9cededa5c0 100644 --- a/lib/log.php +++ b/lib/log.php @@ -47,7 +47,7 @@ class OC_Log { //ob_end_clean(); self::write('PHP', $error['message'] . ' at ' . $error['file'] . '#' . $error['line'], self::FATAL); } else { - return true; + return true; } } diff --git a/lib/public/backgroundjob.php b/lib/public/backgroundjob.php index 24a17836f7f..601046fe691 100644 --- a/lib/public/backgroundjob.php +++ b/lib/public/backgroundjob.php @@ -62,7 +62,7 @@ class BackgroundJob { * @param $type execution type * @return boolean * - * This method sets the execution type of the background jobs. Possible types + * This method sets the execution type of the background jobs. Possible types * are "none", "ajax", "webcron", "cron" */ public static function setExecutionType( $type ) { diff --git a/lib/public/share.php b/lib/public/share.php index da1c0616390..071304ec249 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -28,7 +28,7 @@ namespace OCP; /** * This class provides the ability for apps to share their content between users. * Apps must create a backend class that implements OCP\Share_Backend and register it with this class. -* +* * It provides the following hooks: * - post_shared */ diff --git a/ocs/providers.php b/ocs/providers.php index 4c68ded914e..bdbfe0c4ee7 100644 --- a/ocs/providers.php +++ b/ocs/providers.php @@ -3,22 +3,22 @@ /** * ownCloud * -* @author Frank Karlitschek -* @copyright 2012 Frank Karlitschek frank@owncloud.org -* +* @author Frank Karlitschek +* @copyright 2012 Frank Karlitschek frank@owncloud.org +* * 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 +* 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 . * +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see . +* */ require_once '../lib/base.php'; diff --git a/ocs/v1.php b/ocs/v1.php index b12ea5ef18d..3593f1822cf 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -3,22 +3,22 @@ /** * ownCloud * -* @author Frank Karlitschek -* @copyright 2012 Frank Karlitschek frank@owncloud.org -* +* @author Frank Karlitschek +* @copyright 2012 Frank Karlitschek frank@owncloud.org +* * 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 +* 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 . * +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see . +* */ require_once '../lib/base.php'; diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php index c87ff422f61..16b48c8a9ca 100644 --- a/settings/ajax/createuser.php +++ b/settings/ajax/createuser.php @@ -43,9 +43,9 @@ try { } OC_Group::addToGroup( $username, $i ); } - OC_JSON::success(array("data" => - array( - "username" => $username, + OC_JSON::success(array("data" => + array( + "username" => $username, "groups" => implode( ", ", OC_Group::getUserGroups( $username ))))); } catch (Exception $exception) { OC_JSON::error(array("data" => array( "message" => $exception->getMessage()))); diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php index 273b02e3822..043124fa175 100644 --- a/settings/ajax/getlog.php +++ b/settings/ajax/getlog.php @@ -12,5 +12,5 @@ $offset=(isset($_GET['offset']))?$_GET['offset']:0; $entries=OC_Log_Owncloud::getEntries($count, $offset); OC_JSON::success(array( - "data" => OC_Util::sanitizeHTML($entries), + "data" => OC_Util::sanitizeHTML($entries), "remain"=>(count(OC_Log_Owncloud::getEntries(1, $offset + $offset)) != 0) ? true : false)); diff --git a/settings/ajax/userlist.php b/settings/ajax/userlist.php index 61b1a388fc3..eaeade60a39 100644 --- a/settings/ajax/userlist.php +++ b/settings/ajax/userlist.php @@ -32,9 +32,9 @@ if (OC_Group::inGroup(OC_User::getUser(), 'admin')) { $batch = OC_User::getUsers('', 10, $offset); foreach ($batch as $user) { $users[] = array( - 'name' => $user, - 'groups' => join(', ', OC_Group::getUserGroups($user)), - 'subadmin' => join(', ', OC_SubAdmin::getSubAdminsGroups($user)), + 'name' => $user, + 'groups' => join(', ', OC_Group::getUserGroups($user)), + 'subadmin' => join(', ', OC_SubAdmin::getSubAdminsGroups($user)), 'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default')); } } else { @@ -42,8 +42,8 @@ if (OC_Group::inGroup(OC_User::getUser(), 'admin')) { $batch = OC_Group::usersInGroups($groups, '', 10, $offset); foreach ($batch as $user) { $users[] = array( - 'name' => $user, - 'groups' => join(', ', OC_Group::getUserGroups($user)), + 'name' => $user, + 'groups' => join(', ', OC_Group::getUserGroups($user)), 'quota' => OC_Preferences::getValue($user, 'files', 'quota', 'default')); } } diff --git a/settings/apps.php b/settings/apps.php index 8134b44143a..155291333f3 100644 --- a/settings/apps.php +++ b/settings/apps.php @@ -95,11 +95,11 @@ if ( $remoteApps ) { foreach ( $remoteApps AS $key => $remote ) { - if ( + if ( $app['name'] == $remote['name'] - // To set duplicate detection to use OCS ID instead of string name, - // enable this code, remove the line of code above, - // and add [ID] to info.xml of each 3rd party app: + // To set duplicate detection to use OCS ID instead of string name, + // enable this code, remove the line of code above, + // and add [ID] to info.xml of each 3rd party app: // OR $app['ocs_id'] == $remote['ocs_id'] ) { diff --git a/settings/languageCodes.php b/settings/languageCodes.php index 221aa13cf6a..71655800856 100644 --- a/settings/languageCodes.php +++ b/settings/languageCodes.php @@ -3,7 +3,7 @@ * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */ - + return array( 'bg_BG'=>'български език', 'ca'=>'Català', diff --git a/settings/templates/help.php b/settings/templates/help.php index 56d43853444..9bb46740f5b 100644 --- a/settings/templates/help.php +++ b/settings/templates/help.php @@ -1,4 +1,4 @@ -; - + diff --git a/settings/users.php b/settings/users.php index 395712dbd59..93a259f1cd8 100644 --- a/settings/users.php +++ b/settings/users.php @@ -31,7 +31,7 @@ if($isadmin) { foreach($accessibleusers as $i) { $users[] = array( - "name" => $i, + "name" => $i, "groups" => join( ", ", /*array_intersect(*/OC_Group::getUserGroups($i)/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/), 'quota'=>OC_Preferences::getValue($i, 'files', 'quota', 'default'), 'subadmin'=>implode(', ', OC_SubAdmin::getSubAdminsGroups($i))); diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php index 3cad3a28680..2cb6f7417d2 100644 --- a/tests/lib/share/share.php +++ b/tests/lib/share/share.php @@ -181,7 +181,7 @@ class Test_Share extends UnitTestCase { $this->assertEquals($message, $exception->getMessage()); } - // Owner grants share and update permission + // Owner grants share and update permission OC_User::setUserId($this->user1); $this->assertTrue(OCP\Share::setPermissions('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_UPDATE | OCP\Share::PERMISSION_SHARE)); @@ -375,7 +375,7 @@ class Test_Share extends UnitTestCase { $this->assertTrue(in_array('test.txt', $to_test)); $this->assertTrue(in_array('test1.txt', $to_test)); - // Valid reshare + // Valid reshare $this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_USER, $this->user4, OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_SHARE)); OC_User::setUserId($this->user4); $this->assertEquals(array('test1.txt'), OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET)); diff --git a/tests/lib/user/backend.php b/tests/lib/user/backend.php index 79653481f90..0b744770ea2 100644 --- a/tests/lib/user/backend.php +++ b/tests/lib/user/backend.php @@ -23,10 +23,10 @@ /** * Abstract class to provide the basis of backend-specific unit test classes. * - * All subclasses MUST assign a backend property in setUp() which implements + * All subclasses MUST assign a backend property in setUp() which implements * user operations (add, remove, etc.). Test methods in this class will then be * run on each separate subclass and backend therein. - * + * * For an example see /tests/lib/user/dummy.php */ diff --git a/tests/lib/util.php b/tests/lib/util.php index a8e5b810265..27635cb8055 100644 --- a/tests/lib/util.php +++ b/tests/lib/util.php @@ -10,7 +10,7 @@ class Test_Util extends UnitTestCase { // Constructor function Test_Util() { - date_default_timezone_set("UTC"); + date_default_timezone_set("UTC"); } function testFormatDate() { @@ -36,10 +36,10 @@ class Test_Util extends UnitTestCase { $goodString = "This is an harmless string."; $result = OC_Util::sanitizeHTML($goodString); $this->assertEquals("This is an harmless string.", $result); - } + } function testGenerate_random_bytes() { $result = strlen(OC_Util::generate_random_bytes(59)); $this->assertEquals(59, $result); - } + } } \ No newline at end of file diff --git a/tests/preseed-config.php b/tests/preseed-config.php index 7eadccbe769..9791e713dac 100644 --- a/tests/preseed-config.php +++ b/tests/preseed-config.php @@ -1,15 +1,15 @@ false, - 'apps_paths' => + 'apps_paths' => array ( - 0 => + 0 => array ( 'path' => OC::$SERVERROOT.'/apps', 'url' => '/apps', 'writable' => false, ), - 1 => + 1 => array ( 'path' => OC::$SERVERROOT.'/apps2', 'url' => '/apps2', From 02ec677e3c665da98056496270c22078c4b7aac0 Mon Sep 17 00:00:00 2001 From: Felix Moeller Date: Sun, 4 Nov 2012 22:57:40 +0100 Subject: [PATCH 10/34] Style: The last two spaces --- ocs/providers.php | 2 +- ocs/v1.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ocs/providers.php b/ocs/providers.php index bdbfe0c4ee7..43c9dc2aa42 100644 --- a/ocs/providers.php +++ b/ocs/providers.php @@ -15,7 +15,7 @@ * 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 . * diff --git a/ocs/v1.php b/ocs/v1.php index 3593f1822cf..1652b0bedbe 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -15,7 +15,7 @@ * 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 . * From d9d6dc892c4ed176df0f385f6ed8d1269cbe7c43 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sun, 4 Nov 2012 23:40:37 +0100 Subject: [PATCH 11/34] add a link to the contribution guidelines to make it easier for new people --- README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index e11ff7d10cd..9b113c4f674 100644 --- a/README +++ b/README @@ -4,6 +4,7 @@ A personal cloud which runs on your own server. http://ownCloud.org Installation instructions: http://owncloud.org/support +Contribution Guidelines: http://owncloud.org/dev/contribute/ Source code: https://github.com/owncloud Mailing list: https://mail.kde.org/mailman/listinfo/owncloud @@ -16,4 +17,4 @@ Please submit translations via Transifex: https://www.transifex.com/projects/p/owncloud/ For more detailed information about translations: -http://owncloud.org/dev/translation/ \ No newline at end of file +http://owncloud.org/dev/translation/ From f0be09a23cf2ace0940850b9f321ce54fc38b4ea Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Mon, 5 Nov 2012 00:03:41 +0100 Subject: [PATCH 12/34] [tx-robot] updated from transifex --- l10n/templates/core.pot | 46 ++++++++++++++--------------- l10n/templates/files.pot | 2 +- l10n/templates/files_encryption.pot | 2 +- l10n/templates/files_external.pot | 2 +- l10n/templates/files_sharing.pot | 2 +- l10n/templates/files_versions.pot | 2 +- l10n/templates/lib.pot | 2 +- l10n/templates/settings.pot | 2 +- l10n/templates/user_ldap.pot | 2 +- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot index 3e0f7d390d4..991df4e58b0 100644 --- a/l10n/templates/core.pot +++ b/l10n/templates/core.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-04 00:00+0100\n" +"POT-Creation-Date: 2012-11-05 00:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,7 +29,7 @@ msgstr "" msgid "This category already exists: " msgstr "" -#: js/js.js:243 templates/layout.user.php:53 templates/layout.user.php:54 +#: js/js.js:243 templates/layout.user.php:59 templates/layout.user.php:60 msgid "Settings" msgstr "" @@ -314,87 +314,87 @@ msgstr "" msgid "Finish setup" msgstr "" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Sunday" msgstr "" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Monday" msgstr "" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Tuesday" msgstr "" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Wednesday" msgstr "" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Thursday" msgstr "" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Friday" msgstr "" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Saturday" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "January" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "February" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "March" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "April" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "May" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "June" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "July" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "August" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "September" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "October" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "November" msgstr "" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "December" msgstr "" -#: templates/layout.guest.php:42 +#: templates/layout.guest.php:41 msgid "web services under your control" msgstr "" -#: templates/layout.user.php:38 +#: templates/layout.user.php:44 msgid "Log out" msgstr "" diff --git a/l10n/templates/files.pot b/l10n/templates/files.pot index 06fc0ce46da..5db9a1a6ac5 100644 --- a/l10n/templates/files.pot +++ b/l10n/templates/files.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-04 00:00+0100\n" +"POT-Creation-Date: 2012-11-05 00:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_encryption.pot b/l10n/templates/files_encryption.pot index 729f944b65b..b94a4e40317 100644 --- a/l10n/templates/files_encryption.pot +++ b/l10n/templates/files_encryption.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-04 00:00+0100\n" +"POT-Creation-Date: 2012-11-05 00:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_external.pot b/l10n/templates/files_external.pot index 51f405e0f1e..24de4f4f705 100644 --- a/l10n/templates/files_external.pot +++ b/l10n/templates/files_external.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-04 00:00+0100\n" +"POT-Creation-Date: 2012-11-05 00:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_sharing.pot b/l10n/templates/files_sharing.pot index d53c61547c8..f2f865ee038 100644 --- a/l10n/templates/files_sharing.pot +++ b/l10n/templates/files_sharing.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-04 00:00+0100\n" +"POT-Creation-Date: 2012-11-05 00:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_versions.pot b/l10n/templates/files_versions.pot index 5c037f680ca..217c2ff250a 100644 --- a/l10n/templates/files_versions.pot +++ b/l10n/templates/files_versions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-04 00:00+0100\n" +"POT-Creation-Date: 2012-11-05 00:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/lib.pot b/l10n/templates/lib.pot index fd91ee28f26..615a609eaf2 100644 --- a/l10n/templates/lib.pot +++ b/l10n/templates/lib.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-04 00:01+0100\n" +"POT-Creation-Date: 2012-11-05 00:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot index a7fbc613ee8..3a2f3241317 100644 --- a/l10n/templates/settings.pot +++ b/l10n/templates/settings.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-04 00:01+0100\n" +"POT-Creation-Date: 2012-11-05 00:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/user_ldap.pot b/l10n/templates/user_ldap.pot index 1e74d709150..638b83aa48a 100644 --- a/l10n/templates/user_ldap.pot +++ b/l10n/templates/user_ldap.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-04 00:00+0100\n" +"POT-Creation-Date: 2012-11-05 00:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From 01b0e9b133279ec6c68e7fca6c8ae35c35f82941 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Mon, 5 Nov 2012 10:46:28 +0100 Subject: [PATCH 13/34] fix the webdav user backend. still not completel working but a frist step --- apps/user_webdavauth/templates/settings.php | 2 +- apps/user_webdavauth/user_webdavauth.php | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/user_webdavauth/templates/settings.php b/apps/user_webdavauth/templates/settings.php index c00c199632a..e6ca5d97d3c 100755 --- a/apps/user_webdavauth/templates/settings.php +++ b/apps/user_webdavauth/templates/settings.php @@ -1,7 +1,7 @@
WebDAV Authentication -

+

diff --git a/apps/user_webdavauth/user_webdavauth.php b/apps/user_webdavauth/user_webdavauth.php index 5a16a4c992a..2af8e9f103d 100755 --- a/apps/user_webdavauth/user_webdavauth.php +++ b/apps/user_webdavauth/user_webdavauth.php @@ -34,7 +34,7 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { return false; } - public function deleteUser() { + public function deleteUser($uid) { // Can't delete user OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to delete users from web frontend using WebDAV user backend', 3); return false; @@ -47,7 +47,6 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { } public function checkPassword( $uid, $password ) { - $url= 'http://'.urlencode($uid).':'.urlencode($password).'@'.$this->webdavauth_url; $headers = get_headers($url); if($headers==false) { @@ -58,9 +57,9 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { $returncode= substr($headers[0], 9, 3); if($returncode=='401') { - return false; + return(false); }else{ - return true; + return($uid); } } @@ -75,7 +74,7 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { /* * we don´t know the users so all we can do it return an empty array here */ - public function getUsers() { + public function getUsers($search = '', $limit = 10, $offset = 0) { $returnArray = array(); return $returnArray; From 34fee8afaa9161fbc9c608ae87bb19b770110a5c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 5 Nov 2012 13:52:02 +0100 Subject: [PATCH 14/34] remove debug statements --- apps/files/js/fileactions.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index d09979fc765..40dd9f14a69 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -75,8 +75,6 @@ var FileActions = { event.preventDefault(); FileActions.currentFile = parent; file = FileActions.getCurrentFile(); - console.log(file); - console.log(file); action(file); }; for (name in actions) { From 6fba4ba87d5a16eb61337062cd7a6b9fa51f7682 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Mon, 5 Nov 2012 14:22:16 +0100 Subject: [PATCH 15/34] fix the webdavauth app --- apps/user_webdavauth/appinfo/info.xml | 6 ++++-- apps/user_webdavauth/appinfo/version | 1 + apps/user_webdavauth/user_webdavauth.php | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 apps/user_webdavauth/appinfo/version diff --git a/apps/user_webdavauth/appinfo/info.xml b/apps/user_webdavauth/appinfo/info.xml index 9a8027daee6..0d9f529ed1b 100755 --- a/apps/user_webdavauth/appinfo/info.xml +++ b/apps/user_webdavauth/appinfo/info.xml @@ -2,10 +2,12 @@ user_webdavauth WebDAV user backend - Authenticate Users by a WebDAV call - 1.0 + Authenticate users by a WebDAV call. You can use any WebDAV server, ownCloud server or other webserver to authenticate. It should return http 200 for right credentials and http 401 for wrong ones. AGPL Frank Karlitschek 4.9 true + + + diff --git a/apps/user_webdavauth/appinfo/version b/apps/user_webdavauth/appinfo/version new file mode 100644 index 00000000000..a6bbdb5ff48 --- /dev/null +++ b/apps/user_webdavauth/appinfo/version @@ -0,0 +1 @@ +1.1.0.0 diff --git a/apps/user_webdavauth/user_webdavauth.php b/apps/user_webdavauth/user_webdavauth.php index 2af8e9f103d..0b0be7c2fa1 100755 --- a/apps/user_webdavauth/user_webdavauth.php +++ b/apps/user_webdavauth/user_webdavauth.php @@ -67,10 +67,11 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { /* * we don´t know if a user exists without the password. so we have to return false all the time */ - public function userExists( $uid ) { - return false; + public function userExists( $uid ){ + return true; } + /* * we don´t know the users so all we can do it return an empty array here */ From 510191db6885153a98350d1a3530834491e0b552 Mon Sep 17 00:00:00 2001 From: "Lorenzo M. Catucci" Date: Mon, 5 Nov 2012 15:38:49 +0100 Subject: [PATCH 16/34] Return true or false from readAttribute if $attr is empty This way, readAttribute can act as an existence checker. --- apps/user_ldap/lib/access.php | 11 ++++++++--- apps/user_ldap/user_ldap.php | 5 ++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index f1e2143cfaf..822e0b441c0 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -40,9 +40,10 @@ abstract class Access { * @brief reads a given attribute for an LDAP record identified by a DN * @param $dn the record in question * @param $attr the attribute that shall be retrieved - * @returns the values in an array on success, false otherwise + * if empty, just check the record's existence + * @returns true or the values in an array on success, false otherwise * - * Reads an attribute from an LDAP entry + * Reads an attribute from an LDAP entry or check if entry exists */ public function readAttribute($dn, $attr, $filter = 'objectClass=*') { if(!$this->checkConnection()) { @@ -57,10 +58,14 @@ abstract class Access { } $rr = @ldap_read($cr, $dn, $filter, array($attr)); if(!is_resource($rr)) { - \OCP\Util::writeLog('user_ldap', 'readAttribute '.$attr.' failed for DN '.$dn, \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'readAttribute failed for DN '.$dn, \OCP\Util::DEBUG); //in case an error occurs , e.g. object does not exist return false; } + if (empty($attr)) { + \OCP\Util::writeLog('user_ldap', 'readAttribute: '.$dn.' found', \OCP\Util::DEBUG); + return true; + } $er = ldap_first_entry($cr, $rr); if(!is_resource($er)) { //did not match the filter, return false diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 69e470c78a7..4c0893a5103 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -149,9 +149,8 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { return false; } - //if user really still exists, we will be able to read his objectclass - $objcs = $this->readAttribute($dn, 'objectclass'); - if(!$objcs || empty($objcs)) { + //check if user really still exists by reading its entry + if(!$this->readAttribute($dn, '') ) { $this->connection->writeToCache('userExists'.$uid, false); return false; } From 972243d5640c40b1f161e50f31404c71d7c290c0 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 5 Nov 2012 16:39:03 +0100 Subject: [PATCH 17/34] support string values ('true' and 'false') for configuring the secure parameter on external storage backends fixes #78 --- apps/files_external/lib/ftp.php | 10 +++++++++- apps/files_external/lib/swift.php | 10 +++++++++- apps/files_external/lib/webdav.php | 10 +++++++++- apps/files_external/tests/ftp.php | 18 ++++++++++++++++++ 4 files changed, 45 insertions(+), 3 deletions(-) diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php index 2fc2a3a1a37..650ca88fd93 100644 --- a/apps/files_external/lib/ftp.php +++ b/apps/files_external/lib/ftp.php @@ -19,7 +19,15 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{ $this->host=$params['host']; $this->user=$params['user']; $this->password=$params['password']; - $this->secure=isset($params['secure'])?(bool)$params['secure']:false; + if(isset($params['secure'])){ + if(is_string($params['secure'])){ + $this->secure = ($params['secure'] === 'true'); + }else{ + $this->secure = (bool)$params['secure']; + } + }else{ + $this->secure = false; + } $this->root=isset($params['root'])?$params['root']:'/'; if(!$this->root || $this->root[0]!='/') { $this->root='/'.$this->root; diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index 2f0076706e4..9c9754ac346 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -271,7 +271,15 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{ $this->host=$params['host']; $this->user=$params['user']; $this->root=isset($params['root'])?$params['root']:'/'; - $this->secure=isset($params['secure'])?(bool)$params['secure']:true; + if(isset($params['secure'])){ + if(is_string($params['secure'])){ + $this->secure = ($params['secure'] === 'true'); + }else{ + $this->secure = (bool)$params['secure']; + } + }else{ + $this->secure = false; + } if(!$this->root || $this->root[0]!='/') { $this->root='/'.$this->root; } diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 02fe540d061..ec942b11f6a 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -27,7 +27,15 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ $this->host=$host; $this->user=$params['user']; $this->password=$params['password']; - $this->secure=(isset($params['secure']) && $params['secure'] == 'true')?true:false; + if(isset($params['secure'])){ + if(is_string($params['secure'])){ + $this->secure = ($params['secure'] === 'true'); + }else{ + $this->secure = (bool)$params['secure']; + } + }else{ + $this->secure = false; + } $this->root=isset($params['root'])?$params['root']:'/'; if(!$this->root || $this->root[0]!='/') { $this->root='/'.$this->root; diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php index 4549c420410..80288b59114 100644 --- a/apps/files_external/tests/ftp.php +++ b/apps/files_external/tests/ftp.php @@ -24,4 +24,22 @@ class Test_Filestorage_FTP extends Test_FileStorage { OCP\Files::rmdirr($this->instance->constructUrl('')); } } + + public function testConstructUrl(){ + $config = array ( 'host' => 'localhost', 'user' => 'ftp', 'password' => 'ftp', 'root' => '/', 'secure' => false ); + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); + + $config['secure'] = true; + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftps://ftp:ftp@localhost/', $instance->constructUrl('')); + + $config['secure'] = 'false'; + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); + + $config['secure'] = 'true'; + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftps://ftp:ftp@localhost/', $instance->constructUrl('')); + } } From ca24f4767b996bcded139dd9189592e57eade2a6 Mon Sep 17 00:00:00 2001 From: "Lorenzo M. Catucci" Date: Mon, 5 Nov 2012 17:35:09 +0100 Subject: [PATCH 18/34] Return an empty array on succesful existence check --- apps/user_ldap/lib/access.php | 5 +++-- apps/user_ldap/user_ldap.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 822e0b441c0..9cbb21ead0e 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -41,7 +41,8 @@ abstract class Access { * @param $dn the record in question * @param $attr the attribute that shall be retrieved * if empty, just check the record's existence - * @returns true or the values in an array on success, false otherwise + * @returns an array of values on success or an empty + * array if $attr is empty, false otherwise * * Reads an attribute from an LDAP entry or check if entry exists */ @@ -64,7 +65,7 @@ abstract class Access { } if (empty($attr)) { \OCP\Util::writeLog('user_ldap', 'readAttribute: '.$dn.' found', \OCP\Util::DEBUG); - return true; + return array(); } $er = ldap_first_entry($cr, $rr); if(!is_resource($er)) { diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 4c0893a5103..6591d1d5fee 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -150,7 +150,7 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { } //check if user really still exists by reading its entry - if(!$this->readAttribute($dn, '') ) { + if(!is_array($this->readAttribute($dn, ''))) { $this->connection->writeToCache('userExists'.$uid, false); return false; } From 1aec5378b827ee4e216a28973cb504410c8ebe25 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Mon, 5 Nov 2012 19:54:48 +0100 Subject: [PATCH 19/34] make images in buttons also show click-hand on hover --- core/css/styles.css | 1 + 1 file changed, 1 insertion(+) diff --git a/core/css/styles.css b/core/css/styles.css index 95dceb50dec..646a760f989 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -44,6 +44,7 @@ textarea:hover, textarea:focus, textarea:active { background-color:#fff; color:# input[type="submit"], input[type="button"], button, .button, #quota, div.jp-progress, select, .pager li a { width:auto; padding:.4em; border:1px solid #ddd; font-weight:bold; cursor:pointer; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; } input[type="submit"]:hover, input[type="submit"]:focus, input[type="button"]:hover, select:hover, select:focus, select:active, input[type="button"]:focus, .button:hover { background:#fff; color:#333; } +input[type="submit"] img, input[type="button"] img, button img, .button img { cursor:pointer; } input[type="checkbox"] { width:auto; } #quota { cursor:default; } From 85d6a08ae9803d7b19482b45664200f5980bd356 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Mon, 5 Nov 2012 20:47:26 +0100 Subject: [PATCH 20/34] prepare SQL query only once, that's what prepared statements are for. Should improve upgrade time with larger setups --- apps/files/appinfo/update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php index 738864d7cff..29782ec643e 100644 --- a/apps/files/appinfo/update.php +++ b/apps/files/appinfo/update.php @@ -5,10 +5,10 @@ $installedVersion=OCP\Config::getAppValue('files', 'installed_version'); if (version_compare($installedVersion, '1.1.6', '<')) { $query = OC_DB::prepare( "SELECT `propertyname`, `propertypath`, `userid` FROM `*PREFIX*properties`" ); $result = $query->execute(); + $updateQuery = OC_DB::prepare('UPDATE `*PREFIX*properties` SET `propertyname` = ? WHERE `userid` = ? AND `propertypath` = ?'); while( $row = $result->fetchRow()) { if ( $row["propertyname"][0] != '{' ) { - $query = OC_DB::prepare( 'UPDATE `*PREFIX*properties` SET `propertyname` = ? WHERE `userid` = ? AND `propertypath` = ?' ); - $query->execute( array( '{DAV:}' + $row["propertyname"], $row["userid"], $row["propertypath"] )); + $updateQuery->execute(array('{DAV:}' + $row["propertyname"], $row["userid"], $row["propertypath"])); } } } From f9226f170e503752664cd8152e0211a6564f340d Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Mon, 5 Nov 2012 21:26:59 +0100 Subject: [PATCH 21/34] fixes #266 --- tests/lib/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/template.php b/tests/lib/template.php index 32ae4aca590..736bc95255c 100644 --- a/tests/lib/template.php +++ b/tests/lib/template.php @@ -20,7 +20,7 @@ * */ -require_once("lib/template.php"); +OC::autoload('OC_Template'); class Test_TemplateFunctions extends UnitTestCase { From 8b3ae4309b1a4c44d6a8cccd17534e42f2f17a59 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Mon, 5 Nov 2012 21:37:59 +0100 Subject: [PATCH 22/34] Fix mkdir and opendir warnings when path does not exist --- apps/files_external/lib/config.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 57a6438ff10..fdc847fcf2c 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -285,7 +285,12 @@ class OC_Mount_Config { public static function getCertificates() { $view = \OCP\Files::getStorage('files_external'); $path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'; - if (!is_dir($path)) mkdir($path); + \OCP\Util::writeLog('files_external', 'checking path '.$path, \OCP\Util::INFO); + if(!is_dir($path)) { + //path might not exist (e.g. non-standard OC_User::getHome() value) + //in this case create full path using 3rd (recursive=true) parameter. + mkdir($path, 0777, true); + } $result = array(); $handle = opendir($path); if (!$handle) { From 3d13c9db700522854a2fd6e4af624b921f062c8f Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Mon, 5 Nov 2012 17:54:23 -0500 Subject: [PATCH 23/34] Return empty array if file does not exist inside Shared folder, fixes issue #91 --- lib/files.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/files.php b/lib/files.php index 5a14083c285..3e15c68d885 100644 --- a/lib/files.php +++ b/lib/files.php @@ -45,13 +45,16 @@ class OC_Files { if (($path == '/Shared' || substr($path, 0, 8) == '/Shared/') && OC_App::isEnabled('files_sharing')) { if ($path == '/Shared') { list($info) = OCP\Share::getItemsSharedWith('file', OC_Share_Backend_File::FORMAT_FILE_APP_ROOT); - }else{ - $info['size'] = OC_Filesystem::filesize($path); - $info['mtime'] = OC_Filesystem::filemtime($path); - $info['ctime'] = OC_Filesystem::filectime($path); - $info['mimetype'] = OC_Filesystem::getMimeType($path); - $info['encrypted'] = false; - $info['versioned'] = false; + } else { + $info = array(); + if (OC_Filesystem::file_exists($path)) { + $info['size'] = OC_Filesystem::filesize($path); + $info['mtime'] = OC_Filesystem::filemtime($path); + $info['ctime'] = OC_Filesystem::filectime($path); + $info['mimetype'] = OC_Filesystem::getMimeType($path); + $info['encrypted'] = false; + $info['versioned'] = false; + } } } else { $info = OC_FileCache::get($path); From 4d052c1eeee8c99a3f0a0d10b8e57d209ba2cb3a Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Tue, 6 Nov 2012 00:01:40 +0100 Subject: [PATCH 24/34] [tx-robot] updated from transifex --- apps/files/l10n/pt_PT.php | 1 + apps/files/l10n/ta_LK.php | 1 + core/l10n/pt_PT.php | 2 + l10n/pt_PT/core.po | 64 ++-- l10n/pt_PT/files.po | 10 +- l10n/ta_LK/files.po | 10 +- l10n/templates/core.pot | 2 +- l10n/templates/files.pot | 4 +- l10n/templates/files_encryption.pot | 2 +- l10n/templates/files_external.pot | 2 +- l10n/templates/files_sharing.pot | 2 +- l10n/templates/files_versions.pot | 2 +- l10n/templates/lib.pot | 2 +- l10n/templates/settings.pot | 8 +- l10n/templates/user_ldap.pot | 2 +- l10n/zu_ZA/core.po | 451 ++++++++++++++++++++++++++++ l10n/zu_ZA/files.po | 299 ++++++++++++++++++ l10n/zu_ZA/files_encryption.po | 34 +++ l10n/zu_ZA/files_external.po | 106 +++++++ l10n/zu_ZA/files_sharing.po | 48 +++ l10n/zu_ZA/files_versions.po | 42 +++ l10n/zu_ZA/lib.po | 137 +++++++++ l10n/zu_ZA/settings.po | 320 ++++++++++++++++++++ l10n/zu_ZA/user_ldap.po | 170 +++++++++++ 24 files changed, 1666 insertions(+), 55 deletions(-) create mode 100644 l10n/zu_ZA/core.po create mode 100644 l10n/zu_ZA/files.po create mode 100644 l10n/zu_ZA/files_encryption.po create mode 100644 l10n/zu_ZA/files_external.po create mode 100644 l10n/zu_ZA/files_sharing.po create mode 100644 l10n/zu_ZA/files_versions.po create mode 100644 l10n/zu_ZA/lib.po create mode 100644 l10n/zu_ZA/settings.po create mode 100644 l10n/zu_ZA/user_ldap.po diff --git a/apps/files/l10n/pt_PT.php b/apps/files/l10n/pt_PT.php index 33bfee5b2d2..048c6be8350 100644 --- a/apps/files/l10n/pt_PT.php +++ b/apps/files/l10n/pt_PT.php @@ -58,6 +58,7 @@ "New" => "Novo", "Text file" => "Ficheiro de texto", "Folder" => "Pasta", +"From link" => "Da ligação", "Upload" => "Enviar", "Cancel upload" => "Cancelar envio", "Nothing in here. Upload something!" => "Vazio. Envie alguma coisa!", diff --git a/apps/files/l10n/ta_LK.php b/apps/files/l10n/ta_LK.php index 27c408cdf3a..6d295628139 100644 --- a/apps/files/l10n/ta_LK.php +++ b/apps/files/l10n/ta_LK.php @@ -58,6 +58,7 @@ "New" => "புதிய", "Text file" => "கோப்பு உரை", "Folder" => "கோப்புறை", +"From link" => "இணைப்பிலிருந்து", "Upload" => "பதிவேற்றுக", "Cancel upload" => "பதிவேற்றலை இரத்து செய்க", "Nothing in here. Upload something!" => "இங்கு ஒன்றும் இல்லை. ஏதாவது பதிவேற்றுக!", diff --git a/core/l10n/pt_PT.php b/core/l10n/pt_PT.php index c9daa645c47..f1c658830fc 100644 --- a/core/l10n/pt_PT.php +++ b/core/l10n/pt_PT.php @@ -38,6 +38,7 @@ "ownCloud password reset" => "Reposição da password ownCloud", "Use the following link to reset your password: {link}" => "Use o seguinte endereço para repor a sua password: {link}", "You will receive a link to reset your password via Email." => "Vai receber um endereço para repor a sua password", +"Request failed!" => "O pedido falhou!", "Username" => "Utilizador", "Request reset" => "Pedir reposição", "Your password was reset" => "A sua password foi reposta", @@ -87,6 +88,7 @@ "December" => "Dezembro", "web services under your control" => "serviços web sob o seu controlo", "Log out" => "Sair", +"If you did not change your password recently, your account may be compromised!" => "Se não mudou a sua palavra-passe recentemente, a sua conta pode ter sido comprometida!", "Please change your password to secure your account again." => "Por favor mude a sua palavra-passe para assegurar a sua conta de novo.", "Lost your password?" => "Esqueceu a sua password?", "remember" => "lembrar", diff --git a/l10n/pt_PT/core.po b/l10n/pt_PT/core.po index 4ed9b3813ae..bb6d026ba97 100644 --- a/l10n/pt_PT/core.po +++ b/l10n/pt_PT/core.po @@ -12,9 +12,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-10-29 00:01+0100\n" -"PO-Revision-Date: 2012-10-27 22:12+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2012-11-05 13:51+0000\n" +"Last-Translator: Duarte Velez Grilo \n" "Language-Team: Portuguese (Portugal) (http://www.transifex.com/projects/p/owncloud/language/pt_PT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -34,27 +34,27 @@ msgstr "Nenhuma categoria para adicionar?" msgid "This category already exists: " msgstr "Esta categoria já existe:" -#: js/js.js:243 templates/layout.user.php:53 templates/layout.user.php:54 +#: js/js.js:243 templates/layout.user.php:59 templates/layout.user.php:60 msgid "Settings" msgstr "Definições" -#: js/oc-dialogs.js:123 +#: js/oc-dialogs.js:126 msgid "Choose" msgstr "Escolha" -#: js/oc-dialogs.js:143 js/oc-dialogs.js:163 +#: js/oc-dialogs.js:146 js/oc-dialogs.js:166 msgid "Cancel" msgstr "Cancelar" -#: js/oc-dialogs.js:159 +#: js/oc-dialogs.js:162 msgid "No" msgstr "Não" -#: js/oc-dialogs.js:160 +#: js/oc-dialogs.js:163 msgid "Yes" msgstr "Sim" -#: js/oc-dialogs.js:177 +#: js/oc-dialogs.js:180 msgid "Ok" msgstr "Ok" @@ -186,7 +186,7 @@ msgstr "" #: lostpassword/templates/lostpassword.php:8 msgid "Request failed!" -msgstr "" +msgstr "O pedido falhou!" #: lostpassword/templates/lostpassword.php:11 templates/installation.php:38 #: templates/login.php:20 @@ -319,87 +319,87 @@ msgstr "Host da base de dados" msgid "Finish setup" msgstr "Acabar instalação" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Sunday" msgstr "Domingo" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Monday" msgstr "Segunda" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Tuesday" msgstr "Terça" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Wednesday" msgstr "Quarta" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Thursday" msgstr "Quinta" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Friday" msgstr "Sexta" -#: templates/layout.guest.php:16 templates/layout.user.php:17 +#: templates/layout.guest.php:15 templates/layout.user.php:16 msgid "Saturday" msgstr "Sábado" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "January" msgstr "Janeiro" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "February" msgstr "Fevereiro" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "March" msgstr "Março" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "April" msgstr "Abril" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "May" msgstr "Maio" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "June" msgstr "Junho" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "July" msgstr "Julho" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "August" msgstr "Agosto" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "September" msgstr "Setembro" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "October" msgstr "Outubro" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "November" msgstr "Novembro" -#: templates/layout.guest.php:17 templates/layout.user.php:18 +#: templates/layout.guest.php:16 templates/layout.user.php:17 msgid "December" msgstr "Dezembro" -#: templates/layout.guest.php:42 +#: templates/layout.guest.php:41 msgid "web services under your control" msgstr "serviços web sob o seu controlo" -#: templates/layout.user.php:38 +#: templates/layout.user.php:44 msgid "Log out" msgstr "Sair" @@ -411,7 +411,7 @@ msgstr "" msgid "" "If you did not change your password recently, your account may be " "compromised!" -msgstr "" +msgstr "Se não mudou a sua palavra-passe recentemente, a sua conta pode ter sido comprometida!" #: templates/login.php:10 msgid "Please change your password to secure your account again." diff --git a/l10n/pt_PT/files.po b/l10n/pt_PT/files.po index f14ef7f6f28..52d155e3ab4 100644 --- a/l10n/pt_PT/files.po +++ b/l10n/pt_PT/files.po @@ -11,9 +11,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-11-03 00:00+0100\n" -"PO-Revision-Date: 2012-11-01 23:21+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2012-11-05 13:54+0000\n" +"Last-Translator: Duarte Velez Grilo \n" "Language-Team: Portuguese (Portugal) (http://www.transifex.com/projects/p/owncloud/language/pt_PT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -63,7 +63,7 @@ msgstr "Deixar de partilhar" msgid "Delete" msgstr "Apagar" -#: js/fileactions.js:178 +#: js/fileactions.js:172 msgid "Rename" msgstr "Renomear" @@ -262,7 +262,7 @@ msgstr "Pasta" #: templates/index.php:11 msgid "From link" -msgstr "" +msgstr "Da ligação" #: templates/index.php:22 msgid "Upload" diff --git a/l10n/ta_LK/files.po b/l10n/ta_LK/files.po index d085f8c045f..ea03b680f30 100644 --- a/l10n/ta_LK/files.po +++ b/l10n/ta_LK/files.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-11-03 00:00+0100\n" -"PO-Revision-Date: 2012-11-01 23:21+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2012-11-05 07:17+0000\n" +"Last-Translator: suganthi \n" "Language-Team: Tamil (Sri-Lanka) (http://www.transifex.com/projects/p/owncloud/language/ta_LK/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -60,7 +60,7 @@ msgstr "பகிரப்படாதது" msgid "Delete" msgstr "அழிக்க" -#: js/fileactions.js:178 +#: js/fileactions.js:172 msgid "Rename" msgstr "பெயர்மாற்றம்" @@ -259,7 +259,7 @@ msgstr "கோப்புறை" #: templates/index.php:11 msgid "From link" -msgstr "" +msgstr "இணைப்பிலிருந்து" #: templates/index.php:22 msgid "Upload" diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot index 991df4e58b0..e544bb241e5 100644 --- a/l10n/templates/core.pot +++ b/l10n/templates/core.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-05 00:03+0100\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files.pot b/l10n/templates/files.pot index 5db9a1a6ac5..341c2385dad 100644 --- a/l10n/templates/files.pot +++ b/l10n/templates/files.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-05 00:03+0100\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -59,7 +59,7 @@ msgstr "" msgid "Delete" msgstr "" -#: js/fileactions.js:178 +#: js/fileactions.js:172 msgid "Rename" msgstr "" diff --git a/l10n/templates/files_encryption.pot b/l10n/templates/files_encryption.pot index b94a4e40317..fefa732f644 100644 --- a/l10n/templates/files_encryption.pot +++ b/l10n/templates/files_encryption.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-05 00:03+0100\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_external.pot b/l10n/templates/files_external.pot index 24de4f4f705..7e6a979f41c 100644 --- a/l10n/templates/files_external.pot +++ b/l10n/templates/files_external.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-05 00:03+0100\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_sharing.pot b/l10n/templates/files_sharing.pot index f2f865ee038..614ccb4f512 100644 --- a/l10n/templates/files_sharing.pot +++ b/l10n/templates/files_sharing.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-05 00:03+0100\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_versions.pot b/l10n/templates/files_versions.pot index 217c2ff250a..f06612c7db7 100644 --- a/l10n/templates/files_versions.pot +++ b/l10n/templates/files_versions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-05 00:03+0100\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/lib.pot b/l10n/templates/lib.pot index 615a609eaf2..12b6558b8cd 100644 --- a/l10n/templates/lib.pot +++ b/l10n/templates/lib.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-05 00:03+0100\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot index 3a2f3241317..f7acfeb4c35 100644 --- a/l10n/templates/settings.pot +++ b/l10n/templates/settings.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-05 00:03+0100\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -210,15 +210,15 @@ msgstr "" msgid "Ask a question" msgstr "" -#: templates/help.php:23 +#: templates/help.php:22 msgid "Problems connecting to help database." msgstr "" -#: templates/help.php:24 +#: templates/help.php:23 msgid "Go there manually." msgstr "" -#: templates/help.php:32 +#: templates/help.php:31 msgid "Answer" msgstr "" diff --git a/l10n/templates/user_ldap.pot b/l10n/templates/user_ldap.pot index 638b83aa48a..e3f953d9c60 100644 --- a/l10n/templates/user_ldap.pot +++ b/l10n/templates/user_ldap.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-05 00:03+0100\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/zu_ZA/core.po b/l10n/zu_ZA/core.po new file mode 100644 index 00000000000..956f0f5d845 --- /dev/null +++ b/l10n/zu_ZA/core.po @@ -0,0 +1,451 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: ownCloud\n" +"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2011-07-25 16:05+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Zulu (South Africa) (http://www.transifex.com/projects/p/owncloud/language/zu_ZA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zu_ZA\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ajax/vcategories/add.php:22 ajax/vcategories/delete.php:22 +msgid "Application name not provided." +msgstr "" + +#: ajax/vcategories/add.php:28 +msgid "No category to add?" +msgstr "" + +#: ajax/vcategories/add.php:35 +msgid "This category already exists: " +msgstr "" + +#: js/js.js:243 templates/layout.user.php:59 templates/layout.user.php:60 +msgid "Settings" +msgstr "" + +#: js/oc-dialogs.js:126 +msgid "Choose" +msgstr "" + +#: js/oc-dialogs.js:146 js/oc-dialogs.js:166 +msgid "Cancel" +msgstr "" + +#: js/oc-dialogs.js:162 +msgid "No" +msgstr "" + +#: js/oc-dialogs.js:163 +msgid "Yes" +msgstr "" + +#: js/oc-dialogs.js:180 +msgid "Ok" +msgstr "" + +#: js/oc-vcategories.js:68 +msgid "No categories selected for deletion." +msgstr "" + +#: js/oc-vcategories.js:68 js/share.js:135 js/share.js:142 js/share.js:525 +#: js/share.js:537 +msgid "Error" +msgstr "" + +#: js/share.js:124 +msgid "Error while sharing" +msgstr "" + +#: js/share.js:135 +msgid "Error while unsharing" +msgstr "" + +#: js/share.js:142 +msgid "Error while changing permissions" +msgstr "" + +#: js/share.js:151 +msgid "Shared with you and the group {group} by {owner}" +msgstr "" + +#: js/share.js:153 +msgid "Shared with you by {owner}" +msgstr "" + +#: js/share.js:158 +msgid "Share with" +msgstr "" + +#: js/share.js:163 +msgid "Share with link" +msgstr "" + +#: js/share.js:164 +msgid "Password protect" +msgstr "" + +#: js/share.js:168 templates/installation.php:42 templates/login.php:24 +#: templates/verify.php:13 +msgid "Password" +msgstr "" + +#: js/share.js:173 +msgid "Set expiration date" +msgstr "" + +#: js/share.js:174 +msgid "Expiration date" +msgstr "" + +#: js/share.js:206 +msgid "Share via email:" +msgstr "" + +#: js/share.js:208 +msgid "No people found" +msgstr "" + +#: js/share.js:235 +msgid "Resharing is not allowed" +msgstr "" + +#: js/share.js:271 +msgid "Shared in {item} with {user}" +msgstr "" + +#: js/share.js:292 +msgid "Unshare" +msgstr "" + +#: js/share.js:304 +msgid "can edit" +msgstr "" + +#: js/share.js:306 +msgid "access control" +msgstr "" + +#: js/share.js:309 +msgid "create" +msgstr "" + +#: js/share.js:312 +msgid "update" +msgstr "" + +#: js/share.js:315 +msgid "delete" +msgstr "" + +#: js/share.js:318 +msgid "share" +msgstr "" + +#: js/share.js:343 js/share.js:512 js/share.js:514 +msgid "Password protected" +msgstr "" + +#: js/share.js:525 +msgid "Error unsetting expiration date" +msgstr "" + +#: js/share.js:537 +msgid "Error setting expiration date" +msgstr "" + +#: lostpassword/controller.php:47 +msgid "ownCloud password reset" +msgstr "" + +#: lostpassword/templates/email.php:2 +msgid "Use the following link to reset your password: {link}" +msgstr "" + +#: lostpassword/templates/lostpassword.php:3 +msgid "You will receive a link to reset your password via Email." +msgstr "" + +#: lostpassword/templates/lostpassword.php:5 +msgid "Reset email send." +msgstr "" + +#: lostpassword/templates/lostpassword.php:8 +msgid "Request failed!" +msgstr "" + +#: lostpassword/templates/lostpassword.php:11 templates/installation.php:38 +#: templates/login.php:20 +msgid "Username" +msgstr "" + +#: lostpassword/templates/lostpassword.php:14 +msgid "Request reset" +msgstr "" + +#: lostpassword/templates/resetpassword.php:4 +msgid "Your password was reset" +msgstr "" + +#: lostpassword/templates/resetpassword.php:5 +msgid "To login page" +msgstr "" + +#: lostpassword/templates/resetpassword.php:8 +msgid "New password" +msgstr "" + +#: lostpassword/templates/resetpassword.php:11 +msgid "Reset password" +msgstr "" + +#: strings.php:5 +msgid "Personal" +msgstr "" + +#: strings.php:6 +msgid "Users" +msgstr "" + +#: strings.php:7 +msgid "Apps" +msgstr "" + +#: strings.php:8 +msgid "Admin" +msgstr "" + +#: strings.php:9 +msgid "Help" +msgstr "" + +#: templates/403.php:12 +msgid "Access forbidden" +msgstr "" + +#: templates/404.php:12 +msgid "Cloud not found" +msgstr "" + +#: templates/edit_categories_dialog.php:4 +msgid "Edit categories" +msgstr "" + +#: templates/edit_categories_dialog.php:14 +msgid "Add" +msgstr "" + +#: templates/installation.php:23 templates/installation.php:31 +msgid "Security Warning" +msgstr "" + +#: templates/installation.php:24 +msgid "" +"No secure random number generator is available, please enable the PHP " +"OpenSSL extension." +msgstr "" + +#: templates/installation.php:26 +msgid "" +"Without a secure random number generator an attacker may be able to predict " +"password reset tokens and take over your account." +msgstr "" + +#: templates/installation.php:32 +msgid "" +"Your data directory and your files are probably accessible from the " +"internet. The .htaccess file that ownCloud provides is not working. We " +"strongly suggest that you configure your webserver in a way that the data " +"directory is no longer accessible or you move the data directory outside the" +" webserver document root." +msgstr "" + +#: templates/installation.php:36 +msgid "Create an admin account" +msgstr "" + +#: templates/installation.php:48 +msgid "Advanced" +msgstr "" + +#: templates/installation.php:50 +msgid "Data folder" +msgstr "" + +#: templates/installation.php:57 +msgid "Configure the database" +msgstr "" + +#: templates/installation.php:62 templates/installation.php:73 +#: templates/installation.php:83 templates/installation.php:93 +msgid "will be used" +msgstr "" + +#: templates/installation.php:105 +msgid "Database user" +msgstr "" + +#: templates/installation.php:109 +msgid "Database password" +msgstr "" + +#: templates/installation.php:113 +msgid "Database name" +msgstr "" + +#: templates/installation.php:121 +msgid "Database tablespace" +msgstr "" + +#: templates/installation.php:127 +msgid "Database host" +msgstr "" + +#: templates/installation.php:132 +msgid "Finish setup" +msgstr "" + +#: templates/layout.guest.php:15 templates/layout.user.php:16 +msgid "Sunday" +msgstr "" + +#: templates/layout.guest.php:15 templates/layout.user.php:16 +msgid "Monday" +msgstr "" + +#: templates/layout.guest.php:15 templates/layout.user.php:16 +msgid "Tuesday" +msgstr "" + +#: templates/layout.guest.php:15 templates/layout.user.php:16 +msgid "Wednesday" +msgstr "" + +#: templates/layout.guest.php:15 templates/layout.user.php:16 +msgid "Thursday" +msgstr "" + +#: templates/layout.guest.php:15 templates/layout.user.php:16 +msgid "Friday" +msgstr "" + +#: templates/layout.guest.php:15 templates/layout.user.php:16 +msgid "Saturday" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "January" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "February" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "March" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "April" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "May" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "June" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "July" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "August" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "September" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "October" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "November" +msgstr "" + +#: templates/layout.guest.php:16 templates/layout.user.php:17 +msgid "December" +msgstr "" + +#: templates/layout.guest.php:41 +msgid "web services under your control" +msgstr "" + +#: templates/layout.user.php:44 +msgid "Log out" +msgstr "" + +#: templates/login.php:8 +msgid "Automatic logon rejected!" +msgstr "" + +#: templates/login.php:9 +msgid "" +"If you did not change your password recently, your account may be " +"compromised!" +msgstr "" + +#: templates/login.php:10 +msgid "Please change your password to secure your account again." +msgstr "" + +#: templates/login.php:15 +msgid "Lost your password?" +msgstr "" + +#: templates/login.php:27 +msgid "remember" +msgstr "" + +#: templates/login.php:28 +msgid "Log in" +msgstr "" + +#: templates/logout.php:1 +msgid "You are logged out." +msgstr "" + +#: templates/part.pagenavi.php:3 +msgid "prev" +msgstr "" + +#: templates/part.pagenavi.php:20 +msgid "next" +msgstr "" + +#: templates/verify.php:5 +msgid "Security Warning!" +msgstr "" + +#: templates/verify.php:6 +msgid "" +"Please verify your password.
For security reasons you may be " +"occasionally asked to enter your password again." +msgstr "" + +#: templates/verify.php:16 +msgid "Verify" +msgstr "" diff --git a/l10n/zu_ZA/files.po b/l10n/zu_ZA/files.po new file mode 100644 index 00000000000..19f84d9ed96 --- /dev/null +++ b/l10n/zu_ZA/files.po @@ -0,0 +1,299 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: ownCloud\n" +"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2011-08-13 02:19+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Zulu (South Africa) (http://www.transifex.com/projects/p/owncloud/language/zu_ZA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zu_ZA\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ajax/upload.php:20 +msgid "There is no error, the file uploaded with success" +msgstr "" + +#: ajax/upload.php:21 +msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini" +msgstr "" + +#: ajax/upload.php:22 +msgid "" +"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in " +"the HTML form" +msgstr "" + +#: ajax/upload.php:23 +msgid "The uploaded file was only partially uploaded" +msgstr "" + +#: ajax/upload.php:24 +msgid "No file was uploaded" +msgstr "" + +#: ajax/upload.php:25 +msgid "Missing a temporary folder" +msgstr "" + +#: ajax/upload.php:26 +msgid "Failed to write to disk" +msgstr "" + +#: appinfo/app.php:6 +msgid "Files" +msgstr "" + +#: js/fileactions.js:108 templates/index.php:64 +msgid "Unshare" +msgstr "" + +#: js/fileactions.js:110 templates/index.php:66 +msgid "Delete" +msgstr "" + +#: js/fileactions.js:172 +msgid "Rename" +msgstr "" + +#: js/filelist.js:194 js/filelist.js:196 +msgid "{new_name} already exists" +msgstr "" + +#: js/filelist.js:194 js/filelist.js:196 +msgid "replace" +msgstr "" + +#: js/filelist.js:194 +msgid "suggest name" +msgstr "" + +#: js/filelist.js:194 js/filelist.js:196 +msgid "cancel" +msgstr "" + +#: js/filelist.js:243 +msgid "replaced {new_name}" +msgstr "" + +#: js/filelist.js:243 js/filelist.js:245 js/filelist.js:277 js/filelist.js:279 +msgid "undo" +msgstr "" + +#: js/filelist.js:245 +msgid "replaced {new_name} with {old_name}" +msgstr "" + +#: js/filelist.js:277 +msgid "unshared {files}" +msgstr "" + +#: js/filelist.js:279 +msgid "deleted {files}" +msgstr "" + +#: js/files.js:171 +msgid "generating ZIP-file, it may take some time." +msgstr "" + +#: js/files.js:206 +msgid "Unable to upload your file as it is a directory or has 0 bytes" +msgstr "" + +#: js/files.js:206 +msgid "Upload Error" +msgstr "" + +#: js/files.js:234 js/files.js:339 js/files.js:369 +msgid "Pending" +msgstr "" + +#: js/files.js:254 +msgid "1 file uploading" +msgstr "" + +#: js/files.js:257 js/files.js:302 js/files.js:317 +msgid "{count} files uploading" +msgstr "" + +#: js/files.js:320 js/files.js:353 +msgid "Upload cancelled." +msgstr "" + +#: js/files.js:422 +msgid "" +"File upload is in progress. Leaving the page now will cancel the upload." +msgstr "" + +#: js/files.js:492 +msgid "Invalid name, '/' is not allowed." +msgstr "" + +#: js/files.js:673 +msgid "{count} files scanned" +msgstr "" + +#: js/files.js:681 +msgid "error while scanning" +msgstr "" + +#: js/files.js:754 templates/index.php:50 +msgid "Name" +msgstr "" + +#: js/files.js:755 templates/index.php:58 +msgid "Size" +msgstr "" + +#: js/files.js:756 templates/index.php:60 +msgid "Modified" +msgstr "" + +#: js/files.js:783 +msgid "1 folder" +msgstr "" + +#: js/files.js:785 +msgid "{count} folders" +msgstr "" + +#: js/files.js:793 +msgid "1 file" +msgstr "" + +#: js/files.js:795 +msgid "{count} files" +msgstr "" + +#: js/files.js:838 +msgid "seconds ago" +msgstr "" + +#: js/files.js:839 +msgid "1 minute ago" +msgstr "" + +#: js/files.js:840 +msgid "{minutes} minutes ago" +msgstr "" + +#: js/files.js:843 +msgid "today" +msgstr "" + +#: js/files.js:844 +msgid "yesterday" +msgstr "" + +#: js/files.js:845 +msgid "{days} days ago" +msgstr "" + +#: js/files.js:846 +msgid "last month" +msgstr "" + +#: js/files.js:848 +msgid "months ago" +msgstr "" + +#: js/files.js:849 +msgid "last year" +msgstr "" + +#: js/files.js:850 +msgid "years ago" +msgstr "" + +#: templates/admin.php:5 +msgid "File handling" +msgstr "" + +#: templates/admin.php:7 +msgid "Maximum upload size" +msgstr "" + +#: templates/admin.php:7 +msgid "max. possible: " +msgstr "" + +#: templates/admin.php:9 +msgid "Needed for multi-file and folder downloads." +msgstr "" + +#: templates/admin.php:9 +msgid "Enable ZIP-download" +msgstr "" + +#: templates/admin.php:11 +msgid "0 is unlimited" +msgstr "" + +#: templates/admin.php:12 +msgid "Maximum input size for ZIP files" +msgstr "" + +#: templates/admin.php:15 +msgid "Save" +msgstr "" + +#: templates/index.php:7 +msgid "New" +msgstr "" + +#: templates/index.php:9 +msgid "Text file" +msgstr "" + +#: templates/index.php:10 +msgid "Folder" +msgstr "" + +#: templates/index.php:11 +msgid "From link" +msgstr "" + +#: templates/index.php:22 +msgid "Upload" +msgstr "" + +#: templates/index.php:29 +msgid "Cancel upload" +msgstr "" + +#: templates/index.php:42 +msgid "Nothing in here. Upload something!" +msgstr "" + +#: templates/index.php:52 +msgid "Share" +msgstr "" + +#: templates/index.php:54 +msgid "Download" +msgstr "" + +#: templates/index.php:77 +msgid "Upload too large" +msgstr "" + +#: templates/index.php:79 +msgid "" +"The files you are trying to upload exceed the maximum size for file uploads " +"on this server." +msgstr "" + +#: templates/index.php:84 +msgid "Files are being scanned, please wait." +msgstr "" + +#: templates/index.php:87 +msgid "Current scanning" +msgstr "" diff --git a/l10n/zu_ZA/files_encryption.po b/l10n/zu_ZA/files_encryption.po new file mode 100644 index 00000000000..eb5d7a228c6 --- /dev/null +++ b/l10n/zu_ZA/files_encryption.po @@ -0,0 +1,34 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: ownCloud\n" +"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2012-08-12 22:33+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Zulu (South Africa) (http://www.transifex.com/projects/p/owncloud/language/zu_ZA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zu_ZA\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: templates/settings.php:3 +msgid "Encryption" +msgstr "" + +#: templates/settings.php:4 +msgid "Exclude the following file types from encryption" +msgstr "" + +#: templates/settings.php:5 +msgid "None" +msgstr "" + +#: templates/settings.php:10 +msgid "Enable Encryption" +msgstr "" diff --git a/l10n/zu_ZA/files_external.po b/l10n/zu_ZA/files_external.po new file mode 100644 index 00000000000..a049eb976de --- /dev/null +++ b/l10n/zu_ZA/files_external.po @@ -0,0 +1,106 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: ownCloud\n" +"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2012-08-12 22:34+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Zulu (South Africa) (http://www.transifex.com/projects/p/owncloud/language/zu_ZA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zu_ZA\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: js/dropbox.js:7 js/dropbox.js:25 js/google.js:7 js/google.js:23 +msgid "Access granted" +msgstr "" + +#: js/dropbox.js:28 js/dropbox.js:74 js/dropbox.js:79 js/dropbox.js:86 +msgid "Error configuring Dropbox storage" +msgstr "" + +#: js/dropbox.js:34 js/dropbox.js:45 js/google.js:31 js/google.js:40 +msgid "Grant access" +msgstr "" + +#: js/dropbox.js:73 js/google.js:72 +msgid "Fill out all required fields" +msgstr "" + +#: js/dropbox.js:85 +msgid "Please provide a valid Dropbox app key and secret." +msgstr "" + +#: js/google.js:26 js/google.js:73 js/google.js:78 +msgid "Error configuring Google Drive storage" +msgstr "" + +#: templates/settings.php:3 +msgid "External Storage" +msgstr "" + +#: templates/settings.php:7 templates/settings.php:19 +msgid "Mount point" +msgstr "" + +#: templates/settings.php:8 +msgid "Backend" +msgstr "" + +#: templates/settings.php:9 +msgid "Configuration" +msgstr "" + +#: templates/settings.php:10 +msgid "Options" +msgstr "" + +#: templates/settings.php:11 +msgid "Applicable" +msgstr "" + +#: templates/settings.php:23 +msgid "Add mount point" +msgstr "" + +#: templates/settings.php:54 templates/settings.php:62 +msgid "None set" +msgstr "" + +#: templates/settings.php:63 +msgid "All Users" +msgstr "" + +#: templates/settings.php:64 +msgid "Groups" +msgstr "" + +#: templates/settings.php:69 +msgid "Users" +msgstr "" + +#: templates/settings.php:77 templates/settings.php:107 +msgid "Delete" +msgstr "" + +#: templates/settings.php:87 +msgid "Enable User External Storage" +msgstr "" + +#: templates/settings.php:88 +msgid "Allow users to mount their own external storage" +msgstr "" + +#: templates/settings.php:99 +msgid "SSL root certificates" +msgstr "" + +#: templates/settings.php:113 +msgid "Import Root Certificate" +msgstr "" diff --git a/l10n/zu_ZA/files_sharing.po b/l10n/zu_ZA/files_sharing.po new file mode 100644 index 00000000000..d6c87989f15 --- /dev/null +++ b/l10n/zu_ZA/files_sharing.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: ownCloud\n" +"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2012-08-12 22:35+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Zulu (South Africa) (http://www.transifex.com/projects/p/owncloud/language/zu_ZA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zu_ZA\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: templates/authenticate.php:4 +msgid "Password" +msgstr "" + +#: templates/authenticate.php:6 +msgid "Submit" +msgstr "" + +#: templates/public.php:9 +#, php-format +msgid "%s shared the folder %s with you" +msgstr "" + +#: templates/public.php:11 +#, php-format +msgid "%s shared the file %s with you" +msgstr "" + +#: templates/public.php:14 templates/public.php:30 +msgid "Download" +msgstr "" + +#: templates/public.php:29 +msgid "No preview available for" +msgstr "" + +#: templates/public.php:35 +msgid "web services under your control" +msgstr "" diff --git a/l10n/zu_ZA/files_versions.po b/l10n/zu_ZA/files_versions.po new file mode 100644 index 00000000000..7bc842be419 --- /dev/null +++ b/l10n/zu_ZA/files_versions.po @@ -0,0 +1,42 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: ownCloud\n" +"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2012-08-12 22:37+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Zulu (South Africa) (http://www.transifex.com/projects/p/owncloud/language/zu_ZA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zu_ZA\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: js/settings-personal.js:31 templates/settings-personal.php:10 +msgid "Expire all versions" +msgstr "" + +#: js/versions.js:16 +msgid "History" +msgstr "" + +#: templates/settings-personal.php:4 +msgid "Versions" +msgstr "" + +#: templates/settings-personal.php:7 +msgid "This will delete all existing backup versions of your files" +msgstr "" + +#: templates/settings.php:3 +msgid "Files Versioning" +msgstr "" + +#: templates/settings.php:4 +msgid "Enable" +msgstr "" diff --git a/l10n/zu_ZA/lib.po b/l10n/zu_ZA/lib.po new file mode 100644 index 00000000000..c844f939228 --- /dev/null +++ b/l10n/zu_ZA/lib.po @@ -0,0 +1,137 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: ownCloud\n" +"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2012-07-27 22:23+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Zulu (South Africa) (http://www.transifex.com/projects/p/owncloud/language/zu_ZA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zu_ZA\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: app.php:285 +msgid "Help" +msgstr "" + +#: app.php:292 +msgid "Personal" +msgstr "" + +#: app.php:297 +msgid "Settings" +msgstr "" + +#: app.php:302 +msgid "Users" +msgstr "" + +#: app.php:309 +msgid "Apps" +msgstr "" + +#: app.php:311 +msgid "Admin" +msgstr "" + +#: files.php:328 +msgid "ZIP download is turned off." +msgstr "" + +#: files.php:329 +msgid "Files need to be downloaded one by one." +msgstr "" + +#: files.php:329 files.php:354 +msgid "Back to Files" +msgstr "" + +#: files.php:353 +msgid "Selected files too large to generate zip file." +msgstr "" + +#: json.php:28 +msgid "Application is not enabled" +msgstr "" + +#: json.php:39 json.php:64 json.php:77 json.php:89 +msgid "Authentication error" +msgstr "" + +#: json.php:51 +msgid "Token expired. Please reload page." +msgstr "" + +#: search/provider/file.php:17 search/provider/file.php:35 +msgid "Files" +msgstr "" + +#: search/provider/file.php:26 search/provider/file.php:33 +msgid "Text" +msgstr "" + +#: search/provider/file.php:29 +msgid "Images" +msgstr "" + +#: template.php:103 +msgid "seconds ago" +msgstr "" + +#: template.php:104 +msgid "1 minute ago" +msgstr "" + +#: template.php:105 +#, php-format +msgid "%d minutes ago" +msgstr "" + +#: template.php:108 +msgid "today" +msgstr "" + +#: template.php:109 +msgid "yesterday" +msgstr "" + +#: template.php:110 +#, php-format +msgid "%d days ago" +msgstr "" + +#: template.php:111 +msgid "last month" +msgstr "" + +#: template.php:112 +msgid "months ago" +msgstr "" + +#: template.php:113 +msgid "last year" +msgstr "" + +#: template.php:114 +msgid "years ago" +msgstr "" + +#: updater.php:75 +#, php-format +msgid "%s is available. Get more information" +msgstr "" + +#: updater.php:77 +msgid "up to date" +msgstr "" + +#: updater.php:80 +msgid "updates check is disabled" +msgstr "" diff --git a/l10n/zu_ZA/settings.po b/l10n/zu_ZA/settings.po new file mode 100644 index 00000000000..ce3a223ce20 --- /dev/null +++ b/l10n/zu_ZA/settings.po @@ -0,0 +1,320 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: ownCloud\n" +"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2011-07-25 16:05+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Zulu (South Africa) (http://www.transifex.com/projects/p/owncloud/language/zu_ZA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zu_ZA\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ajax/apps/ocs.php:20 +msgid "Unable to load list from App Store" +msgstr "" + +#: ajax/creategroup.php:10 +msgid "Group already exists" +msgstr "" + +#: ajax/creategroup.php:19 +msgid "Unable to add group" +msgstr "" + +#: ajax/enableapp.php:12 +msgid "Could not enable app. " +msgstr "" + +#: ajax/lostpassword.php:12 +msgid "Email saved" +msgstr "" + +#: ajax/lostpassword.php:14 +msgid "Invalid email" +msgstr "" + +#: ajax/openid.php:13 +msgid "OpenID Changed" +msgstr "" + +#: ajax/openid.php:15 ajax/setlanguage.php:17 ajax/setlanguage.php:20 +msgid "Invalid request" +msgstr "" + +#: ajax/removegroup.php:13 +msgid "Unable to delete group" +msgstr "" + +#: ajax/removeuser.php:15 ajax/setquota.php:15 ajax/togglegroups.php:12 +msgid "Authentication error" +msgstr "" + +#: ajax/removeuser.php:24 +msgid "Unable to delete user" +msgstr "" + +#: ajax/setlanguage.php:15 +msgid "Language changed" +msgstr "" + +#: ajax/togglegroups.php:22 +#, php-format +msgid "Unable to add user to group %s" +msgstr "" + +#: ajax/togglegroups.php:28 +#, php-format +msgid "Unable to remove user from group %s" +msgstr "" + +#: js/apps.js:28 js/apps.js:67 +msgid "Disable" +msgstr "" + +#: js/apps.js:28 js/apps.js:55 +msgid "Enable" +msgstr "" + +#: js/personal.js:69 +msgid "Saving..." +msgstr "" + +#: personal.php:42 personal.php:43 +msgid "__language_name__" +msgstr "" + +#: templates/admin.php:14 +msgid "Security Warning" +msgstr "" + +#: templates/admin.php:17 +msgid "" +"Your data directory and your files are probably accessible from the " +"internet. The .htaccess file that ownCloud provides is not working. We " +"strongly suggest that you configure your webserver in a way that the data " +"directory is no longer accessible or you move the data directory outside the" +" webserver document root." +msgstr "" + +#: templates/admin.php:31 +msgid "Cron" +msgstr "" + +#: templates/admin.php:37 +msgid "Execute one task with each page loaded" +msgstr "" + +#: templates/admin.php:43 +msgid "" +"cron.php is registered at a webcron service. Call the cron.php page in the " +"owncloud root once a minute over http." +msgstr "" + +#: templates/admin.php:49 +msgid "" +"Use systems cron service. Call the cron.php file in the owncloud folder via " +"a system cronjob once a minute." +msgstr "" + +#: templates/admin.php:56 +msgid "Sharing" +msgstr "" + +#: templates/admin.php:61 +msgid "Enable Share API" +msgstr "" + +#: templates/admin.php:62 +msgid "Allow apps to use the Share API" +msgstr "" + +#: templates/admin.php:67 +msgid "Allow links" +msgstr "" + +#: templates/admin.php:68 +msgid "Allow users to share items to the public with links" +msgstr "" + +#: templates/admin.php:73 +msgid "Allow resharing" +msgstr "" + +#: templates/admin.php:74 +msgid "Allow users to share items shared with them again" +msgstr "" + +#: templates/admin.php:79 +msgid "Allow users to share with anyone" +msgstr "" + +#: templates/admin.php:81 +msgid "Allow users to only share with users in their groups" +msgstr "" + +#: templates/admin.php:88 +msgid "Log" +msgstr "" + +#: templates/admin.php:116 +msgid "More" +msgstr "" + +#: templates/admin.php:124 +msgid "" +"Developed by the ownCloud community, the source code is " +"licensed under the AGPL." +msgstr "" + +#: templates/apps.php:10 +msgid "Add your App" +msgstr "" + +#: templates/apps.php:11 +msgid "More Apps" +msgstr "" + +#: templates/apps.php:27 +msgid "Select an App" +msgstr "" + +#: templates/apps.php:31 +msgid "See application page at apps.owncloud.com" +msgstr "" + +#: templates/apps.php:32 +msgid "-licensed by " +msgstr "" + +#: templates/help.php:9 +msgid "Documentation" +msgstr "" + +#: templates/help.php:10 +msgid "Managing Big Files" +msgstr "" + +#: templates/help.php:11 +msgid "Ask a question" +msgstr "" + +#: templates/help.php:22 +msgid "Problems connecting to help database." +msgstr "" + +#: templates/help.php:23 +msgid "Go there manually." +msgstr "" + +#: templates/help.php:31 +msgid "Answer" +msgstr "" + +#: templates/personal.php:8 +#, php-format +msgid "You have used %s of the available %s" +msgstr "" + +#: templates/personal.php:12 +msgid "Desktop and Mobile Syncing Clients" +msgstr "" + +#: templates/personal.php:13 +msgid "Download" +msgstr "" + +#: templates/personal.php:19 +msgid "Your password was changed" +msgstr "" + +#: templates/personal.php:20 +msgid "Unable to change your password" +msgstr "" + +#: templates/personal.php:21 +msgid "Current password" +msgstr "" + +#: templates/personal.php:22 +msgid "New password" +msgstr "" + +#: templates/personal.php:23 +msgid "show" +msgstr "" + +#: templates/personal.php:24 +msgid "Change password" +msgstr "" + +#: templates/personal.php:30 +msgid "Email" +msgstr "" + +#: templates/personal.php:31 +msgid "Your email address" +msgstr "" + +#: templates/personal.php:32 +msgid "Fill in an email address to enable password recovery" +msgstr "" + +#: templates/personal.php:38 templates/personal.php:39 +msgid "Language" +msgstr "" + +#: templates/personal.php:44 +msgid "Help translate" +msgstr "" + +#: templates/personal.php:51 +msgid "use this address to connect to your ownCloud in your file manager" +msgstr "" + +#: templates/users.php:21 templates/users.php:76 +msgid "Name" +msgstr "" + +#: templates/users.php:23 templates/users.php:77 +msgid "Password" +msgstr "" + +#: templates/users.php:26 templates/users.php:78 templates/users.php:98 +msgid "Groups" +msgstr "" + +#: templates/users.php:32 +msgid "Create" +msgstr "" + +#: templates/users.php:35 +msgid "Default Quota" +msgstr "" + +#: templates/users.php:55 templates/users.php:138 +msgid "Other" +msgstr "" + +#: templates/users.php:80 templates/users.php:112 +msgid "Group Admin" +msgstr "" + +#: templates/users.php:82 +msgid "Quota" +msgstr "" + +#: templates/users.php:146 +msgid "Delete" +msgstr "" diff --git a/l10n/zu_ZA/user_ldap.po b/l10n/zu_ZA/user_ldap.po new file mode 100644 index 00000000000..a4f2985ab0e --- /dev/null +++ b/l10n/zu_ZA/user_ldap.po @@ -0,0 +1,170 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: ownCloud\n" +"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" +"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"PO-Revision-Date: 2012-08-12 22:45+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Zulu (South Africa) (http://www.transifex.com/projects/p/owncloud/language/zu_ZA/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zu_ZA\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: templates/settings.php:8 +msgid "Host" +msgstr "" + +#: templates/settings.php:8 +msgid "" +"You can omit the protocol, except you require SSL. Then start with ldaps://" +msgstr "" + +#: templates/settings.php:9 +msgid "Base DN" +msgstr "" + +#: templates/settings.php:9 +msgid "You can specify Base DN for users and groups in the Advanced tab" +msgstr "" + +#: templates/settings.php:10 +msgid "User DN" +msgstr "" + +#: templates/settings.php:10 +msgid "" +"The DN of the client user with which the bind shall be done, e.g. " +"uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password " +"empty." +msgstr "" + +#: templates/settings.php:11 +msgid "Password" +msgstr "" + +#: templates/settings.php:11 +msgid "For anonymous access, leave DN and Password empty." +msgstr "" + +#: templates/settings.php:12 +msgid "User Login Filter" +msgstr "" + +#: templates/settings.php:12 +#, php-format +msgid "" +"Defines the filter to apply, when login is attempted. %%uid replaces the " +"username in the login action." +msgstr "" + +#: templates/settings.php:12 +#, php-format +msgid "use %%uid placeholder, e.g. \"uid=%%uid\"" +msgstr "" + +#: templates/settings.php:13 +msgid "User List Filter" +msgstr "" + +#: templates/settings.php:13 +msgid "Defines the filter to apply, when retrieving users." +msgstr "" + +#: templates/settings.php:13 +msgid "without any placeholder, e.g. \"objectClass=person\"." +msgstr "" + +#: templates/settings.php:14 +msgid "Group Filter" +msgstr "" + +#: templates/settings.php:14 +msgid "Defines the filter to apply, when retrieving groups." +msgstr "" + +#: templates/settings.php:14 +msgid "without any placeholder, e.g. \"objectClass=posixGroup\"." +msgstr "" + +#: templates/settings.php:17 +msgid "Port" +msgstr "" + +#: templates/settings.php:18 +msgid "Base User Tree" +msgstr "" + +#: templates/settings.php:19 +msgid "Base Group Tree" +msgstr "" + +#: templates/settings.php:20 +msgid "Group-Member association" +msgstr "" + +#: templates/settings.php:21 +msgid "Use TLS" +msgstr "" + +#: templates/settings.php:21 +msgid "Do not use it for SSL connections, it will fail." +msgstr "" + +#: templates/settings.php:22 +msgid "Case insensitve LDAP server (Windows)" +msgstr "" + +#: templates/settings.php:23 +msgid "Turn off SSL certificate validation." +msgstr "" + +#: templates/settings.php:23 +msgid "" +"If connection only works with this option, import the LDAP server's SSL " +"certificate in your ownCloud server." +msgstr "" + +#: templates/settings.php:23 +msgid "Not recommended, use for testing only." +msgstr "" + +#: templates/settings.php:24 +msgid "User Display Name Field" +msgstr "" + +#: templates/settings.php:24 +msgid "The LDAP attribute to use to generate the user`s ownCloud name." +msgstr "" + +#: templates/settings.php:25 +msgid "Group Display Name Field" +msgstr "" + +#: templates/settings.php:25 +msgid "The LDAP attribute to use to generate the groups`s ownCloud name." +msgstr "" + +#: templates/settings.php:27 +msgid "in bytes" +msgstr "" + +#: templates/settings.php:29 +msgid "in seconds. A change empties the cache." +msgstr "" + +#: templates/settings.php:30 +msgid "" +"Leave empty for user name (default). Otherwise, specify an LDAP/AD " +"attribute." +msgstr "" + +#: templates/settings.php:32 +msgid "Help" +msgstr "" From c2d6ac53b2cbfb59bb9b34025ee1348c67340c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 6 Nov 2012 11:01:02 +0100 Subject: [PATCH 25/34] fix human filesize column header --- core/js/js.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/js/js.js b/core/js/js.js index 2073fc4d4b7..87d0a172082 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -649,7 +649,7 @@ $.fn.filterAttr = function(attr_name, attr_value) { function humanFileSize(size) { var humanList = ['B', 'kB', 'MB', 'GB', 'TB']; // Calculate Log with base 1024: size = 1024 ** order - var order = Math.floor(Math.log(size) / Math.log(1024)); + var order = size?Math.floor(Math.log(size) / Math.log(1024)):0; // Stay in range of the byte sizes that are defined order = Math.min(humanList.length - 1, order); var readableFormat = humanList[order]; From 50dbb30eb9968cd328915c4632f2742e6e41ad66 Mon Sep 17 00:00:00 2001 From: Alessandro Cosentino Date: Tue, 6 Nov 2012 10:56:42 -0500 Subject: [PATCH 26/34] Moved relative_modified_date from file/js to core/js --- apps/files/js/files.js | 21 --------------------- core/js/js.js | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 2d9ccba424a..7506000d216 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -829,27 +829,6 @@ function getSelectedFiles(property){ return files; } -function relative_modified_date(timestamp) { - var timediff = Math.round((new Date()).getTime() / 1000) - timestamp; - var diffminutes = Math.round(timediff/60); - var diffhours = Math.round(diffminutes/60); - var diffdays = Math.round(diffhours/24); - var diffmonths = Math.round(diffdays/31); - if(timediff < 60) { return t('files','seconds ago'); } - else if(timediff < 120) { return t('files','1 minute ago'); } - else if(timediff < 3600) { return t('files','{minutes} minutes ago',{minutes: diffminutes}); } - //else if($timediff < 7200) { return '1 hour ago'; } - //else if($timediff < 86400) { return $diffhours.' hours ago'; } - else if(timediff < 86400) { return t('files','today'); } - else if(timediff < 172800) { return t('files','yesterday'); } - else if(timediff < 2678400) { return t('files','{days} days ago',{days: diffdays}); } - else if(timediff < 5184000) { return t('files','last month'); } - //else if($timediff < 31556926) { return $diffmonths.' months ago'; } - else if(timediff < 31556926) { return t('files','months ago'); } - else if(timediff < 63113852) { return t('files','last year'); } - else { return t('files','years ago'); } -} - function getMimeIcon(mime, ready){ if(getMimeIcon.cache[mime]){ ready(getMimeIcon.cache[mime]); diff --git a/core/js/js.js b/core/js/js.js index 87d0a172082..2b2a64d25f9 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -675,6 +675,30 @@ function formatDate(date){ return $.datepicker.formatDate(datepickerFormatDate, date)+' '+date.getHours()+':'+((date.getMinutes()<10)?'0':'')+date.getMinutes(); } +/* takes an absolute timestamp and return a string with a human-friendly relative date + * @param int a Unix timestamp + */ +function relative_modified_date(timestamp) { + var timediff = Math.round((new Date()).getTime() / 1000) - timestamp; + var diffminutes = Math.round(timediff/60); + var diffhours = Math.round(diffminutes/60); + var diffdays = Math.round(diffhours/24); + var diffmonths = Math.round(diffdays/31); + if(timediff < 60) { return t('core','seconds ago'); } + else if(timediff < 120) { return t('core','1 minute ago'); } + else if(timediff < 3600) { return t('core','{minutes} minutes ago',{minutes: diffminutes}); } + //else if($timediff < 7200) { return '1 hour ago'; } + //else if($timediff < 86400) { return $diffhours.' hours ago'; } + else if(timediff < 86400) { return t('core','today'); } + else if(timediff < 172800) { return t('core','yesterday'); } + else if(timediff < 2678400) { return t('core','{days} days ago',{days: diffdays}); } + else if(timediff < 5184000) { return t('core','last month'); } + //else if($timediff < 31556926) { return $diffmonths.' months ago'; } + else if(timediff < 31556926) { return t('core','months ago'); } + else if(timediff < 63113852) { return t('core','last year'); } + else { return t('core','years ago'); } +} + /** * get a variable by name * @param string name From 6339e71bdc286abc1881d160a89f8bf2d0a8c110 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 6 Nov 2012 20:16:37 +0100 Subject: [PATCH 27/34] LDAP: fix typo in config value handling. --- apps/user_ldap/lib/connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index ef92bbad40a..687e2692270 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -89,7 +89,7 @@ class Connection { \OCP\Util::writeLog('user_ldap', 'Set config ldapUuidAttribute to '.$value, \OCP\Util::DEBUG); $this->config[$name] = $value; if(!empty($this->configID)) { - \OCP\Config::getAppValue($this->configID, 'ldap_uuid_attribute', $value); + \OCP\Config::setAppValue($this->configID, 'ldap_uuid_attribute', $value); } $changed = true; } From 3e01fe1dbb9e8f1830b7071f4368f23be04a4578 Mon Sep 17 00:00:00 2001 From: Jenkins for ownCloud Date: Wed, 7 Nov 2012 00:02:51 +0100 Subject: [PATCH 28/34] [tx-robot] updated from transifex --- apps/files/l10n/pl.php | 1 + l10n/pl/files.po | 10 +++++----- l10n/si_LK/settings.po | 20 ++++++++++---------- l10n/templates/core.pot | 2 +- l10n/templates/files.pot | 2 +- l10n/templates/files_encryption.pot | 2 +- l10n/templates/files_external.pot | 2 +- l10n/templates/files_sharing.pot | 2 +- l10n/templates/files_versions.pot | 2 +- l10n/templates/lib.pot | 10 +++++----- l10n/templates/settings.pot | 2 +- l10n/templates/user_ldap.pot | 2 +- settings/l10n/si_LK.php | 5 +++++ 13 files changed, 34 insertions(+), 28 deletions(-) diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index f2460562087..3f71e35a7fd 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -58,6 +58,7 @@ "New" => "Nowy", "Text file" => "Plik tekstowy", "Folder" => "Katalog", +"From link" => "Z linku", "Upload" => "Prześlij", "Cancel upload" => "Przestań wysyłać", "Nothing in here. Upload something!" => "Brak zawartości. Proszę wysłać pliki!", diff --git a/l10n/pl/files.po b/l10n/pl/files.po index bc007cff9c5..3581d4de108 100644 --- a/l10n/pl/files.po +++ b/l10n/pl/files.po @@ -13,9 +13,9 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-11-03 00:00+0100\n" -"PO-Revision-Date: 2012-11-01 23:21+0000\n" -"Last-Translator: I Robot \n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" +"PO-Revision-Date: 2012-11-05 23:19+0000\n" +"Last-Translator: emc \n" "Language-Team: Polish (http://www.transifex.com/projects/p/owncloud/language/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -65,7 +65,7 @@ msgstr "Nie udostępniaj" msgid "Delete" msgstr "Usuwa element" -#: js/fileactions.js:178 +#: js/fileactions.js:172 msgid "Rename" msgstr "Zmień nazwę" @@ -264,7 +264,7 @@ msgstr "Katalog" #: templates/index.php:11 msgid "From link" -msgstr "" +msgstr "Z linku" #: templates/index.php:22 msgid "Upload" diff --git a/l10n/si_LK/settings.po b/l10n/si_LK/settings.po index 0b7793a0ad7..206a29d0372 100644 --- a/l10n/si_LK/settings.po +++ b/l10n/si_LK/settings.po @@ -10,8 +10,8 @@ msgid "" msgstr "" "Project-Id-Version: ownCloud\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" -"POT-Creation-Date: 2012-11-02 00:04+0100\n" -"PO-Revision-Date: 2012-11-01 08:56+0000\n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" +"PO-Revision-Date: 2012-11-06 05:39+0000\n" "Last-Translator: Anushke Guneratne \n" "Language-Team: Sinhala (Sri Lanka) (http://www.transifex.com/projects/p/owncloud/language/si_LK/)\n" "MIME-Version: 1.0\n" @@ -46,7 +46,7 @@ msgstr "අවලංගු වි-තැපෑල" #: ajax/openid.php:13 msgid "OpenID Changed" -msgstr "" +msgstr "විවෘත හැඳුනුම නැතහොත් OpenID වෙනස්විය." #: ajax/openid.php:15 ajax/setlanguage.php:17 ajax/setlanguage.php:20 msgid "Invalid request" @@ -58,7 +58,7 @@ msgstr "කණ්ඩායම මැකීමට නොහැක" #: ajax/removeuser.php:15 ajax/setquota.php:15 ajax/togglegroups.php:12 msgid "Authentication error" -msgstr "" +msgstr "සත්‍යාපන දෝෂයක්" #: ajax/removeuser.php:24 msgid "Unable to delete user" @@ -105,7 +105,7 @@ msgid "" "strongly suggest that you configure your webserver in a way that the data " "directory is no longer accessible or you move the data directory outside the" " webserver document root." -msgstr "" +msgstr "ඔබගේ දත්ත ඩිරෙක්ටරිය හා ගොනුවලට අන්තර්ජාලයෙන් පිවිසිය හැක. ownCloud සපයා ඇති .htaccess ගොනුව ක්‍රියාකරන්නේ නැත. අපි තරයේ කියා සිටිනුයේ නම්, මෙම දත්ත හා ගොනු එසේ පිවිසීමට නොහැකි වන ලෙස ඔබේ වෙබ් සේවාදායකයා වින්‍යාස කරන ලෙස හෝ එම ඩිරෙක්ටරිය වෙබ් මූලයෙන් පිටතට ගෙනයන ලෙසය." #: templates/admin.php:31 msgid "Cron" @@ -213,15 +213,15 @@ msgstr "විශාල ගොනු කළමණාකරනය" msgid "Ask a question" msgstr "ප්‍රශ්ණයක් අසන්න" -#: templates/help.php:23 +#: templates/help.php:22 msgid "Problems connecting to help database." msgstr "උදව් දත්ත ගබඩාව හා සම්බන්ධවීමේදී ගැටළු ඇතිවිය." -#: templates/help.php:24 +#: templates/help.php:23 msgid "Go there manually." -msgstr "" +msgstr "ස්වශක්තියෙන් එතැනට යන්න" -#: templates/help.php:32 +#: templates/help.php:31 msgid "Answer" msgstr "පිළිතුර" @@ -284,7 +284,7 @@ msgstr "පරිවර්ථන සහය" #: templates/personal.php:51 msgid "use this address to connect to your ownCloud in your file manager" -msgstr "" +msgstr "ඔබගේ ගොනු කළමනාකරු ownCloudයට සම්බන්ධ කිරීමට මෙම ලිපිනය භාවිතා කරන්න" #: templates/users.php:21 templates/users.php:76 msgid "Name" diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot index e544bb241e5..e251cc0e980 100644 --- a/l10n/templates/core.pot +++ b/l10n/templates/core.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files.pot b/l10n/templates/files.pot index 341c2385dad..9941454208d 100644 --- a/l10n/templates/files.pot +++ b/l10n/templates/files.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_encryption.pot b/l10n/templates/files_encryption.pot index fefa732f644..f06a9584dd1 100644 --- a/l10n/templates/files_encryption.pot +++ b/l10n/templates/files_encryption.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_external.pot b/l10n/templates/files_external.pot index 7e6a979f41c..354a36df8d6 100644 --- a/l10n/templates/files_external.pot +++ b/l10n/templates/files_external.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_sharing.pot b/l10n/templates/files_sharing.pot index 614ccb4f512..fe5d87ccedb 100644 --- a/l10n/templates/files_sharing.pot +++ b/l10n/templates/files_sharing.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/files_versions.pot b/l10n/templates/files_versions.pot index f06612c7db7..f212ca24503 100644 --- a/l10n/templates/files_versions.pot +++ b/l10n/templates/files_versions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/lib.pot b/l10n/templates/lib.pot index 12b6558b8cd..692741a28fc 100644 --- a/l10n/templates/lib.pot +++ b/l10n/templates/lib.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -41,19 +41,19 @@ msgstr "" msgid "Admin" msgstr "" -#: files.php:328 +#: files.php:331 msgid "ZIP download is turned off." msgstr "" -#: files.php:329 +#: files.php:332 msgid "Files need to be downloaded one by one." msgstr "" -#: files.php:329 files.php:354 +#: files.php:332 files.php:357 msgid "Back to Files" msgstr "" -#: files.php:353 +#: files.php:356 msgid "Selected files too large to generate zip file." msgstr "" diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot index f7acfeb4c35..2614e3f52bf 100644 --- a/l10n/templates/settings.pot +++ b/l10n/templates/settings.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/user_ldap.pot b/l10n/templates/user_ldap.pot index e3f953d9c60..47e50020d20 100644 --- a/l10n/templates/user_ldap.pot +++ b/l10n/templates/user_ldap.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-06 00:00+0100\n" +"POT-Creation-Date: 2012-11-07 00:01+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/settings/l10n/si_LK.php b/settings/l10n/si_LK.php index d3e7755c581..dd4be7c0688 100644 --- a/settings/l10n/si_LK.php +++ b/settings/l10n/si_LK.php @@ -4,8 +4,10 @@ "Could not enable app. " => "යෙදුම සක්‍රීය කළ නොහැකි විය.", "Email saved" => "වි-තැපෑල සුරකින ලදී", "Invalid email" => "අවලංගු වි-තැපෑල", +"OpenID Changed" => "විවෘත හැඳුනුම නැතහොත් OpenID වෙනස්විය.", "Invalid request" => "අවලංගු අයදුම", "Unable to delete group" => "කණ්ඩායම මැකීමට නොහැක", +"Authentication error" => "සත්‍යාපන දෝෂයක්", "Unable to delete user" => "පරිශීලකයා මැකීමට නොහැක", "Language changed" => "භාෂාව ාවනස් කිරීම", "Unable to add user to group %s" => "පරිශීලකයා %s කණ්ඩායමට එකතු කළ නොහැක", @@ -14,6 +16,7 @@ "Enable" => "ක්‍රියත්මක කරන්න", "Saving..." => "සුරැකෙමින් පවතී...", "Security Warning" => "ආරක්ෂක නිවේදනයක්", +"Your data directory and your files are probably accessible from the internet. The .htaccess file that ownCloud provides is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." => "ඔබගේ දත්ත ඩිරෙක්ටරිය හා ගොනුවලට අන්තර්ජාලයෙන් පිවිසිය හැක. ownCloud සපයා ඇති .htaccess ගොනුව ක්‍රියාකරන්නේ නැත. අපි තරයේ කියා සිටිනුයේ නම්, මෙම දත්ත හා ගොනු එසේ පිවිසීමට නොහැකි වන ලෙස ඔබේ වෙබ් සේවාදායකයා වින්‍යාස කරන ලෙස හෝ එම ඩිරෙක්ටරිය වෙබ් මූලයෙන් පිටතට ගෙනයන ලෙසය.", "Sharing" => "හුවමාරු කිරීම", "Allow links" => "යොමු සලසන්න", "Allow resharing" => "යළි යළිත් හුවමාරුවට අවසර දෙමි", @@ -29,6 +32,7 @@ "Managing Big Files" => "විශාල ගොනු කළමණාකරනය", "Ask a question" => "ප්‍රශ්ණයක් අසන්න", "Problems connecting to help database." => "උදව් දත්ත ගබඩාව හා සම්බන්ධවීමේදී ගැටළු ඇතිවිය.", +"Go there manually." => "ස්වශක්තියෙන් එතැනට යන්න", "Answer" => "පිළිතුර", "You have used %s of the available %s" => "ඔබ %sක් භාවිතා කර ඇත. මුළු ප්‍රමාණය %sකි", "Download" => "භාගත කරන්න", @@ -43,6 +47,7 @@ "Fill in an email address to enable password recovery" => "මුරපද ප්‍රතිස්ථාපනය සඳහා විද්‍යුත් තැපැල් විස්තර ලබා දෙන්න", "Language" => "භාෂාව", "Help translate" => "පරිවර්ථන සහය", +"use this address to connect to your ownCloud in your file manager" => "ඔබගේ ගොනු කළමනාකරු ownCloudයට සම්බන්ධ කිරීමට මෙම ලිපිනය භාවිතා කරන්න", "Name" => "නාමය", "Password" => "මුරපදය", "Groups" => "සමූහය", From 12983cf0b0bd2829d9b2af30871580d83f5798ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Wed, 7 Nov 2012 10:45:29 +0100 Subject: [PATCH 29/34] urlencode file/dir to allow special characters in filename/path (issue #95) --- apps/files_sharing/public.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 295273d842b..598172aa855 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -70,9 +70,9 @@ if (isset($_GET['file']) || isset($_GET['dir'])) { if (isset($linkItem['share_with'])) { // Check password if (isset($_GET['file'])) { - $url = OCP\Util::linkToPublic('files').'&file='.$_GET['file']; + $url = OCP\Util::linkToPublic('files').'&file='.urlencode($_GET['file']); } else { - $url = OCP\Util::linkToPublic('files').'&dir='.$_GET['dir']; + $url = OCP\Util::linkToPublic('files').'&dir='.urlencode($_GET['dir']); } if (isset($_POST['password'])) { $password = $_POST['password']; From 012a907a8ac4044f6f9e6472deb8cb401a1b5f60 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 7 Nov 2012 14:05:45 +0100 Subject: [PATCH 30/34] fix user specific mount configuration --- lib/filesystem.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/filesystem.php b/lib/filesystem.php index 4635f8b4f30..aa03593908d 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -232,8 +232,8 @@ class OC_Filesystem{ } if(isset($mountConfig['user'])) { - foreach($mountConfig['user'] as $user=>$mounts) { - if($user==='all' or strtolower($user)===strtolower($user)) { + foreach($mountConfig['user'] as $mountUser=>$mounts) { + if($user==='all' or strtolower($mountUser)===strtolower($user)) { foreach($mounts as $mountPoint=>$options) { $mountPoint=self::setUserVars($mountPoint, $user); foreach($options as &$option) { From 168a2c7b6b005feb0820b682809066dc6ddaab5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Wed, 7 Nov 2012 14:10:10 +0100 Subject: [PATCH 31/34] get the right file name for drag&drop. This was necessary after the switch to css to show/hide file actions, otherwise the actions where part of the extracted file name. --- apps/files/js/files.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 2d9ccba424a..70323352fb2 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -722,7 +722,7 @@ var folderDropOptions={ } var crumbDropOptions={ drop: function( event, ui ) { - var file=ui.draggable.text().trim(); + var file=ui.draggable.parent().data('file'); var target=$(this).data('dir'); var dir=$('#dir').val(); while(dir.substr(0,1)=='/'){//remove extra leading /'s From 99aa972a404a76837152109541f0fdf71f8b376d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 7 Nov 2012 14:21:34 +0100 Subject: [PATCH 32/34] Allow changing the way etags are generated --- lib/connector/sabre/node.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php index 5fc106b85ed..9fffa108d2a 100644 --- a/lib/connector/sabre/node.php +++ b/lib/connector/sabre/node.php @@ -25,6 +25,13 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr const GETETAG_PROPERTYNAME = '{DAV:}getetag'; const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified'; + /** + * Allow configuring the method used to generate Etags + * + * @var array(class_name, function_name) + */ + public static $ETagFunction = null; + /** * The path to the current node * @@ -178,7 +185,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr * If the array is empty, all properties should be returned * * @param array $properties - * @return void + * @return array */ public function getProperties($properties) { if (is_null($this->property_cache)) { @@ -209,7 +216,12 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr * @return string|null Returns null if the ETag can not effectively be determined */ static protected function createETag($path) { - return uniqid('', true); + if(self::$ETagFunction) { + $hash = call_user_func(self::$ETagFunction, $path); + return $hash; + }else{ + return uniqid('', true); + } } /** From ba62d8dea73b768afcf41b53d0dd6eb463907dee Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Tue, 6 Nov 2012 18:40:45 +0000 Subject: [PATCH 33/34] Fix quoting problem in fs mount. give Big DB error at least in PG --- lib/filecache.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/filecache.php b/lib/filecache.php index 6263e03fc64..4a7dbd0250d 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -502,11 +502,11 @@ class OC_FileCache{ */ public static function triggerUpdate($user='') { if($user) { - $query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 WHERE `user`=? AND `mimetype`="httpd/unix-directory"'); - $query->execute(array($user)); + $query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 WHERE `user`=? AND `mimetype`= ? '); + $query->execute(array($user,'httpd/unix-directory')); }else{ - $query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 AND `mimetype`="httpd/unix-directory"'); - $query->execute(); + $query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 AND `mimetype`= ? '); + $query->execute(array('httpd/unix-directory')); } } } From 311b04f6098674897e78ff0223cacbbfe381d044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Wed, 7 Nov 2012 16:53:56 +0100 Subject: [PATCH 34/34] backport from approved patch in stable45: make root the default parameter for getAbsolutePath() --- lib/filesystemview.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/filesystemview.php b/lib/filesystemview.php index 936e1feb412..ccaa040fe88 100644 --- a/lib/filesystemview.php +++ b/lib/filesystemview.php @@ -47,10 +47,7 @@ class OC_FilesystemView { $this->fakeRoot=$root; } - public function getAbsolutePath($path) { - if(!$path) { - $path='/'; - } + public function getAbsolutePath($path = '/') { if($path[0]!=='/') { $path='/'.$path; }