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
if(is_file($handle)){
if(@is_file($handle)){
$this->content_type=OC_Helper::getMimeType($handle);
}else{
$this->content_type=OC_Helper::getStringMimeType($handle);
@ -2537,7 +2537,7 @@ class CF_Object
}
$md5 = hash_final($ctx, false);
rewind($data);
} elseif ((string)is_file($data)) {
} elseif ((string)@is_file($data)) {
$md5 = md5_file($data);
} else {
$md5 = md5($data);

View File

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

View File

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

View File

@ -1,4 +1,10 @@
<?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",
"Mount point" => "Punto de montaje",
"Backend" => "Motor",

View File

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

View File

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

View File

@ -133,6 +133,9 @@ class DAV extends \OC\Files\Storage\Common{
switch($mode) {
case 'r':
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
$curl = curl_init();
$fp = fopen('php://temp', 'r+');

View File

@ -1,45 +1,44 @@
<?php
/**
* ownCloud
*
* @author Michael Gapczynski
* @copyright 2012 Michael Gapczynski mtgap@owncloud.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/>.
*/
* ownCloud
*
* @author Michael Gapczynski
* @copyright 2012 Michael Gapczynski mtgap@owncloud.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/>.
*/
namespace Test\Files\Storage;
$config = include('apps/files_external/tests/config.php');
if (!is_array($config) or !isset($config['amazons3']) or !$config['amazons3']['run']) {
abstract class AmazonS3 extends Storage{}
return;
} else {
class AmazonS3 extends Storage {
class AmazonS3 extends Storage {
private $config;
private $id;
private $config;
private $id;
public function setUp() {
$id = uniqid();
$this->config = include('apps/files_external/tests/config.php');
$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 setUp() {
$id = uniqid();
$this->config = include('files_external/tests/config.php');
if (!is_array($this->config) or !isset($this->config['amazons3']) or !$this->config['amazons3']['run']) {
$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']));
if ($s3->delete_all_objects($this->id)) {
$s3->delete_bucket($this->id);

View File

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

View File

@ -8,22 +8,21 @@
namespace Test\Files\Storage;
$config=include('files_external/tests/config.php');
if(!is_array($config) or !isset($config['dropbox']) or !$config['dropbox']['run']) {
abstract class Dropbox extends Storage{}
return;
}else{
class Dropbox extends Storage {
private $config;
class Dropbox extends Storage {
private $config;
public function setUp() {
$id=uniqid();
$this->config=include('files_external/tests/config.php');
$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 setUp() {
$id = uniqid();
$this->config = include('files_external/tests/config.php');
if (!is_array($this->config) or !isset($this->config['dropbox']) or !$this->config['dropbox']['run']) {
$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('/');
}
}

View File

@ -8,22 +8,21 @@
namespace Test\Files\Storage;
$config=include('apps/files_external/tests/config.php');
if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']) {
abstract class FTP extends Storage{}
return;
}else{
class FTP extends Storage {
private $config;
class FTP extends Storage {
private $config;
public function setUp() {
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php');
$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 setUp() {
$id = uniqid();
$this->config = include('files_external/tests/config.php');
if (!is_array($this->config) or !isset($this->config['ftp']) or !$this->config['ftp']['run']) {
$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(''));
}
}

View File

@ -1,44 +1,42 @@
<?php
/**
* ownCloud
*
* @author Michael Gapczynski
* @copyright 2012 Michael Gapczynski mtgap@owncloud.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/>.
*/
* ownCloud
*
* @author Michael Gapczynski
* @copyright 2012 Michael Gapczynski mtgap@owncloud.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/>.
*/
namespace Test\Files\Storage;
$config=include('apps/files_external/tests/config.php');
if(!is_array($config) or !isset($config['google']) or !$config['google']['run']) {
abstract class Google extends Storage{}
return;
}else{
class Google extends Storage {
class Google extends Storage {
private $config;
private $config;
public function setUp() {
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php');
$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 setUp() {
$id = uniqid();
$this->config = include('files_external/tests/config.php');
if (!is_array($this->config) or !isset($this->config['google']) or !$this->config['google']['run']) {
$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']);
}
public function tearDown() {
public function tearDown() {
if ($this->instance) {
$this->instance->rmdir('/');
}
}

View File

@ -8,24 +8,22 @@
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']) {
abstract class SMB extends Storage{}
return;
}else{
class SMB extends Storage {
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']);
public function setUp() {
$id = uniqid();
$this->config = include('files_external/tests/config.php');
if (!is_array($this->config) or !isset($this->config['smb']) or !$this->config['smb']['run']) {
$this->markTestSkipped('Samba backend not configured');
}
$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(''));
}
}

View File

@ -8,25 +8,23 @@
namespace Test\Files\Storage;
$config=include('apps/files_external/tests/config.php');
if(!is_array($config) or !isset($config['swift']) or !$config['swift']['run']) {
abstract class SWIFT extends Storage{}
return;
}else{
class SWIFT extends Storage {
private $config;
class SWIFT extends Storage {
private $config;
public function setUp() {
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php');
$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 setUp() {
$id = uniqid();
$this->config = include('files_external/tests/config.php');
if (!is_array($this->config) or !isset($this->config['swift']) or !$this->config['swift']['run']) {
$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() {
$this->instance->rmdir('');
public function tearDown() {
if ($this->instance) {
$this->instance->rmdir('');
}
}
}

View File

@ -8,22 +8,22 @@
namespace Test\Files\Storage;
$config=include('apps/files_external/tests/config.php');
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;
class DAV extends Storage {
public function setUp() {
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php');
$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']);
private $config;
public function setUp() {
$id = uniqid();
$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('/');
}
}

View File

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

View File

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

View File

@ -21,11 +21,11 @@ $(document).ready(function(){
}
,function(filename){
// 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;
// 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')) {
$('#dropdown').hide('blind', function() {
$('#dropdown').remove();

View File

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

View File

@ -64,7 +64,7 @@ class Hooks {
$abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$params['newpath'].'.v';
if(Storage::isversioned($rel_oldpath)) {
$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);
foreach ($versions as $v) {
rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']);

View File

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

View File

@ -1,5 +1,6 @@
<?php $TRANSLATIONS = array(
"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",
"Group Filter" => "Filtrar por grupo",
"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 groups`s ownCloud name." => "Атрибут LDAP, используемый для создания группового имени в ownCloud.",
"in bytes" => "в байтах",
"in seconds. A change empties the cache." => "в секундах. Изменение очищает кэш.",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Оставьте пустым под имя пользователя (по умолчанию). В противном случае задайте LDAP/AD атрибут.",
"Help" => "Помощь"
);

View File

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

View File

@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-02 23:16+0200\n"
"PO-Revision-Date: 2012-10-02 21:17+0000\n"
"Last-Translator: I Robot <thomas.mueller@tmit.eu>\n"
"POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-10-10 07:08+0000\n"
"Last-Translator: cjtess <claudio.tessone@gmail.com>\n"
"Language-Team: Spanish (Argentina) (http://www.transifex.com/projects/p/owncloud/language/es_AR/)\n"
"MIME-Version: 1.0\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
msgid "Access granted"
msgstr ""
msgstr "Acceso permitido"
#: js/dropbox.js:28 js/dropbox.js:74 js/dropbox.js:79 js/dropbox.js:86
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
msgid "Grant access"
msgstr ""
msgstr "Permitir acceso"
#: js/dropbox.js:73 js/google.js:72
msgid "Fill out all required fields"
msgstr ""
msgstr "Rellenar todos los campos requeridos"
#: js/dropbox.js:85
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
msgid "Error configuring Google Drive storage"
msgstr ""
msgstr "Error al configurar el almacenamiento de Google Drive"
#: templates/settings.php:3
msgid "External Storage"

View File

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

View File

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

View File

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

View File

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

View File

@ -4,13 +4,14 @@
#
# Translators:
# Duarte Velez Grilo <duartegrilo@gmail.com>, 2012.
# Helder Meneses <helder.meneses@gmail.com>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-10-04 02:04+0200\n"
"PO-Revision-Date: 2012-10-03 13:31+0000\n"
"Last-Translator: Duarte Velez Grilo <duartegrilo@gmail.com>\n"
"POT-Creation-Date: 2012-10-11 02:04+0200\n"
"PO-Revision-Date: 2012-10-10 21:26+0000\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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -33,7 +34,7 @@ msgstr ""
#: templates/settings.php:9
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
msgid "User DN"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -29,55 +29,55 @@ msgstr ""
msgid "This category already exists: "
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"
msgstr ""
#: js/js.js:645
#: js/js.js:661
msgid "January"
msgstr ""
#: js/js.js:645
#: js/js.js:661
msgid "February"
msgstr ""
#: js/js.js:645
#: js/js.js:661
msgid "March"
msgstr ""
#: js/js.js:645
#: js/js.js:661
msgid "April"
msgstr ""
#: js/js.js:645
#: js/js.js:661
msgid "May"
msgstr ""
#: js/js.js:645
#: js/js.js:661
msgid "June"
msgstr ""
#: js/js.js:646
#: js/js.js:662
msgid "July"
msgstr ""
#: js/js.js:646
#: js/js.js:662
msgid "August"
msgstr ""
#: js/js.js:646
#: js/js.js:662
msgid "September"
msgstr ""
#: js/js.js:646
#: js/js.js:662
msgid "October"
msgstr ""
#: js/js.js:646
#: js/js.js:662
msgid "November"
msgstr ""
#: js/js.js:646
#: js/js.js:662
msgid "December"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,7 +21,7 @@ msgstr ""
msgid "Unable to load list from App Store"
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
msgid "Authentication error"
msgstr ""
@ -58,7 +58,7 @@ msgstr ""
msgid "Unable to delete group"
msgstr ""
#: ajax/removeuser.php:22
#: ajax/removeuser.php:27
msgid "Unable to delete user"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -72,11 +72,14 @@ class OC{
*/
public static function autoload($className) {
if(array_key_exists($className, OC::$CLASSPATH)) {
$path = OC::$CLASSPATH[$className];
/** @TODO: Remove this when necessary
Remove "apps/" from inclusion path for smooth migration to mutli app dir
*/
$path = str_replace('apps/', '', OC::$CLASSPATH[$className]);
require_once $path;
if (strpos($path, 'apps/')===0) {
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) {
$path = strtolower(str_replace('_', '/', substr($className, 3)) . '.php');
@ -110,7 +113,7 @@ class OC{
public static function initPaths() {
// 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)));
$scriptName=$_SERVER["SCRIPT_NAME"];
if(substr($scriptName, -1)=='/') {
@ -199,6 +202,7 @@ class OC{
public static function checkSSL() {
// redirect to https site if configured
if( OC_Config::getValue( "forcessl", false )) {
header('Strict-Transport-Security: max-age=31536000');
ini_set("session.cookie_secure", "on");
if(OC_Request::serverProtocol()<>'https' and !OC::$CLI) {
$url = "https://". OC_Request::serverHost() . $_SERVER['REQUEST_URI'];

View File

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

View File

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

View File

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

View File

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

View File

@ -82,7 +82,7 @@ class OC_Util {
* @return string
*/
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"];
// 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)) {
$l = OC_L10N::get('core');
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
@ -20,4 +25,4 @@ if( OC_User::deleteUser( $username )) {
}
else{
OC_JSON::error(array("data" => array( "message" => $l->t("Unable to delete user") )));
}
}

View File

@ -36,6 +36,7 @@
"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>.",
"Add your App" => "Añadí tu aplicación",
"More Apps" => "Más aplicaciones",
"Select an App" => "Seleccionar una aplicación",
"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\">",

View File

@ -36,6 +36,7 @@
"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>.",
"Add your App" => "Dodaj aplikacje",
"More Apps" => "Więcej aplikacji",
"Select an App" => "Zaznacz aplikacje",
"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>",

View File

@ -36,6 +36,7 @@
"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>.",
"Add your App" => "Adicione seu Aplicativo",
"More Apps" => "Mais Apps",
"Select an App" => "Selecione uma Aplicação",
"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>",

View File

@ -34,6 +34,7 @@
"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>.",
"Add your App" => "Добавить Ваше приложение",
"More Apps" => "Больше приложений",
"Select an App" => "Выбрать приложение",
"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>",
@ -43,8 +44,10 @@
"Problems connecting to help database." => "Проблемы, связанные с разделом Помощь базы данных",
"Go there manually." => "Сделать вручную.",
"Answer" => "Ответ",
"You have used <strong>%s</strong> of the available <strong>%s<strong>" => "Вы использовали <strong>%s</strong> из доступных<strong>%s<strong>",
"Desktop and Mobile Syncing Clients" => "Клиенты синхронизации настольной и мобильной систем",
"Download" => "Загрузка",
"Your password was changed" => "Ваш пароль был изменен",
"Unable to change your password" => "Невозможно изменить Ваш пароль",
"Current password" => "Текущий пароль",
"New password" => "Новый пароль",

View File

@ -1,24 +1,24 @@
<?php
/**
* ownCloud
*
* @author Robin Appelman
* @copyright 2012 Robin Appelman icewind@owncloud.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/>.
*
*/
* ownCloud
*
* @author Robin Appelman
* @copyright 2012 Robin Appelman icewind@owncloud.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/>.
*
*/
namespace Test\Files\Storage;
@ -32,194 +32,205 @@ abstract class Storage extends \UnitTestCase {
* the root folder of the storage should always exist, be readable and be recognized as a directory
*/
public function testRoot() {
$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->is_dir('/'),'Root folder is not a directory');
$this->assertFalse($this->instance->is_file('/'),'Root folder is a file');
$this->assertEqual('dir',$this->instance->filetype('/'));
//without this, any further testing would be useless, not an acutal requirement for filestorage though
$this->assertTrue($this->instance->isUpdatable('/'),'Root folder is not writable');
$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->is_dir('/'), 'Root folder is not a directory');
$this->assertFalse($this->instance->is_file('/'), 'Root folder is a file');
$this->assertEqual('dir', $this->instance->filetype('/'));
//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');
}
public function testDirectories() {
$this->assertFalse($this->instance->file_exists('/folder'));
$this->assertTrue($this->instance->mkdir('/folder'));
$this->assertTrue($this->instance->file_exists('/folder'));
$this->assertTrue($this->instance->is_dir('/folder'));
$this->assertFalse($this->instance->is_file('/folder'));
$this->assertEqual('dir',$this->instance->filetype('/folder'));
$this->assertEqual(0,$this->instance->filesize('/folder'));
$this->assertEqual('dir', $this->instance->filetype('/folder'));
$this->assertEqual(0, $this->instance->filesize('/folder'));
$this->assertTrue($this->instance->isReadable('/folder'));
$this->assertTrue($this->instance->isUpdatable('/folder'));
$dh=$this->instance->opendir('/');
$content=array();
while($file=readdir($dh)) {
if($file!='.' and $file!='..') {
$content[]=$file;
}
}
$this->assertEqual(array('folder'),$content);
$this->assertFalse($this->instance->mkdir('/folder'));//cant create existing folders
$this->assertTrue($this->instance->rmdir('/folder'));
$this->assertFalse($this->instance->file_exists('/folder'));
$this->assertFalse($this->instance->rmdir('/folder'));//cant remove non existing folders
$dh=$this->instance->opendir('/');
$content=array();
while($file=readdir($dh)) {
if($file!='.' and $file!='..') {
$content[]=$file;
$dh = $this->instance->opendir('/');
$content = array();
while ($file = readdir($dh)) {
if ($file != '.' and $file != '..') {
$content[] = $file;
}
}
$this->assertEqual(array(),$content);
$this->assertEqual(array('folder'), $content);
$this->assertFalse($this->instance->mkdir('/folder')); //cant create existing folders
$this->assertTrue($this->instance->rmdir('/folder'));
$this->assertFalse($this->instance->file_exists('/folder'));
$this->assertFalse($this->instance->rmdir('/folder')); //cant remove non existing folders
$dh = $this->instance->opendir('/');
$content = array();
while ($file = readdir($dh)) {
if ($file != '.' and $file != '..') {
$content[] = $file;
}
}
$this->assertEqual(array(), $content);
}
/**
* test the various uses of file_get_contents and file_put_contents
*/
public function testGetPutContents() {
$sourceFile=\OC::$SERVERROOT.'/tests/data/lorem.txt';
$sourceText=file_get_contents($sourceFile);
$sourceFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$sourceText = file_get_contents($sourceFile);
//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->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
$this->instance->file_put_contents('/lorem.txt','');
$this->assertEqual('',$this->instance->file_get_contents('/lorem.txt'),'file not emptied');
$this->instance->file_put_contents('/lorem.txt', '');
$this->assertEqual('', $this->instance->file_get_contents('/lorem.txt'), 'file not emptied');
}
/**
* test various known mimetypes
*/
public function testMimeType() {
$this->assertEqual('httpd/unix-directory',$this->instance->getMimeType('/'));
$this->assertEqual(false,$this->instance->getMimeType('/non/existing/file'));
$textFile=\OC::$SERVERROOT.'/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile,'r'));
$this->assertEqual('text/plain',$this->instance->getMimeType('/lorem.txt'));
$pngFile=\OC::$SERVERROOT.'/tests/data/logo-wide.png';
$this->instance->file_put_contents('/logo-wide.png',file_get_contents($pngFile,'r'));
$this->assertEqual('image/png',$this->instance->getMimeType('/logo-wide.png'));
$svgFile=\OC::$SERVERROOT.'/tests/data/logo-wide.svg';
$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('httpd/unix-directory', $this->instance->getMimeType('/'));
$this->assertEqual(false, $this->instance->getMimeType('/non/existing/file'));
$textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile, 'r'));
$this->assertEqual('text/plain', $this->instance->getMimeType('/lorem.txt'));
$pngFile = \OC::$SERVERROOT . '/tests/data/logo-wide.png';
$this->instance->file_put_contents('/logo-wide.png', file_get_contents($pngFile, 'r'));
$this->assertEqual('image/png', $this->instance->getMimeType('/logo-wide.png'));
$svgFile = \OC::$SERVERROOT . '/tests/data/logo-wide.svg';
$this->instance->file_put_contents('/logo-wide.svg', file_get_contents($svgFile, 'r'));
$this->assertEqual('image/svg+xml', $this->instance->getMimeType('/logo-wide.svg'));
}
public function testCopyAndMove() {
$textFile=\OC::$SERVERROOT.'/tests/data/lorem.txt';
$this->instance->file_put_contents('/source.txt',file_get_contents($textFile));
$this->instance->copy('/source.txt','/target.txt');
$textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$this->instance->file_put_contents('/source.txt', file_get_contents($textFile));
$this->instance->copy('/source.txt', '/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->instance->rename('/source.txt','/target2.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->assertTrue($this->instance->file_exists('/target2.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() {
$textFile=\OC::$SERVERROOT.'/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile));
$localFile=$this->instance->getLocalFile('/lorem.txt');
$textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile));
$localFile = $this->instance->getLocalFile('/lorem.txt');
$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->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/lorem.txt', file_get_contents($textFile));
$this->instance->file_put_contents('/folder/bar.txt', 'asd');
$this->instance->mkdir('/folder/recursive');
$this->instance->file_put_contents('/folder/recursive/file.txt','foo');
$localFolder=$this->instance->getLocalFolder('/folder');
$this->instance->file_put_contents('/folder/recursive/file.txt', 'foo');
$localFolder = $this->instance->getLocalFolder('/folder');
$this->assertTrue(is_dir($localFolder));
$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.'/bar.txt'),'asd');
$this->assertEqual(file_get_contents($localFolder.'/recursive/file.txt'),'foo');
$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 . '/bar.txt'), 'asd');
$this->assertEqual(file_get_contents($localFolder . '/recursive/file.txt'), 'foo');
}
public function testStat() {
$textFile=\OC::$SERVERROOT.'/tests/data/lorem.txt';
$ctimeStart=time();
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile));
$textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$ctimeStart = time();
$this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile));
$this->assertTrue($this->instance->isReadable('/lorem.txt'));
$ctimeEnd=time();
$cTime=$this->instance->filectime('/lorem.txt');
$mTime=$this->instance->filemtime('/lorem.txt');
if($cTime!=-1) {//not everything can support ctime
$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($mTime<=($ctimeEnd+1));
$this->assertEqual(filesize($textFile),$this->instance->filesize('/lorem.txt'));
$stat=$this->instance->stat('/lorem.txt');
//only size, mtime and ctime are requered in the result
$this->assertEqual($stat['size'],$this->instance->filesize('/lorem.txt'));
$this->assertEqual($stat['mtime'],$mTime);
$this->assertEqual($stat['ctime'],$cTime);
$mtimeStart=time();
$ctimeEnd = time();
$mTime = $this->instance->filemtime('/lorem.txt');
$this->assertTrue($this->instance->hasUpdated('/lorem.txt', $ctimeStart - 1));
$this->assertTrue($this->instance->hasUpdated('/', $ctimeStart - 1));
$this->assertTrue(($ctimeStart - 1) <= $mTime);
$this->assertTrue($mTime <= ($ctimeEnd + 1));
$this->assertEqual(filesize($textFile), $this->instance->filesize('/lorem.txt'));
$stat = $this->instance->stat('/lorem.txt');
//only size and mtime are required in the result
$this->assertEqual($stat['size'], $this->instance->filesize('/lorem.txt'));
$this->assertEqual($stat['mtime'], $mTime);
$mtimeStart = time();
$supportsTouch = $this->instance->touch('/lorem.txt');
$mtimeEnd=time();
if($supportsTouch !== false){
$originalCTime=$cTime;
$cTime=$this->instance->filectime('/lorem.txt');
$mTime=$this->instance->filemtime('/lorem.txt');
$this->assertTrue(($mtimeStart-1)<=$mTime);
$this->assertTrue($mTime<=($mtimeEnd+1));
$this->assertEqual($cTime,$originalCTime);
$mtimeEnd = time();
if ($supportsTouch !== false) {
$mTime = $this->instance->filemtime('/lorem.txt');
$this->assertTrue(($mtimeStart - 1) <= $mTime);
$this->assertTrue($mTime <= ($mtimeEnd + 1));
$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) {
$mTime=$this->instance->filemtime('/lorem.txt');
$this->assertEqual($mTime,100);
if ($this->instance->touch('/lorem.txt', 100) !== false) {
$mTime = $this->instance->filemtime('/lorem.txt');
$this->assertEqual($mTime, 100);
}
}
$mtimeStart=time();
$fh=$this->instance->fopen('/lorem.txt','a');
fwrite($fh,' ');
$mtimeStart = time();
$fh = $this->instance->fopen('/lorem.txt', 'a');
fwrite($fh, ' ');
fclose($fh);
clearstatcache();
$mtimeEnd=time();
$mTime=$this->instance->filemtime('/lorem.txt');
$this->assertTrue(($mtimeStart-1)<=$mTime);
$this->assertTrue($mTime<=($mtimeEnd+1));
$mtimeEnd = time();
$mTime = $this->instance->filemtime('/lorem.txt');
$this->assertTrue(($mtimeStart - 1) <= $mTime);
$this->assertTrue($mTime <= ($mtimeEnd + 1));
$this->instance->unlink('/lorem.txt');
$this->assertTrue($this->instance->hasUpdated('/',$mtimeStart-1));
$this->assertTrue($this->instance->hasUpdated('/', $mtimeStart - 1));
}
public function testSearch() {
$textFile=\OC::$SERVERROOT.'/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile,'r'));
$pngFile=\OC::$SERVERROOT.'/tests/data/logo-wide.png';
$this->instance->file_put_contents('/logo-wide.png',file_get_contents($pngFile,'r'));
$svgFile=\OC::$SERVERROOT.'/tests/data/logo-wide.svg';
$this->instance->file_put_contents('/logo-wide.svg',file_get_contents($svgFile,'r'));
$result=$this->instance->search('logo');
$this->assertEqual(2,count($result));
$this->assertContains('/logo-wide.svg',$result);
$this->assertContains('/logo-wide.png',$result);
$textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile, 'r'));
$pngFile = \OC::$SERVERROOT . '/tests/data/logo-wide.png';
$this->instance->file_put_contents('/logo-wide.png', file_get_contents($pngFile, 'r'));
$svgFile = \OC::$SERVERROOT . '/tests/data/logo-wide.svg';
$this->instance->file_put_contents('/logo-wide.svg', file_get_contents($svgFile, 'r'));
$result = $this->instance->search('logo');
$this->assertEqual(2, count($result));
$this->assertContains('/logo-wide.svg', $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);
}
}