Hello, In our organization we have modified the GLPI code slightly to add history to contacts, suppliers, contracts, and documents. I have attached a patch based on GLPI 0.72.21. Could this be made default functionality for future versions of GLPI? For many organizations it is important to track changes on these things.
Thanks, Ryan
Index: ajax/contract.tabs.php =================================================================== --- ajax/contract.tabs.php (revision 157) +++ ajax/contract.tabs.php (working copy) @@ -70,6 +70,9 @@ case 10 : showNotesForm($_POST['target'],CONTRACT_TYPE,$_POST["ID"]); break; + case 12 : + showHistory(CONTRACT_TYPE,$_POST["ID"]); + break; default : if (!displayPluginAction(CONTRACT_TYPE,$_POST["ID"],$_POST['glpi_tab'])){ showEnterpriseContract($_POST["ID"]); Index: ajax/contact.tabs.php =================================================================== --- ajax/contact.tabs.php (revision 157) +++ ajax/contact.tabs.php (working copy) @@ -62,6 +62,9 @@ case 10 : showNotesForm($_POST['target'],CONTACT_TYPE,$_POST["ID"]); break; + case 12 : + showHistory(CONTACT_TYPE,$_POST["ID"]); + break; default : if (!displayPluginAction(CONTACT_TYPE,$_POST["ID"],$_POST['glpi_tab'])){ showEnterpriseContact($_POST["ID"]); @@ -72,4 +75,4 @@ } ajaxFooter(); -?> \ No newline at end of file +?> Index: ajax/document.tabs.php =================================================================== --- ajax/document.tabs.php (revision 157) +++ ajax/document.tabs.php (working copy) @@ -65,6 +65,9 @@ case 10 : showNotesForm( $_POST['target'],DOCUMENT_TYPE,$_POST["ID"]); break; + case 12 : + showHistory(DOCUMENT_TYPE,$_POST["ID"]); + break; default : if ($_POST["ID"]){ if (!displayPluginAction(DOCUMENT_TYPE,$_POST["ID"],$_POST['glpi_tab'])){ Index: ajax/enterprise.tabs.php =================================================================== --- ajax/enterprise.tabs.php (revision 157) +++ ajax/enterprise.tabs.php (working copy) @@ -84,6 +84,9 @@ case 10 : showNotesForm($_POST['target'],ENTERPRISE_TYPE,$_POST["ID"]); break; + case 12 : + showHistory(ENTERPRISE_TYPE,$_POST["ID"]); + break; case 15 : showInfocomEnterprise($_POST["ID"]); break; Index: inc/contact.class.php =================================================================== --- inc/contact.class.php (revision 160) +++ inc/contact.class.php (working copy) @@ -47,6 +47,7 @@ function __construct () { $this->table="glpi_contacts"; $this->type=CONTACT_TYPE; + $this->dohistory=true; $this->entity_assign=true; $this->may_be_recursive=true; } @@ -69,6 +70,7 @@ $ong[7]=$LANG['title'][34]; if (haveRight("notes","r")) $ong[10]=$LANG['title'][37]; + $ong[12]=$LANG['title'][38]; } else { // New item $ong[1]=$LANG['title'][26]; } Index: inc/contract.class.php =================================================================== --- inc/contract.class.php (revision 160) +++ inc/contract.class.php (working copy) @@ -47,6 +47,7 @@ function __construct () { $this->table="glpi_contracts"; $this->type=CONTRACT_TYPE; + $this->dohistory=true; $this->entity_assign=true; $this->may_be_recursive=true; } @@ -79,6 +80,7 @@ $ong[7]=$LANG['title'][34]; if (haveRight("notes","r")) $ong[10]=$LANG['title'][37]; + $ong[12]=$LANG['title'][38]; } else { // New item $ong[1]=$LANG['title'][26]; } Index: inc/enterprise.class.php =================================================================== --- inc/enterprise.class.php (revision 160) +++ inc/enterprise.class.php (working copy) @@ -47,6 +47,7 @@ function __construct () { $this->table="glpi_enterprises"; $this->type=ENTERPRISE_TYPE; + $this->dohistory=true; $this->entity_assign=true; $this->may_be_recursive=true; } @@ -91,6 +92,7 @@ if (haveRight("notes","r")){ $ong[10] = $LANG['title'][37]; } + $ong[12]=$LANG['title'][38]; } else { // New item $ong[1]=$LANG['title'][26]; } Index: inc/document.class.php =================================================================== --- inc/document.class.php (revision 160) +++ inc/document.class.php (working copy) @@ -47,6 +47,7 @@ function __construct () { $this->table="glpi_docs"; $this->type=DOCUMENT_TYPE; + $this->dohistory=true; $this->entity_assign=true; $this->may_be_recursive=true; } @@ -91,6 +92,7 @@ $ong[5]=$LANG['document'][21]; if (haveRight("notes","r")) $ong[10]=$LANG['title'][37]; + $ong[12]=$LANG['title'][38]; } else { // New item $ong[1]=$LANG['title'][26]; }
_______________________________________________ Glpi-dev mailing list Glpi-dev@gna.org https://mail.gna.org/listinfo/glpi-dev