Location: PHPKode > projects > ADbNewsSender > ADbNewsSender 2.1.0/protected/maintenance/modules/howto.txt
How to create a maintenance modul
You don't need to licence your whole maintenance module under GPLv3 if you just use the predefined objects in chapter 3.
It is sufficient to licence only the parts of your code under the GPLv3 which uses or includes the  ADBNS2 APIs or code.
NOTE: This exception is only valid if you create a maintenance module for ADbNewsSender 2!

2. Best practices:

Use functions!
This avoids problems with other maintenance modules.
Use the ADBNS2 APIs. All skeleton files are included in maintenance.php.

3. Objects which are provided by maintenance.php:

$MyDB: an ADBNS_DB Object.
$MyCFGro: a global_config_ro object 
$MyCFGrw: a global_config_rw object

If you need objects of other classes you can create them by your self.
(Read the docs at http://adbnewssender.sourceforge.net/docs/ )

An example of a maintenance modul :

//Place here a short description of what your modul does.

function my_modul($MyDB, $MyCFGro) 
	//for example:
	//this makes sure that your modul only works with 2.0.x versions

		//place your code here. 


//function call:

my_modul($MyDB, $MyCFGro);

//Don't forget to register your modul in /protected/maintenance/modules_reg.php.inc!
Return current item: ADbNewsSender