├── certificates.png ├── locales ├── cs_CZ.mo ├── da_DK.mo ├── de_DE.mo ├── en_GB.mo ├── es_ES.mo ├── fr_FR.mo ├── pl_PL.mo ├── pt_BR.mo ├── ro_RO.mo ├── ru_RU.mo ├── tr_TR.mo ├── glpi.pot ├── tr_TR.po ├── da_DK.po ├── pt_BR.po ├── de_DE.po ├── pl_PL.po ├── en_GB.po ├── es_ES.po ├── ro_RO.po ├── cs_CZ.po ├── fr_FR.po └── ru_RU.po ├── sql ├── update-1.4.sql ├── update-1.5.1.sql ├── update-1.8.0.sql ├── update-1.5.0.sql ├── empty-1.3.sql ├── empty-1.4.sql ├── empty-1.5.0.sql ├── update-1.6.0.sql ├── empty-1.5.1.sql ├── empty-2.2.0.sql ├── empty-2.0.0.sql ├── empty-1.6.0.sql ├── empty-1.7.0.sql └── empty-1.8.0.sql ├── ISSUE_TEMPLATE.md ├── tools ├── extract_template.sh ├── update_mo.pl ├── update_po.pl └── move_to_po.php ├── README.md ├── front ├── certificatestate.php ├── certificatetype.php ├── certificatestate.form.php ├── certificatetype.form.php ├── notification.state.php ├── certificate.form.php └── certificate.php ├── ajax └── dropdownTypeCertificates.php ├── inc ├── menu.class.php ├── certificatestate.class.php ├── certificatetype.class.php ├── notificationtargetcertificate.class.php ├── config.class.php ├── notificationstate.class.php └── profile.class.php ├── setup.php └── certificates.xml /certificates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/certificates.png -------------------------------------------------------------------------------- /locales/cs_CZ.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/cs_CZ.mo -------------------------------------------------------------------------------- /locales/da_DK.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/da_DK.mo -------------------------------------------------------------------------------- /locales/de_DE.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/de_DE.mo -------------------------------------------------------------------------------- /locales/en_GB.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/en_GB.mo -------------------------------------------------------------------------------- /locales/es_ES.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/es_ES.mo -------------------------------------------------------------------------------- /locales/fr_FR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/fr_FR.mo -------------------------------------------------------------------------------- /locales/pl_PL.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/pl_PL.mo -------------------------------------------------------------------------------- /locales/pt_BR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/pt_BR.mo -------------------------------------------------------------------------------- /locales/ro_RO.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/ro_RO.mo -------------------------------------------------------------------------------- /locales/ru_RU.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/ru_RU.mo -------------------------------------------------------------------------------- /locales/tr_TR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/certificates/master/locales/tr_TR.mo -------------------------------------------------------------------------------- /sql/update-1.4.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `glpi_plugin_certificates` 2 | ADD `recursive` TINYINT(1) NOT NULL DEFAULT '0' 3 | AFTER `FK_entities`; -------------------------------------------------------------------------------- /sql/update-1.5.1.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `glpi_plugin_certificates` 2 | ADD `helpdesk_visible` INT(11) NOT NULL DEFAULT '1', 3 | ADD `date_mod` DATETIME DEFAULT NULL; -------------------------------------------------------------------------------- /sql/update-1.8.0.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `glpi_plugin_certificates_certificates` 2 | CHANGE `groups_id` `groups_id_tech` INT(11) NOT NULL DEFAULT '0', 3 | CHANGE `users_id` `users_id_tech` INT(11) NOT NULL DEFAULT '0'; -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Dear GLPi user. 2 | 3 | For bug reports, you can open an issue here, provide us : 4 | - The version of the plugin. 5 | - The version of your GLPI. 6 | - The steps to reproduce your issue. 7 | 8 | Delete this text to submit your issue. 9 | 10 | The Plugin team. 11 | -------------------------------------------------------------------------------- /tools/extract_template.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Only strings with domain specified are extracted (use Xt args of keyword param to set number of args needed) 4 | 5 | xgettext *.php */*.php --copyright-holder='Certificates Development Team' --package-name='GLPI - Certificates plugin' --package-version='1.9.0' -o locales/glpi.pot -L PHP --add-comments=TRANS --from-code=UTF-8 --force-po \ 6 | --keyword=_n:1,2,4t --keyword=__s:1,2t --keyword=__:1,2t --keyword=_e:1,2t --keyword=_x:1c,2,3t \ 7 | --keyword=_ex:1c,2,3t --keyword=_nx:1c,2,3,5t --keyword=_sx:1c,2,3t 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tools/update_mo.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | #!/usr/bin/perl -w 3 | 4 | if (@ARGV!=0){ 5 | print "USAGE update_mo.pl\n\n"; 6 | 7 | exit(); 8 | } 9 | 10 | 11 | opendir(DIRHANDLE,'locales')||die "ERROR: can not read current directory\n"; 12 | foreach (readdir(DIRHANDLE)){ 13 | if ($_ ne '..' && $_ ne '.'){ 14 | 15 | if(!(-l "$dir/$_")){ 16 | if (index($_,".po",0)==length($_)-3) { 17 | $lang=$_; 18 | $lang=~s/\.po//; 19 | 20 | `msgfmt locales/$_ -o locales/$lang.mo`; 21 | } 22 | } 23 | 24 | } 25 | } 26 | closedir DIRHANDLE; 27 | 28 | # 29 | # 30 | -------------------------------------------------------------------------------- /tools/update_po.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | #!/usr/bin/perl -w 3 | 4 | if (@ARGV!=2){ 5 | print "USAGE update_po.pl transifex_login transifex_password\n\n"; 6 | 7 | exit(); 8 | } 9 | $user = $ARGV[0]; 10 | $password = $ARGV[1]; 11 | 12 | opendir(DIRHANDLE,'locales')||die "ERROR: can not read current directory\n"; 13 | foreach (readdir(DIRHANDLE)){ 14 | if ($_ ne '..' && $_ ne '.'){ 15 | 16 | if(!(-l "$dir/$_")){ 17 | if (index($_,".po",0)==length($_)-3) { 18 | $lang=$_; 19 | $lang=~s/\.po//; 20 | 21 | `wget --user=$user --password=$password --output-document=locales/$_ http://www.transifex.com/api/2/project/GLPI_certificates/resource/glpi/translation/$lang/?file=$_`; 22 | } 23 | } 24 | 25 | } 26 | } 27 | closedir DIRHANDLE; 28 | 29 | # 30 | # 31 | -------------------------------------------------------------------------------- /sql/update-1.5.0.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `glpi_plugin_certificates` 2 | CHANGE `query_date` `query_date` DATE NULL DEFAULT NULL; 3 | UPDATE `glpi_plugin_certificates` 4 | SET `query_date` = NULL 5 | WHERE `query_date` = '0000-00-00'; 6 | ALTER TABLE `glpi_plugin_certificates` 7 | CHANGE `expiration_date` `expiration_date` DATE NULL DEFAULT NULL; 8 | UPDATE `glpi_plugin_certificates` 9 | SET `expiration_date` = NULL 10 | WHERE `expiration_date` = '0000-00-00'; 11 | 12 | ALTER TABLE `glpi_plugin_certificates_profiles` 13 | ADD `open_ticket` CHAR(1) DEFAULT NULL; 14 | 15 | DROP TABLE IF EXISTS `glpi_plugin_certificates_default`; 16 | CREATE TABLE `glpi_plugin_certificates_default` ( 17 | `ID` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, 18 | `status` INT(11) NOT NULL 19 | ) 20 | ENGINE = MyISAM 21 | DEFAULT CHARSET = utf8 22 | COLLATE = utf8_unicode_ci; 23 | 24 | ALTER TABLE `glpi_plugin_certificates_profiles` 25 | DROP COLUMN `interface`, 26 | DROP COLUMN `is_default`; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # certificates 2 | Plugin certificates pour GLPI 3 | 4 | Attention, ce plugin est migré dans le coeur de GLPI à partir de la version 9.2. 5 | 6 | 7 | Ce plugin est sur Transifex - Aidez-nous à le traduire : 8 | https://www.transifex.com/tsmr/GLPI_certificates/ 9 | 10 | This plugin is on Transifex - Help us to translate : 11 | https://www.transifex.com/tsmr/GLPI_certificates/ 12 | 13 | Ce plugin vous permet de gérer les certificats de votre réseau et de les associer à des éléments de l'inventaire 14 | > * Un système d'alertes mail permet de vérifier les certificats qui vont ou qui ont expirés. 15 | > * Utilisable depuis le helpdesk 16 | > * Peut être intégré au plugin "environment":https://github.com/InfotelGLPI/environment. 17 | 18 | 19 | This plugin enables you to manage your certificates into your network and associate them with elements of the inventory. 20 | > * A mailing system allow to verify already expired or soon expired certificates. 21 | > * Can be used with helpdesk 22 | > * Can be integrated into "environment":https://github.com/InfotelGLPI/environment plugin. 23 | -------------------------------------------------------------------------------- /front/certificatestate.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | include('../../../inc/includes.php'); 31 | 32 | $dropdown = new PluginCertificatesCertificateState(); 33 | include(GLPI_ROOT . "/front/dropdown.common.php"); -------------------------------------------------------------------------------- /front/certificatetype.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | include('../../../inc/includes.php'); 31 | 32 | $dropdown = new PluginCertificatesCertificateType(); 33 | include(GLPI_ROOT . "/front/dropdown.common.php"); -------------------------------------------------------------------------------- /front/certificatestate.form.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | include('../../../inc/includes.php'); 30 | 31 | $dropdown = new PluginCertificatesCertificateState(); 32 | include(GLPI_ROOT . "/front/dropdown.common.form.php"); -------------------------------------------------------------------------------- /front/certificatetype.form.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | include('../../../inc/includes.php'); 31 | 32 | $dropdown = new PluginCertificatesCertificateType(); 33 | include(GLPI_ROOT . "/front/dropdown.common.form.php"); -------------------------------------------------------------------------------- /front/notification.state.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | include('../../../inc/includes.php'); 31 | 32 | Session::checkRight("config", UPDATE); 33 | 34 | $config = new PluginCertificatesConfig(); 35 | $notif = new PluginCertificatesNotificationState(); 36 | 37 | if (isset($_POST["add"])) { 38 | 39 | $notif->addNotificationState($_POST['plugin_certificates_certificatestates_id']); 40 | Html::back(); 41 | 42 | } else if (isset($_POST["delete"])) { 43 | 44 | foreach ($_POST["item"] as $key => $val) { 45 | if ($val == 1) { 46 | $notif->delete(array('id' => $key)); 47 | } 48 | } 49 | Html::back(); 50 | 51 | } else if (isset($_POST["update"])) { 52 | 53 | $config->update($_POST); 54 | Html::back(); 55 | 56 | } -------------------------------------------------------------------------------- /ajax/dropdownTypeCertificates.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | if (strpos($_SERVER['PHP_SELF'], "dropdownTypeCertificates.php")) { 31 | $AJAX_INCLUDE = 1; 32 | include('../../../inc/includes.php'); 33 | header("Content-Type: text/html; charset=UTF-8"); 34 | Html::header_nocache(); 35 | } 36 | 37 | 38 | Session::checkCentralAccess(); 39 | 40 | // Make a select box 41 | if (isset($_POST["certificatetype"])) { 42 | $used = array(); 43 | 44 | // Clean used array 45 | if (isset($_POST['used']) && is_array($_POST['used']) && (count($_POST['used']) > 0)) { 46 | $query = "SELECT `id` 47 | FROM `glpi_plugin_certificates_certificates` 48 | WHERE `id` IN (" . implode(',', $_POST['used']) . ") 49 | AND `plugin_certificates_certificatetypes_id` = '" . $_POST["certificatetype"] . "'"; 50 | 51 | foreach ($DB->request($query) AS $data) { 52 | $used[$data['id']] = $data['id']; 53 | } 54 | } 55 | 56 | Dropdown::show('PluginCertificatesCertificate', 57 | array('name' => $_POST['myname'], 58 | 'used' => $used, 59 | 'width' => '50%', 60 | 'entity' => $_POST['entity'], 61 | 'rand' => $_POST['rand'], 62 | 'condition' => "glpi_plugin_certificates_certificates.plugin_certificates_certificatetypes_id='" . $_POST["certificatetype"] . "'")); 63 | 64 | } -------------------------------------------------------------------------------- /inc/menu.class.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | /** 31 | * Class PluginCertificatesMenu 32 | */ 33 | class PluginCertificatesMenu extends CommonGLPI 34 | { 35 | static $rightname = 'plugin_certificates'; 36 | 37 | /** 38 | * @return translated 39 | */ 40 | static function getMenuName() 41 | { 42 | return _n('Certificate', 'Certificates', 2, 'certificates'); 43 | } 44 | 45 | /** 46 | * @return array 47 | */ 48 | static function getMenuContent() 49 | { 50 | 51 | $menu = array(); 52 | $menu['title'] = self::getMenuName(); 53 | $menu['page'] = "/plugins/certificates/front/certificate.php"; 54 | $menu['links']['search'] = PluginCertificatesCertificate::getSearchURL(false); 55 | if (PluginCertificatesCertificate::canCreate()) { 56 | $menu['links']['add'] = PluginCertificatesCertificate::getFormURL(false); 57 | } 58 | 59 | return $menu; 60 | } 61 | 62 | static function removeRightsFromSession() 63 | { 64 | if (isset($_SESSION['glpimenu']['assets']['types']['PluginCertificatesMenu'])) { 65 | unset($_SESSION['glpimenu']['assets']['types']['PluginCertificatesMenu']); 66 | } 67 | if (isset($_SESSION['glpimenu']['assets']['content']['plugincertificatesmenu'])) { 68 | unset($_SESSION['glpimenu']['assets']['content']['plugincertificatesmenu']); 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /inc/certificatestate.class.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | if (!defined('GLPI_ROOT')) { 31 | die("Sorry. You can't access directly to this file"); 32 | } 33 | 34 | /** 35 | * Class PluginCertificatesCertificateState 36 | */ 37 | class PluginCertificatesCertificateState extends CommonDropdown 38 | { 39 | 40 | static $rightname = "dropdown"; 41 | var $can_be_translated = true; 42 | 43 | /** 44 | * @param int $nb 45 | * @return string|translated 46 | */ 47 | static function getTypeName($nb = 0) 48 | { 49 | 50 | return _n('Certificate status', 'Certificate statuses', $nb, 'certificates'); 51 | } 52 | 53 | /** 54 | * @param $ID 55 | * @param $entity 56 | * @return ID|int|the 57 | */ 58 | static function transfer($ID, $entity) 59 | { 60 | global $DB; 61 | 62 | if ($ID > 0) { 63 | // Not already transfer 64 | // Search init item 65 | $query = "SELECT * 66 | FROM `glpi_plugin_certificates_certificatestates` 67 | WHERE `id` = '$ID'"; 68 | 69 | if ($result = $DB->query($query)) { 70 | if ($DB->numrows($result)) { 71 | $data = $DB->fetch_assoc($result); 72 | $data = Toolbox::addslashes_deep($data); 73 | $input['name'] = $data['name']; 74 | $input['entities_id'] = $entity; 75 | $temp = new self(); 76 | $newID = $temp->getID(); 77 | 78 | if ($newID < 0) { 79 | $newID = $temp->import($input); 80 | } 81 | 82 | return $newID; 83 | } 84 | } 85 | } 86 | return 0; 87 | } 88 | } -------------------------------------------------------------------------------- /inc/certificatetype.class.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | if (!defined('GLPI_ROOT')) { 31 | die("Sorry. You can't access directly to this file"); 32 | } 33 | 34 | // Class for a Dropdown 35 | /** 36 | * Class PluginCertificatesCertificateType 37 | */ 38 | class PluginCertificatesCertificateType extends CommonDropdown 39 | { 40 | 41 | static $rightname = "dropdown"; 42 | var $can_be_translated = true; 43 | 44 | /** 45 | * @param int $nb 46 | * @return string|translated 47 | */ 48 | static function getTypeName($nb = 0) 49 | { 50 | 51 | return _n('Certificate type', 'Certificate types', $nb, 'certificates'); 52 | } 53 | 54 | /** 55 | * @param $ID 56 | * @param $entity 57 | * @return ID|int|the 58 | */ 59 | static function transfer($ID, $entity) 60 | { 61 | global $DB; 62 | 63 | if ($ID > 0) { 64 | // Not already transfer 65 | // Search init item 66 | $query = "SELECT * 67 | FROM `glpi_plugin_certificates_certificatetypes` 68 | WHERE `id` = '$ID'"; 69 | 70 | if ($result = $DB->query($query)) { 71 | if ($DB->numrows($result)) { 72 | $data = $DB->fetch_assoc($result); 73 | $data = Toolbox::addslashes_deep($data); 74 | $input['name'] = $data['name']; 75 | $input['entities_id'] = $entity; 76 | $temp = new self(); 77 | $newID = $temp->getID(); 78 | 79 | if ($newID < 0) { 80 | $newID = $temp->import($input); 81 | } 82 | 83 | return $newID; 84 | } 85 | } 86 | } 87 | return 0; 88 | } 89 | } -------------------------------------------------------------------------------- /inc/notificationtargetcertificate.class.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | if (!defined('GLPI_ROOT')) { 31 | die("Sorry. You can't access directly to this file"); 32 | } 33 | 34 | // Class NotificationTarget 35 | /** 36 | * Class PluginCertificatesNotificationTargetCertificate 37 | */ 38 | class PluginCertificatesNotificationTargetCertificate extends NotificationTarget 39 | { 40 | 41 | /** 42 | * @return array 43 | */ 44 | function getEvents() 45 | { 46 | return array('ExpiredCertificates' => __('Expired certificates', 'certificates'), 47 | 'CertificatesWhichExpire' => __('Expiring certificates', 'certificates')); 48 | } 49 | 50 | /** 51 | * @param $event 52 | * @param array $options 53 | */ 54 | function getDatasForTemplate($event, $options = array()) 55 | { 56 | 57 | $this->datas['##certificate.entity##'] = 58 | Dropdown::getDropdownName('glpi_entities', 59 | $options['entities_id']); 60 | $this->datas['##lang.certificate.entity##'] = __('Entity'); 61 | $this->datas['##certificate.action##'] = ($event == "ExpiredCertificates" ? __('Expired certificates', 'certificates') : 62 | __('Expiring certificates', 'certificates')); 63 | 64 | $this->datas['##lang.certificate.name##'] = __('Name'); 65 | $this->datas['##lang.certificate.dateexpiration##'] = __('Expiration date'); 66 | 67 | foreach ($options['certificates'] as $id => $certificate) { 68 | $tmp = array(); 69 | 70 | $tmp['##certificate.name##'] = $certificate['name']; 71 | $tmp['##certificate.dateexpiration##'] = Html::convDate($certificate['date_expiration']); 72 | 73 | $this->datas['certificates'][] = $tmp; 74 | } 75 | } 76 | 77 | /** 78 | * 79 | */ 80 | function getTags() 81 | { 82 | 83 | $tags = array('certificate.name' => __('Name'), 84 | 'certificate.dateexpiration' => __('Expiration date')); 85 | foreach ($tags as $tag => $label) { 86 | $this->addTagToList(array('tag' => $tag, 'label' => $label, 87 | 'value' => true)); 88 | } 89 | 90 | $this->addTagToList(array('tag' => 'certificates', 91 | 'label' => __('Expired or expiring certificates', 'certificates'), 92 | 'value' => false, 93 | 'foreach' => true, 94 | 'events' => array('CertificatesWhichExpire', 'ExpiredCertificates'))); 95 | 96 | asort($this->tag_descriptions); 97 | } 98 | } -------------------------------------------------------------------------------- /front/certificate.form.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | include('../../../inc/includes.php'); 31 | 32 | if (!isset($_GET["id"])) $_GET["id"] = ""; 33 | if (!isset($_GET["withtemplate"])) $_GET["withtemplate"] = ""; 34 | 35 | $certif = new PluginCertificatesCertificate(); 36 | $certif_item = new PluginCertificatesCertificate_Item(); 37 | 38 | if (isset($_POST["add"])) { 39 | $certif->check(-1, CREATE, $_POST); 40 | $newID = $certif->add($_POST); 41 | if ($_SESSION['glpibackcreated']) { 42 | Html::redirect($certif->getFormURL() . "?id=" . $newID); 43 | } 44 | Html::back(); 45 | 46 | } else if (isset($_POST["delete"])) { 47 | 48 | $certif->check($_POST['id'], DELETE); 49 | $certif->delete($_POST); 50 | $certif->redirectToList(); 51 | 52 | } else if (isset($_POST["restore"])) { 53 | 54 | $certif->check($_POST['id'], PURGE); 55 | $certif->restore($_POST); 56 | $certif->redirectToList(); 57 | 58 | } else if (isset($_POST["purge"])) { 59 | 60 | $certif->check($_POST['id'], PURGE); 61 | $certif->delete($_POST, 1); 62 | $certif->redirectToList(); 63 | 64 | } else if (isset($_POST["update"])) { 65 | 66 | $certif->check($_POST['id'], UPDATE); 67 | $certif->update($_POST); 68 | Html::back(); 69 | 70 | } else if (isset($_POST["additem"])) { 71 | 72 | if (!empty($_POST['itemtype']) && $_POST['items_id'] > 0) { 73 | $certif_item->check(-1, UPDATE, $_POST); 74 | $certif_item->addItem($_POST); 75 | } 76 | Html::back(); 77 | 78 | } else if (isset($_POST["deleteitem"])) { 79 | 80 | foreach ($_POST["item"] as $key => $val) { 81 | $input = array('id' => $key); 82 | if ($val == 1) { 83 | $certif_item->check($key, UPDATE); 84 | $certif_item->delete($input); 85 | } 86 | } 87 | Html::back(); 88 | 89 | } else if (isset($_POST["deletecertificates"])) { 90 | 91 | $input = array('id' => $_POST["id"]); 92 | $certif_item->check($_POST["id"], UPDATE); 93 | $certif_item->delete($input); 94 | Html::back(); 95 | 96 | } else { 97 | 98 | $certif->checkGlobal(READ); 99 | 100 | $plugin = new Plugin(); 101 | if ($plugin->isActivated("environment")) { 102 | Html::header(PluginCertificatesCertificate::getTypeName(2), '', "assets", "pluginenvironmentdisplay", "certificates"); 103 | } else { 104 | Html::header(PluginCertificatesCertificate::getTypeName(2), '', "assets", "plugincertificatesmenu"); 105 | } 106 | $certif->display($_GET); 107 | 108 | Html::footer(); 109 | } -------------------------------------------------------------------------------- /setup.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | // Init the hooks of the plugins -Needed 31 | function plugin_init_certificates() 32 | { 33 | global $PLUGIN_HOOKS; 34 | 35 | $PLUGIN_HOOKS['csrf_compliant']['certificates'] = true; 36 | $PLUGIN_HOOKS['change_profile']['certificates'] = array('PluginCertificatesProfile', 'initProfile'); 37 | $PLUGIN_HOOKS['assign_to_ticket']['certificates'] = true; 38 | 39 | 40 | if (Session::getLoginUserID()) { 41 | 42 | // Params : plugin name - string type - number - attributes 43 | Plugin::registerClass('PluginCertificatesCertificate', array( 44 | 'linkgroup_tech_types' => true, 45 | 'linkuser_tech_types' => true, 46 | 'document_types' => true, 47 | 'helpdesk_visible_types' => true, 48 | 'ticket_types' => true, 49 | 'contract_types' => true, 50 | 'notificationtemplates_types' => true 51 | )); 52 | 53 | Plugin::registerClass('PluginCertificatesConfig', 54 | array('addtabon' => 'CronTask')); 55 | 56 | Plugin::registerClass('PluginCertificatesProfile', 57 | array('addtabon' => 'Profile')); 58 | 59 | if (class_exists('PluginAccountsAccount')) { 60 | PluginAccountsAccount::registerType('PluginCertificatesCertificate'); 61 | } 62 | 63 | $plugin = new Plugin(); 64 | if (!$plugin->isActivated('environment') 65 | && Session::haveRight("plugin_certificates", READ) 66 | ) { 67 | 68 | $PLUGIN_HOOKS['menu_toadd']['certificates'] = array('assets' => 'PluginCertificatesMenu'); 69 | } 70 | if (Session::haveRight("plugin_certificates", UPDATE)) { 71 | $PLUGIN_HOOKS['use_massive_action']['certificates'] = 1; 72 | } 73 | 74 | // End init, when all types are registered 75 | $PLUGIN_HOOKS['post_init']['certificates'] = 'plugin_certificates_postinit'; 76 | } 77 | } 78 | 79 | // Get the name and the version of the plugin - Needed 80 | /** 81 | * @return array 82 | */ 83 | function plugin_version_certificates() 84 | { 85 | 86 | return array( 87 | 'name' => _n('Certificate', 'Certificates', 2, 'certificates'), 88 | 'version' => '2.3.0', 89 | 'license' => 'GPLv2+', 90 | 'author' => "Infotel", 91 | 'homepage' => 'https://github.com/InfotelGLPI/certificates', 92 | 'minGlpiVersion' => '9.2', 93 | ); 94 | } 95 | 96 | // Optional : check prerequisites before install : may print errors or add to message after redirect 97 | /** 98 | * @return bool 99 | */ 100 | function plugin_certificates_check_prerequisites() 101 | { 102 | if (version_compare(GLPI_VERSION, '9.2', 'lt') || version_compare(GLPI_VERSION, '9.3', 'ge')) { 103 | echo __('This plugin requires GLPI >= 9.2', 'certificates'); 104 | return false; 105 | } 106 | return true; 107 | } 108 | 109 | // Uninstall process for plugin : need to return true if succeeded : may display messages or add to message after redirect 110 | /** 111 | * @return bool 112 | */ 113 | function plugin_certificates_check_config() 114 | { 115 | return true; 116 | } -------------------------------------------------------------------------------- /inc/config.class.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | if (!defined('GLPI_ROOT')) { 31 | die("Sorry. You can't access directly to this file"); 32 | } 33 | 34 | /** 35 | * Class PluginCertificatesConfig 36 | */ 37 | class PluginCertificatesConfig extends CommonDBTM 38 | { 39 | 40 | /** 41 | * @param CommonGLPI $item 42 | * @param int $withtemplate 43 | * @return string|translated 44 | */ 45 | function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) 46 | { 47 | 48 | if ($item->getType() == 'CronTask' && $item->getField('name') == "CertificatesAlert") { 49 | return __('Plugin Setup', 'certificates'); 50 | } 51 | return ''; 52 | } 53 | 54 | 55 | /** 56 | * @param CommonGLPI $item 57 | * @param int $tabnum 58 | * @param int $withtemplate 59 | * @return bool 60 | */ 61 | static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) 62 | { 63 | global $CFG_GLPI; 64 | 65 | if ($item->getType() == 'CronTask') { 66 | 67 | $target = $CFG_GLPI["root_doc"] . "/plugins/certificates/front/notification.state.php"; 68 | PluginCertificatesCertificate::configCron($target); 69 | } 70 | return true; 71 | } 72 | 73 | /** 74 | * @param $target 75 | * @param $ID 76 | */ 77 | function showForm($target, $ID) 78 | { 79 | 80 | $this->getFromDB($ID); 81 | $delay_expired = $this->fields["delay_expired"]; 82 | $delay_whichexpire = $this->fields["delay_whichexpire"]; 83 | echo "
"; 84 | echo "
"; 85 | echo ""; 87 | echo ""; 105 | echo ""; 106 | 107 | echo ""; 112 | echo "
"; 86 | echo __('Time of checking of validity of certificates', 'certificates') . "
"; 88 | 89 | $delay_stamp_first = mktime(0, 0, 0, date("m"), date("d") - $delay_expired, date("y")); 90 | $delay_stamp_next = mktime(0, 0, 0, date("m"), date("d") + $delay_whichexpire, date("y")); 91 | $date_first = date("Y-m-d", $delay_stamp_first); 92 | $date_next = date("Y-m-d", $delay_stamp_next); 93 | 94 | echo "
"; 95 | echo __('Certificates expired since more', 'certificates'); 96 | echo " "; 97 | echo " " . _n('Day', 'Days', 2); 98 | echo " ( >" . Html::convDate($date_first) . ")
"; 99 | echo __('Certificates expiring in less than', 'certificates'); 100 | echo " "; 101 | echo " " . _n('Day', 'Days', 2); 102 | echo " ( <" . Html::convDate($date_next) . ")"; 103 | 104 | echo "
"; 108 | echo ""; 109 | echo "
"; 110 | echo ""; 111 | echo "
"; 113 | Html::closeForm(); 114 | echo "
"; 115 | } 116 | } -------------------------------------------------------------------------------- /locales/glpi.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: GLPI - Certificates plugin 1.9.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-12-01 10:07+0100\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" 20 | 21 | #: certificate.php:32 setup.php:87 front/certificate.php:32 22 | #: inc/certificate.class.php:55 inc/menu.class.php:42 inc/profile.class.php:179 23 | msgid "Certificate" 24 | msgid_plural "Certificates" 25 | msgstr[0] "" 26 | msgstr[1] "" 27 | 28 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 29 | #: front/certificate.php:43 30 | msgid "Core migration" 31 | msgstr "" 32 | 33 | #: certificate.php:43 front/certificate.php:45 34 | msgid "Are you sure you want to do core migration ??" 35 | msgstr "" 36 | 37 | #: certificate.php:44 certificate.php:48 front/certificate.php:46 38 | #: front/certificate.php:50 39 | msgid "Warning existants Certificates will be migrated !!" 40 | msgstr "" 41 | 42 | #: certificate.php:53 front/certificate.php:53 43 | msgid "Data migration" 44 | msgstr "" 45 | 46 | #: certificate.php:168 front/certificate.php:186 47 | msgid "Tables purge" 48 | msgstr "" 49 | 50 | #: certificate.php:194 front/certificate.php:212 51 | msgid "Link with core purge" 52 | msgstr "" 53 | 54 | #: certificate.php:211 front/certificate.php:229 55 | msgid "Notifications purge" 56 | msgstr "" 57 | 58 | #: hook.php:409 inc/certificate_item.class.php:568 59 | msgid "Does not expire" 60 | msgstr "" 61 | 62 | #: hook.php:483 63 | msgid "Associate to certificate" 64 | msgstr "" 65 | 66 | #: setup.php:103 67 | msgid "This plugin requires GLPI >= 9.2" 68 | msgstr "" 69 | 70 | #: front/certificate.php:256 71 | msgid "No data to migrate" 72 | msgstr "" 73 | 74 | #: front/certificate.php:259 75 | msgid "You can uninstall the plugin" 76 | msgstr "" 77 | 78 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 79 | #: inc/certificate_item.class.php:515 80 | msgid "DNS name" 81 | msgstr "" 82 | 83 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 84 | #: inc/certificate_item.class.php:516 85 | msgid "DNS suffix" 86 | msgstr "" 87 | 88 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 89 | msgid "Root CA" 90 | msgstr "" 91 | 92 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 93 | msgid "Self-signed" 94 | msgstr "" 95 | 96 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 97 | msgid "Notification email" 98 | msgstr "" 99 | 100 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 101 | msgid "Command used" 102 | msgstr "" 103 | 104 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 105 | msgid "Certificate request (CSR)" 106 | msgstr "" 107 | 108 | #: inc/certificate.class.php:361 109 | msgid "Empty for infinite" 110 | msgstr "" 111 | 112 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 113 | #: inc/notificationtargetcertificate.class.php:91 114 | msgid "Expired or expiring certificates" 115 | msgstr "" 116 | 117 | #: inc/certificate_item.class.php:488 118 | msgctxt "button" 119 | msgid "Associate a certificate" 120 | msgstr "" 121 | 122 | #: inc/certificatestate.class.php:50 123 | msgid "Certificate status" 124 | msgid_plural "Certificate statuses" 125 | msgstr[0] "" 126 | msgstr[1] "" 127 | 128 | #: inc/certificatetype.class.php:51 129 | msgid "Certificate type" 130 | msgid_plural "Certificate types" 131 | msgstr[0] "" 132 | msgstr[1] "" 133 | 134 | #: inc/config.class.php:49 135 | msgid "Plugin Setup" 136 | msgstr "" 137 | 138 | #: inc/config.class.php:86 139 | msgid "Time of checking of validity of certificates" 140 | msgstr "" 141 | 142 | #: inc/config.class.php:95 143 | msgid "Certificates expired since more" 144 | msgstr "" 145 | 146 | #: inc/config.class.php:99 147 | msgid "Certificates expiring in less than" 148 | msgstr "" 149 | 150 | #: inc/notificationstate.class.php:125 151 | msgid "add not-used status in expiration mail" 152 | msgstr "" 153 | 154 | #: inc/notificationstate.class.php:156 155 | msgid "No used status in expiration mail" 156 | msgstr "" 157 | 158 | #: inc/notificationtargetcertificate.class.php:46 159 | #: inc/notificationtargetcertificate.class.php:61 160 | msgid "Expired certificates" 161 | msgstr "" 162 | 163 | #: inc/notificationtargetcertificate.class.php:47 164 | #: inc/notificationtargetcertificate.class.php:62 165 | msgid "Expiring certificates" 166 | msgstr "" 167 | -------------------------------------------------------------------------------- /locales/tr_TR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | # Kaya Zeren , 2013,2015,2017 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: GLPI Project - certificates plugin\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 12 | "PO-Revision-Date: 2017-11-28 15:34+0000\n" 13 | "Last-Translator: Amandine Manceau\n" 14 | "Language-Team: Turkish (Turkey) (http://www.transifex.com/tsmr/GLPI_certificates/language/tr_TR/)\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Language: tr_TR\n" 19 | "Plural-Forms: nplurals=1; plural=0;\n" 20 | 21 | #: certificate.php:32 setup.php:87 front/certificate.php:32 22 | #: inc/certificate.class.php:55 inc/menu.class.php:42 23 | #: inc/profile.class.php:179 24 | msgid "Certificate" 25 | msgid_plural "Certificates" 26 | msgstr[0] "Sertifika" 27 | 28 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 29 | #: front/certificate.php:41 30 | msgid "Core migration" 31 | msgstr "" 32 | 33 | #: certificate.php:43 front/certificate.php:43 34 | msgid "Are you sure you want to do core migration ??" 35 | msgstr "" 36 | 37 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 38 | #: front/certificate.php:48 39 | msgid "Warning existants Certificates will be migrated !!" 40 | msgstr "" 41 | 42 | #: certificate.php:53 front/certificate.php:53 43 | msgid "Data migration" 44 | msgstr "" 45 | 46 | #: certificate.php:168 front/certificate.php:186 47 | msgid "Tables purge" 48 | msgstr "" 49 | 50 | #: certificate.php:194 front/certificate.php:212 51 | msgid "Link with core purge" 52 | msgstr "" 53 | 54 | #: certificate.php:211 front/certificate.php:229 55 | msgid "Notifications purge" 56 | msgstr "" 57 | 58 | #: hook.php:409 inc/certificate_item.class.php:568 59 | msgid "Does not expire" 60 | msgstr "Süresiz" 61 | 62 | #: hook.php:483 63 | msgid "Associate to certificate" 64 | msgstr "Sertifika ilişkilendirin" 65 | 66 | #: setup.php:103 67 | msgid "This plugin requires GLPI >= 9.2" 68 | msgstr "" 69 | 70 | #: front/certificate.php:256 71 | msgid "No data to migrate" 72 | msgstr "" 73 | 74 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 75 | #: inc/certificate_item.class.php:515 76 | msgid "DNS name" 77 | msgstr "DNS adı" 78 | 79 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 80 | #: inc/certificate_item.class.php:516 81 | msgid "DNS suffix" 82 | msgstr "DNS soneki" 83 | 84 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 85 | msgid "Root CA" 86 | msgstr "Kök CA" 87 | 88 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 89 | msgid "Self-signed" 90 | msgstr "Kendiliğinden imzalı" 91 | 92 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 93 | msgid "Notification email" 94 | msgstr "Bildirim e-postası" 95 | 96 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 97 | msgid "Command used" 98 | msgstr "Kullanılan komut" 99 | 100 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 101 | msgid "Certificate request (CSR)" 102 | msgstr "Sertifika isteği (CSR)" 103 | 104 | #: inc/certificate.class.php:361 105 | msgid "Empty for infinite" 106 | msgstr "Sonsuz olması için boş bırakın" 107 | 108 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 109 | #: inc/notificationtargetcertificate.class.php:91 110 | msgid "Expired or expiring certificates" 111 | msgstr "Süresi dolmuş ya da dolan sertifikalar" 112 | 113 | #: inc/certificate_item.class.php:488 114 | msgctxt "button" 115 | msgid "Associate a certificate" 116 | msgstr "Bir sertifika ilişkilendirin" 117 | 118 | #: inc/certificatestate.class.php:50 119 | msgid "Certificate status" 120 | msgid_plural "Certificate statuses" 121 | msgstr[0] "Sertifika durumu" 122 | 123 | #: inc/certificatetype.class.php:51 124 | msgid "Certificate type" 125 | msgid_plural "Certificate types" 126 | msgstr[0] "Sertifika türü" 127 | 128 | #: inc/config.class.php:49 129 | msgid "Plugin Setup" 130 | msgstr "Uygulama Eki Ayarları" 131 | 132 | #: inc/config.class.php:86 133 | msgid "Time of checking of validity of certificates" 134 | msgstr "Sertifikaların denetlenme zamanı" 135 | 136 | #: inc/config.class.php:95 137 | msgid "Certificates expired since more" 138 | msgstr "Şu kadar zaman önce süresi dolmuş sertifikalar" 139 | 140 | #: inc/config.class.php:99 141 | msgid "Certificates expiring in less than" 142 | msgstr "Şu kadar zaman içinde süresi dolacak sertifikalar" 143 | 144 | #: inc/notificationstate.class.php:125 145 | msgid "add not-used status in expiration mail" 146 | msgstr "Süre dolma e-postasına kullanılmıyor durumu eklensin" 147 | 148 | #: inc/notificationstate.class.php:156 149 | msgid "No used status in expiration mail" 150 | msgstr "Süre dolma e-postasına kullanılmıyor durumu eklenmesin" 151 | 152 | #: inc/notificationtargetcertificate.class.php:46 153 | #: inc/notificationtargetcertificate.class.php:61 154 | msgid "Expired certificates" 155 | msgstr "Süresi dolmuş sertifikalar" 156 | 157 | #: inc/notificationtargetcertificate.class.php:47 158 | #: inc/notificationtargetcertificate.class.php:62 159 | msgid "Expiring certificates" 160 | msgstr "Süresi dolacak sertifikalar" 161 | -------------------------------------------------------------------------------- /locales/da_DK.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | # Jens Hyllegaard , 2015 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: GLPI Project - certificates plugin\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 12 | "PO-Revision-Date: 2017-11-28 15:35+0000\n" 13 | "Last-Translator: Amandine Manceau\n" 14 | "Language-Team: Danish (Denmark) (http://www.transifex.com/tsmr/GLPI_certificates/language/da_DK/)\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Language: da_DK\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | 21 | #: certificate.php:32 setup.php:87 front/certificate.php:32 22 | #: inc/certificate.class.php:55 inc/menu.class.php:42 23 | #: inc/profile.class.php:179 24 | msgid "Certificate" 25 | msgid_plural "Certificates" 26 | msgstr[0] "Certifikat" 27 | msgstr[1] "Certifikater" 28 | 29 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 30 | #: front/certificate.php:41 31 | msgid "Core migration" 32 | msgstr "" 33 | 34 | #: certificate.php:43 front/certificate.php:43 35 | msgid "Are you sure you want to do core migration ??" 36 | msgstr "" 37 | 38 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 39 | #: front/certificate.php:48 40 | msgid "Warning existants Certificates will be migrated !!" 41 | msgstr "" 42 | 43 | #: certificate.php:53 front/certificate.php:53 44 | msgid "Data migration" 45 | msgstr "" 46 | 47 | #: certificate.php:168 front/certificate.php:186 48 | msgid "Tables purge" 49 | msgstr "" 50 | 51 | #: certificate.php:194 front/certificate.php:212 52 | msgid "Link with core purge" 53 | msgstr "" 54 | 55 | #: certificate.php:211 front/certificate.php:229 56 | msgid "Notifications purge" 57 | msgstr "" 58 | 59 | #: hook.php:409 inc/certificate_item.class.php:568 60 | msgid "Does not expire" 61 | msgstr "Udløber ikke" 62 | 63 | #: hook.php:483 64 | msgid "Associate to certificate" 65 | msgstr "Tilknyt til certifikat" 66 | 67 | #: setup.php:103 68 | msgid "This plugin requires GLPI >= 9.2" 69 | msgstr "" 70 | 71 | #: front/certificate.php:256 72 | msgid "No data to migrate" 73 | msgstr "" 74 | 75 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 76 | #: inc/certificate_item.class.php:515 77 | msgid "DNS name" 78 | msgstr "DNS navn" 79 | 80 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 81 | #: inc/certificate_item.class.php:516 82 | msgid "DNS suffix" 83 | msgstr "DNS efternavn" 84 | 85 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 86 | msgid "Root CA" 87 | msgstr "Rod CA" 88 | 89 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 90 | msgid "Self-signed" 91 | msgstr "Selvsigneret" 92 | 93 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 94 | msgid "Notification email" 95 | msgstr "Notifikations e-mail" 96 | 97 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 98 | msgid "Command used" 99 | msgstr "Brugt kommando" 100 | 101 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 102 | msgid "Certificate request (CSR)" 103 | msgstr "Certifikat forespørgsel (CSR)" 104 | 105 | #: inc/certificate.class.php:361 106 | msgid "Empty for infinite" 107 | msgstr "Blank for uendelig" 108 | 109 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 110 | #: inc/notificationtargetcertificate.class.php:91 111 | msgid "Expired or expiring certificates" 112 | msgstr "Udløbede eller snart udløbne certifikater" 113 | 114 | #: inc/certificate_item.class.php:488 115 | msgctxt "button" 116 | msgid "Associate a certificate" 117 | msgstr "Tilnyt et certifikat" 118 | 119 | #: inc/certificatestate.class.php:50 120 | msgid "Certificate status" 121 | msgid_plural "Certificate statuses" 122 | msgstr[0] "Certifikat status" 123 | msgstr[1] "Certifikat status" 124 | 125 | #: inc/certificatetype.class.php:51 126 | msgid "Certificate type" 127 | msgid_plural "Certificate types" 128 | msgstr[0] "Certifikattype" 129 | msgstr[1] "Certifikattyper" 130 | 131 | #: inc/config.class.php:49 132 | msgid "Plugin Setup" 133 | msgstr "Udvidelses opsætning" 134 | 135 | #: inc/config.class.php:86 136 | msgid "Time of checking of validity of certificates" 137 | msgstr "Tid for tjek af certifikaters gyldighed" 138 | 139 | #: inc/config.class.php:95 140 | msgid "Certificates expired since more" 141 | msgstr "Certifikater der er udløbet inden for de sidste" 142 | 143 | #: inc/config.class.php:99 144 | msgid "Certificates expiring in less than" 145 | msgstr "Certifikater der udløber inden for" 146 | 147 | #: inc/notificationstate.class.php:125 148 | msgid "add not-used status in expiration mail" 149 | msgstr "tilføj ej-brugt status i udløbs e-mail" 150 | 151 | #: inc/notificationstate.class.php:156 152 | msgid "No used status in expiration mail" 153 | msgstr "Ej-brugt status i udløbs e-mail" 154 | 155 | #: inc/notificationtargetcertificate.class.php:46 156 | #: inc/notificationtargetcertificate.class.php:61 157 | msgid "Expired certificates" 158 | msgstr "Udløbede certifikater" 159 | 160 | #: inc/notificationtargetcertificate.class.php:47 161 | #: inc/notificationtargetcertificate.class.php:62 162 | msgid "Expiring certificates" 163 | msgstr "Certifikate der snart udløber" 164 | -------------------------------------------------------------------------------- /locales/pt_BR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | # Rafael Fontenelle , 2013 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: GLPI Project - certificates plugin\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 12 | "PO-Revision-Date: 2017-11-28 15:34+0000\n" 13 | "Last-Translator: Amandine Manceau\n" 14 | "Language-Team: Portuguese (Brazil) (http://www.transifex.com/tsmr/GLPI_certificates/language/pt_BR/)\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Language: pt_BR\n" 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 20 | 21 | #: certificate.php:32 setup.php:87 front/certificate.php:32 22 | #: inc/certificate.class.php:55 inc/menu.class.php:42 23 | #: inc/profile.class.php:179 24 | msgid "Certificate" 25 | msgid_plural "Certificates" 26 | msgstr[0] "Certificado" 27 | msgstr[1] "Certificados" 28 | 29 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 30 | #: front/certificate.php:41 31 | msgid "Core migration" 32 | msgstr "" 33 | 34 | #: certificate.php:43 front/certificate.php:43 35 | msgid "Are you sure you want to do core migration ??" 36 | msgstr "" 37 | 38 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 39 | #: front/certificate.php:48 40 | msgid "Warning existants Certificates will be migrated !!" 41 | msgstr "" 42 | 43 | #: certificate.php:53 front/certificate.php:53 44 | msgid "Data migration" 45 | msgstr "" 46 | 47 | #: certificate.php:168 front/certificate.php:186 48 | msgid "Tables purge" 49 | msgstr "" 50 | 51 | #: certificate.php:194 front/certificate.php:212 52 | msgid "Link with core purge" 53 | msgstr "" 54 | 55 | #: certificate.php:211 front/certificate.php:229 56 | msgid "Notifications purge" 57 | msgstr "" 58 | 59 | #: hook.php:409 inc/certificate_item.class.php:568 60 | msgid "Does not expire" 61 | msgstr "Não expira" 62 | 63 | #: hook.php:483 64 | msgid "Associate to certificate" 65 | msgstr "Associar a certificado" 66 | 67 | #: setup.php:103 68 | msgid "This plugin requires GLPI >= 9.2" 69 | msgstr "" 70 | 71 | #: front/certificate.php:256 72 | msgid "No data to migrate" 73 | msgstr "" 74 | 75 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 76 | #: inc/certificate_item.class.php:515 77 | msgid "DNS name" 78 | msgstr "Nome DNS" 79 | 80 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 81 | #: inc/certificate_item.class.php:516 82 | msgid "DNS suffix" 83 | msgstr "Sufixo DNS" 84 | 85 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 86 | msgid "Root CA" 87 | msgstr "AC Raiz" 88 | 89 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 90 | msgid "Self-signed" 91 | msgstr "Auto-assinado" 92 | 93 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 94 | msgid "Notification email" 95 | msgstr "e-mail de notificação" 96 | 97 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 98 | msgid "Command used" 99 | msgstr "Comando usado" 100 | 101 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 102 | msgid "Certificate request (CSR)" 103 | msgstr "Requisição de certificado (CSR)" 104 | 105 | #: inc/certificate.class.php:361 106 | msgid "Empty for infinite" 107 | msgstr "" 108 | 109 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 110 | #: inc/notificationtargetcertificate.class.php:91 111 | msgid "Expired or expiring certificates" 112 | msgstr "Certificados expirando ou expirados" 113 | 114 | #: inc/certificate_item.class.php:488 115 | msgctxt "button" 116 | msgid "Associate a certificate" 117 | msgstr "Associar um certificado" 118 | 119 | #: inc/certificatestate.class.php:50 120 | msgid "Certificate status" 121 | msgid_plural "Certificate statuses" 122 | msgstr[0] "Status do certificado" 123 | msgstr[1] "Status dos certificados" 124 | 125 | #: inc/certificatetype.class.php:51 126 | msgid "Certificate type" 127 | msgid_plural "Certificate types" 128 | msgstr[0] "Tipo do certificado" 129 | msgstr[1] "Tipos dos certificados" 130 | 131 | #: inc/config.class.php:49 132 | msgid "Plugin Setup" 133 | msgstr "Confoiguração do plug-in" 134 | 135 | #: inc/config.class.php:86 136 | msgid "Time of checking of validity of certificates" 137 | msgstr "Intervalo de verificação da validade de certificados" 138 | 139 | #: inc/config.class.php:95 140 | msgid "Certificates expired since more" 141 | msgstr "Certificados expirados desde mais de" 142 | 143 | #: inc/config.class.php:99 144 | msgid "Certificates expiring in less than" 145 | msgstr "Certificados expirando em menos de" 146 | 147 | #: inc/notificationstate.class.php:125 148 | msgid "add not-used status in expiration mail" 149 | msgstr "adicionar status de não-usado no e-mail de expiração" 150 | 151 | #: inc/notificationstate.class.php:156 152 | msgid "No used status in expiration mail" 153 | msgstr "Status de não-usado no e-mail de expiração" 154 | 155 | #: inc/notificationtargetcertificate.class.php:46 156 | #: inc/notificationtargetcertificate.class.php:61 157 | msgid "Expired certificates" 158 | msgstr "Certificados expirados" 159 | 160 | #: inc/notificationtargetcertificate.class.php:47 161 | #: inc/notificationtargetcertificate.class.php:62 162 | msgid "Expiring certificates" 163 | msgstr "Certificados expirando" 164 | -------------------------------------------------------------------------------- /locales/de_DE.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | # Daniel Fallenstein , 2015 7 | # tynet , 2012 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: GLPI Project - certificates plugin\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 13 | "PO-Revision-Date: 2017-11-28 15:34+0000\n" 14 | "Last-Translator: Amandine Manceau\n" 15 | "Language-Team: German (Germany) (http://www.transifex.com/tsmr/GLPI_certificates/language/de_DE/)\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Language: de_DE\n" 20 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 21 | 22 | #: certificate.php:32 setup.php:87 front/certificate.php:32 23 | #: inc/certificate.class.php:55 inc/menu.class.php:42 24 | #: inc/profile.class.php:179 25 | msgid "Certificate" 26 | msgid_plural "Certificates" 27 | msgstr[0] "Zertifikat" 28 | msgstr[1] "Zertifikate" 29 | 30 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 31 | #: front/certificate.php:41 32 | msgid "Core migration" 33 | msgstr "" 34 | 35 | #: certificate.php:43 front/certificate.php:43 36 | msgid "Are you sure you want to do core migration ??" 37 | msgstr "" 38 | 39 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 40 | #: front/certificate.php:48 41 | msgid "Warning existants Certificates will be migrated !!" 42 | msgstr "" 43 | 44 | #: certificate.php:53 front/certificate.php:53 45 | msgid "Data migration" 46 | msgstr "" 47 | 48 | #: certificate.php:168 front/certificate.php:186 49 | msgid "Tables purge" 50 | msgstr "" 51 | 52 | #: certificate.php:194 front/certificate.php:212 53 | msgid "Link with core purge" 54 | msgstr "" 55 | 56 | #: certificate.php:211 front/certificate.php:229 57 | msgid "Notifications purge" 58 | msgstr "" 59 | 60 | #: hook.php:409 inc/certificate_item.class.php:568 61 | msgid "Does not expire" 62 | msgstr "Läuft nie ab" 63 | 64 | #: hook.php:483 65 | msgid "Associate to certificate" 66 | msgstr "Mit Zertifikat verknüpfen" 67 | 68 | #: setup.php:103 69 | msgid "This plugin requires GLPI >= 9.2" 70 | msgstr "" 71 | 72 | #: front/certificate.php:256 73 | msgid "No data to migrate" 74 | msgstr "" 75 | 76 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 77 | #: inc/certificate_item.class.php:515 78 | msgid "DNS name" 79 | msgstr "DNS-Name" 80 | 81 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 82 | #: inc/certificate_item.class.php:516 83 | msgid "DNS suffix" 84 | msgstr "DNS-Suffix" 85 | 86 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 87 | msgid "Root CA" 88 | msgstr "Root CA" 89 | 90 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 91 | msgid "Self-signed" 92 | msgstr "Selbstsigniert" 93 | 94 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 95 | msgid "Notification email" 96 | msgstr "Benachrichtigen (E-Mail)" 97 | 98 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 99 | msgid "Command used" 100 | msgstr "Verwendeter Befehl" 101 | 102 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 103 | msgid "Certificate request (CSR)" 104 | msgstr "Zertifikatsanfrage (CSR)" 105 | 106 | #: inc/certificate.class.php:361 107 | msgid "Empty for infinite" 108 | msgstr "Leer lassen für unbegrenzt" 109 | 110 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 111 | #: inc/notificationtargetcertificate.class.php:91 112 | msgid "Expired or expiring certificates" 113 | msgstr "Abgelaufene und Ablaufende Zertifikate" 114 | 115 | #: inc/certificate_item.class.php:488 116 | msgctxt "button" 117 | msgid "Associate a certificate" 118 | msgstr "Zertifikat verknüpfen" 119 | 120 | #: inc/certificatestate.class.php:50 121 | msgid "Certificate status" 122 | msgid_plural "Certificate statuses" 123 | msgstr[0] "Zertifikatsstatus" 124 | msgstr[1] "Zertifikatsstatus" 125 | 126 | #: inc/certificatetype.class.php:51 127 | msgid "Certificate type" 128 | msgid_plural "Certificate types" 129 | msgstr[0] "Zertifikatstyp" 130 | msgstr[1] "Zertifikatstypen" 131 | 132 | #: inc/config.class.php:49 133 | msgid "Plugin Setup" 134 | msgstr "Plugin einrichten" 135 | 136 | #: inc/config.class.php:86 137 | msgid "Time of checking of validity of certificates" 138 | msgstr "Zeitpunkt für Prüfung der Zertifikatsgültigkeit" 139 | 140 | #: inc/config.class.php:95 141 | msgid "Certificates expired since more" 142 | msgstr "Zertifikate die abgelaufen sind seit" 143 | 144 | #: inc/config.class.php:99 145 | msgid "Certificates expiring in less than" 146 | msgstr "Zertifikate die ablaufen in" 147 | 148 | #: inc/notificationstate.class.php:125 149 | msgid "add not-used status in expiration mail" 150 | msgstr "Nicht-verwendeten Zustände in den
Benachrichtigungen hinzufügen" 151 | 152 | #: inc/notificationstate.class.php:156 153 | msgid "No used status in expiration mail" 154 | msgstr "Verwendete Zustände in den
Benachrichtigungen hinzufügen" 155 | 156 | #: inc/notificationtargetcertificate.class.php:46 157 | #: inc/notificationtargetcertificate.class.php:61 158 | msgid "Expired certificates" 159 | msgstr "Abgelaufene Zertifikate" 160 | 161 | #: inc/notificationtargetcertificate.class.php:47 162 | #: inc/notificationtargetcertificate.class.php:62 163 | msgid "Expiring certificates" 164 | msgstr "Ablaufende Zertifikate" 165 | -------------------------------------------------------------------------------- /locales/pl_PL.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | # Adam Humienny , 2016 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: GLPI Project - certificates plugin\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 12 | "PO-Revision-Date: 2017-11-28 15:34+0000\n" 13 | "Last-Translator: Amandine Manceau\n" 14 | "Language-Team: Polish (Poland) (http://www.transifex.com/tsmr/GLPI_certificates/language/pl_PL/)\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Language: pl_PL\n" 19 | "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" 20 | 21 | #: certificate.php:32 setup.php:87 front/certificate.php:32 22 | #: inc/certificate.class.php:55 inc/menu.class.php:42 23 | #: inc/profile.class.php:179 24 | msgid "Certificate" 25 | msgid_plural "Certificates" 26 | msgstr[0] "Certyfikat" 27 | msgstr[1] "Certyfikaty" 28 | msgstr[2] "Certyfikatów" 29 | msgstr[3] "Certyfikatów" 30 | 31 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 32 | #: front/certificate.php:41 33 | msgid "Core migration" 34 | msgstr "" 35 | 36 | #: certificate.php:43 front/certificate.php:43 37 | msgid "Are you sure you want to do core migration ??" 38 | msgstr "" 39 | 40 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 41 | #: front/certificate.php:48 42 | msgid "Warning existants Certificates will be migrated !!" 43 | msgstr "" 44 | 45 | #: certificate.php:53 front/certificate.php:53 46 | msgid "Data migration" 47 | msgstr "" 48 | 49 | #: certificate.php:168 front/certificate.php:186 50 | msgid "Tables purge" 51 | msgstr "" 52 | 53 | #: certificate.php:194 front/certificate.php:212 54 | msgid "Link with core purge" 55 | msgstr "" 56 | 57 | #: certificate.php:211 front/certificate.php:229 58 | msgid "Notifications purge" 59 | msgstr "" 60 | 61 | #: hook.php:409 inc/certificate_item.class.php:568 62 | msgid "Does not expire" 63 | msgstr "Nie wygasa" 64 | 65 | #: hook.php:483 66 | msgid "Associate to certificate" 67 | msgstr "" 68 | 69 | #: setup.php:103 70 | msgid "This plugin requires GLPI >= 9.2" 71 | msgstr "" 72 | 73 | #: front/certificate.php:256 74 | msgid "No data to migrate" 75 | msgstr "" 76 | 77 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 78 | #: inc/certificate_item.class.php:515 79 | msgid "DNS name" 80 | msgstr "Nazwa DNS" 81 | 82 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 83 | #: inc/certificate_item.class.php:516 84 | msgid "DNS suffix" 85 | msgstr "Sufiks DNS" 86 | 87 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 88 | msgid "Root CA" 89 | msgstr "Główne centrum certyfikacji" 90 | 91 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 92 | msgid "Self-signed" 93 | msgstr "Podpis własny" 94 | 95 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 96 | msgid "Notification email" 97 | msgstr "Powiadomienia email" 98 | 99 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 100 | msgid "Command used" 101 | msgstr "Użyta komenda" 102 | 103 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 104 | msgid "Certificate request (CSR)" 105 | msgstr "" 106 | 107 | #: inc/certificate.class.php:361 108 | msgid "Empty for infinite" 109 | msgstr "" 110 | 111 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 112 | #: inc/notificationtargetcertificate.class.php:91 113 | msgid "Expired or expiring certificates" 114 | msgstr "Certyfikaty wygaśnięte lub wygasające " 115 | 116 | #: inc/certificate_item.class.php:488 117 | msgctxt "button" 118 | msgid "Associate a certificate" 119 | msgstr "" 120 | 121 | #: inc/certificatestate.class.php:50 122 | msgid "Certificate status" 123 | msgid_plural "Certificate statuses" 124 | msgstr[0] "Status certyfikatu" 125 | msgstr[1] "Statusy certyfikatów" 126 | msgstr[2] "Statusy certyfikatów" 127 | msgstr[3] "Statusy certyfikatów" 128 | 129 | #: inc/certificatetype.class.php:51 130 | msgid "Certificate type" 131 | msgid_plural "Certificate types" 132 | msgstr[0] "Typ certyfikatu" 133 | msgstr[1] "Typy certyfikatów" 134 | msgstr[2] "Typów certyfikatów" 135 | msgstr[3] "Typów certyfikatów" 136 | 137 | #: inc/config.class.php:49 138 | msgid "Plugin Setup" 139 | msgstr "Konfiguracja wtyczki" 140 | 141 | #: inc/config.class.php:86 142 | msgid "Time of checking of validity of certificates" 143 | msgstr "" 144 | 145 | #: inc/config.class.php:95 146 | msgid "Certificates expired since more" 147 | msgstr "" 148 | 149 | #: inc/config.class.php:99 150 | msgid "Certificates expiring in less than" 151 | msgstr "Certyfikat wygaśnie za mniej niż" 152 | 153 | #: inc/notificationstate.class.php:125 154 | msgid "add not-used status in expiration mail" 155 | msgstr "" 156 | 157 | #: inc/notificationstate.class.php:156 158 | msgid "No used status in expiration mail" 159 | msgstr "" 160 | 161 | #: inc/notificationtargetcertificate.class.php:46 162 | #: inc/notificationtargetcertificate.class.php:61 163 | msgid "Expired certificates" 164 | msgstr "Certyfikaty wygasłe" 165 | 166 | #: inc/notificationtargetcertificate.class.php:47 167 | #: inc/notificationtargetcertificate.class.php:62 168 | msgid "Expiring certificates" 169 | msgstr "Certyfikaty wygasające" 170 | -------------------------------------------------------------------------------- /locales/en_GB.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: GLPI Project - certificates plugin\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 11 | "PO-Revision-Date: 2017-11-28 15:35+0000\n" 12 | "Last-Translator: Amandine Manceau\n" 13 | "Language-Team: English (United Kingdom) (http://www.transifex.com/tsmr/GLPI_certificates/language/en_GB/)\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Language: en_GB\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #: certificate.php:32 setup.php:87 front/certificate.php:32 21 | #: inc/certificate.class.php:55 inc/menu.class.php:42 22 | #: inc/profile.class.php:179 23 | msgid "Certificate" 24 | msgid_plural "Certificates" 25 | msgstr[0] "Certificate" 26 | msgstr[1] "Certificates" 27 | 28 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 29 | #: front/certificate.php:41 30 | msgid "Core migration" 31 | msgstr "Core migration" 32 | 33 | #: certificate.php:43 front/certificate.php:43 34 | msgid "Are you sure you want to do core migration ??" 35 | msgstr "Are you sure you want to do core migration ??" 36 | 37 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 38 | #: front/certificate.php:48 39 | msgid "Warning existants Certificates will be migrated !!" 40 | msgstr "Warning existants Certificates will be migrated !!" 41 | 42 | #: certificate.php:53 front/certificate.php:53 43 | msgid "Data migration" 44 | msgstr "Data migration" 45 | 46 | #: certificate.php:168 front/certificate.php:186 47 | msgid "Tables purge" 48 | msgstr "Tables purge" 49 | 50 | #: certificate.php:194 front/certificate.php:212 51 | msgid "Link with core purge" 52 | msgstr "Link with core purge" 53 | 54 | #: certificate.php:211 front/certificate.php:229 55 | msgid "Notifications purge" 56 | msgstr "Notifications purge" 57 | 58 | #: hook.php:409 inc/certificate_item.class.php:568 59 | msgid "Does not expire" 60 | msgstr "Does not expire" 61 | 62 | #: hook.php:483 63 | msgid "Associate to certificate" 64 | msgstr "Associate to certificate" 65 | 66 | #: setup.php:103 67 | msgid "This plugin requires GLPI >= 9.2" 68 | msgstr "This plugin requires GLPI >= 9.2" 69 | 70 | #: front/certificate.php:256 71 | msgid "No data to migrate" 72 | msgstr "No data to migrate" 73 | 74 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 75 | #: inc/certificate_item.class.php:515 76 | msgid "DNS name" 77 | msgstr "DNS name" 78 | 79 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 80 | #: inc/certificate_item.class.php:516 81 | msgid "DNS suffix" 82 | msgstr "DNS suffix" 83 | 84 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 85 | msgid "Root CA" 86 | msgstr "Root CA" 87 | 88 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 89 | msgid "Self-signed" 90 | msgstr "Self-signed" 91 | 92 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 93 | msgid "Notification email" 94 | msgstr "Notification email" 95 | 96 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 97 | msgid "Command used" 98 | msgstr "Command used" 99 | 100 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 101 | msgid "Certificate request (CSR)" 102 | msgstr "Certificate request (CSR)" 103 | 104 | #: inc/certificate.class.php:361 105 | msgid "Empty for infinite" 106 | msgstr "Empty for infinite" 107 | 108 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 109 | #: inc/notificationtargetcertificate.class.php:91 110 | msgid "Expired or expiring certificates" 111 | msgstr "Expired or expiring certificates" 112 | 113 | #: inc/certificate_item.class.php:488 114 | msgctxt "button" 115 | msgid "Associate a certificate" 116 | msgstr "Associate a certificate" 117 | 118 | #: inc/certificatestate.class.php:50 119 | msgid "Certificate status" 120 | msgid_plural "Certificate statuses" 121 | msgstr[0] "Certificate status" 122 | msgstr[1] "Certificate statuses" 123 | 124 | #: inc/certificatetype.class.php:51 125 | msgid "Certificate type" 126 | msgid_plural "Certificate types" 127 | msgstr[0] "Certificate type" 128 | msgstr[1] "Certificate types" 129 | 130 | #: inc/config.class.php:49 131 | msgid "Plugin Setup" 132 | msgstr "Plugin Setup" 133 | 134 | #: inc/config.class.php:86 135 | msgid "Time of checking of validity of certificates" 136 | msgstr "Time of checking of validity of certificates" 137 | 138 | #: inc/config.class.php:95 139 | msgid "Certificates expired since more" 140 | msgstr "Certificates expired since more" 141 | 142 | #: inc/config.class.php:99 143 | msgid "Certificates expiring in less than" 144 | msgstr "Certificates expiring in less than" 145 | 146 | #: inc/notificationstate.class.php:125 147 | msgid "add not-used status in expiration mail" 148 | msgstr "add not-used status in expiration mail" 149 | 150 | #: inc/notificationstate.class.php:156 151 | msgid "No used status in expiration mail" 152 | msgstr "No used status in expiration mail" 153 | 154 | #: inc/notificationtargetcertificate.class.php:46 155 | #: inc/notificationtargetcertificate.class.php:61 156 | msgid "Expired certificates" 157 | msgstr "Expired certificates" 158 | 159 | #: inc/notificationtargetcertificate.class.php:47 160 | #: inc/notificationtargetcertificate.class.php:62 161 | msgid "Expiring certificates" 162 | msgstr "Expiring certificates" 163 | -------------------------------------------------------------------------------- /locales/es_ES.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | # tynet , 2012 7 | # Le Rohellec Benoit , 2015 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: GLPI Project - certificates plugin\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 13 | "PO-Revision-Date: 2017-11-28 15:34+0000\n" 14 | "Last-Translator: Amandine Manceau\n" 15 | "Language-Team: Spanish (Spain) (http://www.transifex.com/tsmr/GLPI_certificates/language/es_ES/)\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Language: es_ES\n" 20 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 21 | 22 | #: certificate.php:32 setup.php:87 front/certificate.php:32 23 | #: inc/certificate.class.php:55 inc/menu.class.php:42 24 | #: inc/profile.class.php:179 25 | msgid "Certificate" 26 | msgid_plural "Certificates" 27 | msgstr[0] "Certificado" 28 | msgstr[1] "Certificados" 29 | 30 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 31 | #: front/certificate.php:41 32 | msgid "Core migration" 33 | msgstr "" 34 | 35 | #: certificate.php:43 front/certificate.php:43 36 | msgid "Are you sure you want to do core migration ??" 37 | msgstr "" 38 | 39 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 40 | #: front/certificate.php:48 41 | msgid "Warning existants Certificates will be migrated !!" 42 | msgstr "" 43 | 44 | #: certificate.php:53 front/certificate.php:53 45 | msgid "Data migration" 46 | msgstr "" 47 | 48 | #: certificate.php:168 front/certificate.php:186 49 | msgid "Tables purge" 50 | msgstr "" 51 | 52 | #: certificate.php:194 front/certificate.php:212 53 | msgid "Link with core purge" 54 | msgstr "" 55 | 56 | #: certificate.php:211 front/certificate.php:229 57 | msgid "Notifications purge" 58 | msgstr "" 59 | 60 | #: hook.php:409 inc/certificate_item.class.php:568 61 | msgid "Does not expire" 62 | msgstr "No caduca nunca" 63 | 64 | #: hook.php:483 65 | msgid "Associate to certificate" 66 | msgstr "Asociar a un certificado" 67 | 68 | #: setup.php:103 69 | msgid "This plugin requires GLPI >= 9.2" 70 | msgstr "" 71 | 72 | #: front/certificate.php:256 73 | msgid "No data to migrate" 74 | msgstr "" 75 | 76 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 77 | #: inc/certificate_item.class.php:515 78 | msgid "DNS name" 79 | msgstr "Nombre DNS asociado (corto)" 80 | 81 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 82 | #: inc/certificate_item.class.php:516 83 | msgid "DNS suffix" 84 | msgstr "Sufijo DNS asociado" 85 | 86 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 87 | msgid "Root CA" 88 | msgstr "Root CA" 89 | 90 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 91 | msgid "Self-signed" 92 | msgstr "Autofirmado" 93 | 94 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 95 | msgid "Notification email" 96 | msgstr "Aviso por email" 97 | 98 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 99 | msgid "Command used" 100 | msgstr "Comando utilizado" 101 | 102 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 103 | msgid "Certificate request (CSR)" 104 | msgstr "Solicitud de certificado" 105 | 106 | #: inc/certificate.class.php:361 107 | msgid "Empty for infinite" 108 | msgstr "" 109 | 110 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 111 | #: inc/notificationtargetcertificate.class.php:91 112 | msgid "Expired or expiring certificates" 113 | msgstr "Certificados caducados o que van a caducar" 114 | 115 | #: inc/certificate_item.class.php:488 116 | msgctxt "button" 117 | msgid "Associate a certificate" 118 | msgstr "Asociar un certificado" 119 | 120 | #: inc/certificatestate.class.php:50 121 | msgid "Certificate status" 122 | msgid_plural "Certificate statuses" 123 | msgstr[0] "Estado de certificado" 124 | msgstr[1] "Estados de certificado" 125 | 126 | #: inc/certificatetype.class.php:51 127 | msgid "Certificate type" 128 | msgid_plural "Certificate types" 129 | msgstr[0] "Tipo de certificado" 130 | msgstr[1] "Tipos de certificado" 131 | 132 | #: inc/config.class.php:49 133 | msgid "Plugin Setup" 134 | msgstr "Configuración del plugin" 135 | 136 | #: inc/config.class.php:86 137 | msgid "Time of checking of validity of certificates" 138 | msgstr "Periodo de comprobación de validez de los certificados" 139 | 140 | #: inc/config.class.php:95 141 | msgid "Certificates expired since more" 142 | msgstr "Certificados caducados desde más de" 143 | 144 | #: inc/config.class.php:99 145 | msgid "Certificates expiring in less than" 146 | msgstr "Certificados que van a caducar en menos de" 147 | 148 | #: inc/notificationstate.class.php:125 149 | msgid "add not-used status in expiration mail" 150 | msgstr "Añadir un estado no utilizado por la notificación de caducidad" 151 | 152 | #: inc/notificationstate.class.php:156 153 | msgid "No used status in expiration mail" 154 | msgstr "Estados no utilizados por la notificación de caducidad" 155 | 156 | #: inc/notificationtargetcertificate.class.php:46 157 | #: inc/notificationtargetcertificate.class.php:61 158 | msgid "Expired certificates" 159 | msgstr "Certificados caducados" 160 | 161 | #: inc/notificationtargetcertificate.class.php:47 162 | #: inc/notificationtargetcertificate.class.php:62 163 | msgid "Expiring certificates" 164 | msgstr "Certificados que van a caducar" 165 | -------------------------------------------------------------------------------- /locales/ro_RO.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | # Doru DEACONU , 2013,2015 7 | # Doru DEACONU , 2012 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: GLPI Project - certificates plugin\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 13 | "PO-Revision-Date: 2017-11-28 15:34+0000\n" 14 | "Last-Translator: Amandine Manceau\n" 15 | "Language-Team: Romanian (Romania) (http://www.transifex.com/tsmr/GLPI_certificates/language/ro_RO/)\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Language: ro_RO\n" 20 | "Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" 21 | 22 | #: certificate.php:32 setup.php:87 front/certificate.php:32 23 | #: inc/certificate.class.php:55 inc/menu.class.php:42 24 | #: inc/profile.class.php:179 25 | msgid "Certificate" 26 | msgid_plural "Certificates" 27 | msgstr[0] "Certificat" 28 | msgstr[1] "Certificate" 29 | msgstr[2] "Certificate" 30 | 31 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 32 | #: front/certificate.php:41 33 | msgid "Core migration" 34 | msgstr "" 35 | 36 | #: certificate.php:43 front/certificate.php:43 37 | msgid "Are you sure you want to do core migration ??" 38 | msgstr "" 39 | 40 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 41 | #: front/certificate.php:48 42 | msgid "Warning existants Certificates will be migrated !!" 43 | msgstr "" 44 | 45 | #: certificate.php:53 front/certificate.php:53 46 | msgid "Data migration" 47 | msgstr "" 48 | 49 | #: certificate.php:168 front/certificate.php:186 50 | msgid "Tables purge" 51 | msgstr "" 52 | 53 | #: certificate.php:194 front/certificate.php:212 54 | msgid "Link with core purge" 55 | msgstr "" 56 | 57 | #: certificate.php:211 front/certificate.php:229 58 | msgid "Notifications purge" 59 | msgstr "" 60 | 61 | #: hook.php:409 inc/certificate_item.class.php:568 62 | msgid "Does not expire" 63 | msgstr "Nu expiră" 64 | 65 | #: hook.php:483 66 | msgid "Associate to certificate" 67 | msgstr "Asociază la certificat" 68 | 69 | #: setup.php:103 70 | msgid "This plugin requires GLPI >= 9.2" 71 | msgstr "" 72 | 73 | #: front/certificate.php:256 74 | msgid "No data to migrate" 75 | msgstr "" 76 | 77 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 78 | #: inc/certificate_item.class.php:515 79 | msgid "DNS name" 80 | msgstr "Nume DNS asociat" 81 | 82 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 83 | #: inc/certificate_item.class.php:516 84 | msgid "DNS suffix" 85 | msgstr "Sufix DNS asociat" 86 | 87 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 88 | msgid "Root CA" 89 | msgstr "Root CA" 90 | 91 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 92 | msgid "Self-signed" 93 | msgstr "Autosemnată" 94 | 95 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 96 | msgid "Notification email" 97 | msgstr "Notificare email" 98 | 99 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 100 | msgid "Command used" 101 | msgstr "Comandă utilizată" 102 | 103 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 104 | msgid "Certificate request (CSR)" 105 | msgstr "Cerere Certificat (CSR)" 106 | 107 | #: inc/certificate.class.php:361 108 | msgid "Empty for infinite" 109 | msgstr "Necompletat pentru infinit" 110 | 111 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 112 | #: inc/notificationtargetcertificate.class.php:91 113 | msgid "Expired or expiring certificates" 114 | msgstr "Certificate expirate sau certificate ce vor expira" 115 | 116 | #: inc/certificate_item.class.php:488 117 | msgctxt "button" 118 | msgid "Associate a certificate" 119 | msgstr "Asociază certificat" 120 | 121 | #: inc/certificatestate.class.php:50 122 | msgid "Certificate status" 123 | msgid_plural "Certificate statuses" 124 | msgstr[0] "Statut certificat" 125 | msgstr[1] "Statusuri certificate" 126 | msgstr[2] "Statusuri certificate" 127 | 128 | #: inc/certificatetype.class.php:51 129 | msgid "Certificate type" 130 | msgid_plural "Certificate types" 131 | msgstr[0] "Tip certificat" 132 | msgstr[1] "Tipuri certificat" 133 | msgstr[2] "Tipuri certificat" 134 | 135 | #: inc/config.class.php:49 136 | msgid "Plugin Setup" 137 | msgstr "Configurare plugin" 138 | 139 | #: inc/config.class.php:86 140 | msgid "Time of checking of validity of certificates" 141 | msgstr "Timp de verificare a valabilităţii certificatelor" 142 | 143 | #: inc/config.class.php:95 144 | msgid "Certificates expired since more" 145 | msgstr "Certificate expirate de mai mult de " 146 | 147 | #: inc/config.class.php:99 148 | msgid "Certificates expiring in less than" 149 | msgstr "Certificate ce expiră în mai puţin de" 150 | 151 | #: inc/notificationstate.class.php:125 152 | msgid "add not-used status in expiration mail" 153 | msgstr "Adaugă un statut neutilizat
în trimiterea emailuri de expirare" 154 | 155 | #: inc/notificationstate.class.php:156 156 | msgid "No used status in expiration mail" 157 | msgstr "Statut neutilizat
în trimiterea emailuri de expirare" 158 | 159 | #: inc/notificationtargetcertificate.class.php:46 160 | #: inc/notificationtargetcertificate.class.php:61 161 | msgid "Expired certificates" 162 | msgstr "Certificate expirate" 163 | 164 | #: inc/notificationtargetcertificate.class.php:47 165 | #: inc/notificationtargetcertificate.class.php:62 166 | msgid "Expiring certificates" 167 | msgstr "Cerificate ce vor expira" 168 | -------------------------------------------------------------------------------- /locales/cs_CZ.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | # David Stepan , 2015 7 | # Ondrej Krejcik , 2013 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: GLPI Project - certificates plugin\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 13 | "PO-Revision-Date: 2017-11-28 15:35+0000\n" 14 | "Last-Translator: Amandine Manceau\n" 15 | "Language-Team: Czech (Czech Republic) (http://www.transifex.com/tsmr/GLPI_certificates/language/cs_CZ/)\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Language: cs_CZ\n" 20 | "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" 21 | 22 | #: certificate.php:32 setup.php:87 front/certificate.php:32 23 | #: inc/certificate.class.php:55 inc/menu.class.php:42 24 | #: inc/profile.class.php:179 25 | msgid "Certificate" 26 | msgid_plural "Certificates" 27 | msgstr[0] "Certifikát" 28 | msgstr[1] "Certifikáty" 29 | msgstr[2] "Certifikátů" 30 | 31 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 32 | #: front/certificate.php:41 33 | msgid "Core migration" 34 | msgstr "" 35 | 36 | #: certificate.php:43 front/certificate.php:43 37 | msgid "Are you sure you want to do core migration ??" 38 | msgstr "" 39 | 40 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 41 | #: front/certificate.php:48 42 | msgid "Warning existants Certificates will be migrated !!" 43 | msgstr "" 44 | 45 | #: certificate.php:53 front/certificate.php:53 46 | msgid "Data migration" 47 | msgstr "" 48 | 49 | #: certificate.php:168 front/certificate.php:186 50 | msgid "Tables purge" 51 | msgstr "" 52 | 53 | #: certificate.php:194 front/certificate.php:212 54 | msgid "Link with core purge" 55 | msgstr "" 56 | 57 | #: certificate.php:211 front/certificate.php:229 58 | msgid "Notifications purge" 59 | msgstr "" 60 | 61 | #: hook.php:409 inc/certificate_item.class.php:568 62 | msgid "Does not expire" 63 | msgstr "bez expirace" 64 | 65 | #: hook.php:483 66 | msgid "Associate to certificate" 67 | msgstr "Přiřadit certifikát" 68 | 69 | #: setup.php:103 70 | msgid "This plugin requires GLPI >= 9.2" 71 | msgstr "" 72 | 73 | #: front/certificate.php:256 74 | msgid "No data to migrate" 75 | msgstr "" 76 | 77 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 78 | #: inc/certificate_item.class.php:515 79 | msgid "DNS name" 80 | msgstr "DNS jméno" 81 | 82 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 83 | #: inc/certificate_item.class.php:516 84 | msgid "DNS suffix" 85 | msgstr "DNS přípona" 86 | 87 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 88 | msgid "Root CA" 89 | msgstr "Kořenová CA" 90 | 91 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 92 | msgid "Self-signed" 93 | msgstr "Sám sebou podepsaný" 94 | 95 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 96 | msgid "Notification email" 97 | msgstr "Oznamovací email" 98 | 99 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 100 | msgid "Command used" 101 | msgstr "Použitý příkaz" 102 | 103 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 104 | msgid "Certificate request (CSR)" 105 | msgstr "Žádost o certifikát (CSR)" 106 | 107 | #: inc/certificate.class.php:361 108 | msgid "Empty for infinite" 109 | msgstr "Prázdné pro nekonečnou platnost" 110 | 111 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 112 | #: inc/notificationtargetcertificate.class.php:91 113 | msgid "Expired or expiring certificates" 114 | msgstr "Prošlá nebo právě procházející platnost certifikátů" 115 | 116 | #: inc/certificate_item.class.php:488 117 | msgctxt "button" 118 | msgid "Associate a certificate" 119 | msgstr "Přiřadit certifikát" 120 | 121 | #: inc/certificatestate.class.php:50 122 | msgid "Certificate status" 123 | msgid_plural "Certificate statuses" 124 | msgstr[0] "Stav certifikátu" 125 | msgstr[1] "Stavy certifikátu" 126 | msgstr[2] "Stavů certifikátu" 127 | 128 | #: inc/certificatetype.class.php:51 129 | msgid "Certificate type" 130 | msgid_plural "Certificate types" 131 | msgstr[0] "Typ certifikátu" 132 | msgstr[1] "Typy certifikátů" 133 | msgstr[2] "Typů certifikátů" 134 | 135 | #: inc/config.class.php:49 136 | msgid "Plugin Setup" 137 | msgstr "Nastavení pluginu" 138 | 139 | #: inc/config.class.php:86 140 | msgid "Time of checking of validity of certificates" 141 | msgstr "Časové období kontroly platnosti certifikátů" 142 | 143 | #: inc/config.class.php:95 144 | msgid "Certificates expired since more" 145 | msgstr "Certifikáty, jejichž platnost vypršela za předchozích" 146 | 147 | #: inc/config.class.php:99 148 | msgid "Certificates expiring in less than" 149 | msgstr "Certifikáty, jejichž platnost vyprší v období následujících" 150 | 151 | #: inc/notificationstate.class.php:125 152 | msgid "add not-used status in expiration mail" 153 | msgstr "Přidat nepoužívaný stav do mailu, který informuje o expiraci" 154 | 155 | #: inc/notificationstate.class.php:156 156 | msgid "No used status in expiration mail" 157 | msgstr "Nepoužívaný stav v mailu, který informuje o expiraci" 158 | 159 | #: inc/notificationtargetcertificate.class.php:46 160 | #: inc/notificationtargetcertificate.class.php:61 161 | msgid "Expired certificates" 162 | msgstr "Certifikáty s prošlou platností" 163 | 164 | #: inc/notificationtargetcertificate.class.php:47 165 | #: inc/notificationtargetcertificate.class.php:62 166 | msgid "Expiring certificates" 167 | msgstr "Certifikáty s právě procházející platností" 168 | -------------------------------------------------------------------------------- /sql/empty-1.3.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `glpi_plugin_certificates`; 2 | CREATE TABLE `glpi_plugin_certificates` ( 3 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 4 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 5 | `name` VARCHAR(255) 6 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 7 | `type` TINYINT(4) NOT NULL DEFAULT '1', 8 | `dns_name` VARCHAR(30) 9 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 10 | `dns_suffix` VARCHAR(30) 11 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 12 | `FK_users` INT(4) NOT NULL DEFAULT '0', 13 | `FK_groups` INT(4) NOT NULL DEFAULT '0', 14 | `location` INT(4) NOT NULL DEFAULT '0', 15 | `FK_glpi_enterprise` INT(4) NOT NULL DEFAULT '0', 16 | `auto_sign` SMALLINT(6) NOT NULL DEFAULT '0', 17 | `query_date` DATE NOT NULL DEFAULT '0000-00-00', 18 | `expiration_date` DATE NOT NULL DEFAULT '0000-00-00', 19 | `status` INT(4) NOT NULL DEFAULT '0', 20 | `mailing` INT(4) NOT NULL DEFAULT '0', 21 | `command` TEXT, 22 | `certificate_request` TEXT, 23 | `certificate_item` TEXT, 24 | `notes` LONGTEXT, 25 | `deleted` SMALLINT(6) NOT NULL DEFAULT '0', 26 | PRIMARY KEY (`ID`) 27 | ) 28 | ENGINE = MyISAM 29 | DEFAULT CHARSET = utf8 30 | COLLATE = utf8_unicode_ci; 31 | 32 | DROP TABLE IF EXISTS `glpi_plugin_certificates_device`; 33 | CREATE TABLE `glpi_plugin_certificates_device` ( 34 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 35 | `FK_certificate` INT(11) NOT NULL DEFAULT '0', 36 | `FK_device` INT(11) NOT NULL DEFAULT '0', 37 | `device_type` INT(11) NOT NULL DEFAULT '0', 38 | PRIMARY KEY (`ID`), 39 | UNIQUE KEY `FK_certificate` (`FK_certificate`, `FK_device`, `device_type`), 40 | KEY `FK_certificate_2` (`FK_certificate`), 41 | KEY `FK_device` (`FK_device`, `device_type`) 42 | ) 43 | ENGINE = MyISAM 44 | DEFAULT CHARSET = utf8 45 | COLLATE = utf8_unicode_ci; 46 | 47 | DROP TABLE IF EXISTS `glpi_dropdown_plugin_certificates_type`; 48 | CREATE TABLE `glpi_dropdown_plugin_certificates_type` ( 49 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 50 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 51 | `name` VARCHAR(255) 52 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 53 | `comments` TEXT, 54 | PRIMARY KEY (`ID`), 55 | KEY `name` (`name`) 56 | ) 57 | ENGINE = MyISAM 58 | DEFAULT CHARSET = utf8 59 | COLLATE = utf8_unicode_ci; 60 | 61 | DROP TABLE IF EXISTS `glpi_dropdown_plugin_certificates_status`; 62 | CREATE TABLE `glpi_dropdown_plugin_certificates_status` ( 63 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 64 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 65 | `name` VARCHAR(255) 66 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 67 | `comments` TEXT, 68 | PRIMARY KEY (`ID`), 69 | KEY `name` (`name`) 70 | ) 71 | ENGINE = MyISAM 72 | DEFAULT CHARSET = utf8 73 | COLLATE = utf8_unicode_ci; 74 | 75 | DROP TABLE IF EXISTS `glpi_plugin_certificates_profiles`; 76 | CREATE TABLE `glpi_plugin_certificates_profiles` ( 77 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 78 | `name` VARCHAR(255) 79 | COLLATE utf8_unicode_ci DEFAULT NULL, 80 | `interface` VARCHAR(50) 81 | COLLATE utf8_unicode_ci NOT NULL DEFAULT 'certificate', 82 | `is_default` SMALLINT(6) NOT NULL DEFAULT '0', 83 | `certificates` CHAR(1) DEFAULT NULL, 84 | PRIMARY KEY (`ID`), 85 | KEY `interface` (`interface`) 86 | ) 87 | ENGINE = MyISAM 88 | DEFAULT CHARSET = utf8 89 | COLLATE = utf8_unicode_ci; 90 | 91 | DROP TABLE IF EXISTS `glpi_plugin_certificates_config`; 92 | CREATE TABLE `glpi_plugin_certificates_config` ( 93 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 94 | `delay` VARCHAR(50) 95 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 96 | PRIMARY KEY (`ID`) 97 | ) 98 | ENGINE = MyISAM 99 | DEFAULT CHARSET = utf8 100 | COLLATE = utf8_unicode_ci; 101 | 102 | INSERT INTO `glpi_plugin_certificates_config` VALUES (1, '30'); 103 | 104 | DROP TABLE IF EXISTS `glpi_plugin_certificates_mailing`; 105 | CREATE TABLE `glpi_plugin_certificates_mailing` ( 106 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 107 | `type` VARCHAR(255) 108 | COLLATE utf8_unicode_ci DEFAULT NULL, 109 | `FK_item` INT(11) NOT NULL DEFAULT '0', 110 | `item_type` INT(11) NOT NULL DEFAULT '0', 111 | PRIMARY KEY (`ID`), 112 | UNIQUE KEY `mailings` (`type`, `FK_item`, `item_type`), 113 | KEY `type` (`type`), 114 | KEY `FK_item` (`FK_item`), 115 | KEY `item_type` (`item_type`), 116 | KEY `items` (`item_type`, `FK_item`) 117 | ) 118 | ENGINE = MyISAM 119 | DEFAULT CHARSET = utf8 120 | COLLATE = utf8_unicode_ci; 121 | 122 | INSERT INTO glpi_plugin_certificates_mailing VALUES ('1', 'certificates', '1', '1'); 123 | 124 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '3', '2', '0'); 125 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '4', '3', '0'); 126 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '5', '4', '0'); -------------------------------------------------------------------------------- /certificates.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Certificates Inventory 4 | certificates 5 | stable 6 | https://raw.githubusercontent.com/InfotelGLPI/certificates/master/certificates.png 7 | 8 | 9 | Un système d'alertes mail permet de vérifier les certificats qui vont ou qui ont expirés.]]> 10 | A mailing system allow to verify already expired or soon expired certificates.]]> 11 | 12 | 13 |
Ce plugin vous permet de gérer les certificats de votre réseau et de les associer à des éléments de l’inventaire.
Un système d'alertes mail permet de vérifier les certificats qui vont ou qui ont expirés.
- Utilisable depuis le helpdesk
- Peut être intégré au plugin environment]]>
14 |
This plugin enables you to manage your certificates into your network and associate them with elements of the inventory.
A mailing system allow to verify already expired or soon expired certificates.
- Can be used with helpdesk
- Can be integrated into Environment plugin.]]>
15 |
16 |
17 | https://github.com/InfotelGLPI/certificates 18 | https://github.com/InfotelGLPI/certificates/releases 19 | https://github.com/InfotelGLPI/certificates/issues 20 | https://raw.githubusercontent.com/InfotelGLPI/certificates/master/README.md 21 | 22 | Xavier Caillaud 23 | Infotel 24 | 25 | 26 | 27 | 2.3.0 28 | 9.2 29 | 30 | 31 | 2.2.2 32 | 9.1 33 | 34 | 35 | 2.2.1 36 | 9.1 37 | 38 | 39 | 2.2.0 40 | 9.1 41 | 42 | 43 | 2.1.1 44 | 0.90 45 | 46 | 47 | 2.1.0 48 | 0.90 49 | 50 | 51 | 2.0.1 52 | 0.85.3 53 | 54 | 55 | 2.0.0 56 | 0.85 57 | 58 | 59 | 1.9.0 60 | 0.84 61 | 62 | 63 | 1.8.3 64 | 0.83.3 65 | 66 | 67 | 1.8.2 68 | 0.83 69 | 70 | 71 | 1.8.1 72 | 0.83 73 | 74 | 75 | 1.8.0 76 | 0.80 77 | 78 | 79 | 1.7.0 80 | 0.80 81 | 82 | 83 | 1.6.0 84 | 0.78 85 | 86 | 87 | 1.5.3 88 | 0.72.1 89 | 90 | 91 | 1.5.2 92 | 0.72.1 93 | 94 | 95 | 1.5.1 96 | 0.72.1 97 | 98 | 99 | 1.5.0 100 | 0.72 101 | 102 | 103 | 1.4 104 | 0.71 105 | 106 | 107 | 1.3 108 | 0.70 109 | 110 | 111 | 112 | fr_FR 113 | en_GB 114 | cs_CZ 115 | de_DE 116 | es_ES 117 | pl_PL 118 | pt_BR 119 | ro_RO 120 | tr_TR 121 | da_DA 122 | ru_RU 123 | 124 | 125 | 126 | 127 | Certificats 128 | Inventaire 129 | Gestion 130 | 131 | 132 | Certificates 133 | Inventory 134 | Management 135 | 136 | 137 |
138 | -------------------------------------------------------------------------------- /sql/empty-1.4.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `glpi_plugin_certificates`; 2 | CREATE TABLE `glpi_plugin_certificates` ( 3 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 4 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 5 | `recursive` TINYINT(1) NOT NULL DEFAULT '0', 6 | `name` VARCHAR(255) 7 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 8 | `type` TINYINT(4) NOT NULL DEFAULT '1', 9 | `dns_name` VARCHAR(30) 10 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 11 | `dns_suffix` VARCHAR(30) 12 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 13 | `FK_users` INT(4) NOT NULL DEFAULT '0', 14 | `FK_groups` INT(4) NOT NULL DEFAULT '0', 15 | `location` INT(4) NOT NULL DEFAULT '0', 16 | `FK_glpi_enterprise` INT(4) NOT NULL DEFAULT '0', 17 | `auto_sign` SMALLINT(6) NOT NULL DEFAULT '0', 18 | `query_date` DATE NOT NULL DEFAULT '0000-00-00', 19 | `expiration_date` DATE NOT NULL DEFAULT '0000-00-00', 20 | `status` INT(4) NOT NULL DEFAULT '0', 21 | `mailing` INT(4) NOT NULL DEFAULT '0', 22 | `command` TEXT, 23 | `certificate_request` TEXT, 24 | `certificate_item` TEXT, 25 | `notes` LONGTEXT, 26 | `deleted` SMALLINT(6) NOT NULL DEFAULT '0', 27 | PRIMARY KEY (`ID`) 28 | ) 29 | ENGINE = MyISAM 30 | DEFAULT CHARSET = utf8 31 | COLLATE = utf8_unicode_ci; 32 | 33 | DROP TABLE IF EXISTS `glpi_plugin_certificates_device`; 34 | CREATE TABLE `glpi_plugin_certificates_device` ( 35 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 36 | `FK_certificate` INT(11) NOT NULL DEFAULT '0', 37 | `FK_device` INT(11) NOT NULL DEFAULT '0', 38 | `device_type` INT(11) NOT NULL DEFAULT '0', 39 | PRIMARY KEY (`ID`), 40 | UNIQUE KEY `FK_certificate` (`FK_certificate`, `FK_device`, `device_type`), 41 | KEY `FK_certificate_2` (`FK_certificate`), 42 | KEY `FK_device` (`FK_device`, `device_type`) 43 | ) 44 | ENGINE = MyISAM 45 | DEFAULT CHARSET = utf8 46 | COLLATE = utf8_unicode_ci; 47 | 48 | DROP TABLE IF EXISTS `glpi_dropdown_plugin_certificates_type`; 49 | CREATE TABLE `glpi_dropdown_plugin_certificates_type` ( 50 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 51 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 52 | `name` VARCHAR(255) 53 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 54 | `comments` TEXT, 55 | PRIMARY KEY (`ID`), 56 | KEY `name` (`name`) 57 | ) 58 | ENGINE = MyISAM 59 | DEFAULT CHARSET = utf8 60 | COLLATE = utf8_unicode_ci; 61 | 62 | DROP TABLE IF EXISTS `glpi_dropdown_plugin_certificates_status`; 63 | CREATE TABLE `glpi_dropdown_plugin_certificates_status` ( 64 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 65 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 66 | `name` VARCHAR(255) 67 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 68 | `comments` TEXT, 69 | PRIMARY KEY (`ID`), 70 | KEY `name` (`name`) 71 | ) 72 | ENGINE = MyISAM 73 | DEFAULT CHARSET = utf8 74 | COLLATE = utf8_unicode_ci; 75 | 76 | DROP TABLE IF EXISTS `glpi_plugin_certificates_profiles`; 77 | CREATE TABLE `glpi_plugin_certificates_profiles` ( 78 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 79 | `name` VARCHAR(255) 80 | COLLATE utf8_unicode_ci DEFAULT NULL, 81 | `interface` VARCHAR(50) 82 | COLLATE utf8_unicode_ci NOT NULL DEFAULT 'certificate', 83 | `is_default` SMALLINT(6) NOT NULL DEFAULT '0', 84 | `certificates` CHAR(1) DEFAULT NULL, 85 | PRIMARY KEY (`ID`), 86 | KEY `interface` (`interface`) 87 | ) 88 | ENGINE = MyISAM 89 | DEFAULT CHARSET = utf8 90 | COLLATE = utf8_unicode_ci; 91 | 92 | DROP TABLE IF EXISTS `glpi_plugin_certificates_config`; 93 | CREATE TABLE `glpi_plugin_certificates_config` ( 94 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 95 | `delay` VARCHAR(50) 96 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 97 | PRIMARY KEY (`ID`) 98 | ) 99 | ENGINE = MyISAM 100 | DEFAULT CHARSET = utf8 101 | COLLATE = utf8_unicode_ci; 102 | 103 | INSERT INTO `glpi_plugin_certificates_config` VALUES (1, '30'); 104 | 105 | DROP TABLE IF EXISTS `glpi_plugin_certificates_mailing`; 106 | CREATE TABLE `glpi_plugin_certificates_mailing` ( 107 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 108 | `type` VARCHAR(255) 109 | COLLATE utf8_unicode_ci DEFAULT NULL, 110 | `FK_item` INT(11) NOT NULL DEFAULT '0', 111 | `item_type` INT(11) NOT NULL DEFAULT '0', 112 | PRIMARY KEY (`ID`), 113 | UNIQUE KEY `mailings` (`type`, `FK_item`, `item_type`), 114 | KEY `type` (`type`), 115 | KEY `FK_item` (`FK_item`), 116 | KEY `item_type` (`item_type`), 117 | KEY `items` (`item_type`, `FK_item`) 118 | ) 119 | ENGINE = MyISAM 120 | DEFAULT CHARSET = utf8 121 | COLLATE = utf8_unicode_ci; 122 | 123 | INSERT INTO glpi_plugin_certificates_mailing VALUES ('1', 'certificates', '1', '1'); 124 | 125 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '3', '2', '0'); 126 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '4', '3', '0'); 127 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '5', '4', '0'); -------------------------------------------------------------------------------- /locales/fr_FR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | # Amandine Manceau, 2017 7 | # tynet , 2012 8 | # Xavier CAILLAUD , 2013,2015 9 | msgid "" 10 | msgstr "" 11 | "Project-Id-Version: GLPI Project - certificates plugin\n" 12 | "Report-Msgid-Bugs-To: \n" 13 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 14 | "PO-Revision-Date: 2017-11-28 15:37+0000\n" 15 | "Last-Translator: Amandine Manceau\n" 16 | "Language-Team: French (France) (http://www.transifex.com/tsmr/GLPI_certificates/language/fr_FR/)\n" 17 | "MIME-Version: 1.0\n" 18 | "Content-Type: text/plain; charset=UTF-8\n" 19 | "Content-Transfer-Encoding: 8bit\n" 20 | "Language: fr_FR\n" 21 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 22 | 23 | #: certificate.php:32 setup.php:87 front/certificate.php:32 24 | #: inc/certificate.class.php:55 inc/menu.class.php:42 25 | #: inc/profile.class.php:179 26 | msgid "Certificate" 27 | msgid_plural "Certificates" 28 | msgstr[0] "Certificat" 29 | msgstr[1] "Certificats" 30 | 31 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 32 | #: front/certificate.php:41 33 | msgid "Core migration" 34 | msgstr "Migration de base" 35 | 36 | #: certificate.php:43 front/certificate.php:43 37 | msgid "Are you sure you want to do core migration ??" 38 | msgstr "Êtes-vous sûr de vouloir effectuer une migration de base?" 39 | 40 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 41 | #: front/certificate.php:48 42 | msgid "Warning existants Certificates will be migrated !!" 43 | msgstr "Attention les certificats seront migrés !!" 44 | 45 | #: certificate.php:53 front/certificate.php:53 46 | msgid "Data migration" 47 | msgstr "Migration de données" 48 | 49 | #: certificate.php:168 front/certificate.php:186 50 | msgid "Tables purge" 51 | msgstr "Suppression des tables" 52 | 53 | #: certificate.php:194 front/certificate.php:212 54 | msgid "Link with core purge" 55 | msgstr "Suppression des liens avec le coeur" 56 | 57 | #: certificate.php:211 front/certificate.php:229 58 | msgid "Notifications purge" 59 | msgstr "Suppression des notifications" 60 | 61 | #: hook.php:409 inc/certificate_item.class.php:568 62 | msgid "Does not expire" 63 | msgstr "N'expire pas" 64 | 65 | #: hook.php:483 66 | msgid "Associate to certificate" 67 | msgstr "Associer au certificat" 68 | 69 | #: setup.php:103 70 | msgid "This plugin requires GLPI >= 9.2" 71 | msgstr "Ce plugin nécessite GLPI> = 9.2" 72 | 73 | #: front/certificate.php:256 74 | msgid "No data to migrate" 75 | msgstr "Aucune donnée à migrer" 76 | 77 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 78 | #: inc/certificate_item.class.php:515 79 | msgid "DNS name" 80 | msgstr "Nom DNS associé (court)" 81 | 82 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 83 | #: inc/certificate_item.class.php:516 84 | msgid "DNS suffix" 85 | msgstr "Suffixe DNS associé" 86 | 87 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 88 | msgid "Root CA" 89 | msgstr "Root CA" 90 | 91 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 92 | msgid "Self-signed" 93 | msgstr "Autosigné" 94 | 95 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 96 | msgid "Notification email" 97 | msgstr "Notification mail" 98 | 99 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 100 | msgid "Command used" 101 | msgstr "Commande utilisée" 102 | 103 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 104 | msgid "Certificate request (CSR)" 105 | msgstr "Demande de certificat" 106 | 107 | #: inc/certificate.class.php:361 108 | msgid "Empty for infinite" 109 | msgstr "Vide pour infini" 110 | 111 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 112 | #: inc/notificationtargetcertificate.class.php:91 113 | msgid "Expired or expiring certificates" 114 | msgstr "Certificats expirés ou certificats qui vont expirer" 115 | 116 | #: inc/certificate_item.class.php:488 117 | msgctxt "button" 118 | msgid "Associate a certificate" 119 | msgstr "Associer un certificat" 120 | 121 | #: inc/certificatestate.class.php:50 122 | msgid "Certificate status" 123 | msgid_plural "Certificate statuses" 124 | msgstr[0] "Statut de certificat" 125 | msgstr[1] "Statuts de certificat" 126 | 127 | #: inc/certificatetype.class.php:51 128 | msgid "Certificate type" 129 | msgid_plural "Certificate types" 130 | msgstr[0] "Type de certificat" 131 | msgstr[1] "Types de certificat" 132 | 133 | #: inc/config.class.php:49 134 | msgid "Plugin Setup" 135 | msgstr "Configuration du plugin" 136 | 137 | #: inc/config.class.php:86 138 | msgid "Time of checking of validity of certificates" 139 | msgstr "Délai de vérification de validité des certificats" 140 | 141 | #: inc/config.class.php:95 142 | msgid "Certificates expired since more" 143 | msgstr "Certificats expirés depuis plus de" 144 | 145 | #: inc/config.class.php:99 146 | msgid "Certificates expiring in less than" 147 | msgstr "Certificats qui vont expirer dans moins de" 148 | 149 | #: inc/notificationstate.class.php:125 150 | msgid "add not-used status in expiration mail" 151 | msgstr "Ajouter un statut non utilisé
dans l'envoi des emails d'expiration" 152 | 153 | #: inc/notificationstate.class.php:156 154 | msgid "No used status in expiration mail" 155 | msgstr "Statuts non utilisés
dans l'envoi des emails d'expiration" 156 | 157 | #: inc/notificationtargetcertificate.class.php:46 158 | #: inc/notificationtargetcertificate.class.php:61 159 | msgid "Expired certificates" 160 | msgstr "Certificats expirés" 161 | 162 | #: inc/notificationtargetcertificate.class.php:47 163 | #: inc/notificationtargetcertificate.class.php:62 164 | msgid "Expiring certificates" 165 | msgstr "Certificats qui vont expirer" 166 | -------------------------------------------------------------------------------- /locales/ru_RU.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Certificates Development Team 3 | # This file is distributed under the same license as the GLPI - Certificates plugin package. 4 | # 5 | # Translators: 6 | # Александр Щербак , 2015 7 | # Nikolay , 2017 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: GLPI Project - certificates plugin\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2017-11-28 16:20+0100\n" 13 | "PO-Revision-Date: 2017-11-28 15:35+0000\n" 14 | "Last-Translator: Amandine Manceau\n" 15 | "Language-Team: Russian (Russia) (http://www.transifex.com/tsmr/GLPI_certificates/language/ru_RU/)\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Language: ru_RU\n" 20 | "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" 21 | 22 | #: certificate.php:32 setup.php:87 front/certificate.php:32 23 | #: inc/certificate.class.php:55 inc/menu.class.php:42 24 | #: inc/profile.class.php:179 25 | msgid "Certificate" 26 | msgid_plural "Certificates" 27 | msgstr[0] "Сертификат" 28 | msgstr[1] "Сертификаты" 29 | msgstr[2] "Сертификаты" 30 | msgstr[3] "Сертификаты" 31 | 32 | #: certificate.php:38 certificate.php:41 front/certificate.php:38 33 | #: front/certificate.php:41 34 | msgid "Core migration" 35 | msgstr "" 36 | 37 | #: certificate.php:43 front/certificate.php:43 38 | msgid "Are you sure you want to do core migration ??" 39 | msgstr "" 40 | 41 | #: certificate.php:44 certificate.php:48 front/certificate.php:44 42 | #: front/certificate.php:48 43 | msgid "Warning existants Certificates will be migrated !!" 44 | msgstr "" 45 | 46 | #: certificate.php:53 front/certificate.php:53 47 | msgid "Data migration" 48 | msgstr "" 49 | 50 | #: certificate.php:168 front/certificate.php:186 51 | msgid "Tables purge" 52 | msgstr "" 53 | 54 | #: certificate.php:194 front/certificate.php:212 55 | msgid "Link with core purge" 56 | msgstr "" 57 | 58 | #: certificate.php:211 front/certificate.php:229 59 | msgid "Notifications purge" 60 | msgstr "" 61 | 62 | #: hook.php:409 inc/certificate_item.class.php:568 63 | msgid "Does not expire" 64 | msgstr "Не истекает" 65 | 66 | #: hook.php:483 67 | msgid "Associate to certificate" 68 | msgstr "Привязать к сертификату" 69 | 70 | #: setup.php:103 71 | msgid "This plugin requires GLPI >= 9.2" 72 | msgstr "" 73 | 74 | #: front/certificate.php:256 75 | msgid "No data to migrate" 76 | msgstr "" 77 | 78 | #: inc/certificate.class.php:93 inc/certificate.class.php:340 79 | #: inc/certificate_item.class.php:515 80 | msgid "DNS name" 81 | msgstr "DNS-имя" 82 | 83 | #: inc/certificate.class.php:97 inc/certificate.class.php:354 84 | #: inc/certificate_item.class.php:516 85 | msgid "DNS suffix" 86 | msgstr "DNS-суффикс" 87 | 88 | #: inc/certificate.class.php:113 inc/certificate.class.php:331 89 | msgid "Root CA" 90 | msgstr "Корневой ЦС" 91 | 92 | #: inc/certificate.class.php:118 inc/certificate.class.php:387 93 | msgid "Self-signed" 94 | msgstr "Самоподписанный" 95 | 96 | #: inc/certificate.class.php:123 inc/certificate.class.php:378 97 | msgid "Notification email" 98 | msgstr "Уведомлять по email" 99 | 100 | #: inc/certificate.class.php:150 inc/certificate.class.php:401 101 | msgid "Command used" 102 | msgstr "Используемая команда" 103 | 104 | #: inc/certificate.class.php:155 inc/certificate.class.php:407 105 | msgid "Certificate request (CSR)" 106 | msgstr "Запрос на получение сертификата (CSR)" 107 | 108 | #: inc/certificate.class.php:361 109 | msgid "Empty for infinite" 110 | msgstr "Окончание действия" 111 | 112 | #: inc/certificate.class.php:694 inc/certificate.class.php:784 113 | #: inc/notificationtargetcertificate.class.php:91 114 | msgid "Expired or expiring certificates" 115 | msgstr "Просроченные или истекающие сертификаты" 116 | 117 | #: inc/certificate_item.class.php:488 118 | msgctxt "button" 119 | msgid "Associate a certificate" 120 | msgstr "Привязанный сертификат" 121 | 122 | #: inc/certificatestate.class.php:50 123 | msgid "Certificate status" 124 | msgid_plural "Certificate statuses" 125 | msgstr[0] "Статус сертификата" 126 | msgstr[1] "Статус сертификата" 127 | msgstr[2] "Статусы сертификатов" 128 | msgstr[3] "Статусы сертификатов" 129 | 130 | #: inc/certificatetype.class.php:51 131 | msgid "Certificate type" 132 | msgid_plural "Certificate types" 133 | msgstr[0] "Тип сертификата" 134 | msgstr[1] "Тип сертификата" 135 | msgstr[2] "Типы сертификатов" 136 | msgstr[3] "Типы сертификатов" 137 | 138 | #: inc/config.class.php:49 139 | msgid "Plugin Setup" 140 | msgstr "Настройки плагина" 141 | 142 | #: inc/config.class.php:86 143 | msgid "Time of checking of validity of certificates" 144 | msgstr "Время проверки действительности сертификатов" 145 | 146 | #: inc/config.class.php:95 147 | msgid "Certificates expired since more" 148 | msgstr "Сертификаты, истёкшие более" 149 | 150 | #: inc/config.class.php:99 151 | msgid "Certificates expiring in less than" 152 | msgstr "Сертификаты, истекающие через" 153 | 154 | #: inc/notificationstate.class.php:125 155 | msgid "add not-used status in expiration mail" 156 | msgstr "при отправке сообщений об окончании срока действия не учитывать статус" 157 | 158 | #: inc/notificationstate.class.php:156 159 | msgid "No used status in expiration mail" 160 | msgstr "Неиспользуемые статусы при отправке сообщений об окончании срока действия" 161 | 162 | #: inc/notificationtargetcertificate.class.php:46 163 | #: inc/notificationtargetcertificate.class.php:61 164 | msgid "Expired certificates" 165 | msgstr "Истёкшие сертификаты" 166 | 167 | #: inc/notificationtargetcertificate.class.php:47 168 | #: inc/notificationtargetcertificate.class.php:62 169 | msgid "Expiring certificates" 170 | msgstr "Истекающие сертификаты" 171 | -------------------------------------------------------------------------------- /sql/empty-1.5.0.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `glpi_plugin_certificates`; 2 | CREATE TABLE `glpi_plugin_certificates` ( 3 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 4 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 5 | `recursive` TINYINT(1) NOT NULL DEFAULT '0', 6 | `name` VARCHAR(255) 7 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 8 | `type` TINYINT(4) NOT NULL DEFAULT '1', 9 | `dns_name` VARCHAR(30) 10 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 11 | `dns_suffix` VARCHAR(30) 12 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 13 | `FK_users` INT(4) NOT NULL DEFAULT '0', 14 | `FK_groups` INT(4) NOT NULL DEFAULT '0', 15 | `location` INT(4) NOT NULL DEFAULT '0', 16 | `FK_glpi_enterprise` INT(4) NOT NULL DEFAULT '0', 17 | `auto_sign` SMALLINT(6) NOT NULL DEFAULT '0', 18 | `query_date` DATE NULL DEFAULT NULL, 19 | `expiration_date` DATE NULL DEFAULT NULL, 20 | `status` INT(4) NOT NULL DEFAULT '0', 21 | `mailing` INT(4) NOT NULL DEFAULT '0', 22 | `command` TEXT, 23 | `certificate_request` TEXT, 24 | `certificate_item` TEXT, 25 | `notes` LONGTEXT, 26 | `deleted` SMALLINT(6) NOT NULL DEFAULT '0', 27 | PRIMARY KEY (`ID`) 28 | ) 29 | ENGINE = MyISAM 30 | DEFAULT CHARSET = utf8 31 | COLLATE = utf8_unicode_ci; 32 | 33 | DROP TABLE IF EXISTS `glpi_plugin_certificates_device`; 34 | CREATE TABLE `glpi_plugin_certificates_device` ( 35 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 36 | `FK_certificate` INT(11) NOT NULL DEFAULT '0', 37 | `FK_device` INT(11) NOT NULL DEFAULT '0', 38 | `device_type` INT(11) NOT NULL DEFAULT '0', 39 | PRIMARY KEY (`ID`), 40 | UNIQUE KEY `FK_certificate` (`FK_certificate`, `FK_device`, `device_type`), 41 | KEY `FK_certificate_2` (`FK_certificate`), 42 | KEY `FK_device` (`FK_device`, `device_type`) 43 | ) 44 | ENGINE = MyISAM 45 | DEFAULT CHARSET = utf8 46 | COLLATE = utf8_unicode_ci; 47 | 48 | DROP TABLE IF EXISTS `glpi_dropdown_plugin_certificates_type`; 49 | CREATE TABLE `glpi_dropdown_plugin_certificates_type` ( 50 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 51 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 52 | `name` VARCHAR(255) 53 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 54 | `comments` TEXT, 55 | PRIMARY KEY (`ID`), 56 | KEY `name` (`name`) 57 | ) 58 | ENGINE = MyISAM 59 | DEFAULT CHARSET = utf8 60 | COLLATE = utf8_unicode_ci; 61 | 62 | DROP TABLE IF EXISTS `glpi_dropdown_plugin_certificates_status`; 63 | CREATE TABLE `glpi_dropdown_plugin_certificates_status` ( 64 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 65 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 66 | `name` VARCHAR(255) 67 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 68 | `comments` TEXT, 69 | PRIMARY KEY (`ID`), 70 | KEY `name` (`name`) 71 | ) 72 | ENGINE = MyISAM 73 | DEFAULT CHARSET = utf8 74 | COLLATE = utf8_unicode_ci; 75 | 76 | DROP TABLE IF EXISTS `glpi_plugin_certificates_profiles`; 77 | CREATE TABLE `glpi_plugin_certificates_profiles` ( 78 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 79 | `name` VARCHAR(255) 80 | COLLATE utf8_unicode_ci DEFAULT NULL, 81 | `certificates` CHAR(1) DEFAULT NULL, 82 | `open_ticket` CHAR(1) DEFAULT NULL, 83 | PRIMARY KEY (`ID`), 84 | KEY `name` (`name`) 85 | ) 86 | ENGINE = MyISAM 87 | DEFAULT CHARSET = utf8 88 | COLLATE = utf8_unicode_ci; 89 | 90 | DROP TABLE IF EXISTS `glpi_plugin_certificates_config`; 91 | CREATE TABLE `glpi_plugin_certificates_config` ( 92 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 93 | `delay` VARCHAR(50) 94 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 95 | PRIMARY KEY (`ID`) 96 | ) 97 | ENGINE = MyISAM 98 | DEFAULT CHARSET = utf8 99 | COLLATE = utf8_unicode_ci; 100 | 101 | INSERT INTO `glpi_plugin_certificates_config` VALUES (1, '30'); 102 | 103 | DROP TABLE IF EXISTS `glpi_plugin_certificates_default`; 104 | CREATE TABLE `glpi_plugin_certificates_default` ( 105 | `ID` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, 106 | `status` INT(11) NOT NULL 107 | ) 108 | ENGINE = MyISAM 109 | DEFAULT CHARSET = utf8 110 | COLLATE = utf8_unicode_ci; 111 | 112 | DROP TABLE IF EXISTS `glpi_plugin_certificates_mailing`; 113 | CREATE TABLE `glpi_plugin_certificates_mailing` ( 114 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 115 | `type` VARCHAR(255) 116 | COLLATE utf8_unicode_ci DEFAULT NULL, 117 | `FK_item` INT(11) NOT NULL DEFAULT '0', 118 | `item_type` INT(11) NOT NULL DEFAULT '0', 119 | PRIMARY KEY (`ID`), 120 | UNIQUE KEY `mailings` (`type`, `FK_item`, `item_type`), 121 | KEY `type` (`type`), 122 | KEY `FK_item` (`FK_item`), 123 | KEY `item_type` (`item_type`), 124 | KEY `items` (`item_type`, `FK_item`) 125 | ) 126 | ENGINE = MyISAM 127 | DEFAULT CHARSET = utf8 128 | COLLATE = utf8_unicode_ci; 129 | 130 | INSERT INTO glpi_plugin_certificates_mailing VALUES ('1', 'certificates', '1', '1'); 131 | 132 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '3', '2', '0'); 133 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '4', '3', '0'); 134 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '5', '4', '0'); -------------------------------------------------------------------------------- /sql/update-1.6.0.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `glpi_plugin_certificates` 2 | RENAME `glpi_plugin_certificates_certificates`; 3 | ALTER TABLE `glpi_plugin_certificates_device` 4 | RENAME `glpi_plugin_certificates_certificates_items`; 5 | ALTER TABLE `glpi_dropdown_plugin_certificates_type` 6 | RENAME `glpi_plugin_certificates_certificatetypes`; 7 | ALTER TABLE `glpi_dropdown_plugin_certificates_status` 8 | RENAME `glpi_plugin_certificates_certificatestates`; 9 | ALTER TABLE `glpi_plugin_certificates_default` 10 | RENAME `glpi_plugin_certificates_notificationstates`; 11 | ALTER TABLE `glpi_plugin_certificates_config` 12 | RENAME `glpi_plugin_certificates_configs`; 13 | DROP TABLE IF EXISTS `glpi_plugin_certificates_mailing`; 14 | 15 | UPDATE `glpi_plugin_certificates_certificates` 16 | SET `FK_users` = '0' 17 | WHERE `FK_users` IS NULL; 18 | UPDATE `glpi_plugin_certificates_certificates` 19 | SET `FK_groups` = '0' 20 | WHERE `FK_groups` IS NULL; 21 | 22 | ALTER TABLE `glpi_plugin_certificates_certificates` 23 | CHANGE `ID` `id` INT(11) NOT NULL AUTO_INCREMENT, 24 | CHANGE `FK_entities` `entities_id` INT(11) NOT NULL DEFAULT '0', 25 | CHANGE `recursive` `is_recursive` TINYINT(1) NOT NULL DEFAULT '0', 26 | CHANGE `name` `name` VARCHAR(255) 27 | COLLATE utf8_unicode_ci DEFAULT NULL, 28 | CHANGE `type` `plugin_certificates_certificatetypes_id` INT(11) NOT NULL DEFAULT '0' 29 | COMMENT 'RELATION to glpi_plugin_certificates_certificatetypes (id)', 30 | CHANGE `dns_name` `dns_name` VARCHAR(255) 31 | COLLATE utf8_unicode_ci DEFAULT NULL, 32 | CHANGE `dns_suffix` `dns_suffix` VARCHAR(255) 33 | COLLATE utf8_unicode_ci DEFAULT NULL, 34 | CHANGE `FK_users` `users_id` INT(11) NOT NULL DEFAULT '0' 35 | COMMENT 'RELATION to glpi_users (id)', 36 | CHANGE `FK_groups` `groups_id` INT(11) NOT NULL DEFAULT '0' 37 | COMMENT 'RELATION to glpi_groups (id)', 38 | CHANGE `location` `locations_id` INT(11) NOT NULL DEFAULT '0' 39 | COMMENT 'RELATION to glpi_locations (id)', 40 | CHANGE `FK_glpi_enterprise` `manufacturers_id` INT(11) NOT NULL DEFAULT '0' 41 | COMMENT 'RELATION to glpi_manufacturers (id)', 42 | CHANGE `query_date` `date_query` DATE DEFAULT NULL, 43 | CHANGE `expiration_date` `date_expiration` DATE DEFAULT NULL, 44 | CHANGE `status` `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 45 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 46 | CHANGE `mailing` `mailing` INT(11) NOT NULL DEFAULT '0', 47 | CHANGE `command` `command` TEXT COLLATE utf8_unicode_ci, 48 | CHANGE `certificate_request` `certificate_request` TEXT COLLATE utf8_unicode_ci, 49 | CHANGE `certificate_item` `certificate_item` TEXT COLLATE utf8_unicode_ci, 50 | CHANGE `helpdesk_visible` `is_helpdesk_visible` INT(11) NOT NULL DEFAULT '1', 51 | CHANGE `notes` `notepad` LONGTEXT COLLATE utf8_unicode_ci, 52 | CHANGE `deleted` `is_deleted` TINYINT(1) NOT NULL DEFAULT '0', 53 | ADD INDEX (`name`), 54 | ADD INDEX (`entities_id`), 55 | ADD INDEX (`plugin_certificates_certificatetypes_id`), 56 | ADD INDEX (`users_id`), 57 | ADD INDEX (`groups_id`), 58 | ADD INDEX (`locations_id`), 59 | ADD INDEX (`manufacturers_id`), 60 | ADD INDEX (`plugin_certificates_certificatestates_id`), 61 | ADD INDEX (`date_mod`), 62 | ADD INDEX (`is_helpdesk_visible`), 63 | ADD INDEX (`is_deleted`); 64 | 65 | ALTER TABLE `glpi_plugin_certificates_certificates_items` 66 | DROP INDEX `FK_certificate`, 67 | DROP INDEX `FK_certificate_2`, 68 | DROP INDEX `FK_device`, 69 | CHANGE `ID` `id` INT(11) NOT NULL AUTO_INCREMENT, 70 | CHANGE `FK_certificate` `plugin_certificates_certificates_id` INT(11) NOT NULL DEFAULT '0', 71 | CHANGE `FK_device` `items_id` INT(11) NOT NULL DEFAULT '0' 72 | COMMENT 'RELATION to various tables, according to itemtype (id)', 73 | CHANGE `device_type` `itemtype` VARCHAR(100) 74 | COLLATE utf8_unicode_ci NOT NULL 75 | COMMENT 'see .class.php file', 76 | ADD UNIQUE `unicity` (`plugin_certificates_certificates_id`, `itemtype`, `items_id`), 77 | ADD INDEX `FK_device` (`items_id`, `itemtype`), 78 | ADD INDEX `item` (`itemtype`, `items_id`); 79 | 80 | ALTER TABLE `glpi_plugin_certificates_certificatetypes` 81 | CHANGE `ID` `id` INT(11) NOT NULL AUTO_INCREMENT, 82 | CHANGE `FK_entities` `entities_id` INT(11) NOT NULL DEFAULT '0', 83 | CHANGE `name` `name` VARCHAR(255) 84 | COLLATE utf8_unicode_ci DEFAULT NULL, 85 | CHANGE `comments` `comment` TEXT COLLATE utf8_unicode_ci; 86 | 87 | ALTER TABLE `glpi_plugin_certificates_certificatestates` 88 | CHANGE `ID` `id` INT(11) NOT NULL AUTO_INCREMENT, 89 | CHANGE `FK_entities` `entities_id` INT(11) NOT NULL DEFAULT '0', 90 | CHANGE `name` `name` VARCHAR(255) 91 | COLLATE utf8_unicode_ci DEFAULT NULL, 92 | CHANGE `comments` `comment` TEXT COLLATE utf8_unicode_ci; 93 | 94 | ALTER TABLE `glpi_plugin_certificates_profiles` 95 | CHANGE `ID` `id` INT(11) NOT NULL AUTO_INCREMENT, 96 | ADD `profiles_id` INT(11) NOT NULL DEFAULT '0' 97 | COMMENT 'RELATION to glpi_profiles (id)', 98 | CHANGE `certificates` `certificates` CHAR(1) 99 | COLLATE utf8_unicode_ci DEFAULT NULL, 100 | CHANGE `open_ticket` `open_ticket` CHAR(1) 101 | COLLATE utf8_unicode_ci DEFAULT NULL, 102 | ADD INDEX (`profiles_id`); 103 | 104 | ALTER TABLE `glpi_plugin_certificates_notificationstates` 105 | CHANGE `ID` `id` INT(11) NOT NULL AUTO_INCREMENT, 106 | CHANGE `status` `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 107 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 108 | ADD INDEX (`plugin_certificates_certificatestates_id`); 109 | 110 | ALTER TABLE `glpi_plugin_certificates_configs` 111 | CHANGE `ID` `id` INT(11) NOT NULL AUTO_INCREMENT, 112 | CHANGE `delay` `delay_expired` VARCHAR(50) 113 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 114 | ADD `delay_whichexpire` VARCHAR(50) 115 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30'; 116 | 117 | INSERT INTO `glpi_notificationtemplates` (`name`, `itemtype`, `date_mod`) 118 | VALUES ('Alert Certificates', 'PluginCertificatesCertificate', '2010-02-24 21:34:46'); -------------------------------------------------------------------------------- /sql/empty-1.5.1.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `glpi_plugin_certificates`; 2 | CREATE TABLE `glpi_plugin_certificates` ( 3 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 4 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 5 | `recursive` TINYINT(1) NOT NULL DEFAULT '0', 6 | `name` VARCHAR(255) 7 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 8 | `type` TINYINT(4) NOT NULL DEFAULT '1', 9 | `dns_name` VARCHAR(30) 10 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 11 | `dns_suffix` VARCHAR(30) 12 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 13 | `FK_users` INT(4) NOT NULL DEFAULT '0', 14 | `FK_groups` INT(4) NOT NULL DEFAULT '0', 15 | `location` INT(4) NOT NULL DEFAULT '0', 16 | `FK_glpi_enterprise` INT(4) NOT NULL DEFAULT '0', 17 | `auto_sign` SMALLINT(6) NOT NULL DEFAULT '0', 18 | `query_date` DATE NULL DEFAULT NULL, 19 | `expiration_date` DATE NULL DEFAULT NULL, 20 | `status` INT(4) NOT NULL DEFAULT '0', 21 | `mailing` INT(4) NOT NULL DEFAULT '0', 22 | `command` TEXT, 23 | `certificate_request` TEXT, 24 | `certificate_item` TEXT, 25 | `helpdesk_visible` INT(11) NOT NULL DEFAULT '1', 26 | `date_mod` DATETIME DEFAULT NULL, 27 | `notes` LONGTEXT, 28 | `deleted` SMALLINT(6) NOT NULL DEFAULT '0', 29 | PRIMARY KEY (`ID`) 30 | ) 31 | ENGINE = MyISAM 32 | DEFAULT CHARSET = utf8 33 | COLLATE = utf8_unicode_ci; 34 | 35 | DROP TABLE IF EXISTS `glpi_plugin_certificates_device`; 36 | CREATE TABLE `glpi_plugin_certificates_device` ( 37 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 38 | `FK_certificate` INT(11) NOT NULL DEFAULT '0', 39 | `FK_device` INT(11) NOT NULL DEFAULT '0', 40 | `device_type` INT(11) NOT NULL DEFAULT '0', 41 | PRIMARY KEY (`ID`), 42 | UNIQUE KEY `FK_certificate` (`FK_certificate`, `FK_device`, `device_type`), 43 | KEY `FK_certificate_2` (`FK_certificate`), 44 | KEY `FK_device` (`FK_device`, `device_type`) 45 | ) 46 | ENGINE = MyISAM 47 | DEFAULT CHARSET = utf8 48 | COLLATE = utf8_unicode_ci; 49 | 50 | DROP TABLE IF EXISTS `glpi_dropdown_plugin_certificates_type`; 51 | CREATE TABLE `glpi_dropdown_plugin_certificates_type` ( 52 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 53 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 54 | `name` VARCHAR(255) 55 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 56 | `comments` TEXT, 57 | PRIMARY KEY (`ID`), 58 | KEY `name` (`name`) 59 | ) 60 | ENGINE = MyISAM 61 | DEFAULT CHARSET = utf8 62 | COLLATE = utf8_unicode_ci; 63 | 64 | DROP TABLE IF EXISTS `glpi_dropdown_plugin_certificates_status`; 65 | CREATE TABLE `glpi_dropdown_plugin_certificates_status` ( 66 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 67 | `FK_entities` INT(11) NOT NULL DEFAULT '0', 68 | `name` VARCHAR(255) 69 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '', 70 | `comments` TEXT, 71 | PRIMARY KEY (`ID`), 72 | KEY `name` (`name`) 73 | ) 74 | ENGINE = MyISAM 75 | DEFAULT CHARSET = utf8 76 | COLLATE = utf8_unicode_ci; 77 | 78 | DROP TABLE IF EXISTS `glpi_plugin_certificates_profiles`; 79 | CREATE TABLE `glpi_plugin_certificates_profiles` ( 80 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 81 | `name` VARCHAR(255) 82 | COLLATE utf8_unicode_ci DEFAULT NULL, 83 | `certificates` CHAR(1) DEFAULT NULL, 84 | `open_ticket` CHAR(1) DEFAULT NULL, 85 | PRIMARY KEY (`ID`), 86 | KEY `name` (`name`) 87 | ) 88 | ENGINE = MyISAM 89 | DEFAULT CHARSET = utf8 90 | COLLATE = utf8_unicode_ci; 91 | 92 | DROP TABLE IF EXISTS `glpi_plugin_certificates_config`; 93 | CREATE TABLE `glpi_plugin_certificates_config` ( 94 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 95 | `delay` VARCHAR(50) 96 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 97 | PRIMARY KEY (`ID`) 98 | ) 99 | ENGINE = MyISAM 100 | DEFAULT CHARSET = utf8 101 | COLLATE = utf8_unicode_ci; 102 | 103 | INSERT INTO `glpi_plugin_certificates_config` VALUES (1, '30'); 104 | 105 | DROP TABLE IF EXISTS `glpi_plugin_certificates_default`; 106 | CREATE TABLE `glpi_plugin_certificates_default` ( 107 | `ID` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, 108 | `status` INT(11) NOT NULL 109 | ) 110 | ENGINE = MyISAM 111 | DEFAULT CHARSET = utf8 112 | COLLATE = utf8_unicode_ci; 113 | 114 | DROP TABLE IF EXISTS `glpi_plugin_certificates_mailing`; 115 | CREATE TABLE `glpi_plugin_certificates_mailing` ( 116 | `ID` INT(11) NOT NULL AUTO_INCREMENT, 117 | `type` VARCHAR(255) 118 | COLLATE utf8_unicode_ci DEFAULT NULL, 119 | `FK_item` INT(11) NOT NULL DEFAULT '0', 120 | `item_type` INT(11) NOT NULL DEFAULT '0', 121 | PRIMARY KEY (`ID`), 122 | UNIQUE KEY `mailings` (`type`, `FK_item`, `item_type`), 123 | KEY `type` (`type`), 124 | KEY `FK_item` (`FK_item`), 125 | KEY `item_type` (`item_type`), 126 | KEY `items` (`item_type`, `FK_item`) 127 | ) 128 | ENGINE = MyISAM 129 | DEFAULT CHARSET = utf8 130 | COLLATE = utf8_unicode_ci; 131 | 132 | INSERT INTO glpi_plugin_certificates_mailing VALUES ('1', 'certificates', '1', '1'); 133 | 134 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '3', '2', '0'); 135 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '4', '3', '0'); 136 | INSERT INTO `glpi_display` (`ID`, `type`, `num`, `rank`, `FK_users`) VALUES (NULL, '1700', '5', '4', '0'); -------------------------------------------------------------------------------- /inc/notificationstate.class.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | if (!defined('GLPI_ROOT')) { 31 | die("Sorry. You can't access directly to this file"); 32 | } 33 | 34 | /** 35 | * Class PluginCertificatesNotificationState 36 | */ 37 | class PluginCertificatesNotificationState extends CommonDBTM 38 | { 39 | 40 | /** 41 | * @param $plugin_certificates_certificatestates_id 42 | * @return bool 43 | */ 44 | function getFromDBbyState($plugin_certificates_certificatestates_id) 45 | { 46 | global $DB; 47 | 48 | $query = "SELECT * FROM `" . $this->getTable() . "` " . 49 | "WHERE `plugin_certificates_certificatestates_id` = '" . $plugin_certificates_certificatestates_id . "' "; 50 | if ($result = $DB->query($query)) { 51 | if ($DB->numrows($result) != 1) { 52 | return false; 53 | } 54 | $this->fields = $DB->fetch_assoc($result); 55 | if (is_array($this->fields) && count($this->fields)) { 56 | return true; 57 | } else { 58 | return false; 59 | } 60 | } 61 | return false; 62 | } 63 | 64 | /** 65 | * @return string 66 | */ 67 | function findStates() 68 | { 69 | global $DB; 70 | 71 | $queryBranch = ''; 72 | // Recherche les enfants 73 | 74 | $queryChilds = "SELECT `plugin_certificates_certificatestates_id` 75 | FROM `" . $this->getTable() . "`"; 76 | if ($resultChilds = $DB->query($queryChilds)) { 77 | while ($dataChilds = $DB->fetch_array($resultChilds)) { 78 | $child = $dataChilds["plugin_certificates_certificatestates_id"]; 79 | $queryBranch .= ",$child"; 80 | } 81 | } 82 | 83 | return $queryBranch; 84 | } 85 | 86 | /** 87 | * @param $plugin_certificates_certificatestates_id 88 | */ 89 | function addNotificationState($plugin_certificates_certificatestates_id) 90 | { 91 | 92 | if ($this->getFromDBbyState($plugin_certificates_certificatestates_id)) { 93 | 94 | $this->update(array( 95 | 'id' => $this->fields['id'], 96 | 'plugin_certificates_certificatestates_id' => $plugin_certificates_certificatestates_id)); 97 | } else { 98 | 99 | $this->add(array( 100 | 'plugin_certificates_certificatestates_id' => $plugin_certificates_certificatestates_id)); 101 | } 102 | } 103 | 104 | /** 105 | * @param $target 106 | */ 107 | function showAddForm($target) 108 | { 109 | global $DB; 110 | 111 | $used = array(); 112 | $query = "SELECT * 113 | FROM `" . $this->getTable() . "` 114 | ORDER BY `plugin_certificates_certificatestates_id` ASC "; 115 | if ($result = $DB->query($query)) { 116 | $number = $DB->numrows($result); 117 | if ($number != 0) { 118 | while ($ligne = $DB->fetch_array($result)) { 119 | $used[] = $ligne["plugin_certificates_certificatestates_id"]; 120 | } 121 | } 122 | } 123 | echo "
"; 124 | echo ""; 126 | echo ""; 130 | echo ""; 132 | echo "
"; 125 | echo __('add not-used status in expiration mail', 'certificates') . "
"; 127 | Dropdown::show('PluginCertificatesCertificateState', array('name' => "plugin_certificates_certificatestates_id", 128 | 'used' => $used)); 129 | echo ""; 131 | echo "
"; 133 | Html::closeForm(); 134 | echo "
"; 135 | } 136 | 137 | /** 138 | * @param $target 139 | */ 140 | function showForm($target) 141 | { 142 | global $DB; 143 | 144 | $rand = mt_rand(); 145 | 146 | $query = "SELECT * 147 | FROM `" . $this->getTable() . "` 148 | ORDER BY `plugin_certificates_certificatestates_id` ASC "; 149 | if ($result = $DB->query($query)) { 150 | $number = $DB->numrows($result); 151 | if ($number != 0) { 152 | 153 | echo "
"; 154 | echo ""; 155 | echo ""; 156 | echo ""; 157 | echo ""; 158 | while ($ligne = $DB->fetch_array($result)) { 159 | $ID = $ligne["id"]; 160 | echo ""; 161 | echo ""; 165 | echo ""; 168 | echo ""; 169 | } 170 | 171 | Html::openArrowMassives("massiveaction_form$rand", true); 172 | Html::closeArrowMassives(array('delete' => __('Delete permanently'))); 173 | echo "
" . __('No used status in expiration mail', 'certificates') . "
"; 162 | echo ""; 163 | echo ""; 164 | echo "" . Dropdown::getDropdownName("glpi_plugin_certificates_certificatestates" 166 | , $ligne["plugin_certificates_certificatestates_id"]); 167 | echo "
"; 174 | Html::closeForm(); 175 | echo "
"; 176 | } 177 | } 178 | } 179 | } -------------------------------------------------------------------------------- /sql/empty-2.2.0.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificates`; 2 | CREATE TABLE `glpi_plugin_certificates_certificates` ( 3 | `id` INT(11) NOT NULL AUTO_INCREMENT, 4 | `entities_id` INT(11) NOT NULL DEFAULT '0', 5 | `is_recursive` TINYINT(1) NOT NULL DEFAULT '0', 6 | `name` VARCHAR(255) 7 | COLLATE utf8_unicode_ci DEFAULT NULL, 8 | `plugin_certificates_certificatetypes_id` INT(11) NOT NULL DEFAULT '0' 9 | COMMENT 'RELATION to glpi_plugin_certificates_certificatetypes (id)', 10 | `dns_name` VARCHAR(255) 11 | COLLATE utf8_unicode_ci DEFAULT NULL, 12 | `dns_suffix` VARCHAR(255) 13 | COLLATE utf8_unicode_ci DEFAULT NULL, 14 | `users_id_tech` INT(11) NOT NULL DEFAULT '0' 15 | COMMENT 'RELATION to glpi_users (id)', 16 | `groups_id_tech` INT(11) NOT NULL DEFAULT '0' 17 | COMMENT 'RELATION to glpi_groups (id)', 18 | `locations_id` INT(11) NOT NULL DEFAULT '0' 19 | COMMENT 'RELATION to glpi_locations (id)', 20 | `manufacturers_id` INT(11) NOT NULL DEFAULT '0' 21 | COMMENT 'RELATION to glpi_manufacturers (id)', 22 | `auto_sign` SMALLINT(6) NOT NULL DEFAULT '0', 23 | `date_query` DATE DEFAULT NULL, 24 | `date_expiration` DATE DEFAULT NULL, 25 | `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 26 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 27 | `mailing` INT(11) NOT NULL DEFAULT '0', 28 | `command` TEXT COLLATE utf8_unicode_ci, 29 | `certificate_request` TEXT COLLATE utf8_unicode_ci, 30 | `certificate_item` TEXT COLLATE utf8_unicode_ci, 31 | `is_helpdesk_visible` INT(11) NOT NULL DEFAULT '1', 32 | `date_mod` DATETIME DEFAULT NULL, 33 | `is_deleted` TINYINT(1) NOT NULL DEFAULT '0', 34 | PRIMARY KEY (`id`), 35 | KEY `name` (`name`), 36 | KEY `entities_id` (`entities_id`), 37 | KEY `plugin_certificates_certificatetypes_id` (`plugin_certificates_certificatetypes_id`), 38 | KEY `users_id_tech` (`users_id_tech`), 39 | KEY `groups_id_tech` (`groups_id_tech`), 40 | KEY `locations_id` (`locations_id`), 41 | KEY `manufacturers_id` (`manufacturers_id`), 42 | KEY `plugin_certificates_certificatestates_id` (`plugin_certificates_certificatestates_id`), 43 | KEY `date_mod` (`date_mod`), 44 | KEY `is_helpdesk_visible` (`is_helpdesk_visible`), 45 | KEY `is_deleted` (`is_deleted`) 46 | ) 47 | ENGINE = MyISAM 48 | DEFAULT CHARSET = utf8 49 | COLLATE = utf8_unicode_ci; 50 | 51 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificates_items`; 52 | CREATE TABLE `glpi_plugin_certificates_certificates_items` ( 53 | `id` INT(11) NOT NULL AUTO_INCREMENT, 54 | `plugin_certificates_certificates_id` INT(11) NOT NULL DEFAULT '0', 55 | `items_id` INT(11) NOT NULL DEFAULT '0' 56 | COMMENT 'RELATION to various tables, according to itemtype (id)', 57 | `itemtype` VARCHAR(100) 58 | COLLATE utf8_unicode_ci NOT NULL 59 | COMMENT 'see .class.php file', 60 | PRIMARY KEY (`id`), 61 | UNIQUE KEY `unicity` (`plugin_certificates_certificates_id`, `itemtype`, `items_id`), 62 | KEY `FK_device` (`items_id`, `itemtype`), 63 | KEY `item` (`itemtype`, `items_id`) 64 | ) 65 | ENGINE = MyISAM 66 | DEFAULT CHARSET = utf8 67 | COLLATE = utf8_unicode_ci; 68 | 69 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificatetypes`; 70 | CREATE TABLE `glpi_plugin_certificates_certificatetypes` ( 71 | `id` INT(11) NOT NULL AUTO_INCREMENT, 72 | `entities_id` INT(11) NOT NULL DEFAULT '0', 73 | `name` VARCHAR(255) 74 | COLLATE utf8_unicode_ci DEFAULT NULL, 75 | `comment` TEXT COLLATE utf8_unicode_ci, 76 | PRIMARY KEY (`id`), 77 | KEY `name` (`name`) 78 | ) 79 | ENGINE = MyISAM 80 | DEFAULT CHARSET = utf8 81 | COLLATE = utf8_unicode_ci; 82 | 83 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificatestates`; 84 | CREATE TABLE `glpi_plugin_certificates_certificatestates` ( 85 | `id` INT(11) NOT NULL AUTO_INCREMENT, 86 | `entities_id` INT(11) NOT NULL DEFAULT '0', 87 | `name` VARCHAR(255) 88 | COLLATE utf8_unicode_ci DEFAULT NULL, 89 | `comment` TEXT COLLATE utf8_unicode_ci, 90 | PRIMARY KEY (`id`), 91 | KEY `name` (`name`) 92 | ) 93 | ENGINE = MyISAM 94 | DEFAULT CHARSET = utf8 95 | COLLATE = utf8_unicode_ci; 96 | 97 | DROP TABLE IF EXISTS `glpi_plugin_certificates_configs`; 98 | CREATE TABLE `glpi_plugin_certificates_configs` ( 99 | `id` INT(11) NOT NULL AUTO_INCREMENT, 100 | `delay_expired` VARCHAR(50) 101 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 102 | `delay_whichexpire` VARCHAR(50) 103 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 104 | PRIMARY KEY (`id`) 105 | ) 106 | ENGINE = MyISAM 107 | DEFAULT CHARSET = utf8 108 | COLLATE = utf8_unicode_ci; 109 | 110 | INSERT INTO `glpi_plugin_certificates_configs` VALUES (1, '30', '30'); 111 | 112 | DROP TABLE IF EXISTS `glpi_plugin_certificates_notificationstates`; 113 | CREATE TABLE `glpi_plugin_certificates_notificationstates` ( 114 | `id` INT(11) NOT NULL AUTO_INCREMENT, 115 | `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 116 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 117 | PRIMARY KEY (`id`), 118 | KEY `plugin_certificates_certificatestates_id` (`plugin_certificates_certificatestates_id`) 119 | ) 120 | ENGINE = MyISAM 121 | DEFAULT CHARSET = utf8 122 | COLLATE = utf8_unicode_ci; 123 | 124 | INSERT INTO `glpi_notificationtemplates` (`name`, `itemtype`) 125 | VALUES ('Alert Certificates', 'PluginCertificatesCertificate'); 126 | 127 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '3', '2', '0'); 128 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '4', '3', '0'); 129 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '5', '4', '0'); -------------------------------------------------------------------------------- /sql/empty-2.0.0.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificates`; 2 | CREATE TABLE `glpi_plugin_certificates_certificates` ( 3 | `id` INT(11) NOT NULL AUTO_INCREMENT, 4 | `entities_id` INT(11) NOT NULL DEFAULT '0', 5 | `is_recursive` TINYINT(1) NOT NULL DEFAULT '0', 6 | `name` VARCHAR(255) 7 | COLLATE utf8_unicode_ci DEFAULT NULL, 8 | `plugin_certificates_certificatetypes_id` INT(11) NOT NULL DEFAULT '0' 9 | COMMENT 'RELATION to glpi_plugin_certificates_certificatetypes (id)', 10 | `dns_name` VARCHAR(255) 11 | COLLATE utf8_unicode_ci DEFAULT NULL, 12 | `dns_suffix` VARCHAR(255) 13 | COLLATE utf8_unicode_ci DEFAULT NULL, 14 | `users_id_tech` INT(11) NOT NULL DEFAULT '0' 15 | COMMENT 'RELATION to glpi_users (id)', 16 | `groups_id_tech` INT(11) NOT NULL DEFAULT '0' 17 | COMMENT 'RELATION to glpi_groups (id)', 18 | `locations_id` INT(11) NOT NULL DEFAULT '0' 19 | COMMENT 'RELATION to glpi_locations (id)', 20 | `manufacturers_id` INT(11) NOT NULL DEFAULT '0' 21 | COMMENT 'RELATION to glpi_manufacturers (id)', 22 | `auto_sign` SMALLINT(6) NOT NULL DEFAULT '0', 23 | `date_query` DATE DEFAULT NULL, 24 | `date_expiration` DATE DEFAULT NULL, 25 | `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 26 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 27 | `mailing` INT(11) NOT NULL DEFAULT '0', 28 | `command` TEXT COLLATE utf8_unicode_ci, 29 | `certificate_request` TEXT COLLATE utf8_unicode_ci, 30 | `certificate_item` TEXT COLLATE utf8_unicode_ci, 31 | `is_helpdesk_visible` INT(11) NOT NULL DEFAULT '1', 32 | `date_mod` DATETIME DEFAULT NULL, 33 | `is_deleted` TINYINT(1) NOT NULL DEFAULT '0', 34 | PRIMARY KEY (`id`), 35 | KEY `name` (`name`), 36 | KEY `entities_id` (`entities_id`), 37 | KEY `plugin_certificates_certificatetypes_id` (`plugin_certificates_certificatetypes_id`), 38 | KEY `users_id_tech` (`users_id_tech`), 39 | KEY `groups_id_tech` (`groups_id_tech`), 40 | KEY `locations_id` (`locations_id`), 41 | KEY `manufacturers_id` (`manufacturers_id`), 42 | KEY `plugin_certificates_certificatestates_id` (`plugin_certificates_certificatestates_id`), 43 | KEY `date_mod` (`date_mod`), 44 | KEY `is_helpdesk_visible` (`is_helpdesk_visible`), 45 | KEY `is_deleted` (`is_deleted`) 46 | ) 47 | ENGINE = MyISAM 48 | DEFAULT CHARSET = utf8 49 | COLLATE = utf8_unicode_ci; 50 | 51 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificates_items`; 52 | CREATE TABLE `glpi_plugin_certificates_certificates_items` ( 53 | `id` INT(11) NOT NULL AUTO_INCREMENT, 54 | `plugin_certificates_certificates_id` INT(11) NOT NULL DEFAULT '0', 55 | `items_id` INT(11) NOT NULL DEFAULT '0' 56 | COMMENT 'RELATION to various tables, according to itemtype (id)', 57 | `itemtype` VARCHAR(100) 58 | COLLATE utf8_unicode_ci NOT NULL 59 | COMMENT 'see .class.php file', 60 | PRIMARY KEY (`id`), 61 | UNIQUE KEY `unicity` (`plugin_certificates_certificates_id`, `itemtype`, `items_id`), 62 | KEY `FK_device` (`items_id`, `itemtype`), 63 | KEY `item` (`itemtype`, `items_id`) 64 | ) 65 | ENGINE = MyISAM 66 | DEFAULT CHARSET = utf8 67 | COLLATE = utf8_unicode_ci; 68 | 69 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificatetypes`; 70 | CREATE TABLE `glpi_plugin_certificates_certificatetypes` ( 71 | `id` INT(11) NOT NULL AUTO_INCREMENT, 72 | `entities_id` INT(11) NOT NULL DEFAULT '0', 73 | `name` VARCHAR(255) 74 | COLLATE utf8_unicode_ci DEFAULT NULL, 75 | `comment` TEXT COLLATE utf8_unicode_ci, 76 | PRIMARY KEY (`id`), 77 | KEY `name` (`name`) 78 | ) 79 | ENGINE = MyISAM 80 | DEFAULT CHARSET = utf8 81 | COLLATE = utf8_unicode_ci; 82 | 83 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificatestates`; 84 | CREATE TABLE `glpi_plugin_certificates_certificatestates` ( 85 | `id` INT(11) NOT NULL AUTO_INCREMENT, 86 | `entities_id` INT(11) NOT NULL DEFAULT '0', 87 | `name` VARCHAR(255) 88 | COLLATE utf8_unicode_ci DEFAULT NULL, 89 | `comment` TEXT COLLATE utf8_unicode_ci, 90 | PRIMARY KEY (`id`), 91 | KEY `name` (`name`) 92 | ) 93 | ENGINE = MyISAM 94 | DEFAULT CHARSET = utf8 95 | COLLATE = utf8_unicode_ci; 96 | 97 | DROP TABLE IF EXISTS `glpi_plugin_certificates_configs`; 98 | CREATE TABLE `glpi_plugin_certificates_configs` ( 99 | `id` INT(11) NOT NULL AUTO_INCREMENT, 100 | `delay_expired` VARCHAR(50) 101 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 102 | `delay_whichexpire` VARCHAR(50) 103 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 104 | PRIMARY KEY (`id`) 105 | ) 106 | ENGINE = MyISAM 107 | DEFAULT CHARSET = utf8 108 | COLLATE = utf8_unicode_ci; 109 | 110 | INSERT INTO `glpi_plugin_certificates_configs` VALUES (1, '30', '30'); 111 | 112 | DROP TABLE IF EXISTS `glpi_plugin_certificates_notificationstates`; 113 | CREATE TABLE `glpi_plugin_certificates_notificationstates` ( 114 | `id` INT(11) NOT NULL AUTO_INCREMENT, 115 | `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 116 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 117 | PRIMARY KEY (`id`), 118 | KEY `plugin_certificates_certificatestates_id` (`plugin_certificates_certificatestates_id`) 119 | ) 120 | ENGINE = MyISAM 121 | DEFAULT CHARSET = utf8 122 | COLLATE = utf8_unicode_ci; 123 | 124 | INSERT INTO `glpi_notificationtemplates` 125 | VALUES (NULL, 'Alert Certificates', 'PluginCertificatesCertificate', '2010-02-24 21:34:46', '', NULL); 126 | 127 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '3', '2', '0'); 128 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '4', '3', '0'); 129 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '5', '4', '0'); -------------------------------------------------------------------------------- /sql/empty-1.6.0.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificates`; 2 | CREATE TABLE `glpi_plugin_certificates_certificates` ( 3 | `id` INT(11) NOT NULL AUTO_INCREMENT, 4 | `entities_id` INT(11) NOT NULL DEFAULT '0', 5 | `is_recursive` TINYINT(1) NOT NULL DEFAULT '0', 6 | `name` VARCHAR(255) 7 | COLLATE utf8_unicode_ci DEFAULT NULL, 8 | `plugin_certificates_certificatetypes_id` INT(11) NOT NULL DEFAULT '0' 9 | COMMENT 'RELATION to glpi_plugin_certificates_certificatetypes (id)', 10 | `dns_name` VARCHAR(255) 11 | COLLATE utf8_unicode_ci DEFAULT NULL, 12 | `dns_suffix` VARCHAR(255) 13 | COLLATE utf8_unicode_ci DEFAULT NULL, 14 | `users_id` INT(11) NOT NULL DEFAULT '0' 15 | COMMENT 'RELATION to glpi_users (id)', 16 | `groups_id` INT(11) NOT NULL DEFAULT '0' 17 | COMMENT 'RELATION to glpi_groups (id)', 18 | `locations_id` INT(11) NOT NULL DEFAULT '0' 19 | COMMENT 'RELATION to glpi_locations (id)', 20 | `manufacturers_id` INT(11) NOT NULL DEFAULT '0' 21 | COMMENT 'RELATION to glpi_manufacturers (id)', 22 | `auto_sign` SMALLINT(6) NOT NULL DEFAULT '0', 23 | `date_query` DATE DEFAULT NULL, 24 | `date_expiration` DATE DEFAULT NULL, 25 | `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 26 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 27 | `mailing` INT(11) NOT NULL DEFAULT '0', 28 | `command` TEXT COLLATE utf8_unicode_ci, 29 | `certificate_request` TEXT COLLATE utf8_unicode_ci, 30 | `certificate_item` TEXT COLLATE utf8_unicode_ci, 31 | `is_helpdesk_visible` INT(11) NOT NULL DEFAULT '1', 32 | `date_mod` DATETIME DEFAULT NULL, 33 | `notepad` LONGTEXT COLLATE utf8_unicode_ci, 34 | `is_deleted` TINYINT(1) NOT NULL DEFAULT '0', 35 | PRIMARY KEY (`id`), 36 | KEY `name` (`name`), 37 | KEY `entities_id` (`entities_id`), 38 | KEY `plugin_certificates_certificatetypes_id` (`plugin_certificates_certificatetypes_id`), 39 | KEY `users_id` (`users_id`), 40 | KEY `groups_id` (`groups_id`), 41 | KEY `locations_id` (`locations_id`), 42 | KEY `manufacturers_id` (`manufacturers_id`), 43 | KEY `plugin_certificates_certificatestates_id` (`plugin_certificates_certificatestates_id`), 44 | KEY `date_mod` (`date_mod`), 45 | KEY `is_helpdesk_visible` (`is_helpdesk_visible`), 46 | KEY `is_deleted` (`is_deleted`) 47 | ) 48 | ENGINE = MyISAM 49 | DEFAULT CHARSET = utf8 50 | COLLATE = utf8_unicode_ci; 51 | 52 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificates_items`; 53 | CREATE TABLE `glpi_plugin_certificates_certificates_items` ( 54 | `id` INT(11) NOT NULL AUTO_INCREMENT, 55 | `plugin_certificates_certificates_id` INT(11) NOT NULL DEFAULT '0', 56 | `items_id` INT(11) NOT NULL DEFAULT '0' 57 | COMMENT 'RELATION to various tables, according to itemtype (id)', 58 | `itemtype` VARCHAR(100) 59 | COLLATE utf8_unicode_ci NOT NULL 60 | COMMENT 'see .class.php file', 61 | PRIMARY KEY (`id`), 62 | UNIQUE KEY `unicity` (`plugin_certificates_certificates_id`, `itemtype`, `items_id`), 63 | KEY `FK_device` (`items_id`, `itemtype`), 64 | KEY `item` (`itemtype`, `items_id`) 65 | ) 66 | ENGINE = MyISAM 67 | DEFAULT CHARSET = utf8 68 | COLLATE = utf8_unicode_ci; 69 | 70 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificatetypes`; 71 | CREATE TABLE `glpi_plugin_certificates_certificatetypes` ( 72 | `id` INT(11) NOT NULL AUTO_INCREMENT, 73 | `entities_id` INT(11) NOT NULL DEFAULT '0', 74 | `name` VARCHAR(255) 75 | COLLATE utf8_unicode_ci DEFAULT NULL, 76 | `comment` TEXT COLLATE utf8_unicode_ci, 77 | PRIMARY KEY (`id`), 78 | KEY `name` (`name`) 79 | ) 80 | ENGINE = MyISAM 81 | DEFAULT CHARSET = utf8 82 | COLLATE = utf8_unicode_ci; 83 | 84 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificatestates`; 85 | CREATE TABLE `glpi_plugin_certificates_certificatestates` ( 86 | `id` INT(11) NOT NULL AUTO_INCREMENT, 87 | `entities_id` INT(11) NOT NULL DEFAULT '0', 88 | `name` VARCHAR(255) 89 | COLLATE utf8_unicode_ci DEFAULT NULL, 90 | `comment` TEXT COLLATE utf8_unicode_ci, 91 | PRIMARY KEY (`id`), 92 | KEY `name` (`name`) 93 | ) 94 | ENGINE = MyISAM 95 | DEFAULT CHARSET = utf8 96 | COLLATE = utf8_unicode_ci; 97 | 98 | DROP TABLE IF EXISTS `glpi_plugin_certificates_profiles`; 99 | CREATE TABLE `glpi_plugin_certificates_profiles` ( 100 | `id` INT(11) NOT NULL AUTO_INCREMENT, 101 | `profiles_id` INT(11) NOT NULL DEFAULT '0' 102 | COMMENT 'RELATION to glpi_profiles (id)', 103 | `certificates` CHAR(1) 104 | COLLATE utf8_unicode_ci DEFAULT NULL, 105 | `open_ticket` CHAR(1) 106 | COLLATE utf8_unicode_ci DEFAULT NULL, 107 | PRIMARY KEY (`id`), 108 | KEY `profiles_id` (`profiles_id`) 109 | ) 110 | ENGINE = MyISAM 111 | DEFAULT CHARSET = utf8 112 | COLLATE = utf8_unicode_ci; 113 | 114 | DROP TABLE IF EXISTS `glpi_plugin_certificates_configs`; 115 | CREATE TABLE `glpi_plugin_certificates_configs` ( 116 | `id` INT(11) NOT NULL AUTO_INCREMENT, 117 | `delay_expired` VARCHAR(50) 118 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 119 | `delay_whichexpire` VARCHAR(50) 120 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 121 | PRIMARY KEY (`id`) 122 | ) 123 | ENGINE = MyISAM 124 | DEFAULT CHARSET = utf8 125 | COLLATE = utf8_unicode_ci; 126 | 127 | INSERT INTO `glpi_plugin_certificates_configs` VALUES (1, '30', '30'); 128 | 129 | DROP TABLE IF EXISTS `glpi_plugin_certificates_notificationstates`; 130 | CREATE TABLE `glpi_plugin_certificates_notificationstates` ( 131 | `id` INT(11) NOT NULL AUTO_INCREMENT, 132 | `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 133 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 134 | PRIMARY KEY (`id`), 135 | KEY `plugin_certificates_certificatestates_id` (`plugin_certificates_certificatestates_id`) 136 | ) 137 | ENGINE = MyISAM 138 | DEFAULT CHARSET = utf8 139 | COLLATE = utf8_unicode_ci; 140 | 141 | INSERT INTO `glpi_notificationtemplates` 142 | VALUES (NULL, 'Alert Certificates', 'PluginCertificatesCertificate', '2010-02-24 21:34:46', ''); 143 | 144 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '3', '2', '0'); 145 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '4', '3', '0'); 146 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '5', '4', '0'); -------------------------------------------------------------------------------- /sql/empty-1.7.0.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificates`; 2 | CREATE TABLE `glpi_plugin_certificates_certificates` ( 3 | `id` INT(11) NOT NULL AUTO_INCREMENT, 4 | `entities_id` INT(11) NOT NULL DEFAULT '0', 5 | `is_recursive` TINYINT(1) NOT NULL DEFAULT '0', 6 | `name` VARCHAR(255) 7 | COLLATE utf8_unicode_ci DEFAULT NULL, 8 | `plugin_certificates_certificatetypes_id` INT(11) NOT NULL DEFAULT '0' 9 | COMMENT 'RELATION to glpi_plugin_certificates_certificatetypes (id)', 10 | `dns_name` VARCHAR(255) 11 | COLLATE utf8_unicode_ci DEFAULT NULL, 12 | `dns_suffix` VARCHAR(255) 13 | COLLATE utf8_unicode_ci DEFAULT NULL, 14 | `users_id` INT(11) NOT NULL DEFAULT '0' 15 | COMMENT 'RELATION to glpi_users (id)', 16 | `groups_id` INT(11) NOT NULL DEFAULT '0' 17 | COMMENT 'RELATION to glpi_groups (id)', 18 | `locations_id` INT(11) NOT NULL DEFAULT '0' 19 | COMMENT 'RELATION to glpi_locations (id)', 20 | `manufacturers_id` INT(11) NOT NULL DEFAULT '0' 21 | COMMENT 'RELATION to glpi_manufacturers (id)', 22 | `auto_sign` SMALLINT(6) NOT NULL DEFAULT '0', 23 | `date_query` DATE DEFAULT NULL, 24 | `date_expiration` DATE DEFAULT NULL, 25 | `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 26 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 27 | `mailing` INT(11) NOT NULL DEFAULT '0', 28 | `command` TEXT COLLATE utf8_unicode_ci, 29 | `certificate_request` TEXT COLLATE utf8_unicode_ci, 30 | `certificate_item` TEXT COLLATE utf8_unicode_ci, 31 | `is_helpdesk_visible` INT(11) NOT NULL DEFAULT '1', 32 | `date_mod` DATETIME DEFAULT NULL, 33 | `notepad` LONGTEXT COLLATE utf8_unicode_ci, 34 | `is_deleted` TINYINT(1) NOT NULL DEFAULT '0', 35 | PRIMARY KEY (`id`), 36 | KEY `name` (`name`), 37 | KEY `entities_id` (`entities_id`), 38 | KEY `plugin_certificates_certificatetypes_id` (`plugin_certificates_certificatetypes_id`), 39 | KEY `users_id` (`users_id`), 40 | KEY `groups_id` (`groups_id`), 41 | KEY `locations_id` (`locations_id`), 42 | KEY `manufacturers_id` (`manufacturers_id`), 43 | KEY `plugin_certificates_certificatestates_id` (`plugin_certificates_certificatestates_id`), 44 | KEY `date_mod` (`date_mod`), 45 | KEY `is_helpdesk_visible` (`is_helpdesk_visible`), 46 | KEY `is_deleted` (`is_deleted`) 47 | ) 48 | ENGINE = MyISAM 49 | DEFAULT CHARSET = utf8 50 | COLLATE = utf8_unicode_ci; 51 | 52 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificates_items`; 53 | CREATE TABLE `glpi_plugin_certificates_certificates_items` ( 54 | `id` INT(11) NOT NULL AUTO_INCREMENT, 55 | `plugin_certificates_certificates_id` INT(11) NOT NULL DEFAULT '0', 56 | `items_id` INT(11) NOT NULL DEFAULT '0' 57 | COMMENT 'RELATION to various tables, according to itemtype (id)', 58 | `itemtype` VARCHAR(100) 59 | COLLATE utf8_unicode_ci NOT NULL 60 | COMMENT 'see .class.php file', 61 | PRIMARY KEY (`id`), 62 | UNIQUE KEY `unicity` (`plugin_certificates_certificates_id`, `itemtype`, `items_id`), 63 | KEY `FK_device` (`items_id`, `itemtype`), 64 | KEY `item` (`itemtype`, `items_id`) 65 | ) 66 | ENGINE = MyISAM 67 | DEFAULT CHARSET = utf8 68 | COLLATE = utf8_unicode_ci; 69 | 70 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificatetypes`; 71 | CREATE TABLE `glpi_plugin_certificates_certificatetypes` ( 72 | `id` INT(11) NOT NULL AUTO_INCREMENT, 73 | `entities_id` INT(11) NOT NULL DEFAULT '0', 74 | `name` VARCHAR(255) 75 | COLLATE utf8_unicode_ci DEFAULT NULL, 76 | `comment` TEXT COLLATE utf8_unicode_ci, 77 | PRIMARY KEY (`id`), 78 | KEY `name` (`name`) 79 | ) 80 | ENGINE = MyISAM 81 | DEFAULT CHARSET = utf8 82 | COLLATE = utf8_unicode_ci; 83 | 84 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificatestates`; 85 | CREATE TABLE `glpi_plugin_certificates_certificatestates` ( 86 | `id` INT(11) NOT NULL AUTO_INCREMENT, 87 | `entities_id` INT(11) NOT NULL DEFAULT '0', 88 | `name` VARCHAR(255) 89 | COLLATE utf8_unicode_ci DEFAULT NULL, 90 | `comment` TEXT COLLATE utf8_unicode_ci, 91 | PRIMARY KEY (`id`), 92 | KEY `name` (`name`) 93 | ) 94 | ENGINE = MyISAM 95 | DEFAULT CHARSET = utf8 96 | COLLATE = utf8_unicode_ci; 97 | 98 | DROP TABLE IF EXISTS `glpi_plugin_certificates_profiles`; 99 | CREATE TABLE `glpi_plugin_certificates_profiles` ( 100 | `id` INT(11) NOT NULL AUTO_INCREMENT, 101 | `profiles_id` INT(11) NOT NULL DEFAULT '0' 102 | COMMENT 'RELATION to glpi_profiles (id)', 103 | `certificates` CHAR(1) 104 | COLLATE utf8_unicode_ci DEFAULT NULL, 105 | `open_ticket` CHAR(1) 106 | COLLATE utf8_unicode_ci DEFAULT NULL, 107 | PRIMARY KEY (`id`), 108 | KEY `profiles_id` (`profiles_id`) 109 | ) 110 | ENGINE = MyISAM 111 | DEFAULT CHARSET = utf8 112 | COLLATE = utf8_unicode_ci; 113 | 114 | DROP TABLE IF EXISTS `glpi_plugin_certificates_configs`; 115 | CREATE TABLE `glpi_plugin_certificates_configs` ( 116 | `id` INT(11) NOT NULL AUTO_INCREMENT, 117 | `delay_expired` VARCHAR(50) 118 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 119 | `delay_whichexpire` VARCHAR(50) 120 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 121 | PRIMARY KEY (`id`) 122 | ) 123 | ENGINE = MyISAM 124 | DEFAULT CHARSET = utf8 125 | COLLATE = utf8_unicode_ci; 126 | 127 | INSERT INTO `glpi_plugin_certificates_configs` VALUES (1, '30', '30'); 128 | 129 | DROP TABLE IF EXISTS `glpi_plugin_certificates_notificationstates`; 130 | CREATE TABLE `glpi_plugin_certificates_notificationstates` ( 131 | `id` INT(11) NOT NULL AUTO_INCREMENT, 132 | `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 133 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 134 | PRIMARY KEY (`id`), 135 | KEY `plugin_certificates_certificatestates_id` (`plugin_certificates_certificatestates_id`) 136 | ) 137 | ENGINE = MyISAM 138 | DEFAULT CHARSET = utf8 139 | COLLATE = utf8_unicode_ci; 140 | 141 | INSERT INTO `glpi_notificationtemplates` 142 | VALUES (NULL, 'Alert Certificates', 'PluginCertificatesCertificate', '2010-02-24 21:34:46', '', NULL); 143 | 144 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '3', '2', '0'); 145 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '4', '3', '0'); 146 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '5', '4', '0'); -------------------------------------------------------------------------------- /sql/empty-1.8.0.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificates`; 2 | CREATE TABLE `glpi_plugin_certificates_certificates` ( 3 | `id` INT(11) NOT NULL AUTO_INCREMENT, 4 | `entities_id` INT(11) NOT NULL DEFAULT '0', 5 | `is_recursive` TINYINT(1) NOT NULL DEFAULT '0', 6 | `name` VARCHAR(255) 7 | COLLATE utf8_unicode_ci DEFAULT NULL, 8 | `plugin_certificates_certificatetypes_id` INT(11) NOT NULL DEFAULT '0' 9 | COMMENT 'RELATION to glpi_plugin_certificates_certificatetypes (id)', 10 | `dns_name` VARCHAR(255) 11 | COLLATE utf8_unicode_ci DEFAULT NULL, 12 | `dns_suffix` VARCHAR(255) 13 | COLLATE utf8_unicode_ci DEFAULT NULL, 14 | `users_id_tech` INT(11) NOT NULL DEFAULT '0' 15 | COMMENT 'RELATION to glpi_users (id)', 16 | `groups_id_tech` INT(11) NOT NULL DEFAULT '0' 17 | COMMENT 'RELATION to glpi_groups (id)', 18 | `locations_id` INT(11) NOT NULL DEFAULT '0' 19 | COMMENT 'RELATION to glpi_locations (id)', 20 | `manufacturers_id` INT(11) NOT NULL DEFAULT '0' 21 | COMMENT 'RELATION to glpi_manufacturers (id)', 22 | `auto_sign` SMALLINT(6) NOT NULL DEFAULT '0', 23 | `date_query` DATE DEFAULT NULL, 24 | `date_expiration` DATE DEFAULT NULL, 25 | `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 26 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 27 | `mailing` INT(11) NOT NULL DEFAULT '0', 28 | `command` TEXT COLLATE utf8_unicode_ci, 29 | `certificate_request` TEXT COLLATE utf8_unicode_ci, 30 | `certificate_item` TEXT COLLATE utf8_unicode_ci, 31 | `is_helpdesk_visible` INT(11) NOT NULL DEFAULT '1', 32 | `date_mod` DATETIME DEFAULT NULL, 33 | `notepad` LONGTEXT COLLATE utf8_unicode_ci, 34 | `is_deleted` TINYINT(1) NOT NULL DEFAULT '0', 35 | PRIMARY KEY (`id`), 36 | KEY `name` (`name`), 37 | KEY `entities_id` (`entities_id`), 38 | KEY `plugin_certificates_certificatetypes_id` (`plugin_certificates_certificatetypes_id`), 39 | KEY `users_id_tech` (`users_id_tech`), 40 | KEY `groups_id_tech` (`groups_id_tech`), 41 | KEY `locations_id` (`locations_id`), 42 | KEY `manufacturers_id` (`manufacturers_id`), 43 | KEY `plugin_certificates_certificatestates_id` (`plugin_certificates_certificatestates_id`), 44 | KEY `date_mod` (`date_mod`), 45 | KEY `is_helpdesk_visible` (`is_helpdesk_visible`), 46 | KEY `is_deleted` (`is_deleted`) 47 | ) 48 | ENGINE = MyISAM 49 | DEFAULT CHARSET = utf8 50 | COLLATE = utf8_unicode_ci; 51 | 52 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificates_items`; 53 | CREATE TABLE `glpi_plugin_certificates_certificates_items` ( 54 | `id` INT(11) NOT NULL AUTO_INCREMENT, 55 | `plugin_certificates_certificates_id` INT(11) NOT NULL DEFAULT '0', 56 | `items_id` INT(11) NOT NULL DEFAULT '0' 57 | COMMENT 'RELATION to various tables, according to itemtype (id)', 58 | `itemtype` VARCHAR(100) 59 | COLLATE utf8_unicode_ci NOT NULL 60 | COMMENT 'see .class.php file', 61 | PRIMARY KEY (`id`), 62 | UNIQUE KEY `unicity` (`plugin_certificates_certificates_id`, `itemtype`, `items_id`), 63 | KEY `FK_device` (`items_id`, `itemtype`), 64 | KEY `item` (`itemtype`, `items_id`) 65 | ) 66 | ENGINE = MyISAM 67 | DEFAULT CHARSET = utf8 68 | COLLATE = utf8_unicode_ci; 69 | 70 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificatetypes`; 71 | CREATE TABLE `glpi_plugin_certificates_certificatetypes` ( 72 | `id` INT(11) NOT NULL AUTO_INCREMENT, 73 | `entities_id` INT(11) NOT NULL DEFAULT '0', 74 | `name` VARCHAR(255) 75 | COLLATE utf8_unicode_ci DEFAULT NULL, 76 | `comment` TEXT COLLATE utf8_unicode_ci, 77 | PRIMARY KEY (`id`), 78 | KEY `name` (`name`) 79 | ) 80 | ENGINE = MyISAM 81 | DEFAULT CHARSET = utf8 82 | COLLATE = utf8_unicode_ci; 83 | 84 | DROP TABLE IF EXISTS `glpi_plugin_certificates_certificatestates`; 85 | CREATE TABLE `glpi_plugin_certificates_certificatestates` ( 86 | `id` INT(11) NOT NULL AUTO_INCREMENT, 87 | `entities_id` INT(11) NOT NULL DEFAULT '0', 88 | `name` VARCHAR(255) 89 | COLLATE utf8_unicode_ci DEFAULT NULL, 90 | `comment` TEXT COLLATE utf8_unicode_ci, 91 | PRIMARY KEY (`id`), 92 | KEY `name` (`name`) 93 | ) 94 | ENGINE = MyISAM 95 | DEFAULT CHARSET = utf8 96 | COLLATE = utf8_unicode_ci; 97 | 98 | DROP TABLE IF EXISTS `glpi_plugin_certificates_profiles`; 99 | CREATE TABLE `glpi_plugin_certificates_profiles` ( 100 | `id` INT(11) NOT NULL AUTO_INCREMENT, 101 | `profiles_id` INT(11) NOT NULL DEFAULT '0' 102 | COMMENT 'RELATION to glpi_profiles (id)', 103 | `certificates` CHAR(1) 104 | COLLATE utf8_unicode_ci DEFAULT NULL, 105 | `open_ticket` CHAR(1) 106 | COLLATE utf8_unicode_ci DEFAULT NULL, 107 | PRIMARY KEY (`id`), 108 | KEY `profiles_id` (`profiles_id`) 109 | ) 110 | ENGINE = MyISAM 111 | DEFAULT CHARSET = utf8 112 | COLLATE = utf8_unicode_ci; 113 | 114 | DROP TABLE IF EXISTS `glpi_plugin_certificates_configs`; 115 | CREATE TABLE `glpi_plugin_certificates_configs` ( 116 | `id` INT(11) NOT NULL AUTO_INCREMENT, 117 | `delay_expired` VARCHAR(50) 118 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 119 | `delay_whichexpire` VARCHAR(50) 120 | COLLATE utf8_unicode_ci NOT NULL DEFAULT '30', 121 | PRIMARY KEY (`id`) 122 | ) 123 | ENGINE = MyISAM 124 | DEFAULT CHARSET = utf8 125 | COLLATE = utf8_unicode_ci; 126 | 127 | INSERT INTO `glpi_plugin_certificates_configs` VALUES (1, '30', '30'); 128 | 129 | DROP TABLE IF EXISTS `glpi_plugin_certificates_notificationstates`; 130 | CREATE TABLE `glpi_plugin_certificates_notificationstates` ( 131 | `id` INT(11) NOT NULL AUTO_INCREMENT, 132 | `plugin_certificates_certificatestates_id` INT(11) NOT NULL DEFAULT '0' 133 | COMMENT 'RELATION to glpi_plugin_certificates_certificatestates (id)', 134 | PRIMARY KEY (`id`), 135 | KEY `plugin_certificates_certificatestates_id` (`plugin_certificates_certificatestates_id`) 136 | ) 137 | ENGINE = MyISAM 138 | DEFAULT CHARSET = utf8 139 | COLLATE = utf8_unicode_ci; 140 | 141 | INSERT INTO `glpi_notificationtemplates` 142 | VALUES (NULL, 'Alert Certificates', 'PluginCertificatesCertificate', '2010-02-24 21:34:46', '', NULL); 143 | 144 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '3', '2', '0'); 145 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '4', '3', '0'); 146 | INSERT INTO `glpi_displaypreferences` VALUES (NULL, 'PluginCertificatesCertificate', '5', '4', '0'); -------------------------------------------------------------------------------- /inc/profile.class.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | if (!defined('GLPI_ROOT')) { 31 | die("Sorry. You can't access directly to this file"); 32 | } 33 | 34 | /** 35 | * Class PluginCertificatesProfile 36 | */ 37 | class PluginCertificatesProfile extends CommonDBTM 38 | { 39 | 40 | static $rightname = "profile"; 41 | 42 | /** 43 | * @param CommonGLPI $item 44 | * @param int $withtemplate 45 | * @return string|translated 46 | */ 47 | function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) 48 | { 49 | 50 | if ($item->getType() == 'Profile') { 51 | return PluginCertificatesCertificate::getTypeName(2); 52 | } 53 | return ''; 54 | } 55 | 56 | 57 | /** 58 | * @param CommonGLPI $item 59 | * @param int $tabnum 60 | * @param int $withtemplate 61 | * @return bool 62 | */ 63 | static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) 64 | { 65 | 66 | if ($item->getType() == 'Profile') { 67 | $ID = $item->getID(); 68 | $prof = new self(); 69 | 70 | self::addDefaultProfileInfos($ID, 71 | array('plugin_certificates' => 0, 72 | 'plugin_certificates_open_ticket' => 0)); 73 | $prof->showForm($ID); 74 | } 75 | return true; 76 | } 77 | 78 | /** 79 | * @param $ID 80 | */ 81 | static function createFirstAccess($ID) 82 | { 83 | //85 84 | self::addDefaultProfileInfos($ID, 85 | array('plugin_certificates' => 127, 86 | 'plugin_certificates_open_ticket' => 1), true); 87 | } 88 | 89 | /** 90 | * @param $profiles_id 91 | * @param $rights 92 | * @param bool $drop_existing 93 | * @internal param $profile 94 | */ 95 | static function addDefaultProfileInfos($profiles_id, $rights, $drop_existing = false) 96 | { 97 | 98 | $profileRight = new ProfileRight(); 99 | foreach ($rights as $right => $value) { 100 | if (countElementsInTable('glpi_profilerights', 101 | "`profiles_id`='$profiles_id' AND `name`='$right'") && $drop_existing 102 | ) { 103 | $profileRight->deleteByCriteria(array('profiles_id' => $profiles_id, 'name' => $right)); 104 | } 105 | if (!countElementsInTable('glpi_profilerights', 106 | "`profiles_id`='$profiles_id' AND `name`='$right'") 107 | ) { 108 | $myright['profiles_id'] = $profiles_id; 109 | $myright['name'] = $right; 110 | $myright['rights'] = $value; 111 | $profileRight->add($myright); 112 | 113 | //Add right to the current session 114 | $_SESSION['glpiactiveprofile'][$right] = $value; 115 | } 116 | } 117 | } 118 | 119 | /** 120 | * Show profile form 121 | * 122 | * @param int $profiles_id 123 | * @param bool $openform 124 | * @param bool $closeform 125 | * @internal param int $items_id id of the profile 126 | * @internal param value $target url of target 127 | */ 128 | function showForm($profiles_id = 0, $openform = TRUE, $closeform = TRUE) 129 | { 130 | 131 | echo "
"; 132 | if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) 133 | && $openform 134 | ) { 135 | $profile = new Profile(); 136 | echo ""; 137 | } 138 | 139 | $profile = new Profile(); 140 | $profile->getFromDB($profiles_id); 141 | if ($profile->getField('interface') == 'central') { 142 | $rights = $this->getAllRights(); 143 | $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 144 | 'default_class' => 'tab_bg_2', 145 | 'title' => __('General'))); 146 | } 147 | echo ""; 148 | echo "\n"; 149 | 150 | $effective_rights = ProfileRight::getProfileRights($profiles_id, array('plugin_certificates_open_ticket')); 151 | echo ""; 152 | echo ""; 153 | echo "\n"; 157 | echo "
" . __('Helpdesk') . "
" . __('Associable items to a ticket') . ""; 154 | Html::showCheckbox(array('name' => '_plugin_certificates_open_ticket', 155 | 'checked' => $effective_rights['plugin_certificates_open_ticket'])); 156 | echo "
"; 158 | 159 | if ($canedit 160 | && $closeform 161 | ) { 162 | echo "
"; 163 | echo Html::hidden('id', array('value' => $profiles_id)); 164 | echo Html::submit(_sx('button', 'Save'), array('name' => 'update')); 165 | echo "
\n"; 166 | Html::closeForm(); 167 | } 168 | echo "
"; 169 | } 170 | 171 | /** 172 | * @param bool $all 173 | * @return array 174 | */ 175 | static function getAllRights($all = false) 176 | { 177 | $rights = array( 178 | array('itemtype' => 'PluginCertificatesCertificate', 179 | 'label' => _n('Certificate', 'Certificates', 2, 'certificates'), 180 | 'field' => 'plugin_certificates' 181 | ), 182 | ); 183 | 184 | if ($all) { 185 | $rights[] = array('itemtype' => 'PluginCertificatesCertificate', 186 | 'label' => __('Associable items to a ticket'), 187 | 'field' => 'plugin_certificates_open_ticket'); 188 | } 189 | 190 | return $rights; 191 | } 192 | 193 | /** 194 | * Init profiles 195 | * 196 | * @param $old_right 197 | * @return int 198 | */ 199 | 200 | static function translateARight($old_right) 201 | { 202 | switch ($old_right) { 203 | case '': 204 | return 0; 205 | case 'r' : 206 | return READ; 207 | case 'w': 208 | return ALLSTANDARDRIGHT + READNOTE + UPDATENOTE; 209 | case '0': 210 | case '1': 211 | return $old_right; 212 | 213 | default : 214 | return 0; 215 | } 216 | } 217 | 218 | /** 219 | * @since 0.85 220 | * Migration rights from old system to the new one for one profile 221 | * @param $profiles_id 222 | * @return bool 223 | */ 224 | static function migrateOneProfile($profiles_id) 225 | { 226 | global $DB; 227 | //Cannot launch migration if there's nothing to migrate... 228 | if (!$DB->tableExists('glpi_plugin_certificates_profiles')) { 229 | return true; 230 | } 231 | 232 | foreach ($DB->request('glpi_plugin_certificates_profiles', 233 | "`profiles_id`='$profiles_id'") as $profile_data) { 234 | 235 | $matching = array('certificates' => 'plugin_certificates', 236 | 'open_ticket' => 'plugin_certificates_open_ticket'); 237 | $current_rights = ProfileRight::getProfileRights($profiles_id, array_values($matching)); 238 | foreach ($matching as $old => $new) { 239 | if (!isset($current_rights[$old])) { 240 | $query = "UPDATE `glpi_profilerights` 241 | SET `rights`='" . self::translateARight($profile_data[$old]) . "' 242 | WHERE `name`='$new' AND `profiles_id`='$profiles_id'"; 243 | $DB->query($query); 244 | } 245 | } 246 | } 247 | } 248 | 249 | /** 250 | * Initialize profiles, and migrate it necessary 251 | */ 252 | static function initProfile() 253 | { 254 | global $DB; 255 | $profile = new self(); 256 | 257 | //Add new rights in glpi_profilerights table 258 | foreach ($profile->getAllRights(true) as $data) { 259 | if (countElementsInTable("glpi_profilerights", 260 | "`name` = '" . $data['field'] . "'") == 0 261 | ) { 262 | ProfileRight::addProfileRights(array($data['field'])); 263 | } 264 | } 265 | 266 | //Migration old rights in new ones 267 | foreach ($DB->request("SELECT `id` FROM `glpi_profiles`") as $prof) { 268 | self::migrateOneProfile($prof['id']); 269 | } 270 | foreach ($DB->request("SELECT * 271 | FROM `glpi_profilerights` 272 | WHERE `profiles_id`='" . $_SESSION['glpiactiveprofile']['id'] . "' 273 | AND `name` LIKE '%plugin_certificates%'") as $prof) { 274 | $_SESSION['glpiactiveprofile'][$prof['name']] = $prof['rights']; 275 | } 276 | } 277 | 278 | 279 | static function removeRightsFromSession() 280 | { 281 | foreach (self::getAllRights(true) as $right) { 282 | if (isset($_SESSION['glpiactiveprofile'][$right['field']])) { 283 | unset($_SESSION['glpiactiveprofile'][$right['field']]); 284 | } 285 | } 286 | } 287 | } -------------------------------------------------------------------------------- /tools/move_to_po.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | // ---------------------------------------------------------------------- 31 | // Original Author of file: Julien Dombre 32 | // Purpose of file: 33 | // ---------------------------------------------------------------------- 34 | 35 | chdir(dirname($_SERVER["SCRIPT_FILENAME"])); 36 | 37 | if ($argv) { 38 | for ($i = 1; $i < count($argv); $i++) { 39 | //To be able to use = in search filters, enter \= instead in command line 40 | //Replace the \= by ° not to match the split function 41 | $arg = str_replace('\=', '°', $argv[$i]); 42 | $it = explode("=", $arg); 43 | $it[0] = preg_replace('/^--/', '', $it[0]); 44 | 45 | //Replace the ° by = the find the good filter 46 | $it = str_replace('°', '=', $it); 47 | $_GET[$it[0]] = $it[1]; 48 | } 49 | } 50 | 51 | if (!isset($_GET['lang'])) { 52 | echo "Usage move_to_po.php lang=xx_YY\n Will take the pot file and try to complete it to create initial po for the lang\n"; 53 | } 54 | 55 | define('GLPI_ROOT', realpath('../../..')); 56 | 57 | if (!is_readable(GLPI_ROOT . "/plugins/certificates/locales/" . $_GET['lang'] . ".php")) { 58 | print "Unable to read dictionnary file\n"; 59 | exit(); 60 | } 61 | include(GLPI_ROOT . "/plugins/certificates/locales/en_GB.php"); 62 | $REFLANG = $LANG; 63 | 64 | $lf = fopen(GLPI_ROOT . "/plugins/certificates/locales/" . $_GET['lang'] . ".php", "r"); 65 | $lf_new = fopen(GLPI_ROOT . "/plugins/certificates/locales/temp.php", "w+"); 66 | 67 | while (($content = fgets($lf, 4096)) !== false) { 68 | if (!preg_match('/string to be translated/', $content, $reg)) { 69 | if (fwrite($lf_new, $content) === FALSE) { 70 | echo "unable to write in clean lang file"; 71 | exit; 72 | } 73 | } 74 | 75 | } 76 | fclose($lf); 77 | fclose($lf_new); 78 | 79 | 80 | include(GLPI_ROOT . "/plugins/certificates/locales/temp.php"); 81 | 82 | if (!is_readable(GLPI_ROOT . "/plugins/certificates/locales/glpi.pot")) { 83 | print "Unable to read glpi.pot file\n"; 84 | exit(); 85 | } 86 | $current_string_plural = ''; 87 | 88 | $pot = fopen(GLPI_ROOT . "/plugins/certificates/locales/glpi.pot", "r"); 89 | $po = fopen(GLPI_ROOT . "/plugins/certificates/locales/" . $_GET['lang'] . ".po", "w+"); 90 | 91 | $in_plural = false; 92 | 93 | if ($pot && $po) { 94 | $context = ''; 95 | 96 | while (($content = fgets($pot, 4096)) !== false) { 97 | if (preg_match('/^msgctxt "(.*)"$/', $content, $reg)) { 98 | $context = $reg[1]; 99 | } 100 | if (preg_match('/^msgid "(.*)"$/', $content, $reg)) { 101 | $current_string = $reg[1]; 102 | } 103 | 104 | if (preg_match('/^msgid_plural "(.*)"$/', $content, $reg)) { 105 | $current_string_plural = $reg[1]; 106 | $sing_trans = ''; 107 | $plural_trans = ''; 108 | } 109 | 110 | // String on several lines 111 | if (preg_match('/^"(.*)"$/', $content, $reg)) { 112 | if ($in_plural) { 113 | $current_string_plural .= $reg[1]; 114 | } else { 115 | $current_string .= $reg[1]; 116 | } 117 | // echo '-'.$current_string."-\n"; 118 | } 119 | 120 | 121 | if (preg_match('/^msgstr[\[]*([0-9]*)[\]]* "(.*)"$/', $content, $reg)) { 122 | if (strlen($reg[1]) == 0) { //Singular 123 | $in_plural = false; 124 | if ($_GET['lang'] == 'en_GB') { 125 | $content = "msgstr \"$current_string\"\n"; 126 | } else { 127 | $translation = search_in_dict($current_string, $context); 128 | $content = "msgstr \"$translation\"\n"; 129 | // echo '+'.$current_string."+\n"; 130 | // echo "$translation\n"; 131 | } 132 | } else { 133 | 134 | switch ($reg[1]) { 135 | case "0" : // Singular 136 | $in_plural = false; 137 | 138 | // echo '+'.$current_string."+\n"; 139 | $sing_trans = search_in_dict($current_string, $context); 140 | // echo "$translation\n"; 141 | break; 142 | 143 | case "1" : // Plural 144 | $in_plural = true; 145 | 146 | // echo '++'.$current_string."++\n"; 147 | $plural_trans = search_in_dict($current_string_plural, $context); 148 | // echo "$translation\n"; 149 | break; 150 | } 151 | 152 | if ($reg[1] == "1") { 153 | if ($_GET['lang'] == 'en_GB') { 154 | $content = "msgstr[0] \"$current_string\"\n"; 155 | $content .= "msgstr[1] \"$current_string_plural\"\n"; 156 | } else { 157 | // echo $current_string.'->'.$sing_trans.' '.$current_string_plural.'->'.$plural_trans."\n"; 158 | if (!strlen($sing_trans) || !strlen($plural_trans)) { 159 | // echo "clean\n"; 160 | $sing_trans = ''; 161 | $plural_trans = ''; 162 | } 163 | $content = "msgstr[0] \"$sing_trans\"\n"; 164 | $content .= "msgstr[1] \"$plural_trans\"\n"; 165 | } 166 | } else { 167 | $content = ''; 168 | } 169 | } 170 | $context = ''; 171 | } 172 | // Standard replacement 173 | $content = preg_replace('/charset=CHARSET/', 'charset=UTF-8', $content); 174 | 175 | if (preg_match('/Plural-Forms/', $content)) { 176 | $content = "\"Plural-Forms: nplurals=2; plural=(n != 1)\\n\"\n"; 177 | } 178 | 179 | if (fwrite($po, $content) === FALSE) { 180 | echo "unable to write in po file"; 181 | exit; 182 | } 183 | 184 | } 185 | } 186 | fclose($pot); 187 | fclose($po); 188 | 189 | 190 | /** 191 | * @param $string 192 | * @param $context 193 | * @return string 194 | */ 195 | function search_in_dict($string, $context) 196 | { 197 | global $REFLANG, $LANG; 198 | 199 | if ($context) { 200 | $string = "$context/$string"; 201 | } 202 | 203 | $ponctmatch = "([\.: \(\)]*)"; 204 | $varmatch = "(%s)*"; 205 | 206 | if (preg_match("/$varmatch$ponctmatch(.*)$ponctmatch$varmatch$/U", $string, $reg)) { 207 | // print_r($reg); 208 | $left = $reg[1]; 209 | $left .= $reg[2]; 210 | $string = $reg[3]; 211 | $right = $reg[4]; 212 | if (isset($reg[5])) { 213 | $right .= $reg[5]; 214 | } 215 | } 216 | 217 | // echo $left.' <- '.$string.' -> '.$right."\n"; 218 | foreach ($REFLANG as $mod => $data) { 219 | 220 | foreach ($data as $key => $val) { 221 | 222 | if (!is_array($val)) { 223 | if (!isset($LANG[$mod][$key])) { 224 | continue; 225 | } 226 | 227 | // Search same case with punc 228 | if (strcmp($val, $left . $string . $right) === 0) { 229 | return $LANG[$mod][$key]; 230 | } 231 | // Search same case with punc 232 | if (strcasecmp($val, $left . $string . $right) === 0) { 233 | return $LANG[$mod][$key]; 234 | } 235 | 236 | // Search same case with left punc 237 | if (strcmp($val, $left . $string) === 0) { 238 | return $LANG[$mod][$key] . $right; 239 | } 240 | // Search same case with left punc 241 | if (strcasecmp($val, $left . $string) === 0) { 242 | return $LANG[$mod][$key] . $right; 243 | } 244 | 245 | // Search same case with right punc 246 | if (strcmp($val, $string . $right) === 0) { 247 | return $left . $LANG[$mod][$key]; 248 | } 249 | // Search same case with right punc 250 | if (strcasecmp($val, $string . $right) === 0) { 251 | return $left . $LANG[$mod][$key]; 252 | } 253 | 254 | // Search same case without punc 255 | if (strcmp($val, $string) === 0) { 256 | return $left . $LANG[$mod][$key] . $right; 257 | } 258 | // Search non case sensitive 259 | if (strcasecmp($val, $string) === 0) { 260 | return $left . $LANG[$mod][$key] . $right; 261 | } 262 | } else { 263 | //toolbox::logdebug($val); 264 | //toolbox::logdebug($key); 265 | //toolbox::logdebug($mod); 266 | foreach ($val as $k => $v) { 267 | if (!isset($LANG[$mod][$key][$k])) { 268 | continue; 269 | } 270 | 271 | // Search same case with punc 272 | if (strcmp($v, $left . $string . $right) === 0) { 273 | return $LANG[$mod][$key][$k]; 274 | } 275 | // Search same case with punc 276 | if (strcasecmp($v, $left . $string . $right) === 0) { 277 | return $LANG[$mod][$key][$k]; 278 | } 279 | 280 | // Search same case with left punc 281 | if (strcmp($v, $left . $string) === 0) { 282 | return $LANG[$mod][$key][$k] . $right; 283 | } 284 | // Search same case with left punc 285 | if (strcasecmp($v, $left . $string) === 0) { 286 | return $LANG[$mod][$key][$k] . $right; 287 | } 288 | 289 | // Search same case with right punc 290 | if (strcmp($v, $string . $right) === 0) { 291 | return $left . $LANG[$mod][$key][$k]; 292 | } 293 | // Search same case with right punc 294 | if (strcasecmp($v, $string . $right) === 0) { 295 | return $left . $LANG[$mod][$key][$k]; 296 | } 297 | 298 | // Search same case without punc 299 | if (strcmp($v, $string) === 0) { 300 | return $left . $LANG[$mod][$key][$k] . $right; 301 | } 302 | // Search non case sensitive 303 | if (strcasecmp($v, $string) === 0) { 304 | return $left . $LANG[$mod][$key][$k] . $right; 305 | } 306 | } 307 | } 308 | } 309 | } 310 | 311 | return ""; 312 | } -------------------------------------------------------------------------------- /front/certificate.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | include('../../../inc/includes.php'); 31 | 32 | Html::header(_n('Certificate', 'Certificates', 2, 'certificates'), '', "assets", "plugincertificatesmenu"); 33 | 34 | if (!isset($_POST['do_migration'])) { 35 | $_POST['do_migration'] = "0"; 36 | } 37 | 38 | echo "

" . __('Core migration', 'certificates') . "


"; 39 | echo "
"; 40 | 41 | Html::showSimpleForm($_SERVER['PHP_SELF'], 'migration', __('Core migration', 'certificates'), 42 | array('do_migration' => '1'), '', '', 43 | array(__('Are you sure you want to do core migration ??', 'certificates'), 44 | __('Warning existants Certificates will be migrated !!', 'certificates'))); 45 | 46 | echo "
"; 47 | if ($DB->tableExists("glpi_plugin_certificates_certificates") && $_POST['do_migration'] == 1) { 48 | 49 | echo "
".__('Warning existants Certificates will be migrated !!', 'certificates').""; 50 | 51 | echo "
"; 52 | echo __('Data migration', 'certificates'); 53 | 54 | //certificatetypes 55 | $query_selecttypes = "SELECT * FROM `glpi_plugin_certificates_certificatetypes`;"; 56 | $result_selecttypes = $DB->query($query_selecttypes); 57 | 58 | if($DB->numrows($result_selecttypes) > 0) { 59 | while ($data_selecttypes = $DB->fetch_assoc($result_selecttypes)) { 60 | $id_type = $data_selecttypes['id']; 61 | 62 | $DB->query("INSERT INTO `glpi_certificatetypes`(`entities_id`, `is_recursive`, `name`, `comment`) 63 | SELECT `entities_id`, 1, `name`, `comment` 64 | FROM `glpi_plugin_certificates_certificatetypes` 65 | WHERE `id` = $id_type"); 66 | 67 | //ID inserted 68 | $result = $DB->query("SELECT `id` 69 | FROM `glpi_certificatetypes` 70 | WHERE `name` LIKE '".$data_selecttypes['name']."'"); 71 | 72 | $last_id = $DB->result($result, 0, "id"); 73 | 74 | $DB->query("UPDATE `glpi_plugin_certificates_certificates` 75 | SET `plugin_certificates_certificatetypes_id` = $last_id 76 | WHERE `plugin_certificates_certificatetypes_id` = $id_type"); 77 | 78 | $DB->query("UPDATE `glpi_dropdowntranslations` 79 | SET `items_id` = $last_id, `itemtype` = 'CertificateType' 80 | WHERE `items_id` = $id_type 81 | AND `itemtype` = 'PluginCertificatesCertificateType'"); 82 | } 83 | } 84 | 85 | 86 | //states 87 | $query_selectstates = "SELECT * FROM `glpi_plugin_certificates_certificatestates`;"; 88 | $result_selectstates = $DB->query($query_selectstates); 89 | 90 | if($DB->numrows($result_selectstates) > 0) { 91 | while ($data_selectstates = $DB->fetch_assoc($result_selectstates)) { 92 | $id_states = $data_selectstates['id']; 93 | 94 | $result = $DB->query("SELECT `id` 95 | FROM `glpi_states` 96 | WHERE `completename` LIKE '".$data_selectstates['name']."'"); 97 | $last_id = $DB->result($result, 0, "id"); 98 | 99 | if ($last_id == null) { 100 | 101 | $DB->query("INSERT INTO `glpi_states`(`entities_id`, `name`, `completename`, `comment`, `is_recursive`, 102 | `is_visible_computer`, `is_visible_monitor`, `is_visible_networkequipment`, 103 | `is_visible_peripheral`, `is_visible_phone`, `is_visible_printer`, 104 | `is_visible_softwareversion`, `is_visible_softwarelicense`, `is_visible_line`) 105 | SELECT `entities_id`, `name`, `name`, `comment`, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 106 | FROM `glpi_plugin_certificates_certificatestates` 107 | WHERE `id` = $id_states"); 108 | 109 | //ID inserted 110 | $result = $DB->query("SELECT `id` 111 | FROM `glpi_states` 112 | WHERE `name` LIKE '".$data_selectstates['name']."'"); 113 | 114 | $last_id = $DB->result($result, 0, "id"); 115 | } 116 | 117 | $DB->query("UPDATE `glpi_plugin_certificates_certificates` 118 | SET `plugin_certificates_certificatestates_id` = $last_id 119 | WHERE `plugin_certificates_certificatestates_id` = $id_states"); 120 | 121 | } 122 | } 123 | 124 | 125 | //certificates 126 | $query_selectcertificates = "SELECT * FROM `glpi_plugin_certificates_certificates`;"; 127 | $result_selectcertificates = $DB->query($query_selectcertificates); 128 | 129 | if($DB->numrows($result_selectcertificates) > 0) { 130 | while ($data_selectcertificates = $DB->fetch_assoc($result_selectcertificates)) { 131 | $id_certificates = $data_selectcertificates['id']; 132 | 133 | $DB->query("INSERT INTO `glpi_certificates`(`name`, `entities_id`, `is_recursive`, `is_deleted`, `certificatetypes_id`, 134 | `dns_name`, `dns_suffix`, `users_id_tech`, `groups_id_tech`, `locations_id`, 135 | `manufacturers_id`, `is_autosign`, `date_expiration`, `states_id`, `command`, 136 | `certificate_request`, `certificate_item`, `date_mod`) 137 | SELECT `name`, `entities_id`, `is_recursive`, `is_deleted`, `plugin_certificates_certificatetypes_id`, 138 | `dns_name`, `dns_suffix`, `users_id_tech`, `groups_id_tech`, `locations_id`, 139 | `manufacturers_id`, `auto_sign`, `date_expiration`, 140 | `plugin_certificates_certificatestates_id`, `command`, 141 | `certificate_request`, `certificate_item`, `date_mod` 142 | FROM `glpi_plugin_certificates_certificates` 143 | WHERE `id` = $id_certificates"); 144 | $last_id = $DB->insert_id(); 145 | 146 | $DB->query("UPDATE `glpi_plugin_certificates_certificates_items` 147 | SET `plugin_certificates_certificates_id` = $last_id 148 | WHERE `plugin_certificates_certificates_id` = $id_certificates"); 149 | 150 | $tables_glpi = array("glpi_documents_items", 151 | "glpi_logs", 152 | "glpi_items_tickets", 153 | "glpi_contracts_items", 154 | "glpi_notepads", 155 | "glpi_items_problems"); 156 | 157 | foreach ($tables_glpi as $table_glpi) { 158 | 159 | $DB->query("UPDATE `$table_glpi` 160 | SET `items_id` = $last_id, `itemtype` = 'Certificate' 161 | WHERE `items_id` = $id_certificates 162 | AND `itemtype` = 'PluginCertificatesCertificate'"); 163 | } 164 | 165 | $plugin = new Plugin(); 166 | if ($plugin->isActivated('account')) { 167 | 168 | $DB->query("UPDATE `glpi_plugin_accounts_accounts_items` 169 | SET `items_id` = $last_id, `itemtype` = 'Certificate' 170 | WHERE `items_id` = $id_certificates 171 | AND `itemtype` = 'PluginCertificatesCertificate'"); 172 | } 173 | 174 | } 175 | } 176 | 177 | //certificates item 178 | $DB->query("INSERT INTO `glpi_certificates_items`(`certificates_id`, `items_id`, `itemtype`) 179 | SELECT `plugin_certificates_certificates_id`, `items_id`, `itemtype` 180 | FROM `glpi_plugin_certificates_certificates_items`"); 181 | 182 | 183 | 184 | echo "
"; 185 | echo __('Tables purge', 'certificates'); 186 | 187 | $tables = array("glpi_plugin_certificates_certificates", 188 | "glpi_plugin_certificates_certificates_items", 189 | "glpi_plugin_certificates_certificatetypes", 190 | "glpi_plugin_certificates_certificatestates", 191 | "glpi_plugin_certificates_configs", 192 | "glpi_plugin_certificates_notificationstates"); 193 | 194 | foreach ($tables as $table) { 195 | $DB->query("DROP TABLE IF EXISTS `$table`;"); 196 | } 197 | //old versions 198 | $tables = array("glpi_plugin_certificates", 199 | "glpi_plugin_certificates_profiles", 200 | "glpi_plugin_certificates_device", 201 | "glpi_dropdown_plugin_certificates_type", 202 | "glpi_dropdown_plugin_certificates_status", 203 | "glpi_plugin_certificates_config", 204 | "glpi_plugin_certificates_mailing", 205 | "glpi_plugin_certificates_default"); 206 | 207 | foreach ($tables as $table) { 208 | $DB->query("DROP TABLE IF EXISTS `$table`;"); 209 | } 210 | echo "
"; 211 | echo __('Link with core purge', 'certificates'); 212 | 213 | $tables_glpi = array("glpi_displaypreferences", 214 | "glpi_documents_items", 215 | "glpi_savedsearches", 216 | "glpi_logs", 217 | "glpi_items_tickets", 218 | "glpi_contracts_items", 219 | "glpi_items_problems", 220 | "glpi_notepads", 221 | "glpi_dropdowntranslations"); 222 | 223 | foreach ($tables_glpi as $table_glpi) { 224 | $DB->query("DELETE FROM `$table_glpi` WHERE `itemtype` LIKE 'PluginCertificates%';"); 225 | } 226 | 227 | echo "
"; 228 | echo __('Notifications purge', 'certificates'); 229 | 230 | $notif = new Notification(); 231 | $options = array('itemtype' => 'PluginCertificatesCertificate', 232 | 'FIELDS' => 'id'); 233 | foreach ($DB->request('glpi_notifications', $options) as $data) { 234 | $notif->delete($data); 235 | } 236 | 237 | //templates 238 | $template = new NotificationTemplate(); 239 | $translation = new NotificationTemplateTranslation(); 240 | $options = array('itemtype' => 'PluginCertificatesCertificate', 241 | 'FIELDS' => 'id'); 242 | foreach ($DB->request('glpi_notificationtemplates', $options) as $data) { 243 | $options_template = array('notificationtemplates_id' => $data['id'], 244 | 'FIELDS' => 'id'); 245 | 246 | foreach ($DB->request('glpi_notificationtemplatetranslations', $options_template) as $data_template) { 247 | $translation->delete($data_template); 248 | } 249 | $template->delete($data); 250 | } 251 | 252 | CronTask::Unregister('CertificatesAlert'); 253 | } else if (!$DB->tableExists("glpi_plugin_certificates_certificates")) { 254 | echo "
"; 255 | echo __('No data to migrate', 'certificates'); 256 | echo "
"; 257 | echo __('You can uninstall the plugin', 'certificates'); 258 | 259 | } 260 | echo "
"; 261 | Html::footer(); --------------------------------------------------------------------------------