diff options
author | hfuecks <hfuecks@gmail.com> | 2005-11-07 00:38:00 +0100 |
---|---|---|
committer | hfuecks <hfuecks@gmail.com> | 2005-11-07 00:38:00 +0100 |
commit | fc1c55b1830fbbb13f99db0490df4f46e15dcd31 (patch) | |
tree | c95e7c3ca97b6afcbc7fbda6300808ff46b089d8 /inc | |
parent | 4add97cbe7c3aae97c8c54fc6a3bd7fae1de29a2 (diff) | |
download | rpg-fc1c55b1830fbbb13f99db0490df4f46e15dcd31.tar.gz rpg-fc1c55b1830fbbb13f99db0490df4f46e15dcd31.tar.bz2 |
get_tests_running_1
darcs-hash:20051106233800-e96b6-90328f1b6cc5c8b25c6e02f113cf80475789d297.gz
Diffstat (limited to 'inc')
-rw-r--r-- | inc/init.php | 4 | ||||
-rw-r--r-- | inc/parser/handler.php | 24 | ||||
-rw-r--r-- | inc/utf8.php | 5 |
3 files changed, 29 insertions, 4 deletions
diff --git a/inc/init.php b/inc/init.php index f9e095533..fb02ab15d 100644 --- a/inc/init.php +++ b/inc/init.php @@ -26,7 +26,9 @@ //load the language files require_once(DOKU_INC.'inc/lang/en/lang.php'); - require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php'); + if ( defined($conf['lang']) ) { + require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php'); + } // define baseURL if(!defined('DOKU_BASE')) define('DOKU_BASE',getBaseURL()); diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 61185b046..a1f2fe4c7 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -593,6 +593,9 @@ function Doku_Handler_Parse_Media($match) { if(preg_match('#(\d+)(x(\d+))?#i',$param,$size)){ ($size[1]) ? $w = $size[1] : $w = NULL; ($size[3]) ? $h = $size[3] : $h = NULL; + } else { + $w = NULL; + $h = NULL; } //get linking command @@ -1511,10 +1514,25 @@ class Doku_Handler_Toc { #FIXME can this be done better? global $conf; - $toplevel = $conf['toptoclevel']; // retrieve vars once to save time - $maxlevel = $conf['maxtoclevel']; + + if ( isset($conf['toptoclevel']) ) { + // retrieve vars once to save time + $toplevel = $conf['toptoclevel']; + } else { + $toplevel = 0; + } + + if ( isset($conf['maxtoclevel']) ) { + $maxlevel = $conf['maxtoclevel']; + } else { + $maxlevel = 0; + } foreach ( $calls as $call ) { + if ( !isset($call[1][1]) ) { + $this->calls[] = $call; + continue; + } $level = $call[1][1]; if ( $call[0] == 'header' && $level >= $toplevel && $level <= $maxlevel ) { $this->numHeaders++; @@ -1639,7 +1657,7 @@ class Doku_Handler_Toc { function finalizeToc($call) { global $conf; - if ( $this->numHeaders < $conf['maxtoclevel'] ) { + if ( isset($conf['maxtoclevel']) && $this->numHeaders < $conf['maxtoclevel'] ) { return; } if ( count ($this->tocStack) > 0 ) { diff --git a/inc/utf8.php b/inc/utf8.php index 7e82e7cd2..3c1f361f7 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -409,6 +409,11 @@ function utf8_to_unicode( &$str ) { * @see utf8_to_unicode() */ function unicode_to_utf8( &$str ) { + // init_getID_test causes something to get + // passed to this function that isn't a string + if ( !is_string($str) ) { + return; + } $utf8 = ''; foreach( $str as $unicode ) { if ( $unicode < 128 ) { |