Skip to content

Commit a560bea

Browse files
committed
Continued work
1 parent 363cf44 commit a560bea

6 files changed

Lines changed: 30 additions & 138 deletions

File tree

files.php

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
11
<?php
22

3-
require_once("../../global/library.php");
4-
5-
use FormTools\Modules\Files;
6-
use FormTools\Modules\General;
73

4+
require_once("../../global/library.php");
85

9-
ft_init_module_page();
6+
use FormTools\Core;
7+
use FormTools\Modules;
8+
use FormTools\Themes;
9+
use FormTools\Modules\SystemCheck\Files;
10+
use FormTools\Modules\SystemCheck\General;
1011

11-
$settings = ft_get_settings();
12-
$core_version = ($settings["release_type"] == "beta") ? "{$settings["program_version"]}-beta-{$settings["release_date"]}" : $settings["program_version"];
12+
Core::init();
13+
Core::$user->checkAuth("admin");
14+
Modules::initModulePage();
15+
$L = Modules::getModuleLangFile("system_check", Core::$user->getLang());
16+
$root_url = Core::getRootUrl();
1317

1418
$word_testing_uc = mb_strtoupper($L["word_untested"]);
1519
$word_passed_uc = mb_strtoupper($L["word_passed"]);
1620
$word_failed_uc = mb_strtoupper($L["word_failed"]);
17-
$notify_file_verification_complete_problems = ft_sanitize($L["notify_file_verification_complete_problems"]);
21+
$notify_file_verification_complete_problems = addcslashes($L["notify_file_verification_complete_problems"], '"');
1822

1923
$page_vars = array();
20-
$page_vars["core_version"] = $core_version;
24+
$page_vars["core_version"] = Core::getVersionString();
2125
$page_vars["module_list"] = General::getCompatibleModules("files");
2226
$page_vars["theme_list"] = Files::getCompatibleThemes();
2327
$page_vars["head_string"] =<<< EOF
24-
<script src="{$g_root_url}/modules/system_check/global/scripts/tests.js"></script>
25-
<link type="text/css" rel="stylesheet" href="{$g_root_url}/modules/system_check/global/css/styles.css">
28+
<script src="{$root_url}/modules/system_check/global/scripts/tests.js"></script>
29+
<link type="text/css" rel="stylesheet" href="{$root_url}/modules/system_check/global/css/styles.css">
2630
<script>
2731
g.messages = [];
2832
g.messages["word_testing_c"] = "{$L["word_testing_c"]}";
@@ -39,8 +43,8 @@
3943
g.messages["validation_no_components_selected"] = "{$L["validation_no_components_selected"]}";
4044
g.messages["notify_file_verification_complete_problems"] = "$notify_file_verification_complete_problems";
4145
var loading = new Image();
42-
loading.src = "$g_root_url/modules/system_check/images/loading.gif";
46+
loading.src = "$root_url/modules/system_check/images/loading.gif";
4347
</script>
4448
EOF;
4549

46-
ft_display_module_page("templates/files.tpl", $page_vars);
50+
Themes::displayModulePage("templates/files.tpl", $page_vars);

index.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
<?php
22

33
require_once("../../global/library.php");
4-
ft_init_module_page();
4+
5+
use FormTools\Core;
6+
use FormTools\Modules;
7+
use FormTools\Themes;
8+
9+
Core::init();
10+
Core::$user->checkAuth("admin");
11+
Modules::initModulePage();
12+
13+
$root_url = Core::getRootUrl();
514

615
$page_vars = array();
716
$page_vars["head_string"] =<<< END
8-
<link type="text/css" rel="stylesheet" href="{$g_root_url}/modules/system_check/global/css/styles.css?v=2">
17+
<link type="text/css" rel="stylesheet" href="{$root_url}/modules/system_check/global/css/styles.css?v=2">
918
END;
1019

11-
ft_display_module_page("templates/index.tpl", $page_vars);
20+
Themes::displayModulePage("templates/index.tpl", $page_vars);

lang/en_us.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141
$L["phrase_suhosin_extension"] = "Suhosin Extension";
4242
$L["phrase_curl_extension"] = "Curl Extension";
4343
$L["phrase_simplexml_extension"] = "SimpleXML Extension";
44-
$L["phrase_ft3_compatibility"] = "FT3 compatibility";
45-
$L["phrase_formtools3_compatibility"] = "Form Tools 3 compatibility";
4644

4745
$L["text_tables_test"] = "The following tables will be tested to confirm they exist, and that the column information is valid.";
4846
$L["text_module_intro"] = "This module lets you run tests on your Form Tools installation to look for potential problems. Choose one of the tests below.";

module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
$MODULE["version"] = "2.0.0";
1111
$MODULE["date"] = "2017-06-04";
1212
$MODULE["origin_language"] = "en_us";
13+
$MODULE["namespace"] = "SystemCheck";
1314

1415
// define the module navigation - the keys are keys defined in the language file. This lets
1516
// the navigation - like everything else - be customized to the users language. The paths are always built
1617
// relative to the module's root, so help/index.php means: /[form tools root]/modules/export_manager/help/index.php
1718
$MODULE["nav"] = array(
1819
"module_name" => array('{$module_dir}/index.php', false),
19-
"phrase_ft3_compatibility" => array('{$module_dir}/ft3.php', true),
2020
"phrase_file_verification" => array('{$module_dir}/files.php', true),
2121
"phrase_table_verification" => array('{$module_dir}/tables.php', true),
2222
"phrase_hook_verification" => array('{$module_dir}/hooks.php', true),

templates/ft3.tpl

Lines changed: 0 additions & 115 deletions
This file was deleted.

templates/index.tpl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
<hr size="1" />
2121

2222
<table cellspacing="0" class="index_link_table">
23-
<tr>
24-
<td valign="top" width="160"><a href="ft3.php">{$L.phrase_formtools3_compatibility}</a></td>
25-
<td>{$L.text_ft3_compatibility}</td>
26-
</tr>
2723
<tr>
2824
<td valign="top" width="160"><a href="files.php">{$L.phrase_file_verification}</a></td>
2925
<td>{$L.text_file_check} {$L.text_problems_identified_not_fixed}</td>

0 commit comments

Comments
 (0)