</configsection>
</configsection>
- <configsection name="options" desc="Look and feel">
- <configheader>Look and feel</configheader>
- <configboolean name="use_mod_rewrite" desc="Should we use mod_rewrite URL translations for page URLs? If your webserver doesn't have mod_rewrite enabled, enabling this will result in broken links. The default/fallback if this is off is to use GET to pass the page name.">false</configboolean>
- </configsection>
-
<configsection name="menu">
<configheader>
Menu Settings
}
}
- $anchor = '#'.$this->urlEncode(substr($anchor, 1));
+ $anchor = '#' . $this->urlEncode(substr($anchor, 1));
- // does the page exist?
+ // Does the page exist?
if ($exists) {
-
- // PAGE EXISTS.
-
- $href = sprintf($this->getConf('view_url'), (!empty($GLOBALS['conf']['options']['use_mod_rewrite']) ? htmlspecialchars($page) : $this->urlEncode($page))) . $anchor;
+ $href = sprintf($this->getConf('view_url'), $GLOBALS['conf']['urls']['pretty'] == 'rewrite' ? htmlspecialchars($page) : $this->urlEncode($page)) . $anchor;
// get the CSS class and generate output
$css = ' class="'.$this->textEncode($this->getConf('css')).'"';
$start = '<a'.$css.' href="'.$this->textEncode($href).'">';
$end = '</a>';
} else {
-
- // PAGE DOES NOT EXIST.
-
$new_url = $this->getConf('new_url');
if (!$new_url) {
return $this->textEncode($text);
*/
public static function url($page, $full = false, $append_session = 0)
{
- global $conf;
-
- if (!empty($conf['options']['use_mod_rewrite'])) {
+ if ($GLOBALS['conf']['urls']['pretty'] == 'rewrite') {
$script = str_replace('%2F', '/', urlencode($page));
} else {
$script = Horde_Util::addParameter('display.php', 'page', $page);