summaryrefslogtreecommitdiff
path: root/modules/info
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 /modules/info
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 'modules/info')
-rw-r--r--modules/info/helpers/info_block.php4
-rw-r--r--modules/info/helpers/info_installer.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php
index 46e2bd72..3bc51c73 100644
--- a/modules/info/helpers/info_block.php
+++ b/modules/info/helpers/info_block.php
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class info_block_Core {
- public static function sidebar_blocks($theme) {
+ static function sidebar_blocks($theme) {
if ($theme->item()) {
$block = new Block();
$block->css_id = "gMetadata";
@@ -28,7 +28,7 @@ class info_block_Core {
}
}
- public static function thumb_info($theme, $item) {
+ static function thumb_info($theme, $item) {
$results = "";
if ($item->view_count) {
$results .= "<li>";
diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php
index 747fc639..1c6cef95 100644
--- a/modules/info/helpers/info_installer.php
+++ b/modules/info/helpers/info_installer.php
@@ -18,14 +18,14 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class info_installer {
- public static function install() {
+ static function install() {
$version = module::get_version("info");
if ($version == 0) {
module::set_version("info", 1);
}
}
- public static function uninstall() {
+ static function uninstall() {
module::delete("info");
}
}