diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 7c0a007..e806000 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -61,13 +61,13 @@ jobs: steps: - name: Checkout Cacti - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: Cacti/cacti path: cacti - name: Checkout Weathermap Plugin - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: path: cacti/plugins/weathermap @@ -189,9 +189,9 @@ jobs: run: composer run-script lint ${{ github.workspace }}/cacti/plugins/weathermap working-directory: ${{ github.workspace }}/cacti - - name: Checking coding standards on base code - run: composer run-script phpcsfixer ${{ github.workspace }}/cacti/plugins/weathermap - working-directory: ${{ github.workspace }}/cacti +# - name: Checking coding standards on base code +# run: composer run-script phpcsfixer ${{ github.workspace }}/cacti/plugins/weathermap +# working-directory: ${{ github.workspace }}/cacti # - name: Run PHPStan at Level 6 on base code outside of Composer due to technical issues # run: ./include/vendor/bin/phpstan analyze --level 6 ${{ github.workspace }}/cacti/plugins/weathermap diff --git a/CHANGELOG.md b/CHANGELOG.md index cedf88c..2212665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ IMPORTANT NOTE: This version only works on CACTI 1.x++! * issue#173: Data Source select queries slow or not working * issue#186: Popups are not working in standalone mode * issue#211: Warn Count is being reset too early +* issue: Attempt to keep the plugin basepath the weathermap directory * feature#219: Add Via Style as a Link form Option * feature#193: Allow the Info URL to be either "Time View Graph" or "Classic View Graph" diff --git a/lib/editor.inc.php b/lib/editor.inc.php index f8f1df6..40313b3 100644 --- a/lib/editor.inc.php +++ b/lib/editor.inc.php @@ -262,7 +262,7 @@ function show_editor_startpage() { $errormessage .= $configerror . '
'; } - html_start_box(__('Welcome to the PHP Weathermap %s Editor', $weathermap_version, 'weathermap'), '100%', '', '3', 'center', ''); + html_start_box(__('Welcome to the PHP Weathermap %s Editor', $weathermap_version, 'weathermap'), '100%', false, 3, 'center', ''); print '
';
@@ -1815,7 +1814,7 @@ function perms_filter($id) {
WHERE id = ?',
[$id]);
- html_start_box(__('Weathermap Permissions for Map [ %s ]', $title, 'weathermap'), '100%', '', '3', 'center', '');
+ html_start_box(__('Weathermap Permissions for Map [ %s ]', $title, 'weathermap'), '100%', false, 3, 'center', '');
?>
@@ -2120,7 +2119,7 @@ function perms_list($id) {
print $nav;
- html_start_box('', '100%', '', '3', 'center', '');
+ html_start_box('', '100%', false, 3, 'center', '');
$display_text = [
[
@@ -2275,7 +2274,7 @@ function weathermap_map_settings($id) {
$do_map_settings = false;
if ($type == 'group' || $type == 'map') {
- html_start_box(__('Usage Notes', 'weathermap'), '100%', '', '3', 'center', '');
+ html_start_box(__('Usage Notes', 'weathermap'), '100%', false, 3, 'center', '');
print ' ';
@@ -2305,7 +2304,7 @@ function weathermap_map_settings($id) {
}
}
- html_start_box($title, '100%', '', '3', 'center', 'weathermap-cacti-plugin-mgmt.php?action=map_settings_form&mapid=' . intval($id));
+ html_start_box($title, '100%', false, 3, 'center', 'weathermap-cacti-plugin-mgmt.php?action=map_settings_form&mapid=' . intval($id));
if (cacti_sizeof($settingrows)) {
html_header([__('Action', 'weathermap'), __('Name', 'weathermap'), __('Value', 'weathermap')], 2);
@@ -2377,7 +2376,7 @@ function weathermap_readonly_settings($id, $title = 'Settings') {
[$id]);
}
- html_start_box($title, '100%', '', '3', 'center', '');
+ html_start_box($title, '100%', false, 3, 'center', '');
html_header([__('Name', 'weathermap'), __('Value', 'weathermap')]);
@@ -2480,7 +2479,7 @@ function weathermap_map_settings_form($mapid = 0, $settingid = 0) {
form_start('weathermap-cacti-plugin-mgmt.php');
- html_start_box("$action $title", '100%', '', '3', 'center', '');
+ html_start_box("$action $title", '100%', false, 3, 'center', '');
draw_edit_form(['config' => $values_ar, 'fields' => $field_ar]);
@@ -2575,7 +2574,7 @@ function weathermap_chgroup($id) {
print "";
print "";
- html_start_box(__('Edit Map Group for Weathermap [ %s ]', $title, 'weathermap'), '100%', '', '3', 'center', '');
+ html_start_box(__('Edit Map Group for Weathermap [ %s ]', $title, 'weathermap'), '100%', false, 3, 'center', '');
// html_header(array("Group Name", ""));
form_alternate_row();
@@ -2628,7 +2627,7 @@ function weathermap_group_form($id = 0) {
$header = __esc('Editing Group: %s', $grouptext, 'weathermap');
}
- html_start_box($header, '100%', '', '3', 'center', '');
+ html_start_box($header, '100%', false, 3, 'center', '');
print ' ';
@@ -2655,7 +2654,7 @@ function weathermap_group_form($id = 0) {
function weathermap_group_editor() {
global $config;
- html_start_box(__('Edit Map Groups', 'weathermap'), '100%', '', '3', 'center', 'weathermap-cacti-plugin-mgmt.php?action=group_form&id=0');
+ html_start_box(__('Edit Map Groups', 'weathermap'), '100%', false, 3, 'center', 'weathermap-cacti-plugin-mgmt.php?action=group_form&id=0');
html_header([__('Actions', 'weathermap'), __('Group Name', 'weathermap'), __('Settings', 'weathermap'), __('Sort Order', 'weathermap')], 2);
diff --git a/weathermap-cacti-plugin.php b/weathermap-cacti-plugin.php
index f3f4faf..35fc2e4 100644
--- a/weathermap-cacti-plugin.php
+++ b/weathermap-cacti-plugin.php
@@ -42,8 +42,7 @@
$guest_account = true;
-chdir('../../');
-include_once('./include/auth.php');
+include_once('../../include/auth.php');
include_once($config['base_path'] . '/plugins/weathermap/lib/WeatherMap.class.php');
$showversionbox = read_config_option('weathermap_showversion');
@@ -767,7 +766,7 @@ function weathermap_footer_links() {
print '
';
- html_start_box("Local Documentation -- Weathermap Website -- Weathermap Editor -- This is version $weathermap_version ", '100%', '', '3', 'center', '');
+ html_start_box("Local Documentation -- Weathermap Website -- Weathermap Editor -- This is version $weathermap_version ", '100%', false, 3, 'center', '');
html_end_box();
}
@@ -794,7 +793,7 @@ function weathermap_mapselector($current_id = 0) {
if (cacti_sizeof($maps) > 1) {
// include graph view filter selector
- html_start_box(__('Weathermap Filter', 'weathermap'), '100%', '', '3', 'center', '');
+ html_start_box(__('Weathermap Filter', 'weathermap'), '100%', false, 3, 'center', '');
?>