Skip to content

Commit 86d684b

Browse files
committed
added necessary methods for API 2.0.0; upgrade method
1 parent 6cb0a1a commit 86d684b

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

code/Module.class.php

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ public function install($module_id)
7575
$message = $L["notify_installation_problem_c"] . " <b>" . $e->getMessage() . "</b>";
7676
}
7777

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();
8079

8180
return array($success, $message);
8281
}
@@ -98,6 +97,20 @@ public function uninstall($module_id)
9897
}
9998

10099

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+
101114
public function resetData()
102115
{
103116
$db = Core::$db;
@@ -741,7 +754,19 @@ public function getExportGroups() {
741754
return ExportGroups::getExportGroups();
742755
}
743756

757+
public function getExportGroup($export_group_id) {
758+
return ExportGroups::getExportGroup($export_group_id);
759+
}
760+
744761
public function getExportTypes($export_group, $only_return_visible) {
745762
return ExportTypes::getExportTypes($export_group, $only_return_visible);
746763
}
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+
}
747772
}

0 commit comments

Comments
 (0)