Skip to content

Commit

Permalink
Revert "Removed useless hook for contribution (managed via save)."
Browse files Browse the repository at this point in the history
This reverts commit 4bad309.
  • Loading branch information
zerocrates committed Sep 22, 2016
1 parent fa044cb commit 011d4b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions GeolocationPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class GeolocationPlugin extends Omeka_Plugin_AbstractPlugin
'admin_head',
'initialize',
'contribution_type_form',
'contribution_save_form'
);

protected $_filters = array(
Expand Down Expand Up @@ -192,13 +193,12 @@ public function hookAfterSaveItem($args)
return;
}

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

$item = $args['record'];

// Find the location object for the item
$location = $this->_db->getTable('Location')->findLocationByItem($item, true);

Expand Down Expand Up @@ -483,6 +483,11 @@ public function hookContributionTypeForm($args)
}
}

public function hookContributionSaveForm($args)
{
$this->hookAfterSaveItem($args);
}

public function filterExhibitLayouts($layouts)
{
$layouts['geolocation-map'] = array(
Expand Down

0 comments on commit 011d4b6

Please sign in to comment.