Dodanie obsługi tokenów przesyłania i kluczy API w edytorach artykułów, banerów i produktów; aktualizacja adresu URL do changeloga
This commit is contained in:
@@ -4,6 +4,17 @@
|
||||
<?
|
||||
global $db;
|
||||
|
||||
$upload_token = bin2hex( random_bytes(24) );
|
||||
$_SESSION['upload_tokens'][$upload_token] = [
|
||||
'user_id' => $this -> user['id'],
|
||||
'expires' => time() + 60*20
|
||||
];
|
||||
|
||||
$_SESSION['rfm_akey'] = bin2hex(random_bytes(16));
|
||||
$_SESSION['rfm_akey_expires'] = time() + 20*60;
|
||||
$_SESSION['can_use_rfm'] = true;
|
||||
$rfmAkeyJS = $_SESSION['rfm_akey'];
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
|
||||
@@ -119,7 +130,11 @@ ob_start();
|
||||
$(function() {
|
||||
$('#short_description_<?= $lg['id']; ?>, #description_<?= $lg['id']; ?>').ckeditor({
|
||||
toolbar: 'MyToolbar',
|
||||
height: '250'
|
||||
height: '250',
|
||||
filebrowserBrowseUrl: '/libraries/filemanager-9.14.2/dialog.php?type=2&editor=ckeditor&akey=<?= $rfmAkeyJS;?>',
|
||||
filebrowserImageBrowseUrl: '/libraries/filemanager-9.14.2/dialog.php?type=1&editor=ckeditor&akey=<?= $rfmAkeyJS;?>',
|
||||
filebrowserUploadUrl: '/libraries/filemanager-9.14.2/dialog.php?type=2&editor=ckeditor&upload=1&akey=<?= $rfmAkeyJS;?>',
|
||||
filebrowserImageUploadUrl: '/libraries/filemanager-9.14.2/dialog.php?type=1&editor=ckeditor&upload=1&akey=<?= $rfmAkeyJS;?>'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -208,7 +223,11 @@ ob_start();
|
||||
$(function() {
|
||||
$('#tab_description_1_<?= $lg['id']; ?>, #tab_description_2_<?= $lg['id']; ?>').ckeditor({
|
||||
toolbar: 'MyToolbar',
|
||||
height: '250'
|
||||
height: '250',
|
||||
filebrowserBrowseUrl: '/libraries/filemanager-9.14.2/dialog.php?type=2&editor=ckeditor&akey=<?= $rfmAkeyJS;?>',
|
||||
filebrowserImageBrowseUrl: '/libraries/filemanager-9.14.2/dialog.php?type=1&editor=ckeditor&akey=<?= $rfmAkeyJS;?>',
|
||||
filebrowserUploadUrl: '/libraries/filemanager-9.14.2/dialog.php?type=2&editor=ckeditor&upload=1&akey=<?= $rfmAkeyJS;?>',
|
||||
filebrowserImageUploadUrl: '/libraries/filemanager-9.14.2/dialog.php?type=1&editor=ckeditor&upload=1&akey=<?= $rfmAkeyJS;?>'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -826,6 +845,9 @@ echo $grid->draw();
|
||||
});
|
||||
|
||||
$("#images-uploader").pluploadQueue({
|
||||
multipart_params: {
|
||||
upload_token: '<?= $upload_token ?>',
|
||||
},
|
||||
runtimes: 'html5,flash,html4',
|
||||
init: {
|
||||
Refresh: function(up) {
|
||||
@@ -874,6 +896,9 @@ echo $grid->draw();
|
||||
});
|
||||
|
||||
$("#files-uploader").pluploadQueue({
|
||||
multipart_params: {
|
||||
upload_token: '<?= $upload_token ?>',
|
||||
},
|
||||
runtimes: 'html5,flash,html4',
|
||||
init: {
|
||||
Refresh: function(up) {
|
||||
|
||||
Reference in New Issue
Block a user