This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/application/classes/config.php
2012-01-12 19:53:53 +11:00

25 lines
572 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
class Config extends lnApp_Config {
/**
* Find a list of all database enabled modules
*
* Our available modules are defined in the DB (along with method
* security).
*/
public static function appmodules() {
$modules = array();
$module_table = 'module';
if (class_exists('Model_'.ucfirst($module_table))) {
$mo = ORM::factory($module_table)->where('status','=',1)->find_all()->as_array();
foreach ($mo as $o)
$modules[$o->name] = MODPATH.$o->name;
}
return $modules;
}
}
?>