File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments