diff options
author | Graham Eames <grahamje@users.sourceforge.net> | 2005-11-17 21:54:11 +0000 |
---|---|---|
committer | Graham Eames <grahamje@users.sourceforge.net> | 2005-11-17 21:54:11 +0000 |
commit | d6b2182c7e4111ab5110a5d5b6ed4daad7c05249 (patch) | |
tree | 6d781782c99b6769826038a0ebb37df20515be66 /phpBB/includes/functions_module.php | |
parent | 5e606fc6b54b9d653692769838e7f6274af90b9b (diff) | |
download | forums-d6b2182c7e4111ab5110a5d5b6ed4daad7c05249.tar forums-d6b2182c7e4111ab5110a5d5b6ed4daad7c05249.tar.gz forums-d6b2182c7e4111ab5110a5d5b6ed4daad7c05249.tar.bz2 forums-d6b2182c7e4111ab5110a5d5b6ed4daad7c05249.tar.xz forums-d6b2182c7e4111ab5110a5d5b6ed4daad7c05249.zip |
In keeping with tradition I remove yet more code....
(abstraction of functionality used by the mcp to allow it to be used
elsewhere)
git-svn-id: file:///svn/phpbb/trunk@5305 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_module.php')
-rw-r--r-- | phpBB/includes/functions_module.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index e4236cc259..ae71d677fe 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -145,6 +145,8 @@ class p_master $right = $row['right_id']; + $url_func = $row['module_name'] . '_' . $row['module_mode'] . '_url'; + $this->module_ary[$i] = array( 'depth' => $depth, @@ -155,6 +157,8 @@ class p_master 'name' => (string) $row['module_name'], 'mode' => (string) $row['module_mode'], 'display' => (int) $row['module_display'], + + 'url_extra' => (function_exists($url_func)) ? $url_func() : '', 'lang' => (function_exists($row['module_name'])) ? $row['module_name']($row['module_mode'], $row['module_langname']) : ((!empty($user->lang[$row['module_langname']])) ? $user->lang[$row['module_langname']] : $row['module_langname']), 'langname' => $row['module_langname'], @@ -374,6 +378,21 @@ class p_master page_footer(); } + + /** + * Toggle whether this module will be displayed or not + */ + function set_display($id, $display = true) + { + foreach ($this->module_ary as $row_id => $itep_ary) + { + if ($itep_ary['mode'] === $id || $itep_ary['id'] === (int) $id) + { + $this->module_ary[$row_id]['display'] = (int) $display; + break; + } + } + } } ?>
\ No newline at end of file |