diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
commit | 75160b12821f7f4299cce7f0b69c83c1502ae071 (patch) | |
tree | 27e25e4ccaef45f0c58b22831164050d1af1d4db /editors/ckeditor_4_4/uploader/EnkaUploader.php | |
parent | prvi-commit (diff) | |
download | 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip |
Diffstat (limited to 'editors/ckeditor_4_4/uploader/EnkaUploader.php')
-rw-r--r-- | editors/ckeditor_4_4/uploader/EnkaUploader.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/editors/ckeditor_4_4/uploader/EnkaUploader.php b/editors/ckeditor_4_4/uploader/EnkaUploader.php index 851fd58..a00fd6e 100644 --- a/editors/ckeditor_4_4/uploader/EnkaUploader.php +++ b/editors/ckeditor_4_4/uploader/EnkaUploader.php @@ -62,9 +62,20 @@ if (!isset ($_POST['posted']) && (isset ($_GET['image']) && $_GET['image'] == 1) }else {
$nakljucno = time();
$final = $nakljucno .$ime;
+
+ // Preverimo protokol in ga ustrezno replacamo
+ $upload_protocol = (strpos($site_url, 'https://') !== FALSE) ? 'https://' : 'http://';
+ $file_url = str_replace($upload_protocol, "", $site_url).'uploadi/editor/doc/'.$final;
+
if (move_uploaded_file($_FILES['editorDatoteka']['tmp_name'], $site_path .'uploadi/editor/doc/' .$final)) {
?>
- <body bgcolor="#ebebeb" onload="parent.document.getElementById(parent.urlsrc).value='<?=str_replace("http://", "", $site_url)?>uploadi/editor/doc/<?=$final?>'; window.location.href='<?= $site_url ?>editors/ckeditor_4_4/uploader/EnkaUploader.php'; ">
+ <body bgcolor="#ebebeb" onload="
+ parent.document.getElementById(parent.urlsrc).value='<?=$file_url?>';
+ if(parent.document.getElementById('cke_75_select')){
+ parent.document.getElementById('cke_75_select').value = '<?=$upload_protocol?>';
+ }
+ window.location.href='<?= $site_url ?>editors/ckeditor_4_4/uploader/EnkaUploader.php';
+ ">
<strong style="font-family: Arial; font-size: 12px; font-weight: bold;"><?=$lang['upload_done']?></strong>
<?php
}else {
@@ -105,8 +116,8 @@ if (!isset ($_POST['posted']) && (isset ($_GET['image']) && $_GET['image'] == 1) $UF_obj->NewName = $_FILES['eitorSlika']['name'];
//Širina in višina slike nastavimo
- $UF_obj->NewWidth = 600;
- $UF_obj->NewHeight = 600;
+ $UF_obj->NewWidth = 1920;
+ $UF_obj->NewHeight = 1920;
$ime = $UF_obj->NameCase = 'lower';
$UF_obj->OverWrite = false;
|