diff --git a/main/document/create_paint.php b/main/document/create_paint.php index 809886d835..c076b0689c 100644 --- a/main/document/create_paint.php +++ b/main/document/create_paint.php @@ -143,7 +143,24 @@ $target_path=api_get_path(WEB_CODE_PATH).'document/save_pixlr.php'; $target=$target_path; $locktarget="true"; $locktitle="false"; -$credentials="true"; + +if ($_SERVER['HTTP_HOST']=="localhost") { + $path_and_file= api_get_path(SYS_SERVER_ROOT_PATH).'/crossdomain.xml'; + if (!file_exists($path_and_file)) { + $crossdomain=' + + + + + + ';//more open domain="*" + @file_put_contents($path_and_file, $crossdomain); + } + $credentials="true"; +} +else { + $credentials="false"; +} echo ''; \ No newline at end of file diff --git a/main/document/edit_paint.php b/main/document/edit_paint.php index 91bdaee3cb..5ca3c9e06d 100644 --- a/main/document/edit_paint.php +++ b/main/document/edit_paint.php @@ -6,7 +6,7 @@ * @package chamilo.document * @todo used the document_id instead of the curdirpath * - * @author Juan Carlos Ra�a Trabado + * @author Juan Carlos Raña Trabado * @since 30/january/2011 */ /** @@ -151,7 +151,24 @@ $target=$target_path; $locktarget="true"; $locktitle="false"; -$credentials="true"; + +if ($_SERVER['HTTP_HOST']=="localhost") { + $path_and_file= api_get_path(SYS_SERVER_ROOT_PATH).'/crossdomain.xml'; + if (!file_exists($path_and_file)) { + $crossdomain=' + + + + + + ';//more open domain="*" + @file_put_contents($path_and_file, $crossdomain); + } + $credentials="true"; +} +else { + $credentials="false"; +} //make temp images $temp_folder=api_get_path(SYS_ARCHIVE_PATH).'temp/images';