Index: trunk/extensions/Maps/includes/parserHooks/Maps_Finddestination.php |
— | — | @@ -59,16 +59,8 @@ |
60 | 60 | |
61 | 61 | $params = array(); |
62 | 62 | |
63 | | - $params['location'] = new Parameter( |
64 | | - 'location', |
65 | | - Parameter::TYPE_STRING, |
66 | | - null, |
67 | | - array(), |
68 | | - array( |
69 | | - new CriterionIsLocation(), |
70 | | - ) |
71 | | - ); |
72 | | - |
| 63 | + $params['location'] = new Parameter( 'location' ); |
| 64 | + $params['location']->addCriteria( new CriterionIsLocation() ); |
73 | 65 | $params['location']->lowerCaseValue = false; |
74 | 66 | |
75 | 67 | $params['bearing'] = new Parameter( |
— | — | @@ -76,10 +68,8 @@ |
77 | 69 | Parameter::TYPE_FLOAT |
78 | 70 | ); |
79 | 71 | |
80 | | - $params['distance'] = new Parameter( |
81 | | - 'distance' |
82 | | - // TODO: add distance criterion |
83 | | - ); |
| 72 | + $params['distance'] = new Parameter( 'distance' ); |
| 73 | + $params['distance']->addCriteria( new CriterionIsDistance() ); |
84 | 74 | |
85 | 75 | $params['mappingservice'] = new Parameter( |
86 | 76 | 'mappingservice', |