Major work to domain and hosting
Minor updates for ADSL services Updates to Sort::MAsort() Move core OSB items under application/ Moved ACCOUNT functions under application Minor updates to task
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class is for access system configuration.
|
||||
*
|
||||
* @package OSB
|
||||
* @subpackage Config
|
||||
* @category Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Config extends lnApp_Config {
|
||||
// Our setup object
|
||||
public $so;
|
||||
@@ -28,18 +38,18 @@ class Config extends lnApp_Config {
|
||||
* Our available modules are defined in the DB (along with method
|
||||
* security).
|
||||
*/
|
||||
public static function appmodules() {
|
||||
$modules = array();
|
||||
$module_table = 'module';
|
||||
public static function modules() {
|
||||
static $return = array();
|
||||
|
||||
if (class_exists('Model_'.ucfirst($module_table))) {
|
||||
$mo = ORM::factory($module_table)->where('status','=',1)->find_all()->as_array();
|
||||
if (! count($return))
|
||||
foreach (ORM::factory('module')->where('status','=',1)->find_all() as $mo)
|
||||
$return[$mo->name] = MODPATH.$mo->name;
|
||||
|
||||
foreach ($mo as $o)
|
||||
$modules[$o->name] = MODPATH.$o->name;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
return $modules;
|
||||
public static function moduleexist($module) {
|
||||
return array_key_exists($module,static::modules()) ? TRUE : FALSE;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user