This is an old revision of the document!


Functions declared in Module Manager module and what they do .

Functions used :

1) main.inc
function shn_mm_mainmenu()
Contains the Main menu entries for Module Manager

function shn_mm_default()

Home page content of Module Manager is placed here

function shn_mm_change_conf($module)
This method is used to change values of conf.inc variables

2) conf.inc

Contains the configuration variables

3) inst.inc

function shn_mm_module_mgr()
Displays content for install/uninstall

function shn_mm_install()

Contains the core code for installing a module

4) unist.inc

function shn_mm_uninstall()
Contains the core code for uninstalling a module

5) app_store.inc

function shn_mm_app_store()
Shows the home page of the App store (content yet to be added)

6) conf_inc.inc

contains list of all the files that have to be included

7) home.inc

Contains content of the home page of the Module Manager >8) inc_func.inc » function recursiveDelete($str) »> Deletes a folder and all its subfolders » function list_dir($dir_handle,$path) »> Displays a folder and all its subfolders >9) upgrade.inc » function shn_mm_upgrade() »> Displays a list of modules for which upgrade versions are available » function shn_mm_up($module) »> Contains the core function code for upgrading a module » function shn_mm_up2() »> This function is used to iterate over a set of modules to be Upgraded (Note : This function only iterates over a array of module names passed but uses the shn_mm_up function to perform the upgrade ) » function shn_mm_download($category,$file,$extension) »> This function contains code to download a file from the App store and parameters to be passed are category of the module(mod) , module name and extension (.inc or .zip) » function shn_mm_verify_upgrade($module) »> This function contains code to check if a particular module has a upgrade version on the App store » function shn_mm_unzipit($module) »> Unzip a downloaded module package folder into the mod folder and also executes the corresponding sql files » function ver($file) »> A temporary function to return the version number of a file (eg: v2.4.sql will be returned as 2.4) » function compare_version($upgrade,$current) »> This contains code to check if upgrade version value is greater than current eg : compare_version(2.5.4.2.1,2.4.3.6) will return a true » function shn_check_dependancy($module) »> No code yet » function shn_mm_conf_value($module,$value) »> returns value of the required column from mm_conf table in database » function shn_mm_get_dependancy($module) >10) update.inc » function shn_mm_update() »> Displays the entire list of installed modules and gives an option to Enable/Disable the module >11) dp.inc » function shn_mm_dp() »> Handles the form submit after module upgrade is selected . Also displays the needed action on dependencies like need to upgrade » function shn_mm_update_step2() »> Iterates over the array of modules selected in the Update list (enable/disable) » function shn_mm_module_upgrade_check($modules) »> Code yet to be written » function shn_mm_verify_package($module) »> Code yet to be written . This function will contain code to verify if the downloaded module.zip package is downloaded correctly in terms of file structure and files This is the file structure of Module Manager