*/
class MapstractionPlugin extends Plugin
{
- const VERSION = STATUSNET_VERSION;
+ const VERSION = GNUSOCIAL_VERSION;
/** provider name, one of:
'cloudmade', 'google', 'microsoft', 'openlayers', 'yahoo' */
*
* @return boolean event handler return
*/
- function onRouterInitialized($m)
+ function onRouterInitialized(URLMapper $m)
{
$m->connect(':nickname/all/map',
array('action' => 'allmap'),
default:
return true;
}
-
- if ($this->provider == 'openlayers') {
- // We have an optimized path for our default case.
- //
- // Note that OpenLayers.js needs to be separate, or it won't
- // be able to find its UI images and styles.
- $action->script($this->path('usermap-mxn-openlayers.min.js'));
- } else {
- $action->script(sprintf('%s?(%s)',
- $this->path('js/mxn.js'),
- $this->provider));
-
- $action->script($this->path('usermap.js'));
- }
+ $action->script(sprintf('%s?(%s)',
+ $this->path('js/mxn.js'),
+ $this->provider));
+ $action->script($this->path('usermap.js'));
$action->inlineScript(sprintf('var _provider = "%s";', $this->provider));
return true;
}
- function onEndShowSections($action)
+ function onEndShowSections(Action $action)
{
$actionName = $action->trimmed('action');
// These are the ones that have maps on 'em
$action->elementEnd('div');
}
- function onPluginVersion(&$versions)
+ function onPluginVersion(array &$versions)
{
$versions[] = array('name' => 'Mapstraction',
'version' => self::VERSION,