fix
This commit is contained in:
parent
5d78c3530b
commit
15623ae852
@ -2197,14 +2197,12 @@ if ($action == 'generatesitemaps') {
|
|||||||
}
|
}
|
||||||
$robotcontent = @file_get_contents($filerobot);
|
$robotcontent = @file_get_contents($filerobot);
|
||||||
$result = preg_replace('/<?php // BEGIN PHP[^?]END PHP ?>\n/ims', '', $robotcontent);
|
$result = preg_replace('/<?php // BEGIN PHP[^?]END PHP ?>\n/ims', '', $robotcontent);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$robotcontent = $result;
|
$robotcontent = $result;
|
||||||
}
|
}
|
||||||
$robotsitemap = "Sitemap: ".$domainname."/".$xmlname;
|
$robotsitemap = "Sitemap: ".$domainname."/".$xmlname;
|
||||||
$result = strpos($robotcontent, 'Sitemap: ');
|
$result = strpos($robotcontent, 'Sitemap: ');
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$result = preg_replace("/Sitemap.*\n/", $robotsitemap, $robotcontent);
|
$result = preg_replace("/Sitemap.*\n/", $robotsitemap, $robotcontent);
|
||||||
$robotcontent = $result ? $result : $robotcontent;
|
$robotcontent = $result ? $result : $robotcontent;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user