Last active
August 29, 2015 13:58
-
-
Save kbjohnson90/10315416 to your computer and use it in GitHub Desktop.
FUEL CMS Forum: (1704) Helper Function Redeclaration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get Modules | |
* | |
* Returns a list of Modules from the 'modules_allowed' configuration | |
* | |
* @access public | |
* @return array modules | |
*/ | |
function event_helper_get_modules() { | |
if ( !function_exists('get_modules') ) { | |
function get_modules() { | |
$CI =& get_instance(); | |
static $modules; | |
if (is_null($modules)) { | |
$modules[] = 'app'; | |
$modules = array_merge($modules, $CI->fuel->config('modules_allowed')); | |
} | |
return array_combine($modules, $modules); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment