--- /dev/null
+<?php
+// ----------------------------------------------------------------
+// $ Revision: 1.0 $
+// Creator: Maxime Bourge
+// date_: 2013-05-04
+// Title: Order Line Extra
+// Free software under GNU GPL
+// ----------------------------------------------------------------
+define ('SS_ORDERLINEX', 131<<8);
+
+class hooks_orderline_extra extends hooks {
+ var $module_name = 'Order Line Extra';
+
+ /*
+ Install additonal menu options provided by module
+ */
+ function install_tabs($app) {
+ global $path_to_root;
+
+ }
+
+ function install_options($app) {
+ global $path_to_root;
+ }
+
+ function install_access()
+ {
+ $security_sections[SS_ORDERLINEX] = _("Order Line eXtra");
+
+ return array($security_areas, $security_sections);
+ }
+
+ /* This method is called on extension activation for company. */
+ function activate_extension($company, $check_only=true)
+ {
+ global $db_connections;
+
+ $updates = array(
+ 'alter_sales_order_details.sql' => array('0_sales_order_details', )
+ );
+
+ return $this->update_databases($company, $updates, $check_only);
+ }
+
+ function deactivate_extension($company, $check_only=true)
+ {
+ global $db_connections;
+
+ $updates = array(
+ 'clean_sales_order_details.sql' => array('ugly_hack') // FIXME: just an ugly hack to clean database on deactivation
+ );
+
+ return $this->update_databases($company, $updates, $check_only);
+ }
+}
+?>