Adding pdfs/download.php filter see BT#10217

1.9.x
Julio Montoya 10 years ago
parent 0f89516bd9
commit 3e58873e11
  1. 6
      main/newscorm/lp_upload.php

@ -78,17 +78,21 @@ 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://',
'href="http://', 'href="http://',
'url="www.', 'url="www.',
'pdfs/download.php?'
); );
$replace = array( $replace = array(
'href="http://www.', 'href="http://www.',
'target = "_blank" href="'.$proxyPath.'?type=link&src=https://', 'target = "_blank" href="'.$proxyPath.'?type=link&src=https://',
'target = "_blank" href="'.$proxyPath.'?type=link&src=http://', 'target = "_blank" href="'.$proxyPath.'?type=link&src=http://',
'url="http://www.' 'url="http://www.',
'pdfs/download.php&'
); );
$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