| 110 |
if($url == 'node/' . $node['nid']){ |
if($url == 'node/' . $node['nid']){ |
| 111 |
$nids['node/' . $node['nid']] = 'page' . $node['nid'] . '.html'; |
$nids['node/' . $node['nid']] = 'page' . $node['nid'] . '.html'; |
| 112 |
}else{ |
}else{ |
| 113 |
$nids[$url] = $url . '.html'; |
$tmp_url = $url; |
| 114 |
$nids['node/' . $node['nid']] = $url . '.html'; |
//this removes the fake extension if one exists |
| 115 |
|
$tmp_url = str_replace(".html","",$tmp_url); |
| 116 |
|
$tmp_url = str_replace(".htm","",$tmp_url); |
| 117 |
|
$tmp_url = str_replace(".shtml","",$tmp_url); |
| 118 |
|
$tmp_url = str_replace(".php","",$tmp_url); |
| 119 |
|
$tmp_url = str_replace(".asp","",$tmp_url); |
| 120 |
|
//this will remove everything that isn't a letter or number and replace it with a dash |
| 121 |
|
//this will allow custom url paths to still remain yet be translated correctly |
| 122 |
|
$tmp_url=preg_replace('/[^0-9a-z ]+/i', '-', $tmp_url); |
| 123 |
|
$tmp_url=preg_replace('/[^\w\d\s]+/i', '-', $tmp_url); |
| 124 |
|
|
| 125 |
|
$nids[$url] = $tmp_url . '.html'; |
| 126 |
|
$nids['node/' . $node['nid']] = $tmp_url . '.html'; |
| 127 |
} |
} |
| 128 |
} |
} |
| 129 |
//run through all the nodes and render pages to add to the zip file |
//run through all the nodes and render pages to add to the zip file |