Commit 9a7074a3 authored by Johan Cwiklinski's avatar Johan Cwiklinski Committed by Johan Cwiklinski

Add versionning on KB entries and their translations; fixes #1326

parent 38f4cd33
<?php
/*
-------------------------------------------------------------------------
GLPI - Gestionnaire Libre de Parc Informatique
Copyright (C) 2003-2014 by the INDEPNET Development Team.
http://indepnet.net/ http://glpi-project.org
-------------------------------------------------------------------------
LICENSE
This file is part of GLPI.
GLPI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
GLPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @since version 9.1
* @brief
*/
$AJAX_INCLUDE = 1;
include ('../inc/includes.php');
header("Content-Type: application/json; charset=UTF-8");
Html::header_nocache();
Session::checkLoginUser();
if (!isset($_POST['kbid']) || !isset($_POST['oldid']) || !isset($_POST['diffid'])) {
throw new \RuntimeException('Required argument missing!');
}
$oldid = $_POST['oldid'];
$diffid = $_POST['diffid'];
$kbid = $_POST['kbid'];
$revision = new KnowbaseItem_Revision();
$revision->getFromDB($oldid);
$old = [
'name' => $revision->fields['name'],
'answer' => Toolbox::unclean_html_cross_side_scripting_deep($revision->fields['answer'])
];
$revision = $diffid == 0 ? new KnowbaseItem() : new KnowbaseItem_Revision();
$revision->getFromDB($diffid == 0 ? $kbid : $diffid);
$diff = [
'name' => $revision->fields['name'],
'answer' => Toolbox::unclean_html_cross_side_scripting_deep($revision->fields['answer'])
];
echo json_encode([
'old' => $old,
'diff' => $diff
]);
<?php
/*
-------------------------------------------------------------------------
GLPI - Gestionnaire Libre de Parc Informatique
Copyright (C) 2003-2014 by the INDEPNET Development Team.
http://indepnet.net/ http://glpi-project.org
-------------------------------------------------------------------------
LICENSE
This file is part of GLPI.
GLPI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
GLPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @since version 9.1
* @brief
*/
$AJAX_INCLUDE = 1;
include ('../inc/includes.php');
header("Content-Type: application/json; charset=UTF-8");
Html::header_nocache();
Session::checkLoginUser();
if (!isset($_POST['revid'])) {
throw new \RuntimeException('Required argument missing!');
}
$revid = $_POST['revid'];
$revision = new KnowbaseItem_Revision();
$revision->getFromDB($revid);
$rev = [
'name' => $revision->fields['name'],
'answer' => Toolbox::unclean_html_cross_side_scripting_deep($revision->fields['answer'])
];
echo json_encode($rev);
File mode changed from 100755 to 100644
......@@ -3823,6 +3823,16 @@ input[type=checkbox]:not(:disabled) ~ .lever:active:after {
margin-left: 20px;
}
td.diff ins {
color: green;
text-decoration: none;
}
td.diff del {
color:red;
text-decoration: none;
}
@media screen and (max-width: 900px) {
.documentation {
margin-left: 0 !important;
......
......@@ -120,8 +120,27 @@ if (isset($_POST["add"])) {
}
Html::back();
} else if (isset($_GET["id"]) and isset($_GET['to_rev'])) {
$kb->check($_GET["id"], UPDATE);
if ($kb->revertTo($_GET['to_rev'])) {
Session::addMessageAfterRedirect(
sprintf(
__('Knowledge base item has been reverted to revision %s'),
$_GET['to_rev']
)
);
} else {
Session::addMessageAfterRedirect(
sprintf(
__('Knowledge base item has not been reverted to revision %s'),
$_GET['to_rev']
),
false,
ERROR
);
}
Html::redirect($CFG_GLPI["root_doc"]."/front/knowbaseitem.form.php?id=".$_GET['id']);
} else if (isset($_GET["id"])) {
if (isset($_GET["_in_modal"])) {
Html::popHeader(__('Knowledge base'), $_SERVER['PHP_SELF']);
$kb = new KnowbaseItem();
......
......@@ -43,8 +43,66 @@ include ('../inc/includes.php');
$translation = new KnowbaseItemTranslation();
if (isset($_POST['add'])) {
$translation->add($_POST);
Html::back();
} else if (isset($_POST['update'])) {
$translation->update($_POST);
Html::back();
} else if (isset($_GET["id"]) and isset($_GET['to_rev'])) {
$translation->check($_GET["id"], UPDATE);
if ($translation->revertTo($_GET['to_rev'])) {
Session::addMessageAfterRedirect(
sprintf(
__('Knowledge base item translation has been reverted to revision %s'),
$_GET['to_rev']
)
);
} else {
Session::addMessageAfterRedirect(
sprintf(
__('Knowledge base item translation has not been reverted to revision %s'),
$_GET['to_rev']
),
false,
ERROR
);
}
Html::redirect($CFG_GLPI["root_doc"]."/front/knowbaseitemtranslation.form.php?id=".$_GET['id']);
} else if (isset($_GET["id"])) {
// modifier un item dans la base de connaissance
$translation->check($_GET["id"], READ);
if (Session::getLoginUserID()) {
if ($_SESSION["glpiactiveprofile"]["interface"] == "central") {
Html::header(KnowbaseItem::getTypeName(1), $_SERVER['PHP_SELF'], "tools", "knowbaseitemtranslation");
} else {
Html::helpHeader(__('FAQ'), $_SERVER['PHP_SELF']);
}
Html::helpHeader(__('FAQ'), $_SERVER['PHP_SELF'], $_SESSION["glpiname"]);
} else {
$_SESSION["glpilanguage"] = $CFG_GLPI['language'];
// Anonymous FAQ
Html::simpleHeader(__('FAQ'),
array(__('Authentication')
=> $CFG_GLPI['root_doc'].'/',
__('FAQ') => $CFG_GLPI['root_doc'].'/front/helpdesk.faq.php'));
}
/*$available_options = array('item_itemtype', 'item_items_id', 'id');
$options = array();
foreach ($available_options as $key) {
if (isset($_GET[$key])) {
$options[$key] = $_GET[$key];
}
}*/
$translation->display([]);
if (Session::getLoginUserID()) {
if ($_SESSION["glpiactiveprofile"]["interface"] == "central") {
Html::footer();
} else {
Html::helpFooter();
}
} else {
Html::helpFooter();
}
}
Html::back();
......@@ -173,6 +173,7 @@ class KnowbaseItem extends CommonDBVisible {
$this->addStandardTab('KnowbaseItemTranslation', $ong, $options);
$this->addStandardTab('Log', $ong, $options);
$this->addStandardTab('KnowbaseItem_Revision', $ong, $options);
return $ong;
}
......@@ -323,6 +324,8 @@ class KnowbaseItem extends CommonDBVisible {
$class->cleanDBonItemDelete($this->getType(), $this->fields['id']);
$class = new KnowbaseItem_Item();
$class->cleanDBonItemDelete($this->getType(), $this->fields['id']);
$class = new KnowbaseItem_Revision();
$class->cleanDBonItemDelete($this->getType(), $this->fields['id']);
}
/**
......@@ -1693,6 +1696,13 @@ class KnowbaseItem extends CommonDBVisible {
return $values;
}
function pre_updateInDB() {
$revision = new KnowbaseItem_Revision();
$kb = new KnowbaseItem();
$kb->getFromDB($this->getID());
$revision->createNew($kb);
}
/**
* Get KB answer, with id on titles to set anchors
*
......@@ -1740,4 +1750,31 @@ class KnowbaseItem extends CommonDBVisible {
$params['right'] = ($this->getField('is_faq') ? 'faq' : 'knowbase');
return $params;
}
/**
* Reverts item contents to specified revision
*
* @param integer $revid Revision ID
*
* @return boolean
*/
public function revertTo($revid) {
$revision = new KnowbaseItem_Revision();
$revision->getFromDB($revid);
$values = [
'id' => $this->getID(),
'name' => $revision->fields['name'],
'answer' => $revision->fields['answer']
];
if ($this->update($values)) {
Event::log($this->getID(), "knowbaseitem", 5, "tools",
//TRANS: %s is the user login, %d the revision number
sprintf(__('%s reverts item to revision %id'), $_SESSION["glpiname"], $revision));
return true;
} else {
return false;
}
}
}
This diff is collapsed.
......@@ -50,6 +50,7 @@ class KnowbaseItemTranslation extends CommonDBChild {
static public $itemtype = 'KnowbaseItem';
static public $items_id = 'knowbaseitems_id';
public $dohistory = true;
static public $logs_for_parent = false;
static $rightname = 'knowbase';
......@@ -60,6 +61,16 @@ class KnowbaseItemTranslation extends CommonDBChild {
}
function defineTabs($options=array()) {
$ong = array();
$this->addStandardTab(__CLASS__, $ong, $options);
$this->addStandardTab('Log', $ong, $options);
$this->addStandardTab('KnowbaseItem_Revision', $ong, $options);
return $ong;
}
function getForbiddenStandardMassiveAction() {
$forbidden = parent::getForbiddenStandardMassiveAction();
......@@ -73,6 +84,18 @@ class KnowbaseItemTranslation extends CommonDBChild {
**/
function getTabNameForItem(CommonGLPI $item, $withtemplate=0) {
if (!$withtemplate) {
$nb = 0;
switch ($item->getType()) {
case __CLASS__ :
$ong[1] = $this->getTypeName(1);
if ($item->canUpdateItem()) {
$ong[3] = __('Edit');
}
return $ong;
}
}
if (self::canBeTranslated($item)) {
$nb = 0;
if ($_SESSION['glpishow_count_on_tabs']) {
......@@ -80,6 +103,7 @@ class KnowbaseItemTranslation extends CommonDBChild {
}
return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), $nb);
}
return '';
}
......@@ -91,12 +115,65 @@ class KnowbaseItemTranslation extends CommonDBChild {
**/
static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) {
if (self::canBeTranslated($item)) {
if ($item->getType() == __CLASS__) {
switch ($tabnum) {
case 1 :
$item->showFull();
break;
case 2 :
$item->showVisibility();
break;
case 3 :
$item->showForm($item->getID());
break;
}
} else if (self::canBeTranslated($item)) {
self::showTranslations($item);
}
return true;
}
/**
* Print out (html) show item : question and answer
*
* @param $options array of options
*
* @return nothing (display item : question and answer)
**/
function showFull($options=array()) {
global $DB, $CFG_GLPI;
if (!$this->can($this->fields['id'], READ)) {
return false;
}
$linkusers_id = true;
// show item : question and answer
if (((Session::getLoginUserID() === false) && $CFG_GLPI["use_public_faq"])
|| ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk")
|| !User::canView()) {
$linkusers_id = false;
}
echo "<table class='tab_cadre_fixe'>";
echo "<tr><td class='left' colspan='4'><h2>".__('Subject')."</h2>";
echo $this->fields["name"];
echo "</td></tr>";
echo "<tr><td class='left' colspan='4'><h2>".__('Content')."</h2>\n";
echo "<div id='kbanswer'>";
$answer = $this->fields["answer"];
echo Toolbox::unclean_html_cross_side_scripting_deep($answer);
echo "</div>";
echo "</td></tr>";
echo "</table>";
return true;
}
/**
* Display all translated field for an KnowbaseItem
......@@ -138,6 +215,9 @@ class KnowbaseItemTranslation extends CommonDBChild {
$massiveactionparams = array('container' => 'mass'.__CLASS__.$rand);
Html::showMassiveActions($massiveactionparams);
}
Session::initNavigateListItems('KnowbaseItemTranslation', __('Entry translations list'));
echo "<div class='center'>";
echo "<table class='tab_cadre_fixehov'><tr class='tab_bg_2'>";
echo "<th colspan='4'>".__("List of translations")."</th></tr>";
......@@ -149,31 +229,20 @@ class KnowbaseItemTranslation extends CommonDBChild {
echo "<th>".__("Language")."</th>";
echo "<th>".__("Subject")."</th>";
foreach ($found as $data) {
echo "<tr class='tab_bg_1' ".($canedit ? "style='cursor:pointer'
onClick=\"viewEditTranslation".$data['id']."$rand();\"" : '') .
">";
echo "<tr class='tab_bg_1'>";
if ($canedit) {
echo "<td class='center'>";
Html::showMassiveActionCheckBox(__CLASS__, $data["id"]);
echo "</td>";
}
echo "<td>";
if ($canedit) {
echo "\n<script type='text/javascript' >\n";
echo "function viewEditTranslation". $data["id"]."$rand() {\n";
$params = array('type' => __CLASS__,
'parenttype' => get_class($item),
'knowbaseitems_id' => $item->getID(),
'id' => $data["id"]);
Ajax::updateItemJsCode("viewtranslation" . $item->getID() . "$rand",
$CFG_GLPI["root_doc"]."/ajax/viewsubitem.php",
$params);
echo "};";
echo "</script>\n";
}
echo Dropdown::getLanguageName($data['language']);
echo "</td><td>";
echo $data["name"];
if ($canedit) {
echo "<a href=\"" . $CFG_GLPI["root_doc"] . "/front/knowbaseitemtranslation.form.php?id=".$data["id"] . "\">{$data['name']}</a>";
} else {
echo $data["name"];
}
if (isset($data['answer']) && !empty($data['answer'])) {
echo "&nbsp;";
Html::showToolTip(Toolbox::unclean_html_cross_side_scripting_deep($data['answer']));
......@@ -221,7 +290,8 @@ class KnowbaseItemTranslation extends CommonDBChild {
echo "<tr class='tab_bg_1'>";
echo "<td>".__('Language')."&nbsp;:</td>";
echo "<td>";
echo "<input type='hidden' name='knowbaseitems_id' value='".$item->getID()."'>";
echo "<input type='hidden' name='users_id' value=\"".Session::getLoginUserID()."\">";
echo "<input type='hidden' name='knowbaseitems_id' value='".$this->fields['knowbaseitems_id']."'>";
if ($ID > 0) {
echo Dropdown::getLanguageName($this->fields['language']);
} else {
......@@ -333,4 +403,38 @@ class KnowbaseItemTranslation extends CommonDBChild {
}
return $tab;
}
function pre_updateInDB() {
$revision = new KnowbaseItem_Revision();
$translation = new KnowbaseItemTranslation();
$translation->getFromDB($this->getID());
$revision->createNewTranslated($translation);
}
/**
* Reverts item translation contents to specified revision
*
* @param integer $revid Revision ID
*
* @return boolean
*/
public function revertTo($revid) {
$revision = new KnowbaseItem_Revision();
$revision->getFromDB($revid);
$values = [
'id' => $this->getID(),
'name' => $revision->fields['name'],
'answer' => $revision->fields['answer']
];
if ($this->update($values)) {
Event::log($this->getID(), "knowbaseitemtranslation", 5, "tools",
//TRANS: %s is the user login, %d the revision number
sprintf(__('%s reverts item translation to revision %id'), $_SESSION["glpiname"], $revision));
return true;
} else {
return false;
}
}
}
......@@ -3306,8 +3306,12 @@ CREATE TABLE `glpi_knowbaseitemtranslations` (
`language` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
`name` text COLLATE utf8_unicode_ci,
`answer` longtext COLLATE utf8_unicode_ci,
`users_id` int(11) NOT NULL DEFAULT '0',
`date_mod` datetime DEFAULT NULL,
`date_creation` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `item` (`knowbaseitems_id`,`language`),
KEY `users_id` (`users_id`),
FULLTEXT KEY `fulltext` (`name`,`answer`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
......@@ -7704,3 +7708,20 @@ CREATE TABLE `glpi_knowbaseitems_items` (
KEY `item_id` (`items_id`),
KEY `item` (`itemtype`,`items_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
### Dump table glpi_knowbaseitems_revisions
DROP TABLE IF EXISTS `glpi_knowbaseitems_revisions`;
CREATE TABLE `glpi_knowbaseitems_revisions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`knowbaseitems_id` int(11) NOT NULL,
`revision` int(11) NOT NULL,
`name` text COLLATE utf8_unicode_ci,
`answer` longtext COLLATE utf8_unicode_ci,
`language` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
`users_id` int(11) NOT NULL DEFAULT '0',
`date_creation` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unicity` (`knowbaseitems_id`, `revision`, `language`),
KEY `revision` (`revision`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
......@@ -130,6 +130,47 @@ function update91to92() {
$DB->queryOrDie($query, "9.2 add table glpi_knowbaseitems_items");
}
$migration->displayMessage(sprintf(__('Add of - %s to database'), 'Knowbase item revisions'));
if (!TableExists('glpi_knowbaseitems_revisions')) {
$query = "CREATE TABLE `glpi_knowbaseitems_revisions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`knowbaseitems_id` int(11) NOT NULL,
`revision` int(11) NOT NULL,
`name` text COLLATE utf8_unicode_ci,
`answer` longtext COLLATE utf8_unicode_ci,
`language` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
`users_id` int(11) NOT NULL,
`date_creation` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unicity` (`knowbaseitems_id`, `revision`, `language`),
KEY `revision` (`revision`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci";
$DB->queryOrDie($query, "9.2 add table glpi_knowbaseitems_revisions");
}
$migration->addField("glpi_knowbaseitemtranslations", "users_id", "integer");
$migration->addKey("glpi_knowbaseitemtranslations", "users_id");
//set kb translations users...
$query = "SELECT `id`, `users_id`
FROM `glpi_knowbaseitem`
INNER JOIN `glpi_knowbaseitemtranslations`
ON `glpi_knowbaseitemtranslations`.`knowbaseitems_id` = `glpi_knowbaseitem`.`id`";
if ($result = $DB->query($query)) {
if ($DB->numrows($result)>0) {
while ($data = $DB->fetch_assoc($result)) {
$query = "UPDATE `glpi_knowbaseitemtranslations`
SET `users_id` = '{$data['users_id']}'
WHERE `knowbaseitems_id` = '{$data['id']}'";
$DB->queryOrDie($query, 'Set knowledge base translations users');
}
}
}
$migration->addField("glpi_knowbaseitemtranslations", "date_creation", "DATE");
$migration->addField("glpi_knowbaseitemtranslations", "date_mod", "DATE");
// ************ Keep it at the end **************
$migration->executeMigration();
......
This diff is collapsed.
// Generated by CoffeeScript 1.9.2
/*
@preserve jQuery.PrettyTextDiff 1.0.4
See https://github.com/arnab/jQuery.PrettyTextDiff/
*/
(function() {
var $;
$ = jQuery;
$.fn.extend({
prettyTextDiff: function(options) {
var dmp, settings;
settings = {
originalContainer: ".original",
changedContainer: ".changed",
diffContainer: ".diff",
cleanup: true,
debug: false
};
settings = $.extend(settings, options);
$.fn.prettyTextDiff.debug("Options: ", settings, settings);
dmp = new diff_match_patch();
return this.each(function() {
var changed, diff_as_html, diffs, original;
if (settings.originalContent && settings.changedContent) {
original = $('<div />').html(settings.originalContent).text();
changed = $('<div />').html(settings.changedContent).text();
} else {
original = $(settings.originalContainer, this).text();
changed = $(settings.changedContainer, this).text();
}
$.fn.prettyTextDiff.debug("Original text found: ", original, settings);
$.fn.prettyTextDiff.debug("Changed text found: ", changed, settings);
diffs = dmp.diff_main(original, changed);
if (settings.cleanup) {
dmp.diff_cleanupSemantic(diffs);
}
$.fn.prettyTextDiff.debug("Diffs: ", diffs, settings);
diff_as_html = $.map(diffs, function(diff) {
return $.fn.prettyTextDiff.createHTML(diff);
});
$(settings.diffContainer, this).html(diff_as_html.join(''));
return this;
});
}
});
$.fn.prettyTextDiff.debug = function(message, object, settings) {
if (settings.debug) {
return console.log(message, object);
}
};
$.fn.prettyTextDiff.createHTML = function(diff) {
var data, html, operation, pattern_amp, pattern_gt, pattern_lt, pattern_para, text;
html = [];
pattern_amp = /&/g;
pattern_lt = /</g;
pattern_gt = />/g;
pattern_para = /\n/g;
operation = diff[0], data = diff[1];
text = data.replace(pattern_amp, '&amp;').replace(pattern_lt, '&lt;').replace(pattern_gt, '&gt;').replace(pattern_para, '<br>');
switch (operation) {
case DIFF_INSERT:
return '<ins>' + text + '</ins>';
case DIFF_DELETE:
return '<del>' + text + '</del>';
case DIFF_EQUAL:
return '<span>' + text + '</span>';
}
};
}).call(this);
/*
@preserve jQuery.PrettyTextDiff 1.0.4
See https://github.com/arnab/jQuery.PrettyTextDiff/
*/
(function(){var $;$=jQuery;$.fn.extend({prettyTextDiff:function(options){var dmp,settings;settings={originalContainer:".original",changedContainer:".changed",diffContainer:".diff",cleanup:true,debug:false};settings=$.extend(settings,options);$.fn.prettyTextDiff.debug("Options: ",settings,settings);dmp=new diff_match_patch;return this.each(function(){var changed,diff_as_html,diffs,original;if(settings.originalContent&&settings.changedContent){original=$("<div />").html(settings.originalContent).text();changed=$("<div />").html(settings.changedContent).text()}else{original=$(settings.originalContainer,this).text();changed=$(settings.changedContainer,this).text()}$.fn.prettyTextDiff.debug("Original text found: ",original,settings);$.fn.prettyTextDiff.debug("Changed text found: ",changed,settings);diffs=dmp.diff_main(original,changed);if(settings.cleanup){dmp.diff_cleanupSemantic(diffs)}$.fn.prettyTextDiff.debug("Diffs: ",diffs,settings);diff_as_html=$.map(diffs,function(diff){return $.fn.prettyTextDiff.createHTML(diff)});$(settings.diffContainer,this).html(diff_as_html.join(""));return this})}});$.fn.prettyTextDiff.debug=function(message,object,settings){if(settings.debug){return console.log(message,object)}};$.fn.prettyTextDiff.createHTML=function(diff){var data,html,operation,pattern_amp,pattern_gt,pattern_lt,pattern_para,text;html=[];pattern_amp=/&/g;pattern_lt=/</g;pattern_gt=/>/g;pattern_para=/\n/g;operation=diff[0],data=diff[1];text=data.replace(pattern_amp,"&amp;").replace(pattern_lt,"&lt;").replace(pattern_gt,"&gt;").replace(pattern_para,"<br>");switch(operation){case DIFF_INSERT:return"<ins>"+text+"</ins>";case DIFF_DELETE:return"<del>"+text+"</del>";case DIFF_EQUAL:return"<span>"+text+"</span>"}}}).call(this);
\ No newline at end of file
......@@ -59,7 +59,7 @@ $types = array('Computer', 'Monitor', 'Printer', 'Phone', 'Software', 'SoftwareV
'ContractType', 'ContactType', 'DeviceMemoryType', 'SupplierType', 'InterfaceType',
'DeviceCaseType', 'PhonePowerSupply', 'Filesystem', 'VirtualMachineType',
'VirtualMachineSystem', 'VirtualMachineState', 'DocumentCategory', 'DocumentType',
'KnowbaseItemCategory', 'Calendar', 'Holiday', 'NetworkEquipmentFirmware',
'KnowbaseItemCategory', 'KnowbaseItemTranslation', 'Calendar', 'Holiday', 'NetworkEquipmentFirmware',
'Network', 'Domain', 'Vlan', 'IPNetwork', 'FQDN', 'WifiNetwork', 'NetworkName',
'UserTitle', 'UserCategory', 'RuleRightParameter', 'Fieldblacklist', 'SsoVariable',
'NotificationTemplate', 'Notification', 'SLA', 'FieldUnicity', 'Crontask', 'Link',
......
<?php
/*
-------------------------------------------------------------------------
GLPI - Gestionnaire Libre de Parc Informatique
Copyright (C) 2015-2016 Teclib'.
http://glpi-project.org
based on GLPI - Gestionnaire Libre de Parc Informatique
Copyright (C) 2003-2014 by the INDEPNET Development Team.
-------------------------------------------------------------------------
LICENSE