Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / install / update_0712_0713.php @ b67d8923

Historique | Voir | Annoter | Télécharger (2,39 ko)

1
<?php
2

    
3

    
4
/*
5
 * @version $Id: update_0712_0713.php 7763 2009-01-06 18:44:50Z moyo $
6
 -------------------------------------------------------------------------
7
 GLPI - Gestionnaire Libre de Parc Informatique
8
 Copyright (C) 2003-2009 by the INDEPNET Development Team.
9

10
 http://indepnet.net/   http://glpi-project.org
11
 -------------------------------------------------------------------------
12

13
 LICENSE
14

15
 This file is part of GLPI.
16

17
 GLPI is free software; you can redistribute it and/or modify
18
 it under the terms of the GNU General Public License as published by
19
 the Free Software Foundation; either version 2 of the License, or
20
 (at your option) any later version.
21

22
 GLPI is distributed in the hope that it will be useful,
23
 but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 GNU General Public License for more details.
26

27
 You should have received a copy of the GNU General Public License
28
 along with GLPI; if not, write to the Free Software
29
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
30
 --------------------------------------------------------------------------
31
 */
32

    
33
// ----------------------------------------------------------------------
34
// Original Author of file:
35
// Purpose of file:
36
// ----------------------------------------------------------------------
37

    
38
/// Update from 0.71.2 to 0.71.3
39
function update0712to0713() {
40
        global $DB, $CFG_GLPI, $LANG;
41

    
42
        if (!FieldExists("glpi_rule_cache_software", "ignore_ocs_import")) {
43
                $query = "ALTER TABLE `glpi_rule_cache_software` ADD `ignore_ocs_import` VARCHAR( 255 ) NULL ;";
44
                $DB->query($query) or die("0.71.3 add ignore _from_ocs field in dictionnary cache " . $LANG["update"][90] . $DB->error());
45
        }
46
        // Clean KB cache because error on datas stored
47
        cleanCache("GLPI_".KNOWBASE_TYPE);
48
        
49
        // Update to longtext for fields which may be very long
50
        if (FieldExists("glpi_kbitems", "answer")) {
51
                $query = "ALTER TABLE `glpi_kbitems` CHANGE `answer` `answer` LONGTEXT NULL DEFAULT NULL  ";
52
                $DB->query($query) or die("0.71.3 alter kbitem answer field to longtext " . $LANG["update"][90] . $DB->error());
53
        }
54
        if (FieldExists("glpi_tracking", "contents")) {
55
                $query = "ALTER TABLE `glpi_tracking` CHANGE `contents` `contents` LONGTEXT NULL DEFAULT NULL  ";
56
                $DB->query($query) or die("0.71.3 alter tracking contents field to longtext " . $LANG["update"][90] . $DB->error());
57
        }
58
                
59
        
60
} 
61
?>
Redmine Appliance - Powered by TurnKey Linux