diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c09b1ba..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: [push, pull_request] -name: Main -jobs: - php-cs-fixer: - name: PHP-CS-Fixer - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: PHP-CS-Fixer - uses: docker://oskarstark/php-cs-fixer-ga diff --git a/.github/workflows/php-lint.yml b/.github/workflows/php-lint.yml deleted file mode 100644 index 3abbc65..0000000 --- a/.github/workflows/php-lint.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: PHP Linting -on: pull_request -jobs: - phplint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: michaelw90/PHP-Lint@master diff --git a/hook.php b/hook.php index d0ab39c..a79c1a9 100644 --- a/hook.php +++ b/hook.php @@ -121,6 +121,7 @@ function plugin_room_uninstall() { global $DB; + // Drop plugin tables $tables = [ 'glpi_plugin_room_rooms_computers', 'glpi_plugin_room_roomtypes', @@ -133,6 +134,11 @@ function plugin_room_uninstall() $DB->query("DROP TABLE IF EXISTS `$table`;"); } + // Delete reservations + $DB->query('DELETE FROM `glpi_reservations` WHERE `reservationitems_id` in + (SELECT id FROM `glpi_reservationitems` WHERE `itemtype` = "PluginRoomRoom");'); + + // Delete logs, items and other things from glpi tables $tables_glpi = [ 'glpi_displaypreferences', 'glpi_documents_items', @@ -143,7 +149,7 @@ function plugin_room_uninstall() ]; foreach ($tables_glpi as $table_glpi) { - $DB->query('DELETE FROM `$table_glpi` WHERE `itemtype` = "PluginRoomRoom";'); + $DB->query("DELETE FROM `$table_glpi` WHERE `itemtype` = 'PluginRoomRoom';"); } return true; diff --git a/locales/it_IT.mo b/locales/it_IT.mo index 5c09eaa..ec39a07 100644 Binary files a/locales/it_IT.mo and b/locales/it_IT.mo differ diff --git a/locales/it_IT.po b/locales/it_IT.po index af38740..8859006 100644 --- a/locales/it_IT.po +++ b/locales/it_IT.po @@ -52,7 +52,7 @@ msgstr[1] "Locali" #: inc/dropdown1.class.php:14 msgid "Room specificities" -msgstr "Caratteristica di Locale" +msgstr "Caratteristica del locale" #: inc/profile.class.php:115 msgid "General" @@ -61,27 +61,27 @@ msgstr "" #: inc/roomaccesscond.class.php:14 inc/room.class.php:113 #: inc/room.class.php:330 msgid "Conditions of Access" -msgstr "" +msgstr "Condizioni di accesso" #: inc/room.class.php:61 inc/room.class.php:318 msgid "Type" -msgstr "" +msgstr "Tipo" #: inc/room.class.php:69 inc/room.class.php:377 msgid "Group in charge of the hardware" -msgstr "" +msgstr "Gruppo responsabile dell'hardware" #: inc/room.class.php:79 inc/room.class.php:353 msgid "Technician in charge of the hardware" -msgstr "" +msgstr "Responsabile tecnico" #: inc/room.class.php:87 inc/room.class.php:342 msgid "Alternate username" -msgstr "" +msgstr "Nome utente alternativo" #: inc/room.class.php:95 inc/room.class.php:153 inc/room.class.php:468 msgid "Comments" -msgstr "" +msgstr "Commenti" #: inc/room.class.php:105 inc/room.class.php:364 msgid "Seating" @@ -89,7 +89,7 @@ msgstr "Posti a sedere" #: inc/room.class.php:121 inc/room.class.php:387 msgid "Date of purchase" -msgstr "" +msgstr "Data di acquisto" #: inc/room.class.php:129 msgid "Printer" @@ -149,11 +149,11 @@ msgstr "" #: inc/room.class.php:306 msgid "Location" -msgstr "" +msgstr "Posizione" #: inc/room.class.php:400 msgid "Whiteboard" -msgstr "" +msgstr "Lavagna" #: inc/room.class.php:513 msgid "Associated items" diff --git a/locales/room.pot b/locales/room.pot index 9fb3db5..11aad3a 100644 --- a/locales/room.pot +++ b/locales/room.pot @@ -1,13 +1,14 @@ -# GLPI - Room Management plugin -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Rooms Development Team +# This file is distributed under the same license as the GLPI - Rooms plugin package. # FIRST AUTHOR , YEAR. # +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: GLPI - Room plugin 3.2.0-jb\n\n" +"Project-Id-Version: GLPI - Rooms plugin\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-30 18:48+0200\n" +"POT-Creation-Date: 2022-04-07 21:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +22,7 @@ msgstr "" msgid "Error during the database update" msgstr "" -#: hook.php:276 hook.php:284 hook.php:362 front/room.form.php:82 +#: hook.php:276 hook.php:284 hook.php:362 index.php:11 front/room.form.php:82 #: front/room.php:11 inc/profile.class.php:145 msgid "Room Management" msgstr "" @@ -57,14 +58,11 @@ msgstr "" msgid "General" msgstr "" -#: inc/roomaccesscond.class.php:14 inc/room.class.php:113 -#: inc/room.class.php:330 -msgid "Conditions of Access" -msgstr "" - -#: inc/room.class.php:61 inc/room.class.php:318 +#: inc/room.class.php:61 inc/room.class.php:318 inc/roomtype.class.php:14 msgid "Type" -msgstr "" +msgid_plural "Types" +msgstr[0] "" +msgstr[1] "" #: inc/room.class.php:69 inc/room.class.php:377 msgid "Group in charge of the hardware" @@ -86,6 +84,11 @@ msgstr "" msgid "Seating" msgstr "" +#: inc/room.class.php:113 inc/room.class.php:330 +#: inc/roomaccesscond.class.php:14 +msgid "Conditions of Access" +msgstr "" + #: inc/room.class.php:121 inc/room.class.php:387 msgid "Date of purchase" msgstr ""