Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(Core): remove uselss and non-functional injection #396

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

stonebuzz
Copy link
Contributor

@stonebuzz stonebuzz commented Oct 18, 2024

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

Injecting generic objects into $CFG_GLPI['state_types'] is useless and can't work

image

The corresponding SQL table cannot accept a new is_visible_xxxx column (this is GLPI's responsibility in this area).

Updating the field simply doesn't work

MariaDB [10bugfixes]> explain glpi_states;
+-------------------------------+------------------+------+-----+---------+----------------+
| Field                         | Type             | Null | Key | Default | Extra          |
+-------------------------------+------------------+------+-----+---------+----------------+
| id                            | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| name                          | varchar(255)     | YES  | MUL | NULL    |                |
| entities_id                   | int(10) unsigned | NO   | MUL | 0       |                |
| is_recursive                  | tinyint(4)       | NO   | MUL | 0       |                |
| comment                       | text             | YES  |     | NULL    |                |
| states_id                     | int(10) unsigned | NO   | MUL | 0       |                |
| completename                  | text             | YES  |     | NULL    |                |
| level                         | int(11)          | NO   | MUL | 0       |                |
| ancestors_cache               | longtext         | YES  |     | NULL    |                |
| sons_cache                    | longtext         | YES  |     | NULL    |                |
| is_visible_computer           | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_monitor            | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_networkequipment   | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_peripheral         | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_phone              | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_printer            | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_softwareversion    | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_softwarelicense    | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_line               | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_certificate        | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_rack               | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_passivedcequipment | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_enclosure          | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_pdu                | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_cluster            | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_contract           | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_appliance          | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_databaseinstance   | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_cable              | tinyint(4)       | NO   | MUL | 1       |                |
| is_visible_unmanaged          | tinyint(4)       | NO   | MUL | 1       |                |
| date_mod                      | timestamp        | YES  | MUL | NULL    |                |
| date_creation                 | timestamp        | YES  | MUL | NULL    |                |
+-------------------------------+------------------+------+-----+---------+----------------+

Fix !34853

No CHANGELOG entry as this issue is not is not known (no one paid attention and it doesn't work anyway)

Screenshots (if appropriate):

@stonebuzz stonebuzz added the bug label Oct 18, 2024
@stonebuzz stonebuzz requested a review from Rom1-B October 18, 2024 14:53
@stonebuzz stonebuzz self-assigned this Oct 18, 2024
@Rom1-B Rom1-B merged commit 2436496 into main Oct 21, 2024
3 checks passed
@Rom1-B Rom1-B deleted the fix_error_with_states branch October 21, 2024 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants