Example:
Page Test
- id=2
- alias="testing"
Friendly URL settings
- Prefix = ""
- Suffix = ".html"
- Friendly aliases = enabled
Normal makeUrl would return "2.html"
New makeUrl returns "testing.html"
function makeUrl($id, $alias='', $args='') {
if(!is_numeric($id)) {
$this->messageQuit("`$id` is not numeric and may not be passed to makeUrl()");
}
if($this->config['friendly_urls']==1 && $alias!='') {
return $alias.$args;
} elseif($this->config['friendly_urls']==1 && $alias=='') {
// If friendly alias URL's are configured
if ($this->config['friendly_alias_urls']==1) {
// Check if the document has an alias
$docalias = '';
$limit_tmp = count($this->aliasListing);
for ($i_tmp=0; $i_tmp<$limit_tmp && $docalias==''; $i_tmp++) {
if ($this->aliasListing[$i_tmp]['id'] == $id) {
$docalias = $this->aliasListing[$i_tmp]['alias'];
}
}
if ($docalias=='') {
$docalias=$id;
}
return $this->config['friendly_url_prefix'].$docalias.$this->config['friendly_url_suffix'].$args;
} else {
return $this->config['friendly_url_prefix'].$id.$this->config['friendly_url_suffix'].$args;
}
} else {
return "index.php?id=$id$args";
}
}
PS: I was not sure if it is a bug and I didn't really know where to post this so I assumed it was mostly a mod so I posted it here. Let me know if there is a better place.










