Hi here is a small code-cleanup for generic-object. I just deleted some spaces in inc/install.function.php.
-- Julien Pivotto
Index: inc/install.function.php
===================================================================
--- inc/install.function.php (revision 125)
+++ inc/install.function.php (working copy)
@@ -88,7 +88,7 @@
`itemtype` VARCHAR( 255 ) NOT NULL DEFAULT 0 ,
`state` INT( 2 ) NOT NULL DEFAULT 0 ,
`status` INT ( 1 )NOT NULL DEFAULT 0 ,
- `name` VARCHAR( 255 ) collate utf8_unicode_ci NOT NULL ,
+ `name` VARCHAR( 255 ) collate utf8_unicode_ci NOT NULL ,
`use_deleted` INT ( 1 ) NOT NULL DEFAULT 0 ,
`use_notes` INT ( 1 ) NOT NULL DEFAULT 0 ,
`use_history` INT ( 1 ) NOT NULL DEFAULT 0 ,
@@ -108,7 +108,7 @@
`use_plugin_uninstall` INT ( 1 ) NOT NULL DEFAULT 0 ,
`use_plugin_geninventorynumber` INT ( 1 ) NOT NULL DEFAULT 0 ,
PRIMARY KEY ( `id` )
- ) ENGINE = MYISAM COMMENT = 'Object types definition table' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
+ ) ENGINE=MYISAM COMMENT='Object types definition table' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
$DB->query($query);
$query = "INSERT INTO `glpi_displaypreferences` (`id`, `itemtype`, `num`, `rank`, `users_id`) " .
@@ -127,9 +127,9 @@
`device_name` VARCHAR( 255 ) default NULL,
`right` char(1) default NULL,
`open_ticket` char(1) NOT NULL DEFAULT 0,
- PRIMARY KEY (`id`),
+ PRIMARY KEY (`id`),
KEY `name` (`name`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
$DB->query($query);
}
@@ -137,12 +137,12 @@
$query = "CREATE TABLE `glpi_plugin_genericobject_type_fields` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`itemtype` VARCHAR( 255 ) NOT NULL DEFAULT 0 ,
- `name` VARCHAR( 255 ) collate utf8_unicode_ci NOT NULL DEFAULT '' ,
+ `name` VARCHAR( 255 ) collate utf8_unicode_ci NOT NULL DEFAULT '' ,
`rank` INT( 11 ) NOT NULL DEFAULT 0 ,
`mandatory` INT( 1 ) NOT NULL ,
`entity_restrict` INT( 1 ) NOT NULL ,
`unique` INT( 1 ) NOT NULL
- ) ENGINE = MYISAM COMMENT = 'Field type description' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
+ ) ENGINE=MYISAM COMMENT='Field type description' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
$DB->query($query);
}
@@ -152,7 +152,7 @@
`itemtype` VARCHAR( 255 ) NOT NULL ,
`destination_type` INT( 11 ) NOT NULL ,
PRIMARY KEY ( `id` )
- ) ENGINE = MYISAM COMMENT = 'Device type links definitions' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
+ ) ENGINE=MYISAM COMMENT='Device type links definitions' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
$DB->query($query);
}
@@ -214,9 +214,9 @@
//Delete link tables
$link_tables = array ("glpi_infocoms", "glpi_reservationitems", "glpi_documents_items",
- "glpi_contracts_items", "glpi_bookmarks", "glpi_logs");
+ "glpi_contracts_items", "glpi_bookmarks", "glpi_logs");
foreach ($link_tables as $link_table) {
- $query = "DELETE FROM `" . $link_table . "` WHERE `itemtype`='" .
+ $query = "DELETE FROM `" . $link_table . "` WHERE `itemtype`='" .
$value["itemtype"] . "';";
$DB->query($query);
}
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Glpi-dev mailing list [email protected] https://mail.gna.org/listinfo/glpi-dev
