| 1 |
<?php
|
| 2 |
require_once "taxonews.module";
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Installer file for Taxonews module
|
| 6 |
*
|
| 7 |
* @author Frederic G. MARAND
|
| 8 |
* @version CVS: $Id: taxonews.install,v 1.1.2.4 2008/06/07 22:55:20 fgm Exp $
|
| 9 |
* @copyright 2005-2007 Ouest Systèmes Informatiques (OSI)
|
| 10 |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
|
| 11 |
* @link http://drupal.org/project/taxonews
|
| 12 |
* @since Version 1.10.8.2 of taxonews.module
|
| 13 |
*/
|
| 14 |
|
| 15 |
|
| 16 |
/**
|
| 17 |
* Implement hook_uninstall
|
| 18 |
*
|
| 19 |
* By convention, all persistent variables in the main class of a module
|
| 20 |
* are named VAR_something, so we can find them all safely using reflection.
|
| 21 |
*/
|
| 22 |
function taxonews_uninstall()
|
| 23 |
{
|
| 24 |
$class = new ReflectionClass('Taxonews');
|
| 25 |
foreach($class->getConstants() as $varConstantName => $varVariableName)
|
| 26 |
{
|
| 27 |
if (strpos($varConstantName, 'VAR_') === 0)
|
| 28 |
{
|
| 29 |
variable_del($varVariableName);
|
| 30 |
}
|
| 31 |
}
|
| 32 |
}
|