Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
This commit is contained in:
commit
d9ee8b2c32
@ -478,6 +478,8 @@ class Import extends \Zotlabs\Web\Controller {
|
|||||||
if(! $account_id)
|
if(! $account_id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
check_form_security_token_redirectOnErr('/import', 'channel_import');
|
||||||
|
|
||||||
$this->import_account($account_id);
|
$this->import_account($account_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -508,6 +510,7 @@ class Import extends \Zotlabs\Web\Controller {
|
|||||||
'$pleasewait' => t('This process may take several minutes to complete. Please submit the form only once and leave this page open until finished.'),
|
'$pleasewait' => t('This process may take several minutes to complete. Please submit the form only once and leave this page open until finished.'),
|
||||||
'$email' => '',
|
'$email' => '',
|
||||||
'$pass' => '',
|
'$pass' => '',
|
||||||
|
'$form_security_token' => get_form_security_token('channel_import'),
|
||||||
'$submit' => t('Submit')
|
'$submit' => t('Submit')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ class Import_items extends \Zotlabs\Web\Controller {
|
|||||||
if(! local_channel())
|
if(! local_channel())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
check_form_security_token_redirectOnErr('/import_items', 'import_items');
|
||||||
|
|
||||||
$data = null;
|
$data = null;
|
||||||
|
|
||||||
$src = $_FILES['filename']['tmp_name'];
|
$src = $_FILES['filename']['tmp_name'];
|
||||||
@ -123,6 +125,7 @@ class Import_items extends \Zotlabs\Web\Controller {
|
|||||||
'$title' => t('Import Items'),
|
'$title' => t('Import Items'),
|
||||||
'$desc' => t('Use this form to import existing posts and content from an export file.'),
|
'$desc' => t('Use this form to import existing posts and content from an export file.'),
|
||||||
'$label_filename' => t('File to Upload'),
|
'$label_filename' => t('File to Upload'),
|
||||||
|
'$form_security_token' => get_form_security_token('import_items'),
|
||||||
'$submit' => t('Submit')
|
'$submit' => t('Submit')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<h2>{{$title}}</h2>
|
<h2>{{$title}}</h2>
|
||||||
|
|
||||||
<form action="import" method="post" enctype="multipart/form-data" id="import-channel-form">
|
<form action="import" method="post" enctype="multipart/form-data" id="import-channel-form">
|
||||||
|
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||||
<div id="import-desc" class="descriptive-paragraph">{{$desc}}</div>
|
<div id="import-desc" class="descriptive-paragraph">{{$desc}}</div>
|
||||||
|
|
||||||
<label for="import-filename" id="label-import-filename" class="import-label" >{{$label_filename}}</label>
|
<label for="import-filename" id="label-import-filename" class="import-label" >{{$label_filename}}</label>
|
||||||
@ -40,7 +40,4 @@
|
|||||||
<div id="import-submit-end" class="import-field-end"></div>
|
<div id="import-submit-end" class="import-field-end"></div>
|
||||||
|
|
||||||
<div id="import-common-desc" class="descriptive-paragraph">{{$pleasewait}}</div>
|
<div id="import-common-desc" class="descriptive-paragraph">{{$pleasewait}}</div>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<h2>{{$title}}</h2>
|
<h2>{{$title}}</h2>
|
||||||
|
|
||||||
<form action="import_items" method="post" enctype="multipart/form-data" id="import-channel-form">
|
<form action="import_items" method="post" enctype="multipart/form-data" id="import-channel-form">
|
||||||
|
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||||
<div id="import-desc" class="descriptive-paragraph">{{$desc}}</div>
|
<div id="import-desc" class="descriptive-paragraph">{{$desc}}</div>
|
||||||
|
|
||||||
<label for="import-filename" id="label-import-filename" class="import-label" >{{$label_filename}}</label>
|
<label for="import-filename" id="label-import-filename" class="import-label" >{{$label_filename}}</label>
|
||||||
@ -10,6 +10,4 @@
|
|||||||
|
|
||||||
<input type="submit" name="submit" id="import-submit-button" value="{{$submit}}" />
|
<input type="submit" name="submit" id="import-submit-button" value="{{$submit}}" />
|
||||||
<div id="import-submit-end" class="import-field-end"></div>
|
<div id="import-submit-end" class="import-field-end"></div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user