Index: trunk/extensions/SemanticMaps/includes/SM_GeoCoordsHooks.php |
— | — | @@ -33,7 +33,8 @@ |
34 | 34 | // Only apply when there is more then one print request. |
35 | 35 | // This way requests comming from #show are ignored. |
36 | 36 | if ( count( $printRequests ) > 0 ) { |
37 | | - $allCoords = true; |
| 37 | + $allValid = true; |
| 38 | + $hasCoords = false; |
38 | 39 | |
39 | 40 | // Loop through the print requests to determine their types. |
40 | 41 | foreach( $printRequests as /* SMWPrintRequest */ $printRequest ) { |
— | — | @@ -43,15 +44,18 @@ |
44 | 45 | } |
45 | 46 | |
46 | 47 | $typeId = $printRequest->getTypeID(); |
47 | | - |
48 | | - if ( $typeId != '_geo' ) { |
49 | | - $allCoords = false; |
| 48 | + |
| 49 | + if ( $typeId == '_geo' ) { |
| 50 | + $hasCoords = true; |
| 51 | + } |
| 52 | + else { |
| 53 | + $allValid = false; |
50 | 54 | break; |
51 | 55 | } |
52 | 56 | } |
53 | 57 | |
54 | 58 | // If they are all coordinates, set the result format to 'map'. |
55 | | - if ( $allCoords ) { |
| 59 | + if ( $allValid && $hasCoords ) { |
56 | 60 | $format = 'map'; |
57 | 61 | } |
58 | 62 | } |