mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
On seeding and transplanting logs, only plantings can be referenced.
This commit is contained in:
parent
979a43156b
commit
83868308ea
|
@ -302,3 +302,14 @@ function farm_crop_views_post_render(&$view, &$output, &$cache) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_farm_log_allowed_asset_reference_type().
|
||||
*/
|
||||
function farm_crop_farm_log_allowed_asset_reference_type($log_type) {
|
||||
|
||||
// On seeding and transplanting logs, only plantings can be referenced.
|
||||
if (in_array($log_type, array('farm_seeding', 'farm_transplanting'))) {
|
||||
return 'planting';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue