Index: trunk/extensions/GeoData/ApiQueryCoordinates.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | $vals['primary'] = ''; |
59 | 59 | } |
60 | 60 | foreach( $params['prop'] as $prop ) { |
61 | | - if ( isset( Coord::$fieldMapping[$prop] ) && isset( $row->$field ) ) { |
| 61 | + if ( isset( Coord::$fieldMapping[$prop] ) && isset( $row->{Coord::$fieldMapping[$prop]} ) ) { |
62 | 62 | $field = Coord::$fieldMapping[$prop]; |
63 | 63 | $vals[$prop] = $row->$field; |
64 | 64 | } |
Index: trunk/extensions/GeoData/ApiQueryGeoSearch.php |
— | — | @@ -110,11 +110,11 @@ |
111 | 111 | $vals['primary'] = ''; |
112 | 112 | } |
113 | 113 | foreach( $params['prop'] as $prop ) { |
114 | | - if ( isset( Coord::$fieldMapping[$prop] ) && isset( $row->$field ) ) { |
| 114 | + if ( isset( Coord::$fieldMapping[$prop] ) && isset( $row->{Coord::$fieldMapping[$prop]} ) ) { |
115 | 115 | $field = Coord::$fieldMapping[$prop]; |
116 | 116 | $vals[$prop] = $row->$field; |
117 | 117 | } |
118 | | - } |
| 118 | + } |
119 | 119 | $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $vals ); |
120 | 120 | if ( !$fit ) { |
121 | 121 | break; |