@@ -75,8 +75,7 @@ public function install($module_id)
75
75
$ message = $ L ["notify_installation_problem_c " ] . " <b> " . $ e ->getMessage () . "</b> " ;
76
76
}
77
77
78
- Hooks::registerHook ("template " , "export_manager " , "admin_submission_listings_bottom " , "" , "displayExportOptions " );
79
- Hooks::registerHook ("template " , "export_manager " , "client_submission_listings_bottom " , "" , "displayExportOptions " );
78
+ $ this ->resetHooks ();
80
79
81
80
return array ($ success , $ message );
82
81
}
@@ -98,6 +97,20 @@ public function uninstall($module_id)
98
97
}
99
98
100
99
100
+ public function upgrade ($ module_id , $ old_module_version )
101
+ {
102
+ $ this ->resetHooks ();
103
+ }
104
+
105
+
106
+ public function resetHooks ()
107
+ {
108
+ Hooks::unregisterModuleHooks ("export_manager " );
109
+
110
+ Hooks::registerHook ("template " , "export_manager " , "admin_submission_listings_bottom " , "" , "displayExportOptions " );
111
+ Hooks::registerHook ("template " , "export_manager " , "client_submission_listings_bottom " , "" , "displayExportOptions " );
112
+ }
113
+
101
114
public function resetData ()
102
115
{
103
116
$ db = Core::$ db ;
@@ -741,7 +754,19 @@ public function getExportGroups() {
741
754
return ExportGroups::getExportGroups ();
742
755
}
743
756
757
+ public function getExportGroup ($ export_group_id ) {
758
+ return ExportGroups::getExportGroup ($ export_group_id );
759
+ }
760
+
744
761
public function getExportTypes ($ export_group , $ only_return_visible ) {
745
762
return ExportTypes::getExportTypes ($ export_group , $ only_return_visible );
746
763
}
764
+
765
+ public function getExportType ($ export_type_id ) {
766
+ return ExportTypes::getExportType ($ export_type_id );
767
+ }
768
+
769
+ public function getExportFilenamePlaceholderHash () {
770
+ return General::getExportFilenamePlaceholderHash ();
771
+ }
747
772
}
0 commit comments