summaryrefslogtreecommitdiff
path: root/core/helpers/dashboard.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-14 04:12:02 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-14 04:12:02 +0000
commitf3ba69c1d67c425ffa180d082a373e5cce0c86ce (patch)
tree5ecbbe0ba96a94e3f4aadd26042c8ad1a32ef1bc /core/helpers/dashboard.php
parent02af2d8b7639fdc18fba3d69a4ca0a3f5c92b948 (diff)
Make sure that helper functions are all static. Add new
File_Structure_Test to make sure we don't regress. According to the PHP docs, the "public" keyword is implied on static functions, so remove it. Also, require private static functions to start with an _. http://php.net/manual/en/language.oop5.visibility.php
Diffstat (limited to 'core/helpers/dashboard.php')
-rw-r--r--core/helpers/dashboard.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/helpers/dashboard.php b/core/helpers/dashboard.php
index 1c46b218..8e6f6aaa 100644
--- a/core/helpers/dashboard.php
+++ b/core/helpers/dashboard.php
@@ -18,24 +18,24 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class dashboard_Core {
- public static function get_active() {
+ static function get_active() {
return unserialize(module::get_var("core", "dashboard_blocks", "a:0:{}"));
}
- public static function add_block($location, $module_name, $block_id) {
+ static function add_block($location, $module_name, $block_id) {
$blocks = self::get_active();
$blocks[$location][rand()] = array($module_name, $block_id);
module::set_var("core", "dashboard_blocks", serialize($blocks));
}
- public static function remove_block($location, $block_id) {
+ static function remove_block($location, $block_id) {
$blocks = self::get_active();
unset($blocks[$location][$block_id]);
unset($blocks[$location][$block_id]);
module::set_var("core", "dashboard_blocks", serialize($blocks));
}
- public static function get_available() {
+ static function get_available() {
$blocks = array();
foreach (module::installed() as $module) {
@@ -48,7 +48,7 @@ class dashboard_Core {
return $blocks;
}
- public static function get_blocks($blocks) {
+ static function get_blocks($blocks) {
$result = "";
foreach ($blocks as $id => $desc) {
if (method_exists("$desc[0]_dashboard", "get_block")) {