From ed7b5f0908941f1bacef7e7c3a02c106a42cd5cc Mon Sep 17 00:00:00 2001 From: andi Date: Sat, 19 Feb 2005 11:20:55 +0100 Subject: added init.php - may have broken something! (related to #153) darcs-hash:20050219102055-9977f-575d654e742934c911ffab855d82aa91f198b5cf.gz --- inc/format.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'inc/format.php') 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 @@ - */ - 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']; } -- cgit v1.2.3