From 92d5fbb15177f5c858914913d6b336362ac91777 Mon Sep 17 00:00:00 2001 From: =?utf8?q?John=20Molakvo=C3=A6?= Date: Thu, 25 Jan 2024 10:16:29 +0100 Subject: [PATCH] chore(files): cleanup old templates MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- apps/files/list.php | 45 ----------- apps/files/simplelist.php | 35 --------- apps/files/templates/appnavigation.php | 93 ----------------------- apps/files/templates/fileexists.html | 31 -------- apps/files/templates/simplelist.php | 39 ---------- apps/files_sharing/list.php | 40 ---------- apps/files_sharing/public.php | 43 ----------- apps/files_sharing/templates/list.php | 30 -------- apps/files_sharing/templates/part.404.php | 12 --- apps/files_trashbin/list.php | 38 --------- apps/files_trashbin/templates/index.php | 47 ------------ apps/systemtags/list.php | 25 ------ apps/systemtags/templates/list.php | 37 --------- 13 files changed, 515 deletions(-) delete mode 100644 apps/files/list.php delete mode 100644 apps/files/simplelist.php delete mode 100644 apps/files/templates/appnavigation.php delete mode 100644 apps/files/templates/fileexists.html delete mode 100644 apps/files/templates/simplelist.php delete mode 100644 apps/files_sharing/list.php delete mode 100644 apps/files_sharing/public.php delete mode 100644 apps/files_sharing/templates/list.php delete mode 100644 apps/files_sharing/templates/part.404.php delete mode 100644 apps/files_trashbin/list.php delete mode 100644 apps/files_trashbin/templates/index.php delete mode 100644 apps/systemtags/list.php delete mode 100644 apps/systemtags/templates/list.php diff --git a/apps/files/list.php b/apps/files/list.php deleted file mode 100644 index 5f1bc07f499..00000000000 --- a/apps/files/list.php +++ /dev/null @@ -1,45 +0,0 @@ - - * @author John Molakvoæ - * @author Robin Appelman - * @author Vincent Petry - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see - * - */ -use OCP\IConfig; -use OCP\IUserSession; -use OCP\Server; -use OCP\Share\IManager; - -$config = Server::get(IConfig::class); -$userSession = Server::get(IUserSession::class); -// TODO: move this to the generated config.js -/** @var IManager $shareManager */ -$shareManager = Server::get(IManager::class); -$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload() ? 'yes' : 'no'; - -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); - -// renders the controls and table headers template -$tmpl = new OCP\Template('files', 'list', ''); - -// gridview not available for ie -$tmpl->assign('showgridview', $showgridview); -$tmpl->assign('publicUploadEnabled', $publicUploadEnabled); -$tmpl->printPage(); diff --git a/apps/files/simplelist.php b/apps/files/simplelist.php deleted file mode 100644 index b20bdcc9c63..00000000000 --- a/apps/files/simplelist.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @author John Molakvoæ - * @author Vincent Petry - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see - * - */ -// TODO: move to handlebars -$config = \OC::$server->getConfig(); -$userSession = \OC::$server->getUserSession(); - -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); - -// renders the controls and table headers template -$tmpl = new OCP\Template('files', 'simplelist', ''); - -// gridview not available for ie -$tmpl->assign('showgridview', $showgridview); -$tmpl->printPage(); diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php deleted file mode 100644 index d2b57b03eca..00000000000 --- a/apps/files/templates/appnavigation.php +++ /dev/null @@ -1,93 +0,0 @@ - - - - - -
  • data-dir="" - data-view="" - data-expandedstate="" - class="nav- - - - open" - folderposition="" > - - - - - - -
      - -
    - -
  • - - - -
    style="display: none"> -
      -
    • - -
    • -
    -
    -
    -
      - -
    -
    - - {why}
    - {what}
    -
    - - - -
    -
    -
    -
    -
    - - -
    -
    - - -
    -
    -
    - diff --git a/apps/files/templates/simplelist.php b/apps/files/templates/simplelist.php deleted file mode 100644 index fc0a9fb38c9..00000000000 --- a/apps/files/templates/simplelist.php +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - -
    diff --git a/apps/files_sharing/list.php b/apps/files_sharing/list.php deleted file mode 100644 index f43aed21427..00000000000 --- a/apps/files_sharing/list.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @author John Molakvoæ - * @author Morris Jobke - * @author Robin Appelman - * @author Vincent Petry - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see - * - */ -use OCP\IConfig; -use OCP\IUserSession; -use OCP\Server; - -$config = Server::get(IConfig::class); -$userSession = Server::get(IUserSession::class); - -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); - -$tmpl = new OCP\Template('files_sharing', 'list', ''); - -// gridview not available for ie -$tmpl->assign('showgridview', $showgridview); - -$tmpl->printPage(); diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php deleted file mode 100644 index 0213247b604..00000000000 --- a/apps/files_sharing/public.php +++ /dev/null @@ -1,43 +0,0 @@ - - * @author John Molakvoæ - * @author Lukas Reschke - * @author Morris Jobke - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see - * - */ -// This file is just used to redirect the legacy sharing URLs (< ownCloud 8) to the new ones - -$urlGenerator = \OC::$server->getURLGenerator(); -$token = $_GET['t'] ?? ''; -$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare'; - -if ($token !== '') { - $protocol = \OC::$server->getRequest()->getHttpProtocol(); - if ($protocol == 'HTTP/1.0') { - http_response_code(302); - } else { - http_response_code(307); - } - header('Location: ' . $urlGenerator->linkToRoute($route, ['token' => $token])); -} else { - http_response_code(404); - $tmpl = new OCP\Template('', '404', 'guest'); - print_unescaped($tmpl->fetchPage()); -} diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php deleted file mode 100644 index 066736013b9..00000000000 --- a/apps/files_sharing/templates/list.php +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - -
    diff --git a/apps/files_sharing/templates/part.404.php b/apps/files_sharing/templates/part.404.php deleted file mode 100644 index 2aa55383847..00000000000 --- a/apps/files_sharing/templates/part.404.php +++ /dev/null @@ -1,12 +0,0 @@ -
      - -
    diff --git a/apps/files_trashbin/list.php b/apps/files_trashbin/list.php deleted file mode 100644 index 117d3b4ddfe..00000000000 --- a/apps/files_trashbin/list.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @author Björn Schießle - * @author Christoph Wurst - * @author John Molakvoæ - * @author Roeland Jago Douma - * @author Vincent Petry - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see - * - */ - -$config = \OC::$server->getConfig(); -$userSession = \OC::$server->getUserSession(); - -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); - -$tmpl = new OCP\Template('files_trashbin', 'index', ''); - -// gridview not available for ie -$tmpl->assign('showgridview', $showgridview); -OCP\Util::addScript('files_trashbin', 'files_trashbin'); -$tmpl->printPage(); diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php deleted file mode 100644 index 5fe2fab4333..00000000000 --- a/apps/files_trashbin/templates/index.php +++ /dev/null @@ -1,47 +0,0 @@ - -
    -
    -
    - - - - - - - - - - - - - - - - - -
    diff --git a/apps/systemtags/list.php b/apps/systemtags/list.php deleted file mode 100644 index b5bbf223f29..00000000000 --- a/apps/systemtags/list.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @author Vincent Petry - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see - * - */ - -$tmpl = new OCP\Template('systemtags', 'list', ''); -$tmpl->printPage(); diff --git a/apps/systemtags/templates/list.php b/apps/systemtags/templates/list.php deleted file mode 100644 index 6e4ef04ee8b..00000000000 --- a/apps/systemtags/templates/list.php +++ /dev/null @@ -1,37 +0,0 @@ -
    -
    - - - - - - - - - - - - - - - - - -
    - -- 2.39.5