merge master into filesystem

This commit is contained in:
Robin Appelman 2012-10-11 22:54:39 +02:00
commit fb2d2bc201
63 changed files with 651 additions and 596 deletions

View File

@ -2000,7 +2000,7 @@ class CF_Object
// } // }
//use OC's mimetype detection for files //use OC's mimetype detection for files
if(is_file($handle)){ if(@is_file($handle)){
$this->content_type=OC_Helper::getMimeType($handle); $this->content_type=OC_Helper::getMimeType($handle);
}else{ }else{
$this->content_type=OC_Helper::getStringMimeType($handle); $this->content_type=OC_Helper::getStringMimeType($handle);
@ -2537,7 +2537,7 @@ class CF_Object
} }
$md5 = hash_final($ctx, false); $md5 = hash_final($ctx, false);
rewind($data); rewind($data);
} elseif ((string)is_file($data)) { } elseif ((string)@is_file($data)) {
$md5 = md5_file($data); $md5 = md5_file($data);
} else { } else {
$md5 = md5($data); $md5 = md5($data);

View File

@ -229,6 +229,8 @@ class smb {
} }
function addstatcache ($url, $info) { function addstatcache ($url, $info) {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache; global $__smb_cache;
$is_file = (strpos ($info['attr'],'D') === FALSE); $is_file = (strpos ($info['attr'],'D') === FALSE);
$s = ($is_file) ? stat ('/etc/passwd') : stat ('/tmp'); $s = ($is_file) ? stat ('/etc/passwd') : stat ('/tmp');
@ -238,11 +240,15 @@ class smb {
} }
function getstatcache ($url) { function getstatcache ($url) {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache; global $__smb_cache;
return isset ($__smb_cache['stat'][$url]) ? $__smb_cache['stat'][$url] : FALSE; return isset ($__smb_cache['stat'][$url]) ? $__smb_cache['stat'][$url] : FALSE;
} }
function clearstatcache ($url='') { function clearstatcache ($url='') {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache; global $__smb_cache;
if ($url == '') $__smb_cache['stat'] = array (); else unset ($__smb_cache['stat'][$url]); if ($url == '') $__smb_cache['stat'] = array (); else unset ($__smb_cache['stat'][$url]);
} }
@ -358,16 +364,22 @@ class smb_stream_wrapper extends smb {
# cache # cache
function adddircache ($url, $content) { function adddircache ($url, $content) {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache; global $__smb_cache;
return $__smb_cache['dir'][$url] = $content; return $__smb_cache['dir'][$url] = $content;
} }
function getdircache ($url) { function getdircache ($url) {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache; global $__smb_cache;
return isset ($__smb_cache['dir'][$url]) ? $__smb_cache['dir'][$url] : FALSE; return isset ($__smb_cache['dir'][$url]) ? $__smb_cache['dir'][$url] : FALSE;
} }
function cleardircache ($url='') { function cleardircache ($url='') {
$url = str_replace('//', '/', $url);
$url = rtrim($url, '/');
global $__smb_cache; global $__smb_cache;
if ($url == ''){ if ($url == ''){
$__smb_cache['dir'] = array (); $__smb_cache['dir'] = array ();

View File

@ -9,6 +9,7 @@
"Files" => "Файлы", "Files" => "Файлы",
"Unshare" => "Скрыть", "Unshare" => "Скрыть",
"Delete" => "Удалить", "Delete" => "Удалить",
"Rename" => "Переименовать",
"already exists" => "уже существует", "already exists" => "уже существует",
"replace" => "отмена", "replace" => "отмена",
"suggest name" => "подобрать название", "suggest name" => "подобрать название",
@ -22,9 +23,13 @@
"Unable to upload your file as it is a directory or has 0 bytes" => "Невозможно загрузить файл,\n так как он имеет нулевой размер или является директорией", "Unable to upload your file as it is a directory or has 0 bytes" => "Невозможно загрузить файл,\n так как он имеет нулевой размер или является директорией",
"Upload Error" => "Ошибка загрузки", "Upload Error" => "Ошибка загрузки",
"Pending" => "Ожидающий решения", "Pending" => "Ожидающий решения",
"1 file uploading" => "загрузка 1 файла",
"files uploading" => "загрузка файлов",
"Upload cancelled." => "Загрузка отменена", "Upload cancelled." => "Загрузка отменена",
"File upload is in progress. Leaving the page now will cancel the upload." => "Процесс загрузки файла. Если покинуть страницу сейчас, загрузка будет отменена.", "File upload is in progress. Leaving the page now will cancel the upload." => "Процесс загрузки файла. Если покинуть страницу сейчас, загрузка будет отменена.",
"Invalid name, '/' is not allowed." => "Неправильное имя, '/' не допускается.", "Invalid name, '/' is not allowed." => "Неправильное имя, '/' не допускается.",
"files scanned" => "файлы отсканированы",
"error while scanning" => "ошибка при сканировании",
"Name" => "Имя", "Name" => "Имя",
"Size" => "Размер", "Size" => "Размер",
"Modified" => "Изменен", "Modified" => "Изменен",
@ -32,6 +37,16 @@
"folders" => "папки", "folders" => "папки",
"file" => "файл", "file" => "файл",
"files" => "файлы", "files" => "файлы",
"seconds ago" => "секунд назад",
"minute ago" => "минуту назад",
"minutes ago" => "минут назад",
"today" => "сегодня",
"yesterday" => "вчера",
"days ago" => "дней назад",
"last month" => "в прошлом месяце",
"months ago" => "месяцев назад",
"last year" => "в прошлом году",
"years ago" => "лет назад",
"File handling" => "Работа с файлами", "File handling" => "Работа с файлами",
"Maximum upload size" => "Максимальный размер загружаемого файла", "Maximum upload size" => "Максимальный размер загружаемого файла",
"max. possible: " => "Максимально возможный", "max. possible: " => "Максимально возможный",

View File

@ -1,3 +1,12 @@
<script type="text/javascript">
<?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) {
echo "var publicListView = true;";
} else {
echo "var publicListView = false;";
}
?>
</script>
<?php foreach($_['files'] as $file): <?php foreach($_['files'] as $file):
$simple_file_size = OCP\simple_file_size($file['size']); $simple_file_size = OCP\simple_file_size($file['size']);
$simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2 $simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2

View File

@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Access granted" => "Acceso permitido",
"Error configuring Dropbox storage" => "Error al configurar el almacenamiento de Dropbox",
"Grant access" => "Permitir acceso",
"Fill out all required fields" => "Rellenar todos los campos requeridos",
"Please provide a valid Dropbox app key and secret." => "Por favor, proporcioná un secreto y una contraseña válida para la aplicación Dropbox.",
"Error configuring Google Drive storage" => "Error al configurar el almacenamiento de Google Drive",
"External Storage" => "Almacenamiento externo", "External Storage" => "Almacenamiento externo",
"Mount point" => "Punto de montaje", "Mount point" => "Punto de montaje",
"Backend" => "Motor", "Backend" => "Motor",

View File

@ -1,4 +1,8 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Access granted" => "Доступ разрешен",
"Error configuring Dropbox storage" => "Ошибка при конфигурировании хранилища Dropbox",
"Grant access" => "Предоставить доступ",
"Fill out all required fields" => "Заполните все требуемые поля",
"External Storage" => "Внешние системы хранения данных", "External Storage" => "Внешние системы хранения данных",
"Mount point" => "Точка монтирования", "Mount point" => "Точка монтирования",
"Backend" => "Бэкэнд", "Backend" => "Бэкэнд",

View File

@ -61,7 +61,7 @@ class SMB extends \OC\Files\Storage\StreamWrapper{
} }
public function filetype($path) { public function filetype($path) {
return (bool)@$this->opendir($path);//using opendir causes the same amount of requests and caches the content of the folder in one go return (bool)@$this->opendir($path) ? 'dir' : 'file';//using opendir causes the same amount of requests and caches the content of the folder in one go
} }
/** /**

View File

@ -41,7 +41,7 @@ class SWIFT extends \OC\Files\Storage\Common{
* @return string * @return string
*/ */
private function getContainerName($path) { private function getContainerName($path) {
$path=trim($this->root.$path,'/'); $path=trim(trim($this->root,'/')."/".$path,'/.');
return str_replace('/','\\',$path); return str_replace('/','\\',$path);
} }
@ -72,11 +72,11 @@ class SWIFT extends \OC\Files\Storage\Common{
* @return CF_Container * @return CF_Container
*/ */
private function createContainer($path) { private function createContainer($path) {
if($path=='' or $path=='/') { if($path=='' or $path=='/' or $path=='.') {
return $this->conn->create_container($this->getContainerName($path)); return $this->conn->create_container($this->getContainerName($path));
} }
$parent=dirname($path); $parent=dirname($path);
if($parent=='' or $parent=='/') { if($parent=='' or $parent=='/' or $parent=='.') {
$parentContainer=$this->rootContainer; $parentContainer=$this->rootContainer;
}else{ }else{
if(!$this->containerExists($parent)) { if(!$this->containerExists($parent)) {
@ -102,6 +102,9 @@ class SWIFT extends \OC\Files\Storage\Common{
if(is_null($container)) { if(is_null($container)) {
return null; return null;
}else{ }else{
if ($path=="/" or $path=='') {
return null;
}
try{ try{
$obj=$container->get_object(basename($path)); $obj=$container->get_object(basename($path));
$this->objects[$path]=$obj; $this->objects[$path]=$obj;
@ -137,7 +140,7 @@ class SWIFT extends \OC\Files\Storage\Common{
private function createObject($path) { private function createObject($path) {
$container=$this->getContainer(dirname($path)); $container=$this->getContainer(dirname($path));
if(!is_null($container)) { if(!is_null($container)) {
$container=$this->createContainer($path); $container=$this->createContainer(dirname($path));
} }
return $container->create_object(basename($path)); return $container->create_object(basename($path));
} }
@ -279,7 +282,7 @@ class SWIFT extends \OC\Files\Storage\Common{
$this->conn = new \CF_Connection($this->auth); $this->conn = new \CF_Connection($this->auth);
if(!$this->containerExists($this->root)) { if(!$this->containerExists('/')) {
$this->rootContainer=$this->createContainer('/'); $this->rootContainer=$this->createContainer('/');
}else{ }else{
$this->rootContainer=$this->getContainer('/'); $this->rootContainer=$this->getContainer('/');
@ -393,6 +396,9 @@ class SWIFT extends \OC\Files\Storage\Common{
} }
public function unlink($path) { public function unlink($path) {
if($this->containerExists($path)) {
return $this->rmdir($path);
}
if($this->objectExists($path)) { if($this->objectExists($path)) {
$container=$this->getContainer(dirname($path)); $container=$this->getContainer(dirname($path));
$container->delete_object(basename($path)); $container->delete_object(basename($path));
@ -403,13 +409,13 @@ class SWIFT extends \OC\Files\Storage\Common{
} }
public function fopen($path,$mode) { public function fopen($path,$mode) {
$obj=$this->getObject($path);
if(is_null($obj)) {
return false;
}
switch($mode) { switch($mode) {
case 'r': case 'r':
case 'rb': case 'rb':
$obj=$this->getObject($path);
if (is_null($obj)) {
return false;
}
$fp = fopen('php://temp', 'r+'); $fp = fopen('php://temp', 'r+');
$obj->stream($fp); $obj->stream($fp);
@ -442,7 +448,7 @@ class SWIFT extends \OC\Files\Storage\Common{
} }
public function free_space($path) { public function free_space($path) {
return 0; return 1024*1024*1024*8;
} }
public function touch($path,$mtime=null) { public function touch($path,$mtime=null) {
@ -483,7 +489,17 @@ class SWIFT extends \OC\Files\Storage\Common{
} }
public function stat($path) { public function stat($path) {
$container=$this->getContainer($path);
if (!is_null($container)) {
return array(
'mtime'=>-1,
'size'=>$container->bytes_used,
'ctime'=>-1
);
}
$obj=$this->getObject($path); $obj=$this->getObject($path);
if(is_null($obj)) { if(is_null($obj)) {
return false; return false;
} }
@ -507,7 +523,7 @@ class SWIFT extends \OC\Files\Storage\Common{
$obj->save_to_filename($tmpFile); $obj->save_to_filename($tmpFile);
return $tmpFile; return $tmpFile;
}else{ }else{
return false; return OCP\Files::tmpFile();
} }
} }

View File

@ -133,6 +133,9 @@ class DAV extends \OC\Files\Storage\Common{
switch($mode) { switch($mode) {
case 'r': case 'r':
case 'rb': case 'rb':
if(!$this->file_exists($path)) {
return false;
}
//straight up curl instead of sabredav here, sabredav put's the entire get result in memory //straight up curl instead of sabredav here, sabredav put's the entire get result in memory
$curl = curl_init(); $curl = curl_init();
$fp = fopen('php://temp', 'r+'); $fp = fopen('php://temp', 'r+');

View File

@ -1,45 +1,44 @@
<?php <?php
/** /**
* ownCloud * ownCloud
* *
* @author Michael Gapczynski * @author Michael Gapczynski
* @copyright 2012 Michael Gapczynski mtgap@owncloud.com * @copyright 2012 Michael Gapczynski mtgap@owncloud.com
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * 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. * version 3 of the License, or any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
* *
* You should have received a copy of the GNU Affero General Public * You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/ */
namespace Test\Files\Storage; namespace Test\Files\Storage;
$config = include('apps/files_external/tests/config.php'); class AmazonS3 extends Storage {
if (!is_array($config) or !isset($config['amazons3']) or !$config['amazons3']['run']) {
abstract class AmazonS3 extends Storage{}
return;
} else {
class AmazonS3 extends Storage {
private $config; private $config;
private $id; private $id;
public function setUp() { public function setUp() {
$id = uniqid(); $id = uniqid();
$this->config = include('apps/files_external/tests/config.php'); $this->config = include('files_external/tests/config.php');
$this->config['amazons3']['bucket'] = $id; // Make sure we have a new empty bucket to work in if (!is_array($this->config) or !isset($this->config['amazons3']) or !$this->config['amazons3']['run']) {
$this->instance = new \OC\Files\Storage\AmazonS3($this->config['amazons3']); $this->markTestSkipped('AmazonS3 backend not configured');
} }
$this->config['amazons3']['bucket'] = $id; // Make sure we have a new empty bucket to work in
$this->instance = new \OC\Files\Storage\AmazonS3($this->config['amazons3']);
}
public function tearDown() { public function tearDown() {
if ($this->instance) {
$s3 = new \AmazonS3(array('key' => $this->config['amazons3']['key'], 'secret' => $this->config['amazons3']['secret'])); $s3 = new \AmazonS3(array('key' => $this->config['amazons3']['key'], 'secret' => $this->config['amazons3']['secret']));
if ($s3->delete_all_objects($this->id)) { if ($s3->delete_all_objects($this->id)) {
$s3->delete_bucket($this->id); $s3->delete_bucket($this->id);

View File

@ -26,7 +26,7 @@ return array(
'run'=>false, 'run'=>false,
'user'=>'test:tester', 'user'=>'test:tester',
'token'=>'testing', 'token'=>'testing',
'host'=>'localhost:8080/auth', 'host'=>'localhost.local:8080/auth',
'root'=>'/', 'root'=>'/',
), ),
'smb'=>array( 'smb'=>array(

View File

@ -8,22 +8,21 @@
namespace Test\Files\Storage; namespace Test\Files\Storage;
$config=include('files_external/tests/config.php'); class Dropbox extends Storage {
if(!is_array($config) or !isset($config['dropbox']) or !$config['dropbox']['run']) { private $config;
abstract class Dropbox extends Storage{}
return;
}else{
class Dropbox extends Storage {
private $config;
public function setUp() { public function setUp() {
$id=uniqid(); $id = uniqid();
$this->config=include('files_external/tests/config.php'); $this->config = include('files_external/tests/config.php');
$this->config['dropbox']['root'].='/'.$id;//make sure we have an new empty folder to work in if (!is_array($this->config) or !isset($this->config['dropbox']) or !$this->config['dropbox']['run']) {
$this->instance=new \OC\Files\Storage\Dropbox($this->config['dropbox']); $this->markTestSkipped('Dropbox backend not configured');
} }
$this->config['dropbox']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
$this->instance = new \OC\Files\Storage\Dropbox($this->config['dropbox']);
}
public function tearDown() { public function tearDown() {
if ($this->instance) {
$this->instance->unlink('/'); $this->instance->unlink('/');
} }
} }

View File

@ -8,22 +8,21 @@
namespace Test\Files\Storage; namespace Test\Files\Storage;
$config=include('apps/files_external/tests/config.php'); class FTP extends Storage {
if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']) { private $config;
abstract class FTP extends Storage{}
return;
}else{
class FTP extends Storage {
private $config;
public function setUp() { public function setUp() {
$id=uniqid(); $id = uniqid();
$this->config=include('apps/files_external/tests/config.php'); $this->config = include('files_external/tests/config.php');
$this->config['ftp']['root'].='/'.$id;//make sure we have an new empty folder to work in if (!is_array($this->config) or !isset($this->config['ftp']) or !$this->config['ftp']['run']) {
$this->instance=new \OC\Files\Storage\FTP($this->config['ftp']); $this->markTestSkipped('FTP backend not configured');
} }
$this->config['ftp']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
$this->instance = new \OC\Files\Storage\FTP($this->config['ftp']);
}
public function tearDown() { public function tearDown() {
if ($this->instance) {
\OCP\Files::rmdirr($this->instance->constructUrl('')); \OCP\Files::rmdirr($this->instance->constructUrl(''));
} }
} }

View File

@ -1,44 +1,42 @@
<?php <?php
/** /**
* ownCloud * ownCloud
* *
* @author Michael Gapczynski * @author Michael Gapczynski
* @copyright 2012 Michael Gapczynski mtgap@owncloud.com * @copyright 2012 Michael Gapczynski mtgap@owncloud.com
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * 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. * version 3 of the License, or any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
* *
* You should have received a copy of the GNU Affero General Public * You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/ */
namespace Test\Files\Storage; namespace Test\Files\Storage;
$config=include('apps/files_external/tests/config.php'); class Google extends Storage {
if(!is_array($config) or !isset($config['google']) or !$config['google']['run']) { private $config;
abstract class Google extends Storage{}
return;
}else{
class Google extends Storage {
private $config; public function setUp() {
$id = uniqid();
public function setUp() { $this->config = include('files_external/tests/config.php');
$id=uniqid(); if (!is_array($this->config) or !isset($this->config['google']) or !$this->config['google']['run']) {
$this->config=include('apps/files_external/tests/config.php'); $this->markTestSkipped('Google backend not configured');
$this->config['google']['root'].='/'.$id;//make sure we have an new empty folder to work in
$this->instance=new \OC\Files\Storage\Google($this->config['google']);
} }
$this->config['google']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
$this->instance = new \OC\Files\Storage\Google($this->config['google']);
}
public function tearDown() { public function tearDown() {
if ($this->instance) {
$this->instance->rmdir('/'); $this->instance->rmdir('/');
} }
} }

View File

@ -8,24 +8,22 @@
namespace Test\Files\Storage; namespace Test\Files\Storage;
$config=include('apps/files_external/tests/config.php'); class SMB extends Storage {
private $config;
if(!is_array($config) or !isset($config['smb']) or !$config['smb']['run']) { public function setUp() {
abstract class SMB extends Storage{} $id = uniqid();
return; $this->config = include('files_external/tests/config.php');
}else{ if (!is_array($this->config) or !isset($this->config['smb']) or !$this->config['smb']['run']) {
class SMB extends Storage { $this->markTestSkipped('Samba backend not configured');
private $config;
public function setUp() {
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php');
$this->config['smb']['root'].=$id;//make sure we have an new empty folder to work in
$this->instance=new \OC\Files\Storage\SMB($this->config['smb']);
} }
$this->config['smb']['root'] .= $id; //make sure we have an new empty folder to work in
$this->instance = new \OC\Files\Storage\SMB($this->config['smb']);
}
public function tearDown() { public function tearDown() {
if ($this->instance) {
\OCP\Files::rmdirr($this->instance->constructUrl('')); \OCP\Files::rmdirr($this->instance->constructUrl(''));
} }
} }

View File

@ -8,25 +8,23 @@
namespace Test\Files\Storage; namespace Test\Files\Storage;
$config=include('apps/files_external/tests/config.php'); class SWIFT extends Storage {
if(!is_array($config) or !isset($config['swift']) or !$config['swift']['run']) { private $config;
abstract class SWIFT extends Storage{}
return;
}else{
class SWIFT extends Storage {
private $config;
public function setUp() { public function setUp() {
$id=uniqid(); $id = uniqid();
$this->config=include('apps/files_external/tests/config.php'); $this->config = include('files_external/tests/config.php');
$this->config['swift']['root'].='/'.$id;//make sure we have an new empty folder to work in if (!is_array($this->config) or !isset($this->config['swift']) or !$this->config['swift']['run']) {
$this->instance=new \OC\Files\Storage\SWIFT($this->config['swift']); $this->markTestSkipped('OpenStack SWIFT backend not configured');
} }
$this->config['swift']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
$this->instance = new \OC\Files\Storage\SWIFT($this->config['swift']);
}
public function tearDown() { public function tearDown() {
$this->instance->rmdir(''); if ($this->instance) {
$this->instance->rmdir('');
} }
} }
} }

View File

@ -8,22 +8,22 @@
namespace Test\Files\Storage; namespace Test\Files\Storage;
$config=include('apps/files_external/tests/config.php'); class DAV extends Storage {
if(!is_array($config) or !isset($config['webdav']) or !$config['webdav']['run']) {
abstract class DAV extends Storage{}
return;
}else{
class DAV extends Storage {
private $config;
public function setUp() { private $config;
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php'); public function setUp() {
$this->config['webdav']['root'].='/'.$id;//make sure we have an new empty folder to work in $id = uniqid();
$this->instance=new \OC\Files\Storage\DAV($this->config['webdav']); $this->config = include('files_external/tests/config.php');
if (!is_array($this->config) or !isset($this->config['webdav']) or !$this->config['webdav']['run']) {
$this->markTestSkipped('WebDAV backend not configured');
} }
$this->config['webdav']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
$this->instance = new \OC\Files\Storage\DAV($this->config['webdav']);
}
public function tearDown() { public function tearDown() {
if ($this->instance) {
$this->instance->rmdir('/'); $this->instance->rmdir('/');
} }
} }

View File

@ -1,6 +1,6 @@
$(document).ready(function() { $(document).ready(function() {
if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined') { if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !publicListView) {
OC.Share.loadIcons('file'); OC.Share.loadIcons('file');
FileActions.register('all', 'Share', OC.PERMISSION_READ, function(filename) { FileActions.register('all', 'Share', OC.PERMISSION_READ, function(filename) {
// Return the correct sharing icon // Return the correct sharing icon

View File

@ -45,6 +45,11 @@ if (isset($_GET['file']) || isset($_GET['dir'])) {
} }
if (isset($linkItem['share_with'])) { if (isset($linkItem['share_with'])) {
// Check password // 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'])) { if (isset($_POST['password'])) {
$password = $_POST['password']; $password = $_POST['password'];
$storedHash = $linkItem['share_with']; $storedHash = $linkItem['share_with'];
@ -52,7 +57,7 @@ if (isset($_GET['file']) || isset($_GET['dir'])) {
$hasher = new PasswordHash(8, $forcePortable); $hasher = new PasswordHash(8, $forcePortable);
if (!($hasher->CheckPassword($password.OC_Config::getValue('passwordsalt', ''), $storedHash))) { if (!($hasher->CheckPassword($password.OC_Config::getValue('passwordsalt', ''), $storedHash))) {
$tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest');
$tmpl->assign('URL', OCP\Util::linkToPublic('files').'&file='.$_GET['file']); $tmpl->assign('URL', $url);
$tmpl->assign('error', true); $tmpl->assign('error', true);
$tmpl->printPage(); $tmpl->printPage();
exit(); exit();
@ -64,7 +69,7 @@ if (isset($_GET['file']) || isset($_GET['dir'])) {
} else if (!isset($_SESSION['public_link_authenticated']) || $_SESSION['public_link_authenticated'] !== $linkItem['id']) { } else if (!isset($_SESSION['public_link_authenticated']) || $_SESSION['public_link_authenticated'] !== $linkItem['id']) {
// Prompt for password // Prompt for password
$tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest');
$tmpl->assign('URL', OCP\Util::linkToPublic('files').'&file='.$_GET['file']); $tmpl->assign('URL', $url);
$tmpl->printPage(); $tmpl->printPage();
exit(); exit();
} }
@ -138,6 +143,7 @@ if (isset($_GET['file']) || isset($_GET['dir'])) {
} }
$list = new OCP\Template('files', 'part.list', ''); $list = new OCP\Template('files', 'part.list', '');
$list->assign('files', $files, false); $list->assign('files', $files, false);
$list->assign('publicListView', true);
$list->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.$_GET['dir'].'&path=', false); $list->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.$_GET['dir'].'&path=', false);
$list->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.$_GET['dir'].'&path=', false); $list->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.$_GET['dir'].'&path=', false);
$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '' ); $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '' );

View File

@ -21,11 +21,11 @@ $(document).ready(function(){
} }
,function(filename){ ,function(filename){
// Action to perform when clicked // Action to perform when clicked
if (scanFiles.scanning || !$('#dropdown').hasClass('drop-versions')){return;}//workaround to prevent additional http request block scanning feedback if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback
var file = $('#dir').val()+'/'+filename; var file = $('#dir').val()+'/'+filename;
// Check if drop down is already visible for a different file // Check if drop down is already visible for a different file
if (($('#dropdown').length > 0)) { if (($('#dropdown').length > 0) && $('#dropdown').hasClass('drop-versions') ) {
if (file != $('#dropdown').data('file')) { if (file != $('#dropdown').data('file')) {
$('#dropdown').hide('blind', function() { $('#dropdown').hide('blind', function() {
$('#dropdown').remove(); $('#dropdown').remove();

View File

@ -1,4 +1,6 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Expire all versions" => "Срок действия всех версий истекает",
"History" => "История",
"Versions" => "Версии", "Versions" => "Версии",
"This will delete all existing backup versions of your files" => "Это приведет к удалению всех существующих версий резервной копии ваших файлов", "This will delete all existing backup versions of your files" => "Это приведет к удалению всех существующих версий резервной копии ваших файлов",
"Files Versioning" => "Файлы управления версиями", "Files Versioning" => "Файлы управления версиями",

View File

@ -64,7 +64,7 @@ class Hooks {
$abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$params['newpath'].'.v'; $abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$params['newpath'].'.v';
if(Storage::isversioned($rel_oldpath)) { if(Storage::isversioned($rel_oldpath)) {
$info=pathinfo($abs_newpath); $info=pathinfo($abs_newpath);
if(!file_exists($info['dirname'])) mkdir($info['dirname'],0700,true); if(!file_exists($info['dirname'])) mkdir($info['dirname'],0750,true);
$versions = Storage::getVersions($rel_oldpath); $versions = Storage::getVersions($rel_oldpath);
foreach ($versions as $v) { foreach ($versions as $v) {
rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']); rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']);

View File

@ -106,9 +106,9 @@ class Storage {
// create all parent folders // create all parent folders
$dirname = dirname($filename); $info=pathinfo($filename);
if(!$users_view->file_exists('/files_versions/'.$dirname)) { if(!file_exists($versionsFolderName.'/'.$info['dirname'])) {
$users_view->mkdir('/files_versions/'.$dirname,0700,true); mkdir($versionsFolderName.'/'.$info['dirname'],0750,true);
} }
// store a new version of a file // store a new version of a file

View File

@ -1,5 +1,6 @@
<?php $TRANSLATIONS = array( <?php $TRANSLATIONS = array(
"Host" => "Anfitrião", "Host" => "Anfitrião",
"You can specify Base DN for users and groups in the Advanced tab" => "Pode especificar o ND Base para utilizadores e grupos no separador Avançado",
"Password" => "Palavra-passe", "Password" => "Palavra-passe",
"Group Filter" => "Filtrar por grupo", "Group Filter" => "Filtrar por grupo",
"Port" => "Porto", "Port" => "Porto",

View File

@ -18,6 +18,7 @@
"The LDAP attribute to use to generate the user`s ownCloud name." => "Атрибут LDAP, используемый для создания имени пользователя в ownCloud.", "The LDAP attribute to use to generate the user`s ownCloud name." => "Атрибут LDAP, используемый для создания имени пользователя в ownCloud.",
"The LDAP attribute to use to generate the groups`s ownCloud name." => "Атрибут LDAP, используемый для создания группового имени в ownCloud.", "The LDAP attribute to use to generate the groups`s ownCloud name." => "Атрибут LDAP, используемый для создания группового имени в ownCloud.",
"in bytes" => "в байтах", "in bytes" => "в байтах",
"in seconds. A change empties the cache." => "в секундах. Изменение очищает кэш.",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Оставьте пустым под имя пользователя (по умолчанию). В противном случае задайте LDAP/AD атрибут.", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Оставьте пустым под имя пользователя (по умолчанию). В противном случае задайте LDAP/AD атрибут.",
"Help" => "Помощь" "Help" => "Помощь"
); );

View File

@ -86,7 +86,8 @@ function execute_tests {
#test execution #test execution
echo "Testing with $1 ..." echo "Testing with $1 ..."
cd tests cd tests
php -f index.php -- xml $1 > autotest-results-$1.xml #php -f index.php -- xml $1 > autotest-results-$1.xml
phpunit --log-junit autotest-results-$1.xml --coverage-clover autotest-clover-$1.xml
} }
# #

21
core/l10n/ku_IQ.php Normal file
View File

@ -0,0 +1,21 @@
<?php $TRANSLATIONS = array(
"Settings" => "ده‌ستكاری",
"Password" => "وشەی تێپەربو",
"New password" => "وشەی نهێنی نوێ",
"Reset password" => "دووباره‌ كردنه‌وه‌ی وشه‌ی نهێنی",
"Users" => "به‌كارهێنه‌ر",
"Apps" => "به‌رنامه‌كان",
"Admin" => "به‌ڕێوه‌به‌ری سه‌ره‌كی",
"Help" => "یارمەتی",
"Cloud not found" => "هیچ نه‌دۆزرایه‌وه‌",
"Advanced" => "هه‌ڵبژاردنی پیشكه‌وتوو",
"Data folder" => "زانیاری فۆڵده‌ر",
"Database user" => "به‌كارهێنه‌ری داتابه‌یس",
"Database password" => "وشه‌ی نهێنی داتا به‌یس",
"Database name" => "ناوی داتابه‌یس",
"Database host" => "هۆستی داتابه‌یس",
"Finish setup" => "كۆتایی هات ده‌ستكاریه‌كان",
"Log out" => "چوونەدەرەوە",
"prev" => "پێشتر",
"next" => "دواتر"
);

View File

@ -25,15 +25,20 @@
"Error while sharing" => "Ошибка создания общего доступа", "Error while sharing" => "Ошибка создания общего доступа",
"Error while unsharing" => "Ошибка отключения общего доступа", "Error while unsharing" => "Ошибка отключения общего доступа",
"Error while changing permissions" => "Ошибка при изменении прав доступа", "Error while changing permissions" => "Ошибка при изменении прав доступа",
"Share with" => "Сделать общим с",
"Password protect" => "Защитить паролем", "Password protect" => "Защитить паролем",
"Password" => "Пароль", "Password" => "Пароль",
"Set expiration date" => "Установить срок действия",
"Expiration date" => "Дата истечения срока действия",
"No people found" => "Не найдено людей", "No people found" => "Не найдено людей",
"with" => "с",
"Unshare" => "Отключить общий доступ", "Unshare" => "Отключить общий доступ",
"access control" => "контроль доступа", "access control" => "контроль доступа",
"create" => "создать", "create" => "создать",
"update" => "обновить", "update" => "обновить",
"delete" => "удалить", "delete" => "удалить",
"share" => "сделать общим", "share" => "сделать общим",
"Password protected" => "Пароль защищен",
"ownCloud password reset" => "Переназначение пароля", "ownCloud password reset" => "Переназначение пароля",
"Use the following link to reset your password: {link}" => "Воспользуйтесь следующей ссылкой для переназначения пароля: {link}", "Use the following link to reset your password: {link}" => "Воспользуйтесь следующей ссылкой для переназначения пароля: {link}",
"You will receive a link to reset your password via Email." => "Вы получите ссылку для восстановления пароля по электронной почте.", "You will receive a link to reset your password via Email." => "Вы получите ссылку для восстановления пароля по электронной почте.",

View File

@ -8,9 +8,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-02 23:16+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-10-02 21:17+0000\n" "PO-Revision-Date: 2012-10-10 07:08+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n" "Last-Translator: cjtess <claudio.tessone@gmail.com>\n"
"Language-Team: Spanish (Argentina) (http://www.transifex.com/projects/p/owncloud/language/es_AR/)\n" "Language-Team: Spanish (Argentina) (http://www.transifex.com/projects/p/owncloud/language/es_AR/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -20,27 +20,27 @@ msgstr ""
#: js/dropbox.js:7 js/dropbox.js:25 js/google.js:7 js/google.js:23 #: js/dropbox.js:7 js/dropbox.js:25 js/google.js:7 js/google.js:23
msgid "Access granted" msgid "Access granted"
msgstr "" msgstr "Acceso permitido"
#: js/dropbox.js:28 js/dropbox.js:74 js/dropbox.js:79 js/dropbox.js:86 #: js/dropbox.js:28 js/dropbox.js:74 js/dropbox.js:79 js/dropbox.js:86
msgid "Error configuring Dropbox storage" msgid "Error configuring Dropbox storage"
msgstr "" msgstr "Error al configurar el almacenamiento de Dropbox"
#: js/dropbox.js:34 js/dropbox.js:45 js/google.js:31 js/google.js:40 #: js/dropbox.js:34 js/dropbox.js:45 js/google.js:31 js/google.js:40
msgid "Grant access" msgid "Grant access"
msgstr "" msgstr "Permitir acceso"
#: js/dropbox.js:73 js/google.js:72 #: js/dropbox.js:73 js/google.js:72
msgid "Fill out all required fields" msgid "Fill out all required fields"
msgstr "" msgstr "Rellenar todos los campos requeridos"
#: js/dropbox.js:85 #: js/dropbox.js:85
msgid "Please provide a valid Dropbox app key and secret." msgid "Please provide a valid Dropbox app key and secret."
msgstr "" msgstr "Por favor, proporcioná un secreto y una contraseña válida para la aplicación Dropbox."
#: js/google.js:26 js/google.js:73 js/google.js:78 #: js/google.js:26 js/google.js:73 js/google.js:78
msgid "Error configuring Google Drive storage" msgid "Error configuring Google Drive storage"
msgstr "" msgstr "Error al configurar el almacenamiento de Google Drive"
#: templates/settings.php:3 #: templates/settings.php:3
msgid "External Storage" msgid "External Storage"

View File

@ -8,9 +8,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-09 02:03+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-10-09 00:04+0000\n" "PO-Revision-Date: 2012-10-10 06:43+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n" "Last-Translator: cjtess <claudio.tessone@gmail.com>\n"
"Language-Team: Spanish (Argentina) (http://www.transifex.com/projects/p/owncloud/language/es_AR/)\n" "Language-Team: Spanish (Argentina) (http://www.transifex.com/projects/p/owncloud/language/es_AR/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -22,7 +22,7 @@ msgstr ""
msgid "Unable to load list from App Store" msgid "Unable to load list from App Store"
msgstr "Imposible cargar la lista desde el App Store" msgstr "Imposible cargar la lista desde el App Store"
#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18 #: ajax/creategroup.php:9 ajax/removeuser.php:18 ajax/setquota.php:18
#: ajax/togglegroups.php:15 #: ajax/togglegroups.php:15
msgid "Authentication error" msgid "Authentication error"
msgstr "Error al autenticar" msgstr "Error al autenticar"
@ -59,7 +59,7 @@ msgstr "Solicitud no válida"
msgid "Unable to delete group" msgid "Unable to delete group"
msgstr "No fue posible eliminar el grupo" msgstr "No fue posible eliminar el grupo"
#: ajax/removeuser.php:22 #: ajax/removeuser.php:27
msgid "Unable to delete user" msgid "Unable to delete user"
msgstr "No fue posible eliminar el usuario" msgstr "No fue posible eliminar el usuario"
@ -186,7 +186,7 @@ msgstr "Añadí tu aplicación"
#: templates/apps.php:11 #: templates/apps.php:11
msgid "More Apps" msgid "More Apps"
msgstr "" msgstr "Más aplicaciones"
#: templates/apps.php:27 #: templates/apps.php:27
msgid "Select an App" msgid "Select an App"

View File

@ -3,13 +3,14 @@
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the PACKAGE package.
# #
# Translators: # Translators:
# <itkurd0@gmail.com>, 2012.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-07 02:03+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2011-07-25 16:05+0000\n" "PO-Revision-Date: 2012-10-10 15:25+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: kurdboy <itkurd0@gmail.com>\n"
"Language-Team: Kurdish (Iraq) (http://www.transifex.com/projects/p/owncloud/language/ku_IQ/)\n" "Language-Team: Kurdish (Iraq) (http://www.transifex.com/projects/p/owncloud/language/ku_IQ/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -29,55 +30,55 @@ msgstr ""
msgid "This category already exists: " msgid "This category already exists: "
msgstr "" msgstr ""
#: js/js.js:213 templates/layout.user.php:49 templates/layout.user.php:50 #: js/js.js:229 templates/layout.user.php:49 templates/layout.user.php:50
msgid "Settings" msgid "Settings"
msgstr "" msgstr "ده‌ستكاری"
#: js/js.js:645 #: js/js.js:661
msgid "January" msgid "January"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "February" msgid "February"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "March" msgid "March"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "April" msgid "April"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "May" msgid "May"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "June" msgid "June"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "July" msgid "July"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "August" msgid "August"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "September" msgid "September"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "October" msgid "October"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "November" msgid "November"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "December" msgid "December"
msgstr "" msgstr ""
@ -105,8 +106,8 @@ msgstr ""
msgid "No categories selected for deletion." msgid "No categories selected for deletion."
msgstr "" msgstr ""
#: js/oc-vcategories.js:68 js/share.js:114 js/share.js:121 js/share.js:494 #: js/oc-vcategories.js:68 js/share.js:114 js/share.js:121 js/share.js:497
#: js/share.js:506 #: js/share.js:509
msgid "Error" msgid "Error"
msgstr "" msgstr ""
@ -148,7 +149,7 @@ msgstr ""
#: js/share.js:147 templates/installation.php:30 templates/login.php:13 #: js/share.js:147 templates/installation.php:30 templates/login.php:13
msgid "Password" msgid "Password"
msgstr "" msgstr "وشەی تێپەربو"
#: js/share.js:152 #: js/share.js:152
msgid "Set expiration date" msgid "Set expiration date"
@ -206,15 +207,15 @@ msgstr ""
msgid "share" msgid "share"
msgstr "" msgstr ""
#: js/share.js:322 js/share.js:481 #: js/share.js:322 js/share.js:484
msgid "Password protected" msgid "Password protected"
msgstr "" msgstr ""
#: js/share.js:494 #: js/share.js:497
msgid "Error unsetting expiration date" msgid "Error unsetting expiration date"
msgstr "" msgstr ""
#: js/share.js:506 #: js/share.js:509
msgid "Error setting expiration date" msgid "Error setting expiration date"
msgstr "" msgstr ""
@ -257,11 +258,11 @@ msgstr ""
#: lostpassword/templates/resetpassword.php:8 #: lostpassword/templates/resetpassword.php:8
msgid "New password" msgid "New password"
msgstr "" msgstr "وشەی نهێنی نوێ"
#: lostpassword/templates/resetpassword.php:11 #: lostpassword/templates/resetpassword.php:11
msgid "Reset password" msgid "Reset password"
msgstr "" msgstr "دووباره‌ كردنه‌وه‌ی وشه‌ی نهێنی"
#: strings.php:5 #: strings.php:5
msgid "Personal" msgid "Personal"
@ -269,19 +270,19 @@ msgstr ""
#: strings.php:6 #: strings.php:6
msgid "Users" msgid "Users"
msgstr "" msgstr "به‌كارهێنه‌ر"
#: strings.php:7 #: strings.php:7
msgid "Apps" msgid "Apps"
msgstr "" msgstr "به‌رنامه‌كان"
#: strings.php:8 #: strings.php:8
msgid "Admin" msgid "Admin"
msgstr "" msgstr "به‌ڕێوه‌به‌ری سه‌ره‌كی"
#: strings.php:9 #: strings.php:9
msgid "Help" msgid "Help"
msgstr "" msgstr "یارمەتی"
#: templates/403.php:12 #: templates/403.php:12
msgid "Access forbidden" msgid "Access forbidden"
@ -289,7 +290,7 @@ msgstr ""
#: templates/404.php:12 #: templates/404.php:12
msgid "Cloud not found" msgid "Cloud not found"
msgstr "" msgstr "هیچ نه‌دۆزرایه‌وه‌"
#: templates/edit_categories_dialog.php:4 #: templates/edit_categories_dialog.php:4
msgid "Edit categories" msgid "Edit categories"
@ -305,11 +306,11 @@ msgstr ""
#: templates/installation.php:36 #: templates/installation.php:36
msgid "Advanced" msgid "Advanced"
msgstr "" msgstr "هه‌ڵبژاردنی پیشكه‌وتوو"
#: templates/installation.php:38 #: templates/installation.php:38
msgid "Data folder" msgid "Data folder"
msgstr "" msgstr "زانیاری فۆڵده‌ر"
#: templates/installation.php:45 #: templates/installation.php:45
msgid "Configure the database" msgid "Configure the database"
@ -322,15 +323,15 @@ msgstr ""
#: templates/installation.php:93 #: templates/installation.php:93
msgid "Database user" msgid "Database user"
msgstr "" msgstr "به‌كارهێنه‌ری داتابه‌یس"
#: templates/installation.php:97 #: templates/installation.php:97
msgid "Database password" msgid "Database password"
msgstr "" msgstr "وشه‌ی نهێنی داتا به‌یس"
#: templates/installation.php:101 #: templates/installation.php:101
msgid "Database name" msgid "Database name"
msgstr "" msgstr "ناوی داتابه‌یس"
#: templates/installation.php:109 #: templates/installation.php:109
msgid "Database tablespace" msgid "Database tablespace"
@ -338,11 +339,11 @@ msgstr ""
#: templates/installation.php:115 #: templates/installation.php:115
msgid "Database host" msgid "Database host"
msgstr "" msgstr "هۆستی داتابه‌یس"
#: templates/installation.php:120 #: templates/installation.php:120
msgid "Finish setup" msgid "Finish setup"
msgstr "" msgstr "كۆتایی هات ده‌ستكاریه‌كان"
#: templates/layout.guest.php:38 #: templates/layout.guest.php:38
msgid "web services under your control" msgid "web services under your control"
@ -350,7 +351,7 @@ msgstr ""
#: templates/layout.user.php:34 #: templates/layout.user.php:34
msgid "Log out" msgid "Log out"
msgstr "" msgstr "چوونەدەرەوە"
#: templates/login.php:6 #: templates/login.php:6
msgid "Lost your password?" msgid "Lost your password?"
@ -370,8 +371,8 @@ msgstr ""
#: templates/part.pagenavi.php:3 #: templates/part.pagenavi.php:3
msgid "prev" msgid "prev"
msgstr "" msgstr "پێشتر"
#: templates/part.pagenavi.php:20 #: templates/part.pagenavi.php:20
msgid "next" msgid "next"
msgstr "" msgstr "دواتر"

View File

@ -16,9 +16,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-09 02:03+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-10-09 00:03+0000\n" "PO-Revision-Date: 2012-10-10 06:42+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n" "Last-Translator: Cyryl Sochacki <cyrylsochacki@gmail.com>\n"
"Language-Team: Polish (http://www.transifex.com/projects/p/owncloud/language/pl/)\n" "Language-Team: Polish (http://www.transifex.com/projects/p/owncloud/language/pl/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -30,7 +30,7 @@ msgstr ""
msgid "Unable to load list from App Store" msgid "Unable to load list from App Store"
msgstr "Nie mogę załadować listy aplikacji" msgstr "Nie mogę załadować listy aplikacji"
#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18 #: ajax/creategroup.php:9 ajax/removeuser.php:18 ajax/setquota.php:18
#: ajax/togglegroups.php:15 #: ajax/togglegroups.php:15
msgid "Authentication error" msgid "Authentication error"
msgstr "Błąd uwierzytelniania" msgstr "Błąd uwierzytelniania"
@ -67,7 +67,7 @@ msgstr "Nieprawidłowe żądanie"
msgid "Unable to delete group" msgid "Unable to delete group"
msgstr "Nie można usunąć grupy" msgstr "Nie można usunąć grupy"
#: ajax/removeuser.php:22 #: ajax/removeuser.php:27
msgid "Unable to delete user" msgid "Unable to delete user"
msgstr "Nie można usunąć użytkownika" msgstr "Nie można usunąć użytkownika"
@ -194,7 +194,7 @@ msgstr "Dodaj aplikacje"
#: templates/apps.php:11 #: templates/apps.php:11
msgid "More Apps" msgid "More Apps"
msgstr "" msgstr "Więcej aplikacji"
#: templates/apps.php:27 #: templates/apps.php:27
msgid "Select an App" msgid "Select an App"

View File

@ -14,9 +14,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-09 02:03+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-10-09 00:03+0000\n" "PO-Revision-Date: 2012-10-10 03:46+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n" "Last-Translator: sedir <philippi.sedir@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/owncloud/language/pt_BR/)\n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/owncloud/language/pt_BR/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -28,7 +28,7 @@ msgstr ""
msgid "Unable to load list from App Store" msgid "Unable to load list from App Store"
msgstr "Não foi possivel carregar lista da App Store" msgstr "Não foi possivel carregar lista da App Store"
#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18 #: ajax/creategroup.php:9 ajax/removeuser.php:18 ajax/setquota.php:18
#: ajax/togglegroups.php:15 #: ajax/togglegroups.php:15
msgid "Authentication error" msgid "Authentication error"
msgstr "erro de autenticação" msgstr "erro de autenticação"
@ -65,7 +65,7 @@ msgstr "Pedido inválido"
msgid "Unable to delete group" msgid "Unable to delete group"
msgstr "Não foi possivel remover grupo" msgstr "Não foi possivel remover grupo"
#: ajax/removeuser.php:22 #: ajax/removeuser.php:27
msgid "Unable to delete user" msgid "Unable to delete user"
msgstr "Não foi possivel remover usuário" msgstr "Não foi possivel remover usuário"
@ -192,7 +192,7 @@ msgstr "Adicione seu Aplicativo"
#: templates/apps.php:11 #: templates/apps.php:11
msgid "More Apps" msgid "More Apps"
msgstr "" msgstr "Mais Apps"
#: templates/apps.php:27 #: templates/apps.php:27
msgid "Select an App" msgid "Select an App"

View File

@ -4,13 +4,14 @@
# #
# Translators: # Translators:
# Duarte Velez Grilo <duartegrilo@gmail.com>, 2012. # Duarte Velez Grilo <duartegrilo@gmail.com>, 2012.
# Helder Meneses <helder.meneses@gmail.com>, 2012.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-04 02:04+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-10-03 13:31+0000\n" "PO-Revision-Date: 2012-10-10 21:26+0000\n"
"Last-Translator: Duarte Velez Grilo <duartegrilo@gmail.com>\n" "Last-Translator: Helder Meneses <helder.meneses@gmail.com>\n"
"Language-Team: Portuguese (Portugal) (http://www.transifex.com/projects/p/owncloud/language/pt_PT/)\n" "Language-Team: Portuguese (Portugal) (http://www.transifex.com/projects/p/owncloud/language/pt_PT/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -33,7 +34,7 @@ msgstr ""
#: templates/settings.php:9 #: templates/settings.php:9
msgid "You can specify Base DN for users and groups in the Advanced tab" msgid "You can specify Base DN for users and groups in the Advanced tab"
msgstr "" msgstr "Pode especificar o ND Base para utilizadores e grupos no separador Avançado"
#: templates/settings.php:10 #: templates/settings.php:10
msgid "User DN" msgid "User DN"

View File

@ -8,9 +8,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-09-28 23:34+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-09-28 21:34+0000\n" "PO-Revision-Date: 2012-10-10 13:35+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n" "Last-Translator: AnnaSch <cdewqazxsqwe@gmail.com>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n" "Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -30,55 +30,55 @@ msgstr "Нет категории для добавления?"
msgid "This category already exists: " msgid "This category already exists: "
msgstr "Эта категория уже существует:" msgstr "Эта категория уже существует:"
#: js/js.js:213 templates/layout.user.php:49 templates/layout.user.php:50 #: js/js.js:229 templates/layout.user.php:49 templates/layout.user.php:50
msgid "Settings" msgid "Settings"
msgstr "Настройки" msgstr "Настройки"
#: js/js.js:645 #: js/js.js:661
msgid "January" msgid "January"
msgstr "Январь" msgstr "Январь"
#: js/js.js:645 #: js/js.js:661
msgid "February" msgid "February"
msgstr "Февраль" msgstr "Февраль"
#: js/js.js:645 #: js/js.js:661
msgid "March" msgid "March"
msgstr "Март" msgstr "Март"
#: js/js.js:645 #: js/js.js:661
msgid "April" msgid "April"
msgstr "Апрель" msgstr "Апрель"
#: js/js.js:645 #: js/js.js:661
msgid "May" msgid "May"
msgstr "Май" msgstr "Май"
#: js/js.js:645 #: js/js.js:661
msgid "June" msgid "June"
msgstr "Июнь" msgstr "Июнь"
#: js/js.js:646 #: js/js.js:662
msgid "July" msgid "July"
msgstr "Июль" msgstr "Июль"
#: js/js.js:646 #: js/js.js:662
msgid "August" msgid "August"
msgstr "Август" msgstr "Август"
#: js/js.js:646 #: js/js.js:662
msgid "September" msgid "September"
msgstr "Сентябрь" msgstr "Сентябрь"
#: js/js.js:646 #: js/js.js:662
msgid "October" msgid "October"
msgstr "Октябрь" msgstr "Октябрь"
#: js/js.js:646 #: js/js.js:662
msgid "November" msgid "November"
msgstr "Ноябрь" msgstr "Ноябрь"
#: js/js.js:646 #: js/js.js:662
msgid "December" msgid "December"
msgstr "Декабрь" msgstr "Декабрь"
@ -106,8 +106,8 @@ msgstr "Да"
msgid "No categories selected for deletion." msgid "No categories selected for deletion."
msgstr "Нет категорий, выбранных для удаления." msgstr "Нет категорий, выбранных для удаления."
#: js/oc-vcategories.js:68 js/share.js:114 js/share.js:121 js/share.js:489 #: js/oc-vcategories.js:68 js/share.js:114 js/share.js:121 js/share.js:497
#: js/share.js:501 #: js/share.js:509
msgid "Error" msgid "Error"
msgstr "Ошибка" msgstr "Ошибка"
@ -137,7 +137,7 @@ msgstr ""
#: js/share.js:137 #: js/share.js:137
msgid "Share with" msgid "Share with"
msgstr "" msgstr "Сделать общим с"
#: js/share.js:142 #: js/share.js:142
msgid "Share with link" msgid "Share with link"
@ -153,11 +153,11 @@ msgstr "Пароль"
#: js/share.js:152 #: js/share.js:152
msgid "Set expiration date" msgid "Set expiration date"
msgstr "" msgstr "Установить срок действия"
#: js/share.js:153 #: js/share.js:153
msgid "Expiration date" msgid "Expiration date"
msgstr "" msgstr "Дата истечения срока действия"
#: js/share.js:185 #: js/share.js:185
msgid "Share via email:" msgid "Share via email:"
@ -177,45 +177,45 @@ msgstr ""
#: js/share.js:250 #: js/share.js:250
msgid "with" msgid "with"
msgstr "" msgstr "с"
#: js/share.js:271 #: js/share.js:271
msgid "Unshare" msgid "Unshare"
msgstr "Отключить общий доступ" msgstr "Отключить общий доступ"
#: js/share.js:279 #: js/share.js:283
msgid "can edit" msgid "can edit"
msgstr "" msgstr ""
#: js/share.js:281 #: js/share.js:285
msgid "access control" msgid "access control"
msgstr "контроль доступа" msgstr "контроль доступа"
#: js/share.js:284 #: js/share.js:288
msgid "create" msgid "create"
msgstr "создать" msgstr "создать"
#: js/share.js:287 #: js/share.js:291
msgid "update" msgid "update"
msgstr "обновить" msgstr "обновить"
#: js/share.js:290 #: js/share.js:294
msgid "delete" msgid "delete"
msgstr "удалить" msgstr "удалить"
#: js/share.js:293 #: js/share.js:297
msgid "share" msgid "share"
msgstr "сделать общим" msgstr "сделать общим"
#: js/share.js:317 js/share.js:476 #: js/share.js:322 js/share.js:484
msgid "Password protected" msgid "Password protected"
msgstr "" msgstr "Пароль защищен"
#: js/share.js:489 #: js/share.js:497
msgid "Error unsetting expiration date" msgid "Error unsetting expiration date"
msgstr "" msgstr ""
#: js/share.js:501 #: js/share.js:509
msgid "Error setting expiration date" msgid "Error setting expiration date"
msgstr "" msgstr ""
@ -244,7 +244,7 @@ msgstr "Войти не удалось!"
msgid "Username" msgid "Username"
msgstr "Имя пользователя" msgstr "Имя пользователя"
#: lostpassword/templates/lostpassword.php:15 #: lostpassword/templates/lostpassword.php:14
msgid "Request reset" msgid "Request reset"
msgstr "Сброс запроса" msgstr "Сброс запроса"
@ -345,7 +345,7 @@ msgstr "Сервер базы данных"
msgid "Finish setup" msgid "Finish setup"
msgstr "Завершение настройки" msgstr "Завершение настройки"
#: templates/layout.guest.php:36 #: templates/layout.guest.php:38
msgid "web services under your control" msgid "web services under your control"
msgstr "веб-сервисы под Вашим контролем" msgstr "веб-сервисы под Вашим контролем"
@ -357,11 +357,11 @@ msgstr "Выйти"
msgid "Lost your password?" msgid "Lost your password?"
msgstr "Забыли пароль?" msgstr "Забыли пароль?"
#: templates/login.php:17 #: templates/login.php:16
msgid "remember" msgid "remember"
msgstr "запомнить" msgstr "запомнить"
#: templates/login.php:18 #: templates/login.php:17
msgid "Log in" msgid "Log in"
msgstr "Войти" msgstr "Войти"

View File

@ -8,9 +8,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-09-26 13:19+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-09-26 11:20+0000\n" "PO-Revision-Date: 2012-10-10 13:26+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n" "Last-Translator: AnnaSch <cdewqazxsqwe@gmail.com>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n" "Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -62,41 +62,41 @@ msgstr "Удалить"
#: js/fileactions.js:182 #: js/fileactions.js:182
msgid "Rename" msgid "Rename"
msgstr "" msgstr "Переименовать"
#: js/filelist.js:190 js/filelist.js:192 #: js/filelist.js:192 js/filelist.js:194
msgid "already exists" msgid "already exists"
msgstr "уже существует" msgstr "уже существует"
#: js/filelist.js:190 js/filelist.js:192 #: js/filelist.js:192 js/filelist.js:194
msgid "replace" msgid "replace"
msgstr "отмена" msgstr "отмена"
#: js/filelist.js:190 #: js/filelist.js:192
msgid "suggest name" msgid "suggest name"
msgstr "подобрать название" msgstr "подобрать название"
#: js/filelist.js:190 js/filelist.js:192 #: js/filelist.js:192 js/filelist.js:194
msgid "cancel" msgid "cancel"
msgstr "отменить" msgstr "отменить"
#: js/filelist.js:239 js/filelist.js:241 #: js/filelist.js:241 js/filelist.js:243
msgid "replaced" msgid "replaced"
msgstr "заменено" msgstr "заменено"
#: js/filelist.js:239 js/filelist.js:241 js/filelist.js:273 js/filelist.js:275 #: js/filelist.js:241 js/filelist.js:243 js/filelist.js:275 js/filelist.js:277
msgid "undo" msgid "undo"
msgstr "отменить действие" msgstr "отменить действие"
#: js/filelist.js:241 #: js/filelist.js:243
msgid "with" msgid "with"
msgstr "с" msgstr "с"
#: js/filelist.js:273 #: js/filelist.js:275
msgid "unshared" msgid "unshared"
msgstr "скрытый" msgstr "скрытый"
#: js/filelist.js:275 #: js/filelist.js:277
msgid "deleted" msgid "deleted"
msgstr "удалено" msgstr "удалено"
@ -104,114 +104,114 @@ msgstr "удалено"
msgid "generating ZIP-file, it may take some time." msgid "generating ZIP-file, it may take some time."
msgstr "Создание ZIP-файла, это может занять некоторое время." msgstr "Создание ZIP-файла, это может занять некоторое время."
#: js/files.js:208 #: js/files.js:214
msgid "Unable to upload your file as it is a directory or has 0 bytes" msgid "Unable to upload your file as it is a directory or has 0 bytes"
msgstr "Невозможно загрузить файл,\n так как он имеет нулевой размер или является директорией" msgstr "Невозможно загрузить файл,\n так как он имеет нулевой размер или является директорией"
#: js/files.js:208 #: js/files.js:214
msgid "Upload Error" msgid "Upload Error"
msgstr "Ошибка загрузки" msgstr "Ошибка загрузки"
#: js/files.js:236 js/files.js:341 js/files.js:371 #: js/files.js:242 js/files.js:347 js/files.js:377
msgid "Pending" msgid "Pending"
msgstr "Ожидающий решения" msgstr "Ожидающий решения"
#: js/files.js:256 #: js/files.js:262
msgid "1 file uploading" msgid "1 file uploading"
msgstr "" msgstr "загрузка 1 файла"
#: js/files.js:259 js/files.js:304 js/files.js:319 #: js/files.js:265 js/files.js:310 js/files.js:325
msgid "files uploading" msgid "files uploading"
msgstr "" msgstr "загрузка файлов"
#: js/files.js:322 js/files.js:355 #: js/files.js:328 js/files.js:361
msgid "Upload cancelled." msgid "Upload cancelled."
msgstr "Загрузка отменена" msgstr "Загрузка отменена"
#: js/files.js:424 #: js/files.js:430
msgid "" msgid ""
"File upload is in progress. Leaving the page now will cancel the upload." "File upload is in progress. Leaving the page now will cancel the upload."
msgstr "Процесс загрузки файла. Если покинуть страницу сейчас, загрузка будет отменена." msgstr "Процесс загрузки файла. Если покинуть страницу сейчас, загрузка будет отменена."
#: js/files.js:494 #: js/files.js:500
msgid "Invalid name, '/' is not allowed." msgid "Invalid name, '/' is not allowed."
msgstr "Неправильное имя, '/' не допускается." msgstr "Неправильное имя, '/' не допускается."
#: js/files.js:667 #: js/files.js:681
msgid "files scanned" msgid "files scanned"
msgstr "" msgstr "файлы отсканированы"
#: js/files.js:675 #: js/files.js:689
msgid "error while scanning" msgid "error while scanning"
msgstr "" msgstr "ошибка при сканировании"
#: js/files.js:748 templates/index.php:48 #: js/files.js:762 templates/index.php:48
msgid "Name" msgid "Name"
msgstr "Имя" msgstr "Имя"
#: js/files.js:749 templates/index.php:56 #: js/files.js:763 templates/index.php:56
msgid "Size" msgid "Size"
msgstr "Размер" msgstr "Размер"
#: js/files.js:750 templates/index.php:58 #: js/files.js:764 templates/index.php:58
msgid "Modified" msgid "Modified"
msgstr "Изменен" msgstr "Изменен"
#: js/files.js:777 #: js/files.js:791
msgid "folder" msgid "folder"
msgstr "папка" msgstr "папка"
#: js/files.js:779 #: js/files.js:793
msgid "folders" msgid "folders"
msgstr "папки" msgstr "папки"
#: js/files.js:787 #: js/files.js:801
msgid "file" msgid "file"
msgstr "файл" msgstr "файл"
#: js/files.js:789 #: js/files.js:803
msgid "files" msgid "files"
msgstr "файлы" msgstr "файлы"
#: js/files.js:833 #: js/files.js:847
msgid "seconds ago" msgid "seconds ago"
msgstr "" msgstr "секунд назад"
#: js/files.js:834 #: js/files.js:848
msgid "minute ago" msgid "minute ago"
msgstr "" msgstr "минуту назад"
#: js/files.js:835 #: js/files.js:849
msgid "minutes ago" msgid "minutes ago"
msgstr "" msgstr "минут назад"
#: js/files.js:838 #: js/files.js:852
msgid "today" msgid "today"
msgstr "" msgstr "сегодня"
#: js/files.js:839 #: js/files.js:853
msgid "yesterday" msgid "yesterday"
msgstr "" msgstr "вчера"
#: js/files.js:840 #: js/files.js:854
msgid "days ago" msgid "days ago"
msgstr "" msgstr "дней назад"
#: js/files.js:841 #: js/files.js:855
msgid "last month" msgid "last month"
msgstr "" msgstr "в прошлом месяце"
#: js/files.js:843 #: js/files.js:857
msgid "months ago" msgid "months ago"
msgstr "" msgstr "месяцев назад"
#: js/files.js:844 #: js/files.js:858
msgid "last year" msgid "last year"
msgstr "" msgstr "в прошлом году"
#: js/files.js:845 #: js/files.js:859
msgid "years ago" msgid "years ago"
msgstr "" msgstr "лет назад"
#: templates/admin.php:5 #: templates/admin.php:5
msgid "File handling" msgid "File handling"

View File

@ -8,9 +8,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-02 23:16+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-10-02 21:17+0000\n" "PO-Revision-Date: 2012-10-10 12:39+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n" "Last-Translator: AnnaSch <cdewqazxsqwe@gmail.com>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n" "Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -20,19 +20,19 @@ msgstr ""
#: js/dropbox.js:7 js/dropbox.js:25 js/google.js:7 js/google.js:23 #: js/dropbox.js:7 js/dropbox.js:25 js/google.js:7 js/google.js:23
msgid "Access granted" msgid "Access granted"
msgstr "" msgstr "Доступ разрешен"
#: js/dropbox.js:28 js/dropbox.js:74 js/dropbox.js:79 js/dropbox.js:86 #: js/dropbox.js:28 js/dropbox.js:74 js/dropbox.js:79 js/dropbox.js:86
msgid "Error configuring Dropbox storage" msgid "Error configuring Dropbox storage"
msgstr "" msgstr "Ошибка при конфигурировании хранилища Dropbox"
#: js/dropbox.js:34 js/dropbox.js:45 js/google.js:31 js/google.js:40 #: js/dropbox.js:34 js/dropbox.js:45 js/google.js:31 js/google.js:40
msgid "Grant access" msgid "Grant access"
msgstr "" msgstr "Предоставить доступ"
#: js/dropbox.js:73 js/google.js:72 #: js/dropbox.js:73 js/google.js:72
msgid "Fill out all required fields" msgid "Fill out all required fields"
msgstr "" msgstr "Заполните все требуемые поля"
#: js/dropbox.js:85 #: js/dropbox.js:85
msgid "Please provide a valid Dropbox app key and secret." msgid "Please provide a valid Dropbox app key and secret."

View File

@ -8,9 +8,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-09-22 01:14+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-09-21 23:15+0000\n" "PO-Revision-Date: 2012-10-10 13:22+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n" "Last-Translator: AnnaSch <cdewqazxsqwe@gmail.com>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n" "Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -20,11 +20,11 @@ msgstr ""
#: js/settings-personal.js:31 templates/settings-personal.php:10 #: js/settings-personal.js:31 templates/settings-personal.php:10
msgid "Expire all versions" msgid "Expire all versions"
msgstr "" msgstr "Срок действия всех версий истекает"
#: js/versions.js:16 #: js/versions.js:16
msgid "History" msgid "History"
msgstr "" msgstr "История"
#: templates/settings-personal.php:4 #: templates/settings-personal.php:4
msgid "Versions" msgid "Versions"

View File

@ -8,9 +8,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-09 02:03+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-10-09 00:04+0000\n" "PO-Revision-Date: 2012-10-10 13:52+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n" "Last-Translator: AnnaSch <cdewqazxsqwe@gmail.com>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n" "Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -22,7 +22,7 @@ msgstr ""
msgid "Unable to load list from App Store" msgid "Unable to load list from App Store"
msgstr "Невозможно загрузить список из App Store" msgstr "Невозможно загрузить список из App Store"
#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18 #: ajax/creategroup.php:9 ajax/removeuser.php:18 ajax/setquota.php:18
#: ajax/togglegroups.php:15 #: ajax/togglegroups.php:15
msgid "Authentication error" msgid "Authentication error"
msgstr "Ошибка авторизации" msgstr "Ошибка авторизации"
@ -59,7 +59,7 @@ msgstr "Неверный запрос"
msgid "Unable to delete group" msgid "Unable to delete group"
msgstr "Невозможно удалить группу" msgstr "Невозможно удалить группу"
#: ajax/removeuser.php:22 #: ajax/removeuser.php:27
msgid "Unable to delete user" msgid "Unable to delete user"
msgstr "Невозможно удалить пользователя" msgstr "Невозможно удалить пользователя"
@ -186,7 +186,7 @@ msgstr "Добавить Ваше приложение"
#: templates/apps.php:11 #: templates/apps.php:11
msgid "More Apps" msgid "More Apps"
msgstr "" msgstr "Больше приложений"
#: templates/apps.php:27 #: templates/apps.php:27
msgid "Select an App" msgid "Select an App"
@ -227,7 +227,7 @@ msgstr "Ответ"
#: templates/personal.php:8 #: templates/personal.php:8
#, php-format #, php-format
msgid "You have used <strong>%s</strong> of the available <strong>%s<strong>" msgid "You have used <strong>%s</strong> of the available <strong>%s<strong>"
msgstr "" msgstr "Вы использовали <strong>%s</strong> из доступных<strong>%s<strong>"
#: templates/personal.php:12 #: templates/personal.php:12
msgid "Desktop and Mobile Syncing Clients" msgid "Desktop and Mobile Syncing Clients"
@ -239,7 +239,7 @@ msgstr "Загрузка"
#: templates/personal.php:19 #: templates/personal.php:19
msgid "Your password was changed" msgid "Your password was changed"
msgstr "" msgstr "Ваш пароль был изменен"
#: templates/personal.php:20 #: templates/personal.php:20
msgid "Unable to change your password" msgid "Unable to change your password"

View File

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ownCloud\n" "Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n" "Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-10 02:04+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-10-09 13:45+0000\n" "PO-Revision-Date: 2012-10-10 12:58+0000\n"
"Last-Translator: AnnaSch <cdewqazxsqwe@gmail.com>\n" "Last-Translator: AnnaSch <cdewqazxsqwe@gmail.com>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n" "Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/owncloud/language/ru_RU/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -158,7 +158,7 @@ msgstr "в байтах"
#: templates/settings.php:29 #: templates/settings.php:29
msgid "in seconds. A change empties the cache." msgid "in seconds. A change empties the cache."
msgstr "" msgstr "в секундах. Изменение очищает кэш."
#: templates/settings.php:30 #: templates/settings.php:30
msgid "" msgid ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-10 02:04+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -29,55 +29,55 @@ msgstr ""
msgid "This category already exists: " msgid "This category already exists: "
msgstr "" msgstr ""
#: js/js.js:213 templates/layout.user.php:49 templates/layout.user.php:50 #: js/js.js:229 templates/layout.user.php:49 templates/layout.user.php:50
msgid "Settings" msgid "Settings"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "January" msgid "January"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "February" msgid "February"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "March" msgid "March"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "April" msgid "April"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "May" msgid "May"
msgstr "" msgstr ""
#: js/js.js:645 #: js/js.js:661
msgid "June" msgid "June"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "July" msgid "July"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "August" msgid "August"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "September" msgid "September"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "October" msgid "October"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "November" msgid "November"
msgstr "" msgstr ""
#: js/js.js:646 #: js/js.js:662
msgid "December" msgid "December"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-10 02:04+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-10 02:04+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-10 02:04+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-10 02:04+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-10 02:04+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-10 02:05+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-10 02:05+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,7 +21,7 @@ msgstr ""
msgid "Unable to load list from App Store" msgid "Unable to load list from App Store"
msgstr "" msgstr ""
#: ajax/creategroup.php:9 ajax/removeuser.php:13 ajax/setquota.php:18 #: ajax/creategroup.php:9 ajax/removeuser.php:18 ajax/setquota.php:18
#: ajax/togglegroups.php:15 #: ajax/togglegroups.php:15
msgid "Authentication error" msgid "Authentication error"
msgstr "" msgstr ""
@ -58,7 +58,7 @@ msgstr ""
msgid "Unable to delete group" msgid "Unable to delete group"
msgstr "" msgstr ""
#: ajax/removeuser.php:22 #: ajax/removeuser.php:27
msgid "Unable to delete user" msgid "Unable to delete user"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-10 02:04+0200\n" "POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -72,11 +72,14 @@ class OC{
*/ */
public static function autoload($className) { public static function autoload($className) {
if(array_key_exists($className, OC::$CLASSPATH)) { if(array_key_exists($className, OC::$CLASSPATH)) {
$path = OC::$CLASSPATH[$className];
/** @TODO: Remove this when necessary /** @TODO: Remove this when necessary
Remove "apps/" from inclusion path for smooth migration to mutli app dir Remove "apps/" from inclusion path for smooth migration to mutli app dir
*/ */
$path = str_replace('apps/', '', OC::$CLASSPATH[$className]); if (strpos($path, 'apps/')===0) {
require_once $path; OC_Log::write('core', 'include path for class "'.$className.'" starts with "apps/"', OC_Log::DEBUG);
$path = str_replace('apps/', '', $path);
}
} }
elseif(strpos($className, 'OC_')===0) { elseif(strpos($className, 'OC_')===0) {
$path = strtolower(str_replace('_', '/', substr($className, 3)) . '.php'); $path = strtolower(str_replace('_', '/', substr($className, 3)) . '.php');
@ -110,7 +113,7 @@ class OC{
public static function initPaths() { public static function initPaths() {
// calculate the root directories // calculate the root directories
OC::$SERVERROOT=str_replace("\\", '/', substr(__FILE__, 0, -13)); OC::$SERVERROOT=str_replace("\\", '/', substr(__DIR__, 0, -4));
OC::$SUBURI= str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen(OC::$SERVERROOT))); OC::$SUBURI= str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen(OC::$SERVERROOT)));
$scriptName=$_SERVER["SCRIPT_NAME"]; $scriptName=$_SERVER["SCRIPT_NAME"];
if(substr($scriptName, -1)=='/') { if(substr($scriptName, -1)=='/') {
@ -199,6 +202,7 @@ class OC{
public static function checkSSL() { public static function checkSSL() {
// redirect to https site if configured // redirect to https site if configured
if( OC_Config::getValue( "forcessl", false )) { if( OC_Config::getValue( "forcessl", false )) {
header('Strict-Transport-Security: max-age=31536000');
ini_set("session.cookie_secure", "on"); ini_set("session.cookie_secure", "on");
if(OC_Request::serverProtocol()<>'https' and !OC::$CLI) { if(OC_Request::serverProtocol()<>'https' and !OC::$CLI) {
$url = "https://". OC_Request::serverHost() . $_SERVER['REQUEST_URI']; $url = "https://". OC_Request::serverHost() . $_SERVER['REQUEST_URI'];

View File

@ -661,7 +661,7 @@ class OC_Helper {
$length = mb_strlen($search, $encoding); $length = mb_strlen($search, $encoding);
while(($i = mb_strrpos($subject, $search, $offset, $encoding)) !== false ) { while(($i = mb_strrpos($subject, $search, $offset, $encoding)) !== false ) {
$subject = OC_Helper::mb_substr_replace($subject, $replace, $i, $length); $subject = OC_Helper::mb_substr_replace($subject, $replace, $i, $length);
$offset = $i - mb_strlen($subject, $encoding) - 1; $offset = $i - mb_strlen($subject, $encoding);
$count++; $count++;
} }
return $subject; return $subject;

View File

@ -94,4 +94,5 @@ return array(
'sgf' => 'application/sgf', 'sgf' => 'application/sgf',
'cdr' => 'application/coreldraw', 'cdr' => 'application/coreldraw',
'impress' => 'text/impress', 'impress' => 'text/impress',
'ai' => 'application/illustrator',
); );

View File

@ -159,9 +159,11 @@ class OC_Template{
$this->vars['requestlifespan'] = OC_Util::$callLifespan; $this->vars['requestlifespan'] = OC_Util::$callLifespan;
$parts = explode('/', $app); // fix translation when app is something like core/lostpassword $parts = explode('/', $app); // fix translation when app is something like core/lostpassword
$this->l10n = OC_L10N::get($parts[0]); $this->l10n = OC_L10N::get($parts[0]);
header('X-Frame-Options: Sameorigin');
header('X-XSS-Protection: 1; mode=block'); // Some headers to enhance security
header('X-Content-Type-Options: nosniff'); header('X-Frame-Options: Sameorigin');
header('X-XSS-Protection: 1; mode=block');
header('X-Content-Type-Options: nosniff');
$this->findTemplate($name); $this->findTemplate($name);
} }

View File

@ -12,8 +12,7 @@ class OC_TemplateLayout extends OC_Template {
if( $renderas == 'user' ) { if( $renderas == 'user' ) {
parent::__construct( 'core', 'layout.user' ); parent::__construct( 'core', 'layout.user' );
$this->assign('searchurl',OC_Helper::linkTo( 'search', 'index.php' ), false); if(in_array(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false) {
if(array_search(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false) {
$this->assign('bodyid','body-settings', false); $this->assign('bodyid','body-settings', false);
}else{ }else{
$this->assign('bodyid','body-user', false); $this->assign('bodyid','body-user', false);

View File

@ -82,7 +82,7 @@ class OC_Util {
* @return string * @return string
*/ */
public static function getVersionString() { public static function getVersionString() {
return '4.5'; return '5.0 pre alpha';
} }
/** /**

View File

@ -1,51 +0,0 @@
<?php
/**
* ownCloud - ajax frontend
*
* @author Robin Appelman
* @copyright 2010 Robin Appelman icewind1991@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
// Init owncloud
require_once '../lib/base.php';
// Check if we are a user
OC_Util::checkLoggedIn();
// Load the files we need
OC_Util::addStyle( 'search', 'search' );
$query=(isset($_POST['query']))?$_POST['query']:'';
if($query) {
$results=OC_Search::search($query);
}else{
OC_Util::redirectToDefaultPage();
}
$resultTypes=array();
foreach($results as $result) {
if(!isset($resultTypes[$result->type])) {
$resultTypes[$result->type]=array();
}
$resultTypes[$result->type][]=$result;
}
$tmpl = new OC_Template( 'search', 'index', 'user' );
$tmpl->assign('resultTypes', $resultTypes);
$tmpl->printPage();

View File

@ -1,17 +0,0 @@
<ul id='searchresults'>
<?php foreach($_['resultTypes'] as $resultType):?>
<li class='resultHeader'>
<p><?php echo $resultType[0]->type?></p>
</li>
<?php foreach($resultType as $result):?>
<li class='result'>
<p>
<a href='<?php echo $result->link?>' title='<?php echo $result->name?>'><?php echo $result->name?></a>
</p>
<p>
<?php echo $result->text?>
</p>
</li>
<?php endforeach;?>
<?php endforeach;?>
</ul>

View File

@ -8,6 +8,11 @@ OCP\JSON::callCheck();
$username = $_POST["username"]; $username = $_POST["username"];
// A user shouldn't be able to delete his own account
if(OC_User::getUser() === $username) {
exit;
}
if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) { if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) {
$l = OC_L10N::get('core'); $l = OC_L10N::get('core');
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));

View File

@ -36,6 +36,7 @@
"More" => "Más", "More" => "Más",
"Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." => "Desarrollado por la <a href=\"http://ownCloud.org/contact\" target=\"_blank\">comunidad ownCloud</a>, el <a href=\"https://github.com/owncloud\" target=\"_blank\">código fuente</a> está bajo licencia <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.", "Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." => "Desarrollado por la <a href=\"http://ownCloud.org/contact\" target=\"_blank\">comunidad ownCloud</a>, el <a href=\"https://github.com/owncloud\" target=\"_blank\">código fuente</a> está bajo licencia <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.",
"Add your App" => "Añadí tu aplicación", "Add your App" => "Añadí tu aplicación",
"More Apps" => "Más aplicaciones",
"Select an App" => "Seleccionar una aplicación", "Select an App" => "Seleccionar una aplicación",
"See application page at apps.owncloud.com" => "Mirá la web de aplicaciones apps.owncloud.com", "See application page at apps.owncloud.com" => "Mirá la web de aplicaciones apps.owncloud.com",
"<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>" => "<span class=\"licence\"></span>-licenciado por <span class=\"author\">", "<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>" => "<span class=\"licence\"></span>-licenciado por <span class=\"author\">",

View File

@ -36,6 +36,7 @@
"More" => "Więcej", "More" => "Więcej",
"Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." => "Stwirzone przez <a href=\"http://ownCloud.org/contact\" target=\"_blank\"> społeczność ownCloud</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">kod źródłowy</a> na licencji <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.", "Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." => "Stwirzone przez <a href=\"http://ownCloud.org/contact\" target=\"_blank\"> społeczność ownCloud</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">kod źródłowy</a> na licencji <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.",
"Add your App" => "Dodaj aplikacje", "Add your App" => "Dodaj aplikacje",
"More Apps" => "Więcej aplikacji",
"Select an App" => "Zaznacz aplikacje", "Select an App" => "Zaznacz aplikacje",
"See application page at apps.owncloud.com" => "Zobacz stronę aplikacji na apps.owncloud.com", "See application page at apps.owncloud.com" => "Zobacz stronę aplikacji na apps.owncloud.com",
"<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>" => "<span class=\"licence\"></span>-licencjonowane przez <span class=\"author\"></span>", "<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>" => "<span class=\"licence\"></span>-licencjonowane przez <span class=\"author\"></span>",

View File

@ -36,6 +36,7 @@
"More" => "Mais", "More" => "Mais",
"Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." => "Desenvolvido pela <a href=\"http://ownCloud.org/contact\" target=\"_blank\">comunidade ownCloud</a>, o <a href=\"https://github.com/owncloud\" target=\"_blank\">código fonte</a> está licenciado sob <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.", "Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." => "Desenvolvido pela <a href=\"http://ownCloud.org/contact\" target=\"_blank\">comunidade ownCloud</a>, o <a href=\"https://github.com/owncloud\" target=\"_blank\">código fonte</a> está licenciado sob <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.",
"Add your App" => "Adicione seu Aplicativo", "Add your App" => "Adicione seu Aplicativo",
"More Apps" => "Mais Apps",
"Select an App" => "Selecione uma Aplicação", "Select an App" => "Selecione uma Aplicação",
"See application page at apps.owncloud.com" => "Ver página do aplicativo em apps.owncloud.com", "See application page at apps.owncloud.com" => "Ver página do aplicativo em apps.owncloud.com",
"<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>" => "<span class=\"licence\"></span>-licenciado por <span class=\"author\"></span>", "<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>" => "<span class=\"licence\"></span>-licenciado por <span class=\"author\"></span>",

View File

@ -34,6 +34,7 @@
"More" => "Подробнее", "More" => "Подробнее",
"Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." => "Разработанный <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.", "Developed by the <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>." => "Разработанный <a href=\"http://ownCloud.org/contact\" target=\"_blank\">ownCloud community</a>, the <a href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" target=\"_blank\"><abbr title=\"Affero General Public License\">AGPL</abbr></a>.",
"Add your App" => "Добавить Ваше приложение", "Add your App" => "Добавить Ваше приложение",
"More Apps" => "Больше приложений",
"Select an App" => "Выбрать приложение", "Select an App" => "Выбрать приложение",
"See application page at apps.owncloud.com" => "Обратитесь к странице приложений на apps.owncloud.com", "See application page at apps.owncloud.com" => "Обратитесь к странице приложений на apps.owncloud.com",
"<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>" => "<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>", "<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>" => "<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>",
@ -43,8 +44,10 @@
"Problems connecting to help database." => "Проблемы, связанные с разделом Помощь базы данных", "Problems connecting to help database." => "Проблемы, связанные с разделом Помощь базы данных",
"Go there manually." => "Сделать вручную.", "Go there manually." => "Сделать вручную.",
"Answer" => "Ответ", "Answer" => "Ответ",
"You have used <strong>%s</strong> of the available <strong>%s<strong>" => "Вы использовали <strong>%s</strong> из доступных<strong>%s<strong>",
"Desktop and Mobile Syncing Clients" => "Клиенты синхронизации настольной и мобильной систем", "Desktop and Mobile Syncing Clients" => "Клиенты синхронизации настольной и мобильной систем",
"Download" => "Загрузка", "Download" => "Загрузка",
"Your password was changed" => "Ваш пароль был изменен",
"Unable to change your password" => "Невозможно изменить Ваш пароль", "Unable to change your password" => "Невозможно изменить Ваш пароль",
"Current password" => "Текущий пароль", "Current password" => "Текущий пароль",
"New password" => "Новый пароль", "New password" => "Новый пароль",

View File

@ -1,24 +1,24 @@
<?php <?php
/** /**
* ownCloud * ownCloud
* *
* @author Robin Appelman * @author Robin Appelman
* @copyright 2012 Robin Appelman icewind@owncloud.com * @copyright 2012 Robin Appelman icewind@owncloud.com
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * 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. * version 3 of the License, or any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
* *
* You should have received a copy of the GNU Affero General Public * You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
namespace Test\Files\Storage; namespace Test\Files\Storage;
@ -32,14 +32,14 @@ abstract class Storage extends \UnitTestCase {
* the root folder of the storage should always exist, be readable and be recognized as a directory * the root folder of the storage should always exist, be readable and be recognized as a directory
*/ */
public function testRoot() { public function testRoot() {
$this->assertTrue($this->instance->file_exists('/'),'Root folder does not exist'); $this->assertTrue($this->instance->file_exists('/'), 'Root folder does not exist');
$this->assertTrue($this->instance->isReadable('/'),'Root folder is not readable'); $this->assertTrue($this->instance->isReadable('/'), 'Root folder is not readable');
$this->assertTrue($this->instance->is_dir('/'),'Root folder is not a directory'); $this->assertTrue($this->instance->is_dir('/'), 'Root folder is not a directory');
$this->assertFalse($this->instance->is_file('/'),'Root folder is a file'); $this->assertFalse($this->instance->is_file('/'), 'Root folder is a file');
$this->assertEqual('dir',$this->instance->filetype('/')); $this->assertEqual('dir', $this->instance->filetype('/'));
//without this, any further testing would be useless, not an acutal requirement for filestorage though //without this, any further testing would be useless, not an actual requirement for filestorage though
$this->assertTrue($this->instance->isUpdatable('/'),'Root folder is not writable'); $this->assertTrue($this->instance->isUpdatable('/'), 'Root folder is not writable');
} }
public function testDirectories() { public function testDirectories() {
@ -50,176 +50,187 @@ abstract class Storage extends \UnitTestCase {
$this->assertTrue($this->instance->file_exists('/folder')); $this->assertTrue($this->instance->file_exists('/folder'));
$this->assertTrue($this->instance->is_dir('/folder')); $this->assertTrue($this->instance->is_dir('/folder'));
$this->assertFalse($this->instance->is_file('/folder')); $this->assertFalse($this->instance->is_file('/folder'));
$this->assertEqual('dir',$this->instance->filetype('/folder')); $this->assertEqual('dir', $this->instance->filetype('/folder'));
$this->assertEqual(0,$this->instance->filesize('/folder')); $this->assertEqual(0, $this->instance->filesize('/folder'));
$this->assertTrue($this->instance->isReadable('/folder')); $this->assertTrue($this->instance->isReadable('/folder'));
$this->assertTrue($this->instance->isUpdatable('/folder')); $this->assertTrue($this->instance->isUpdatable('/folder'));
$dh=$this->instance->opendir('/'); $dh = $this->instance->opendir('/');
$content=array(); $content = array();
while($file=readdir($dh)) { while ($file = readdir($dh)) {
if($file!='.' and $file!='..') { if ($file != '.' and $file != '..') {
$content[]=$file; $content[] = $file;
} }
} }
$this->assertEqual(array('folder'),$content); $this->assertEqual(array('folder'), $content);
$this->assertFalse($this->instance->mkdir('/folder'));//cant create existing folders $this->assertFalse($this->instance->mkdir('/folder')); //cant create existing folders
$this->assertTrue($this->instance->rmdir('/folder')); $this->assertTrue($this->instance->rmdir('/folder'));
$this->assertFalse($this->instance->file_exists('/folder')); $this->assertFalse($this->instance->file_exists('/folder'));
$this->assertFalse($this->instance->rmdir('/folder'));//cant remove non existing folders $this->assertFalse($this->instance->rmdir('/folder')); //cant remove non existing folders
$dh=$this->instance->opendir('/'); $dh = $this->instance->opendir('/');
$content=array(); $content = array();
while($file=readdir($dh)) { while ($file = readdir($dh)) {
if($file!='.' and $file!='..') { if ($file != '.' and $file != '..') {
$content[]=$file; $content[] = $file;
} }
} }
$this->assertEqual(array(),$content); $this->assertEqual(array(), $content);
} }
/** /**
* test the various uses of file_get_contents and file_put_contents * test the various uses of file_get_contents and file_put_contents
*/ */
public function testGetPutContents() { public function testGetPutContents() {
$sourceFile=\OC::$SERVERROOT.'/tests/data/lorem.txt'; $sourceFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$sourceText=file_get_contents($sourceFile); $sourceText = file_get_contents($sourceFile);
//fill a file with string data //fill a file with string data
$this->instance->file_put_contents('/lorem.txt',$sourceText); $this->instance->file_put_contents('/lorem.txt', $sourceText);
$this->assertFalse($this->instance->is_dir('/lorem.txt')); $this->assertFalse($this->instance->is_dir('/lorem.txt'));
$this->assertEqual($sourceText,$this->instance->file_get_contents('/lorem.txt'),'data returned from file_get_contents is not equal to the source data'); $this->assertEqual($sourceText, $this->instance->file_get_contents('/lorem.txt'), 'data returned from file_get_contents is not equal to the source data');
//empty the file //empty the file
$this->instance->file_put_contents('/lorem.txt',''); $this->instance->file_put_contents('/lorem.txt', '');
$this->assertEqual('',$this->instance->file_get_contents('/lorem.txt'),'file not emptied'); $this->assertEqual('', $this->instance->file_get_contents('/lorem.txt'), 'file not emptied');
} }
/** /**
* test various known mimetypes * test various known mimetypes
*/ */
public function testMimeType() { public function testMimeType() {
$this->assertEqual('httpd/unix-directory',$this->instance->getMimeType('/')); $this->assertEqual('httpd/unix-directory', $this->instance->getMimeType('/'));
$this->assertEqual(false,$this->instance->getMimeType('/non/existing/file')); $this->assertEqual(false, $this->instance->getMimeType('/non/existing/file'));
$textFile=\OC::$SERVERROOT.'/tests/data/lorem.txt'; $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile,'r')); $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile, 'r'));
$this->assertEqual('text/plain',$this->instance->getMimeType('/lorem.txt')); $this->assertEqual('text/plain', $this->instance->getMimeType('/lorem.txt'));
$pngFile=\OC::$SERVERROOT.'/tests/data/logo-wide.png'; $pngFile = \OC::$SERVERROOT . '/tests/data/logo-wide.png';
$this->instance->file_put_contents('/logo-wide.png',file_get_contents($pngFile,'r')); $this->instance->file_put_contents('/logo-wide.png', file_get_contents($pngFile, 'r'));
$this->assertEqual('image/png',$this->instance->getMimeType('/logo-wide.png')); $this->assertEqual('image/png', $this->instance->getMimeType('/logo-wide.png'));
$svgFile=\OC::$SERVERROOT.'/tests/data/logo-wide.svg'; $svgFile = \OC::$SERVERROOT . '/tests/data/logo-wide.svg';
$this->instance->file_put_contents('/logo-wide.svg',file_get_contents($svgFile,'r')); $this->instance->file_put_contents('/logo-wide.svg', file_get_contents($svgFile, 'r'));
$this->assertEqual('image/svg+xml',$this->instance->getMimeType('/logo-wide.svg')); $this->assertEqual('image/svg+xml', $this->instance->getMimeType('/logo-wide.svg'));
} }
public function testCopyAndMove() { public function testCopyAndMove() {
$textFile=\OC::$SERVERROOT.'/tests/data/lorem.txt'; $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$this->instance->file_put_contents('/source.txt',file_get_contents($textFile)); $this->instance->file_put_contents('/source.txt', file_get_contents($textFile));
$this->instance->copy('/source.txt','/target.txt'); $this->instance->copy('/source.txt', '/target.txt');
$this->assertTrue($this->instance->file_exists('/target.txt')); $this->assertTrue($this->instance->file_exists('/target.txt'));
$this->assertEqual($this->instance->file_get_contents('/source.txt'),$this->instance->file_get_contents('/target.txt')); $this->assertEqual($this->instance->file_get_contents('/source.txt'), $this->instance->file_get_contents('/target.txt'));
$this->instance->rename('/source.txt','/target2.txt'); $this->instance->rename('/source.txt', '/target2.txt');
$this->assertTrue($this->instance->file_exists('/target2.txt')); $this->assertTrue($this->instance->file_exists('/target2.txt'));
$this->assertFalse($this->instance->file_exists('/source.txt')); $this->assertFalse($this->instance->file_exists('/source.txt'));
$this->assertEqual(file_get_contents($textFile),$this->instance->file_get_contents('/target.txt')); $this->assertEqual(file_get_contents($textFile), $this->instance->file_get_contents('/target.txt'));
} }
public function testLocal() { public function testLocal() {
$textFile=\OC::$SERVERROOT.'/tests/data/lorem.txt'; $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile)); $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile));
$localFile=$this->instance->getLocalFile('/lorem.txt'); $localFile = $this->instance->getLocalFile('/lorem.txt');
$this->assertTrue(file_exists($localFile)); $this->assertTrue(file_exists($localFile));
$this->assertEqual(file_get_contents($localFile),file_get_contents($textFile)); $this->assertEqual(file_get_contents($localFile), file_get_contents($textFile));
$this->instance->mkdir('/folder'); $this->instance->mkdir('/folder');
$this->instance->file_put_contents('/folder/lorem.txt',file_get_contents($textFile)); $this->instance->file_put_contents('/folder/lorem.txt', file_get_contents($textFile));
$this->instance->file_put_contents('/folder/bar.txt','asd'); $this->instance->file_put_contents('/folder/bar.txt', 'asd');
$this->instance->mkdir('/folder/recursive'); $this->instance->mkdir('/folder/recursive');
$this->instance->file_put_contents('/folder/recursive/file.txt','foo'); $this->instance->file_put_contents('/folder/recursive/file.txt', 'foo');
$localFolder=$this->instance->getLocalFolder('/folder'); $localFolder = $this->instance->getLocalFolder('/folder');
$this->assertTrue(is_dir($localFolder)); $this->assertTrue(is_dir($localFolder));
$this->assertTrue(file_exists($localFolder.'/lorem.txt')); $this->assertTrue(file_exists($localFolder . '/lorem.txt'));
$this->assertEqual(file_get_contents($localFolder.'/lorem.txt'),file_get_contents($textFile)); $this->assertEqual(file_get_contents($localFolder . '/lorem.txt'), file_get_contents($textFile));
$this->assertEqual(file_get_contents($localFolder.'/bar.txt'),'asd'); $this->assertEqual(file_get_contents($localFolder . '/bar.txt'), 'asd');
$this->assertEqual(file_get_contents($localFolder.'/recursive/file.txt'),'foo'); $this->assertEqual(file_get_contents($localFolder . '/recursive/file.txt'), 'foo');
} }
public function testStat() { public function testStat() {
$textFile=\OC::$SERVERROOT.'/tests/data/lorem.txt'; $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$ctimeStart=time(); $ctimeStart = time();
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile)); $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile));
$this->assertTrue($this->instance->isReadable('/lorem.txt')); $this->assertTrue($this->instance->isReadable('/lorem.txt'));
$ctimeEnd=time(); $ctimeEnd = time();
$cTime=$this->instance->filectime('/lorem.txt'); $mTime = $this->instance->filemtime('/lorem.txt');
$mTime=$this->instance->filemtime('/lorem.txt'); $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $ctimeStart - 1));
if($cTime!=-1) {//not everything can support ctime $this->assertTrue($this->instance->hasUpdated('/', $ctimeStart - 1));
$this->assertTrue(($ctimeStart-1)<=$cTime);
$this->assertTrue($cTime<=($ctimeEnd+1));
}
$this->assertTrue($this->instance->hasUpdated('/lorem.txt',$ctimeStart-1));
$this->assertTrue($this->instance->hasUpdated('/',$ctimeStart-1));
$this->assertTrue(($ctimeStart-1)<=$mTime); $this->assertTrue(($ctimeStart - 1) <= $mTime);
$this->assertTrue($mTime<=($ctimeEnd+1)); $this->assertTrue($mTime <= ($ctimeEnd + 1));
$this->assertEqual(filesize($textFile),$this->instance->filesize('/lorem.txt')); $this->assertEqual(filesize($textFile), $this->instance->filesize('/lorem.txt'));
$stat=$this->instance->stat('/lorem.txt'); $stat = $this->instance->stat('/lorem.txt');
//only size, mtime and ctime are requered in the result //only size and mtime are required in the result
$this->assertEqual($stat['size'],$this->instance->filesize('/lorem.txt')); $this->assertEqual($stat['size'], $this->instance->filesize('/lorem.txt'));
$this->assertEqual($stat['mtime'],$mTime); $this->assertEqual($stat['mtime'], $mTime);
$this->assertEqual($stat['ctime'],$cTime);
$mtimeStart=time(); $mtimeStart = time();
$supportsTouch = $this->instance->touch('/lorem.txt'); $supportsTouch = $this->instance->touch('/lorem.txt');
$mtimeEnd=time(); $mtimeEnd = time();
if($supportsTouch !== false){ if ($supportsTouch !== false) {
$originalCTime=$cTime; $mTime = $this->instance->filemtime('/lorem.txt');
$cTime=$this->instance->filectime('/lorem.txt'); $this->assertTrue(($mtimeStart - 1) <= $mTime);
$mTime=$this->instance->filemtime('/lorem.txt'); $this->assertTrue($mTime <= ($mtimeEnd + 1));
$this->assertTrue(($mtimeStart-1)<=$mTime);
$this->assertTrue($mTime<=($mtimeEnd+1));
$this->assertEqual($cTime,$originalCTime);
$this->assertTrue($this->instance->hasUpdated('/lorem.txt',$mtimeStart-1)); $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $mtimeStart - 1));
if($this->instance->touch('/lorem.txt',100)!==false) { if ($this->instance->touch('/lorem.txt', 100) !== false) {
$mTime=$this->instance->filemtime('/lorem.txt'); $mTime = $this->instance->filemtime('/lorem.txt');
$this->assertEqual($mTime,100); $this->assertEqual($mTime, 100);
} }
} }
$mtimeStart=time(); $mtimeStart = time();
$fh=$this->instance->fopen('/lorem.txt','a'); $fh = $this->instance->fopen('/lorem.txt', 'a');
fwrite($fh,' '); fwrite($fh, ' ');
fclose($fh); fclose($fh);
clearstatcache(); clearstatcache();
$mtimeEnd=time(); $mtimeEnd = time();
$mTime=$this->instance->filemtime('/lorem.txt'); $mTime = $this->instance->filemtime('/lorem.txt');
$this->assertTrue(($mtimeStart-1)<=$mTime); $this->assertTrue(($mtimeStart - 1) <= $mTime);
$this->assertTrue($mTime<=($mtimeEnd+1)); $this->assertTrue($mTime <= ($mtimeEnd + 1));
$this->instance->unlink('/lorem.txt'); $this->instance->unlink('/lorem.txt');
$this->assertTrue($this->instance->hasUpdated('/',$mtimeStart-1)); $this->assertTrue($this->instance->hasUpdated('/', $mtimeStart - 1));
} }
public function testSearch() { public function testSearch() {
$textFile=\OC::$SERVERROOT.'/tests/data/lorem.txt'; $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile,'r')); $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile, 'r'));
$pngFile=\OC::$SERVERROOT.'/tests/data/logo-wide.png'; $pngFile = \OC::$SERVERROOT . '/tests/data/logo-wide.png';
$this->instance->file_put_contents('/logo-wide.png',file_get_contents($pngFile,'r')); $this->instance->file_put_contents('/logo-wide.png', file_get_contents($pngFile, 'r'));
$svgFile=\OC::$SERVERROOT.'/tests/data/logo-wide.svg'; $svgFile = \OC::$SERVERROOT . '/tests/data/logo-wide.svg';
$this->instance->file_put_contents('/logo-wide.svg',file_get_contents($svgFile,'r')); $this->instance->file_put_contents('/logo-wide.svg', file_get_contents($svgFile, 'r'));
$result=$this->instance->search('logo'); $result = $this->instance->search('logo');
$this->assertEqual(2,count($result)); $this->assertEqual(2, count($result));
$this->assertContains('/logo-wide.svg',$result); $this->assertContains('/logo-wide.svg', $result);
$this->assertContains('/logo-wide.png',$result); $this->assertContains('/logo-wide.png', $result);
}
public function testFOpen() {
$textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$fh = @$this->instance->fopen('foo', 'r');
if ($fh) {
fclose($fh);
}
$this->assertFalse($fh);
$this->assertFalse($this->instance->file_exists('foo'));
$fh = $this->instance->fopen('foo', 'w');
fwrite($fh, file_get_contents($textFile));
fclose($fh);
$this->assertTrue($this->instance->file_exists('foo'));
$fh = $this->instance->fopen('foo', 'r');
$content = stream_get_contents($fh);
$this->assertEqual(file_get_contents($textFile), $content);
} }
} }