Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list.php files are only invoked via ViewController and APIController #30024

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/files/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// TODO: move this to the generated config.js
/** @var IManager $shareManager */
$shareManager = \OC::$server->get(IManager::class);
$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload() ? 'yes' : 'no';;
$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload() ? 'yes' : 'no';

$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false);

Expand Down
3 changes: 1 addition & 2 deletions apps/files/recentlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
// Check if we are a user
OC_Util::checkLoggedIn();

$config = \OC::$server->getConfig();
$userSession = \OC::$server->getUserSession();

Expand Down
3 changes: 1 addition & 2 deletions apps/files_external/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
// Check if we are a user
OC_Util::checkLoggedIn();

$config = \OC::$server->getConfig();
$userSession = \OC::$server->getUserSession();

Expand Down
2 changes: 0 additions & 2 deletions apps/files_sharing/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
use OCA\Viewer\Event\LoadViewer;
use OCP\EventDispatcher\GenericEvent;

// Check if we are a user
OC_Util::checkLoggedIn();
$config = \OC::$server->getConfig();
$userSession = \OC::$server->getUserSession();
$legacyEventDispatcher = \OC::$server->getEventDispatcher();
Expand Down
2 changes: 0 additions & 2 deletions apps/files_trashbin/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
// Check if we are a user
OC_Util::checkLoggedIn();

$config = \OC::$server->getConfig();
$userSession = \OC::$server->getUserSession();
Expand Down
17 changes: 0 additions & 17 deletions apps/systemtags/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
// WARNING: this should be moved to proper AppFramework handling
// Check if we are a user
if (!\OC::$server->getUserSession()->isLoggedIn()) {
header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute(
'core.login.showLoginForm',
[
'redirect_url' => \OC::$server->getRequest()->getRequestUri(),
]
)
);
exit();
}
// Redirect to 2FA challenge selection if 2FA challenge was not solved yet
if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
exit();
}

$tmpl = new OCP\Template('systemtags', 'list', '');
$tmpl->printPage();