1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-02-21 18:54:32 +01:00

Add requesttoken

This commit is contained in:
Lukas Reschke 2014-11-05 09:56:22 +01:00
parent c124e940ea
commit aa2d32eb61
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,9 @@
<?php <?php
OCP\App::checkAppEnabled('bookmarks'); // Check if we are a user
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
OCP\JSON::checkAppEnabled('bookmarks');
$l = new OC_l10n('bookmarks'); $l = new OC_l10n('bookmarks');
if(empty($_FILES)) { if(empty($_FILES)) {

View File

@ -5,6 +5,7 @@
* later. * later.
* See the COPYING-README file. * See the COPYING-README file.
*/ */
/** @var array $_ */
?> ?>
<fieldset class="personalblock"> <fieldset class="personalblock">
@ -14,6 +15,7 @@
<form id="import_bookmark" action="<?php print_unescaped(OCP\Util::linkTo( "bookmarks", "ajax/import.php" ));?>" <form id="import_bookmark" action="<?php print_unescaped(OCP\Util::linkTo( "bookmarks", "ajax/import.php" ));?>"
method="post" enctype="multipart/form-data"> method="post" enctype="multipart/form-data">
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>"/>
<fieldset class="personalblock"> <fieldset class="personalblock">
<?php if(isset($_['error'])): ?> <?php if(isset($_['error'])): ?>
<h3><?php p($_['error']['error']); ?></h3> <h3><?php p($_['error']['error']); ?></h3>