Просмотр исходного кода

Cosmetic fixes for prepare release

root 2 месяцев назад
Родитель
Сommit
80ef79a552

+ 1 - 1
html/admin/devices/editdevice.php

@@ -259,7 +259,7 @@ print_editdevice_submenu($page_url, $id, $device['device_type'], $user_info['log
                 print "<td class='data'>";
                 print_qa_select('f_dhcp', $device['dhcp']);
                 print "<td class='data' colspan=4>";
-                print_url(WEB_list_l3_networks, "/admin/devices/edit_gw_subnets.php?id=$id");
+                print_url(WEB_list_l3_networks, "/admin/devices/edit_gw_subnets.php?id=$id", 'linkButton');
                 print "</tr>\n";
             }
 

+ 4 - 4
html/admin/users/editauth.php

@@ -452,15 +452,15 @@ $disabled_attr = $is_system_ou ? 'disabled' : '';
                     }
                     ?>
                 </td>
-                <td><?php if (empty($device) || (!empty($device) && $device['device_type'] > 2)) echo WEB_cell_nagios; ?></td>
-                <td><?php if (empty($device) || (!empty($device) && $device['device_type'] > 2)) echo WEB_cell_link; ?></td>
+                <td><?php echo WEB_cell_nagios; ?></td>
+                <td><?php echo WEB_cell_link; ?></td>
                 <td><?php echo WEB_cell_nagios_handler; ?></td>
                 <td></td>
             </tr>
             <tr>
                 <td><input type="text" name="f_wiki" value="<?php echo htmlspecialchars($auth_info['wikiname']); ?>" <?php print $disabled_attr; ?> class='full-width'></td>
-                <td><?php if (empty($device) || (!empty($device) && $device['device_type'] > 2)) print_qa_select('f_nagios', $auth_info['nagios'],$is_system_ou); ?></td>
-                <td><?php if (empty($device) || (!empty($device) && $device['device_type'] > 2)) print_qa_select('f_link', $auth_info['link_check'],$is_system_ou); ?></td>
+                <td><?php print_qa_select('f_nagios', $auth_info['nagios'],$is_system_ou); ?></td>
+                <td><?php print_qa_select('f_link', $auth_info['link_check'],$is_system_ou); ?></td>
                 <td colspan=2><input type="text" name="f_handler" value="<?php echo htmlspecialchars($auth_info['nagios_handler']); ?>" <?php print $disabled_attr; ?> class='full-width'></td>
             </tr>
 

+ 1 - 1
html/admin/users/edituser.php

@@ -358,7 +358,7 @@ require_once($_SERVER["DOCUMENT_ROOT"] . "/inc/header.php");
             <tr>
                 <?php
                 print "<td>";
-                print_url(WEB_user_rule_list, "/admin/users/edit_rules.php?id=$id");
+                print_url(WEB_user_rule_list, "/admin/users/edit_rules.php?id=$id", 'linkButton');
                 print "</td>";
                 $rule_count = get_count_records($db_link, "auth_rules", "user_id=?", [ $id ]);
                 print "<td > Count: " . $rule_count . "</td>";

+ 3 - 3
html/api.php

@@ -139,7 +139,7 @@ function safe_get_record($db, $table, $id) {
     
     $pk_field = 'id'; // Все таблицы используют 'id' как первичный ключ
     $result = get_record_sql($db, "SELECT * FROM $table WHERE $pk_field = ?", [(int)$id]);
-    error_log("SELECT * FROM $table WHERE $pk_field = $id ::". $result);
+#    error_log("SELECT * FROM $table WHERE $pk_field = $id ::". $result);
     return $result;
 }
 
@@ -304,12 +304,12 @@ if (!empty($action)) {
                 header('Content-Type: application/json; charset=utf-8');
                 echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR);
             } else {
-                LOG_VERBOSE($db_link, "API: Not found.");
+                LOG_VERBOSE($db_link, "API: Record not found.");
                 http_response_code(404);
                 echo json_encode(['error' => 'Not found']);
             }
         } else {
-            LOG_VERBOSE($db_link, "API: not enough parameters");
+            LOG_DEBUG($db_link, "API: not enough parameters | GET: " . json_encode($_GET, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . " | POST: " . json_encode($_POST, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
             http_response_code(400);
             echo json_encode(['error' => 'Missing parameters']);
         }

+ 2 - 0
html/inc/common.php

@@ -1953,6 +1953,7 @@ function print_dhcp_acl_list($db, $qa_name, $value = '', $disabled = 0)
 {
     $disabled_attr = $disabled ? 'disabled' : '';
 
+    $acl_values = [];
     $dhcp_acl = get_records_sql($db,
         "SELECT DISTINCT dhcp_acl FROM user_auth
          WHERE dhcp_acl IS NOT NULL AND dhcp_acl != '' AND deleted = 0"
@@ -1984,6 +1985,7 @@ function print_dhcp_acl_list($db, $qa_name, $value = '', $disabled = 0)
 function print_dhcp_option_set_list($db, $qa_name, $value = '', $disabled = 0)
 {
     $disabled_attr = $disabled ? 'disabled' : '';
+    $option_values = [];
     $dhcp_option_sets = get_records_sql($db,
         "SELECT DISTINCT dhcp_option_set FROM user_auth
          WHERE dhcp_option_set IS NOT NULL AND dhcp_option_set != '' AND deleted = 0"

+ 1 - 0
scripts/updates/3-0-3/readme.txt

@@ -0,0 +1 @@
+release 3.0.3 - bugfixes

+ 1 - 1
scripts/updates/upgrade.pl

@@ -195,7 +195,7 @@ for (my $i=$old_version_index; $i < scalar @old_releases; $i++) {
     @perl_patches = ();
 
 #change version
-do_sql($dbh,'UPDATE version SET version="'.$old_releases[$i].'"');
+do_sql($dbh,'UPDATE version SET version=?', $old_releases[$i]);
 }
 
 print "Done!\n";

BIN
scripts/utils/wiki/EyeShowPlugin.zip