diff options
-rw-r--r-- | include/comanche.php | 15 | ||||
-rw-r--r-- | include/text.php | 4 | ||||
-rw-r--r-- | version.inc | 2 |
3 files changed, 11 insertions, 10 deletions
diff --git a/include/comanche.php b/include/comanche.php index 1ddabb693..71ffe99b8 100644 --- a/include/comanche.php +++ b/include/comanche.php @@ -79,22 +79,23 @@ function comanche_parser(&$a, $s, $pass = 0) { if($cnt) $a->layout['theme'] = trim($matches[1]); - } - else { - $cnt = preg_match_all("/\[region=(.*?)\](.*?)\[\/region\]/ism", $s, $matches, PREG_SET_ORDER); + $cnt = preg_match_all("/\[webpage\](.*?)\[\/webpage\]/ism", $s, $matches, PREG_SET_ORDER); if($cnt) { + // only the last webpage definition is used if there is more than one foreach($matches as $mtch) { - $a->layout['region_' . $mtch[1]] = comanche_region($a,$mtch[2]); + $a->layout['webpage'] = comanche_webpage($a,$mtch[1]); } } - $cnt = preg_match_all("/\[webpage\](.*?)\[\/webpage\]/ism", $s, $matches, PREG_SET_ORDER); + } + else { + $cnt = preg_match_all("/\[region=(.*?)\](.*?)\[\/region\]/ism", $s, $matches, PREG_SET_ORDER); if($cnt) { - // only the last webpage definition is used if there is more than one foreach($matches as $mtch) { - $a->layout['webpage'] = comanche_webpage($a,$mtch[1]); + $a->layout['region_' . $mtch[1]] = comanche_region($a,$mtch[2]); } } + } } diff --git a/include/text.php b/include/text.php index 0aba45d14..75125c606 100644 --- a/include/text.php +++ b/include/text.php @@ -1309,13 +1309,13 @@ function generate_map($coord) { $coord = str_replace(array(',','/',' '),array(' ',' ',' '),$coord); $arr = array('lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'html' => ''); call_hooks('generate_map',$arr); - return $arr['html']; + return (($arr['html']) ? $arr['html'] : $coord); } function generate_named_map($location) { $arr = array('location' => $location, 'html' => ''); call_hooks('generate_named_map',$arr); - return $arr['html']; + return (($arr['html']) ? $arr['html'] : $location); } diff --git a/version.inc b/version.inc index 320610d0f..790427996 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-03-24.981 +2015-03-25.982 |