getDB(); echo '

Install check

'; echo '

The following tables will be created:

'; $tablesdef = simplexml_load_file(dirname(__FILE__).DIRECTORY_SEPARATOR.'tables-'.$VERSION.'.xml'); echo ''; echo 'Install'; break; case 2: $db = MMSystem::getInstance()->getDB(); try { echo '

Install check

'; echo '

The following tables are created:

'; $tablesdef = simplexml_load_file(dirname(__FILE__).DIRECTORY_SEPARATOR.'tables-'.$VERSION.'.xml'); echo ''; $db->table('installinfo')->insert(array('type' => 'module', 'key' => $MOD, 'version' => $VERSION, 'attrib' => 0)); echo 'Go back'; } catch (MFDBSQLException $ex) { echo '

'.$ex->getMessage().'

'; echo '
'.$ex->getQuery().'
'; } break; default: throw new BadFunctionCallException('Invalid step'); } break; case 'upgrade': switch ($STEP) { default: throw new BadFunctionCallException('Invalid step'); } break; case 'validate': switch ($STEP) { case 1: $this->doDefaultValidate(__FILE__, $MOD, $VERSION); break; case 2: $this->doDefaultValidateFixes(__FILE__, $MOD, $VERSION); break; default: throw new BadFunctionCallException('Invalid step'); } break; case 'uninstall': switch ($STEP) { case 1: $db = MMSystem::getInstance()->getDB(); echo '

Uninstall check

'; echo '

The following tables will be removed:

'; $tablesdef = simplexml_load_file(dirname(__FILE__).DIRECTORY_SEPARATOR.'tables-'.$VERSION.'.xml'); echo ''; echo 'Uninstall'; break; case 2: $db = MMSystem::getInstance()->getDB(); echo '

Install check

'; echo '

The following tables are created:

'; $tablesdef = simplexml_load_file(dirname(__FILE__).DIRECTORY_SEPARATOR.'tables-'.$VERSION.'.xml'); echo ''; $db->table('installinfo')->delete(array('type' => 'module', 'key' => $MOD)); echo 'Go back'; break; default: throw new BadFunctionCallException('Invalid step'); } break; }