diff options
author | andi <andi@splitbrain.org> | 2005-02-19 11:20:55 +0100 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-02-19 11:20:55 +0100 |
commit | ed7b5f0908941f1bacef7e7c3a02c106a42cd5cc (patch) | |
tree | 6582419f82a87837adaefee934e1cb2a5316d8cb /inc/format.php | |
parent | f840b65d632cd5e155f4d6e39c8a42ae9fd5f566 (diff) | |
download | rpg-ed7b5f0908941f1bacef7e7c3a02c106a42cd5cc.tar.gz rpg-ed7b5f0908941f1bacef7e7c3a02c106a42cd5cc.tar.bz2 |
added init.php - may have broken something! (related to #153)
darcs-hash:20050219102055-9977f-575d654e742934c911ffab855d82aa91f198b5cf.gz
Diffstat (limited to 'inc/format.php')
-rw-r--r-- | inc/format.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/inc/format.php b/inc/format.php index 44d39e22f..4a5415ab4 100644 --- a/inc/format.php +++ b/inc/format.php @@ -1,4 +1,4 @@ -<? +<?php /** * link format functions * @@ -6,8 +6,9 @@ * @author Andreas Gohr <andi@splitbrain.org> */ - require_once("conf/dokuwiki.php"); - require_once("inc/common.php"); + if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); + require_once(DOKU_INC.'conf/dokuwiki.php'); + require_once(DOKU_INC.'inc/common.php'); /** @@ -248,7 +249,7 @@ function format_link_interwiki($link){ $iwlinks = file('conf/interwiki.conf'); //add special case 'this' - $iwlinks[] = 'this '.getBaseURL(true).'{NAME}'; + $iwlinks[] = 'this '.DOKU_URL.'{NAME}'; //go through iwlinks and find URL for wiki foreach ($iwlinks as $line){ @@ -266,13 +267,13 @@ function format_link_interwiki($link){ //if ico exists set additonal style if(@file_exists('interwiki/'.$ico.'.png')){ - $link['style']='background: transparent url('.getBaseURL().'interwiki/'.$ico.'.png) 0px 1px no-repeat;'; + $link['style']='background: transparent url('.DOKU_BASE.'interwiki/'.$ico.'.png) 0px 1px no-repeat;'; }elseif(@file_exists('interwiki/'.$ico.'.gif')){ - $link['style']='background: transparent url('.getBaseURL().'interwiki/'.$ico.'.gif) 0px 1px no-repeat;'; + $link['style']='background: transparent url('.DOKU_BASE.'interwiki/'.$ico.'.gif) 0px 1px no-repeat;'; } //do we stay at the same server? Use local target - if( strpos($url,getBaseURL(true)) === 0 ){ + if( strpos($url,DOKU_URL) === 0 ){ $link['target'] = $conf['target']['wiki']; } |