Skip to content

Commit 61ca21b

Browse files
committed
2.1.0
1 parent 360401d commit 61ca21b

7 files changed

+13
-55
lines changed

code/Module.class.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88

99
class Module extends FormToolsModule
1010
{
11-
// required properties
1211
protected $moduleName = "System Check";
12+
protected $moduleDesc = "This module offers a few tests to analyze and repair your Form Tools installation.";
1313
protected $author = "Ben Keen";
1414
protected $authorEmail = "[email protected]";
1515
protected $authorLink = "http://formtools.org";
1616
protected $version = "2.1.0";
17-
protected $date = "2017-09-23";
17+
protected $date = "2017-09-24";
1818
protected $originLanguage = "en_us";
19-
2019
protected $jsFiles = array("scripts/tests.js");
2120
protected $cssFiles = array("css/styles.css");
2221

env.php

+5-12
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,11 @@
2626
"tab_link" => "{$same_page}?page=phpinfo",
2727
"pages" => array("phpinfo")
2828
)
29-
),
30-
"css_files" => array("{$root_url}/modules/system_check/global/css/styles.css")
29+
)
3130
);
3231

33-
switch ($page) {
34-
case "summary":
35-
require_once("env_tab_summary.php");
36-
break;
37-
case "phpinfo":
38-
require_once("env_tab_phpinfo.php");
39-
break;
40-
default:
41-
require_once("env_tab_summary.php");
42-
break;
32+
if ($page === "phpinfo") {
33+
$module->displayPage("templates/env.tpl", $page_vars);
34+
} else {
35+
require_once("env_tab_summary.php");
4336
}

env_tab_phpinfo.php

-5
This file was deleted.

env_tab_summary.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<?php
22

3+
use FormTools\Core;
34
use FormTools\Modules;
45
use FormTools\Settings;
56
use FormTools\Themes;
67

78
$settings = Settings::get();
89

910
$php_version = PHP_VERSION;
10-
$mysql_version = ""; // mysql_get_server_info(); TODO
11+
$mysql_version = Core::$db->getMysQLVersion();
1112
$suhosin_installed = (extension_loaded("suhosin")) ? $L["word_installed"] : $L["phrase_not_installed"];
1213
$sessions_available = (extension_loaded("session")) ? $L["word_available"] : $L["phrase_not_available"];
1314
$curl_available = (extension_loaded("curl")) ? $L["word_available"] : $L["phrase_not_available"];
@@ -57,4 +58,4 @@
5758

5859
$page_vars["report_card"] = $report_card;
5960

60-
Themes::displayModulePage("templates/env.tpl", $page_vars);
61+
$module->displayPage("templates/env.tpl", $page_vars);

help.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
require_once("../../global/library.php");
44

5-
use FormTools\Modules;
6-
use FormTools\Themes;
5+
$module = FormTools\Modules::initModulePage("admin");
76

8-
$module = Modules::initModule("admin");
9-
$L = $module->getLangStrings();
10-
11-
Themes::displayModulePage("templates/help.tpl", array());
7+
$module->displayPage("templates/help.tpl", array());

lang/en_us.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
$L["text_hook_verification_intro"] = "Modules interact with the Core script through <i>hooks</i>. They attach their own functionality to act at particular junctions in the code. If this gets corrupted, it can prevent the module from working properly. This test examines your database to confirm that the hooks for all your modules are configured properly.";
4949
$L["text_problems_identified_and_fixed"] = "Problems are both identified and fixed.";
5050
$L["text_problems_identified_not_fixed"] = "Problems are only identified, not fixed.";
51-
$L["text_help"] = "For more information on this module, please see the <a href=\"http://modules.formtools.org/system_check/\" target=\"_blank\">help documentation</a> on the Form Tools site.";
51+
$L["text_help"] = "For more information on this module, please see the <a href=\"https://docs.formtools.org/modules/system_check/\" target=\"_blank\">help documentation</a> on the Form Tools site.";
5252
$L["text_file_check"] = "This examines all compatible components (Core, modules and themes) to confirm that the component's files exist.";
5353
$L["text_file_verification_intro"] = "This checks over your Core, modules and themes to confirm that all the necessary files have been uploaded properly. If any are missing, you will need to re-download the appropriate component and upload them to your server.";
5454
$L["text_orphan_record_check_intro"] = "This is a house-keeping test to examine the Core database tables for any unwanted orphaned records and references. Orphaned records are database entries that are no longer needed and should have been deleted along with their \"parents\". For example, when you delete a form, any references to that form ID should also be deleted. Orphaned records shouldn't cause problems, but add unnecessary clutter to your database. <b>If this test finds anything, we'd appreciate it if you <a href=\"http://forums.formtools.org/\">report them in the forums</a>!</b>";

module.php

-26
This file was deleted.

0 commit comments

Comments
 (0)