From 06f80b70d4cb09c80a06c3cd8cb0f188e9ead435 Mon Sep 17 00:00:00 2001 From: Julio Date: Mon, 7 Mar 2016 12:11:04 +0100 Subject: [PATCH] Fix link errors see BT#10217 --- main/newscorm/lp_upload.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main/newscorm/lp_upload.php b/main/newscorm/lp_upload.php index a8bbb07498..bc30ca87af 100755 --- a/main/newscorm/lp_upload.php +++ b/main/newscorm/lp_upload.php @@ -78,7 +78,6 @@ if (Request::is_post() && $is_error) { $templatePath = str_replace('imsmanifest.xml', 'template.xml', $manifest); if (file_exists($templatePath) && is_file($templatePath)) { $templateContent = file_get_contents($templatePath); - $find = array( 'href="www.', 'href="https://', @@ -86,7 +85,10 @@ if (Request::is_post() && $is_error) { 'url="www.', 'pdfs/download.php?', "iframe src='https://", - "iframe src='http://" + "iframe src='http://", + 'href="http://', + 'href="https://', + ); $replace = array( @@ -97,6 +99,8 @@ if (Request::is_post() && $is_error) { 'pdfs/download.php&', "iframe src='".$proxyPath."?type=link&src=https://", "iframe src='".$proxyPath."?type=link&src=http://", + 'href="'.$proxyPath.'?type=link&src=http://', + 'href="'.$proxyPath.'?type=link&src=https://', ); $templateContent = str_replace($find, $replace, $templateContent); file_put_contents($templatePath, $templateContent);