forked from Wavyzz/dolibarr
Fix record file with empty name
This commit is contained in:
@@ -1065,6 +1065,8 @@ class Website extends CommonObject
|
|||||||
{
|
{
|
||||||
while (! feof($fp))
|
while (! feof($fp))
|
||||||
{
|
{
|
||||||
|
$reg = array();
|
||||||
|
|
||||||
// Warning fgets with second parameter that is null or 0 hang.
|
// Warning fgets with second parameter that is null or 0 hang.
|
||||||
$buf = fgets($fp, 65000);
|
$buf = fgets($fp, 65000);
|
||||||
if (preg_match('/^-- Page ID (\d+)\s[^\s]+\s(\d+).*Aliases\s(.*)\s--;/i', $buf, $reg))
|
if (preg_match('/^-- Page ID (\d+)\s[^\s]+\s(\d+).*Aliases\s(.*)\s--;/i', $buf, $reg))
|
||||||
@@ -1086,12 +1088,15 @@ class Website extends CommonObject
|
|||||||
// Regenerate alternative aliases pages
|
// Regenerate alternative aliases pages
|
||||||
foreach($aliasesarray as $aliasshortcuttocreate)
|
foreach($aliasesarray as $aliasshortcuttocreate)
|
||||||
{
|
{
|
||||||
$filealias=$conf->website->dir_output.'/'.$object->ref.'/'.$aliasshortcuttocreate.'.php';
|
if (trim($aliasshortcuttocreate))
|
||||||
|
{
|
||||||
|
$filealias=$conf->website->dir_output.'/'.$object->ref.'/'.trim($aliasshortcuttocreate).'.php';
|
||||||
dolSavePageAlias($filealias, $object, $objectpagestatic);
|
dolSavePageAlias($filealias, $object, $objectpagestatic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Regenerate index page to point to new index page
|
// Regenerate index page to point to new index page
|
||||||
$pathofwebsite = $conf->website->dir_output.'/'.$object->ref;
|
$pathofwebsite = $conf->website->dir_output.'/'.$object->ref;
|
||||||
|
|||||||
Reference in New Issue
Block a user