1
1
Fork 0

Forum class - rename Class CamelCase and rename some methods

This commit is contained in:
rabuzarus 2016-02-04 14:47:20 +01:00
parent c1070e4655
commit 9a54afa629
5 changed files with 14 additions and 14 deletions

View file

@ -8,7 +8,7 @@
/**
* @brief This class handles functions related to the forum functionality
*/
class forum {
class Forum {
/**
* @brief Function to list all forums a user is connected with
@ -27,7 +27,7 @@ class forum {
* 'id' => number of the key from the array
* 'micro' => contact photo in format micro
*/
public static function get_forumlist($uid, $showhidden = true, $lastitem, $showprivate = false) {
public static function get_list($uid, $showhidden = true, $lastitem, $showprivate = false) {
$forumlist = array();
@ -72,7 +72,7 @@ class forum {
* The contact id which is used to mark a forum as "selected"
* @return string
*/
public static function widget_forumlist($uid,$cid = 0) {
public static function widget($uid,$cid = 0) {
if(! intval(feature_enabled(local_user(),'forumlist_widget')))
return;
@ -82,7 +82,7 @@ class forum {
//sort by last updated item
$lastitem = true;
$contacts = self::get_forumlist($uid,true,$lastitem, true);
$contacts = self::get_list($uid,true,$lastitem, true);
$total = count($contacts);
$visible_forums = 10;
@ -131,7 +131,7 @@ class forum {
* @return string
*
*/
public static function forumlist_profile_advanced($uid) {
public static function profile_advanced($uid) {
$profile = intval(feature_enabled($uid,'forumlist_profile'));
if(! $profile)
@ -145,7 +145,7 @@ class forum {
//don't sort by last updated item
$lastitem = false;
$contacts = self::get_forumlist($uid,false,$lastitem,false);
$contacts = self::get_list($uid,false,$lastitem,false);
$total_shown = 0;

View file

@ -3,7 +3,7 @@
* @file include/identity.php
*/
require_once('include/forum.php');
require_once('include/Forum.php');
require_once('include/bbcode.php');
require_once("mod/proxy.php");
@ -655,7 +655,7 @@ function advanced_profile(&$a) {
//show subcribed forum if it is enabled in the usersettings
if (feature_enabled($uid,'forumlist_profile')) {
$profile['forumlist'] = array( t('Forums:'), forum::forumlist_profile_advanced($uid));
$profile['forumlist'] = array( t('Forums:'), Forum::profile_advanced($uid));
}
if ($a->profile['uid'] == local_user())

View file

@ -114,7 +114,7 @@ function network_init(&$a) {
require_once('include/group.php');
require_once('include/contact_widgets.php');
require_once('include/items.php');
require_once('include/forum.php');
require_once('include/Forum.php');
if(! x($a->page,'aside'))
$a->page['aside'] = '';
@ -148,7 +148,7 @@ function network_init(&$a) {
}
$a->page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network','standard',$group_id) : '');
$a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? forum::widget_forumlist(local_user(),$cid) : '');
$a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? Forum::widget(local_user(),$cid) : '');
$a->page['aside'] .= posted_date_widget($a->get_baseurl() . '/network',local_user(),false);
$a->page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
$a->page['aside'] .= saved_searches($search);

View file

@ -1,7 +1,7 @@
<?php
require_once("include/datetime.php");
require_once('include/bbcode.php');
require_once('include/forum.php');
require_once('include/Forum.php');
require_once('include/group.php');
require_once("mod/proxy.php");
@ -96,7 +96,7 @@ function ping_init(&$a) {
}
if(intval(feature_enabled(local_user(),'forumlist_widget'))) {
$forums_unseen = forum::count_unseen_items();
$forums_unseen = Forum::count_unseen_items();
}
}

View file

@ -220,7 +220,7 @@ function vier_community_info() {
//Community_Pages at right_aside
if($show_pages AND local_user()) {
require_once('include/forum.php');
require_once('include/Forum.php');
if(x($_GET['cid']) && intval($_GET['cid']) != 0)
$cid = $_GET['cid'];
@ -228,7 +228,7 @@ function vier_community_info() {
//sort by last updated item
$lastitem = true;
$contacts = forum::get_forumlist($a->user['uid'],true,$lastitem, true);
$contacts = Forum::get_list($a->user['uid'],true,$lastitem, true);
$total = count($contacts);
$visible_forums = 10;