Show
Ignore:
Timestamp:
2007-06-16 18:32:46 (19 months ago)
Author:
alfonsoml
Message:

Proposed fix for #560 as part of #454 (with other little changes)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/branches/developers/alfonsoml/editor/filemanager/connectors/php/basexml.php

    r383 r386  
    5454 
    5555        // Add the current folder node. 
    56         echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder ) ) . '" />' ; 
     56        echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder, $command ) ) . '" />' ; 
    5757 
    5858        $GLOBALS['HeaderSent'] = true ; 
     
    6666function SendError( $number, $text ) 
    6767{ 
    68         SetXmlHeaders() ; 
     68        if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] ) 
     69        {  
     70                SendErrorNode( $number, $text ) ; 
     71                CreateXmlFooter() ; 
     72        } 
     73        else 
     74        { 
     75                SetXmlHeaders() ; 
    6976 
    70         // Create the XML document header 
    71         echo '<?xml version="1.0" encoding="utf-8" ?>' ; 
     77                // Create the XML document header 
     78                echo '<?xml version="1.0" encoding="utf-8" ?>' ; 
    7279 
    73         echo '<Connector>' ; 
    74          
    75         SendErrorNode( $number, $text ) ; 
    76          
    77         echo '</Connector>' ; 
    78  
     80                echo '<Connector>' ; 
     81                 
     82                SendErrorNode( $number, $text ) ; 
     83                 
     84                echo '</Connector>' ; 
     85        } 
    7986        exit ; 
    8087}