Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unflexible filebrowser.php in GS 3.1
#1
@GS Developers:
In the GS 3.1 filebrowser.php there is the following code:
Code:
<script type='text/javascript'>
    function submitLink($funcNum, $url) {
        if ($funcNum=="2"){
            if(window.opener){
                window.opener.CKEDITOR.tools.callFunction($funcNum, $url);
            }
        }
        <?php if (isset($_GET['returnid'])){ ?>
            if(window.opener){
                window.opener.document.getElementById('<?php echo $returnid; ?>').value=$url;
            }
        <?php } ?>    
        window.close();
    }
    </script>
The check for "2" (as opposed to GS 3.0) prevents other instances of CKEditor (e.g. for I18N Custom Fields) from selecting an image, as they will be called with another function number.
I'm not sure what should be achieved with this weird code, but either remove the =="2" or use a code like this:
Code:
<script type='text/javascript'>
    function submitLink($funcNum, $url) {
        <?php if (isset($_GET['returnid'])){ ?>
            if(window.opener){
                window.opener.document.getElementById('<?php echo $returnid; ?>').value=$url;
            }
        <?php } else { ?>
            if(window.opener){
                window.opener.CKEDITOR.tools.callFunction($funcNum, $url);
            }
        <?php } ?>
        window.close();
    }
    </script>
(Not sure if this is what was intended)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
Unflexible filebrowser.php in GS 3.1 - by mvlcek - 2012-06-16, 06:19:53



Users browsing this thread: 1 Guest(s)