2013-01-18 16:11:29 +04:00
|
|
|
<?php
|
|
|
|
|
2013-02-22 20:21:57 +04:00
|
|
|
// Check if we are a user
|
2013-01-18 16:11:29 +04:00
|
|
|
OCP\User::checkLoggedIn();
|
|
|
|
|
2013-01-31 20:59:01 +04:00
|
|
|
OCP\App::setActiveNavigationEntry('files_index');
|
|
|
|
|
2013-01-23 14:30:42 +04:00
|
|
|
OCP\Util::addScript('files_trashbin', 'disableDefaultActions');
|
2013-01-18 16:11:29 +04:00
|
|
|
OCP\Util::addScript('files', 'fileactions');
|
|
|
|
$tmpl = new OCP\Template('files_trashbin', 'index', 'user');
|
|
|
|
|
|
|
|
OCP\Util::addStyle('files', 'files');
|
2013-12-02 18:27:40 +04:00
|
|
|
OCP\Util::addStyle('files_trashbin', 'trash');
|
2013-10-28 23:22:06 +04:00
|
|
|
OCP\Util::addScript('files', 'breadcrumb');
|
2013-01-18 16:11:29 +04:00
|
|
|
OCP\Util::addScript('files', 'filelist');
|
2013-08-17 15:07:18 +04:00
|
|
|
// filelist overrides
|
|
|
|
OCP\Util::addScript('files_trashbin', 'filelist');
|
2013-08-29 22:59:45 +04:00
|
|
|
OCP\Util::addscript('files', 'files');
|
2013-10-09 14:35:15 +04:00
|
|
|
OCP\Util::addScript('files_trashbin', 'trash');
|
2013-01-18 16:11:29 +04:00
|
|
|
|
2013-01-21 16:07:43 +04:00
|
|
|
$dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
|
|
|
|
|
2013-09-13 23:00:15 +04:00
|
|
|
$isIE8 = false;
|
|
|
|
preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches);
|
|
|
|
if (count($matches) > 0 && $matches[1] <= 8){
|
|
|
|
$isIE8 = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
// if IE8 and "?dir=path" was specified, reformat the URL to use a hash like "#?dir=path"
|
|
|
|
if ($isIE8 && isset($_GET['dir'])){
|
|
|
|
if ($dir === ''){
|
|
|
|
$dir = '/';
|
|
|
|
}
|
|
|
|
header('Location: ' . OCP\Util::linkTo('files_trashbin', 'index.php') . '#?dir=' . \OCP\Util::encodePath($dir));
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2013-08-17 15:07:18 +04:00
|
|
|
$tmpl->assign('dir', $dir);
|
|
|
|
$tmpl->assign('disableSharing', true);
|
2013-01-18 16:11:29 +04:00
|
|
|
|
|
|
|
$tmpl->printPage();
|