2013-01-18 07:11:29 -05:00
|
|
|
<?php
|
|
|
|
|
|
2013-02-22 11:21:57 -05:00
|
|
|
// Check if we are a user
|
2013-01-18 07:11:29 -05:00
|
|
|
OCP\User::checkLoggedIn();
|
|
|
|
|
|
2013-01-31 11:59:01 -05:00
|
|
|
OCP\App::setActiveNavigationEntry('files_index');
|
|
|
|
|
|
2013-01-23 05:30:42 -05:00
|
|
|
OCP\Util::addScript('files_trashbin', 'disableDefaultActions');
|
2013-01-18 07:11:29 -05:00
|
|
|
OCP\Util::addScript('files', 'fileactions');
|
|
|
|
|
$tmpl = new OCP\Template('files_trashbin', 'index', 'user');
|
|
|
|
|
|
|
|
|
|
OCP\Util::addStyle('files', 'files');
|
2013-12-02 09:27:40 -05:00
|
|
|
OCP\Util::addStyle('files_trashbin', 'trash');
|
2014-02-11 10:52:56 -05:00
|
|
|
OCP\Util::addScript('files', 'filesummary');
|
2013-10-28 15:22:06 -04:00
|
|
|
OCP\Util::addScript('files', 'breadcrumb');
|
2013-01-18 07:11:29 -05:00
|
|
|
OCP\Util::addScript('files', 'filelist');
|
2013-08-17 07:07:18 -04:00
|
|
|
// filelist overrides
|
|
|
|
|
OCP\Util::addScript('files_trashbin', 'filelist');
|
2013-08-29 14:59:45 -04:00
|
|
|
OCP\Util::addscript('files', 'files');
|
2013-10-09 06:35:15 -04:00
|
|
|
OCP\Util::addScript('files_trashbin', 'trash');
|
2013-01-18 07:11:29 -05:00
|
|
|
|
2013-01-21 07:07:43 -05:00
|
|
|
$dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
|
|
|
|
|
|
2013-09-13 15: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 07:07:18 -04:00
|
|
|
$tmpl->assign('dir', $dir);
|
|
|
|
|
$tmpl->assign('disableSharing', true);
|
2013-01-18 07:11:29 -05:00
|
|
|
|
|
|
|
|
$tmpl->printPage();
|