summaryrefslogtreecommitdiffstats
path: root/editors/ckeditor_4_4/uploader
diff options
context:
space:
mode:
Diffstat (limited to 'editors/ckeditor_4_4/uploader')
-rw-r--r--editors/ckeditor_4_4/uploader/EnkaUploader.php17
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;