Skip to content

Commit 011d4b6

Browse files
committed
Revert "Removed useless hook for contribution (managed via save)."
This reverts commit 4bad309.
1 parent fa044cb commit 011d4b6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

GeolocationPlugin.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class GeolocationPlugin extends Omeka_Plugin_AbstractPlugin
2323
'admin_head',
2424
'initialize',
2525
'contribution_type_form',
26+
'contribution_save_form'
2627
);
2728

2829
protected $_filters = array(
@@ -192,13 +193,12 @@ public function hookAfterSaveItem($args)
192193
return;
193194
}
194195

196+
$item = $args['record'];
195197
// If we don't have the geolocation form on the page, don't do anything!
196198
if (!isset($post['geolocation'])) {
197199
return;
198200
}
199201

200-
$item = $args['record'];
201-
202202
// Find the location object for the item
203203
$location = $this->_db->getTable('Location')->findLocationByItem($item, true);
204204

@@ -483,6 +483,11 @@ public function hookContributionTypeForm($args)
483483
}
484484
}
485485

486+
public function hookContributionSaveForm($args)
487+
{
488+
$this->hookAfterSaveItem($args);
489+
}
490+
486491
public function filterExhibitLayouts($layouts)
487492
{
488493
$layouts['geolocation-map'] = array(

0 commit comments

Comments
 (0)