Fix link errors see BT#10217

1.9.x
Julio 10 years ago
parent 3732c4fe87
commit 06f80b70d4
  1. 8
      main/newscorm/lp_upload.php

@ -78,7 +78,6 @@ if (Request::is_post() && $is_error) {
$templatePath = str_replace('imsmanifest.xml', 'template.xml', $manifest); $templatePath = str_replace('imsmanifest.xml', 'template.xml', $manifest);
if (file_exists($templatePath) && is_file($templatePath)) { if (file_exists($templatePath) && is_file($templatePath)) {
$templateContent = file_get_contents($templatePath); $templateContent = file_get_contents($templatePath);
$find = array( $find = array(
'href="www.', 'href="www.',
'href="https://', 'href="https://',
@ -86,7 +85,10 @@ if (Request::is_post() && $is_error) {
'url="www.', 'url="www.',
'pdfs/download.php?', 'pdfs/download.php?',
"iframe src='https://", "iframe src='https://",
"iframe src='http://" "iframe src='http://",
'href="http://',
'href="https://',
); );
$replace = array( $replace = array(
@ -97,6 +99,8 @@ if (Request::is_post() && $is_error) {
'pdfs/download.php&', 'pdfs/download.php&',
"iframe src='".$proxyPath."?type=link&src=https://", "iframe src='".$proxyPath."?type=link&src=https://",
"iframe src='".$proxyPath."?type=link&src=http://", "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); $templateContent = str_replace($find, $replace, $templateContent);
file_put_contents($templatePath, $templateContent); file_put_contents($templatePath, $templateContent);

Loading…
Cancel
Save