-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhooks.php
52 lines (45 loc) · 2.23 KB
/
hooks.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
require_once("../../global/library.php");
ft_init_module_page();
if (isset($_GET["repair"]))
{
$module_ids = explode(",", $_GET["repair"]);
list($g_success, $g_message) = dbi_reset_module_hook_calls($module_ids);
}
// example
//dbi_generate_module_hook_array("form_backup", "1.1.4");
//exit;
$word_testing_uc = mb_strtoupper($L["word_untested"]);
$word_passed_uc = mb_strtoupper($L["word_passed"]);
$word_failed_uc = mb_strtoupper($L["word_failed"]);
$notify_hook_verification_complete_problems = ft_sanitize($L["notify_hook_verification_complete_problems"]);
$page_vars = array();
$page_vars["module_list"] = dbi_get_hook_verification_compatible_modules();
$page_vars["head_string"] =<<< EOF
<script src="{$g_root_url}/modules/database_integrity/global/scripts/integrity.js"></script>
<link type="text/css" rel="stylesheet" href="{$g_root_url}/modules/database_integrity/global/css/styles.css">
<script>
g.messages = [];
g.messages["word_testing_c"] = "{$L["word_testing_c"]}";
g.messages["word_untested"] = "$word_testing_uc";
g.messages["word_passed"] = "$word_passed_uc";
g.messages["word_failed"] = "$word_failed_uc";
g.messages["phrase_missing_table_c"] = "{$L["phrase_missing_table_c"]}";
g.messages["phrase_missing_column_c"] = "{$L["phrase_missing_column_c"]}";
g.messages["phrase_table_looks_good_c"] = "{$L["phrase_table_looks_good_c"]}";
g.messages["phrase_invalid_column_c"] = "{$L["phrase_invalid_column_c"]}";
g.messages["text_tables_test"] = "{$L["text_tables_test"]}";
g.messages["notify_test_complete_problems"] = "{$L["notify_test_complete_problems"]}";
g.messages["notify_test_complete_no_problems"] = "{$L["notify_test_complete_no_problems"]}";
g.messages["validation_no_components_selected"] = "{$L["validation_no_components_selected"]}";
g.messages["notify_hook_verification_complete_problems"] = "$notify_hook_verification_complete_problems";
var loading = new Image();
loading.src = "$g_root_url/modules/database_integrity/images/loading.gif";
$(function() {
$("#repair_hooks").live("click", function() {
window.location = "hooks.php?repair=" + di.hook_verification_failed_module_ids.toString();
});
});
</script>
EOF;
ft_display_module_page("templates/hooks.tpl", $page_vars);