variable initialisation

This commit is contained in:
Petr Skoda
2010-09-18 12:56:54 +00:00
parent 11cd754ed0
commit 46d39cf3bc
2 changed files with 7 additions and 5 deletions
+2
View File
@@ -4995,6 +4995,8 @@ function forum_print_latest_discussions($course, $forum, $maxdiscussions=-1, $di
$currentgroup = groups_get_activity_group($cm);
}
$groups = array(); //cache
// If the user can post discussions, then this is a good place to put the
// button for it. We do not show the button if we are showing site news
// and the current user is a guest.
+5 -5
View File
@@ -193,7 +193,7 @@ function forum_rss_feed_discussions_sql($forum, $cm, $newsince=0) {
function forum_rss_feed_posts_sql($forum, $cm, $newsince=0) {
$modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
//get group enforcement SQL
$groupmode = groups_get_activity_groupmode($cm);
$currentgroup = groups_get_activity_group($cm);
@@ -258,7 +258,7 @@ function forum_rss_get_group_sql($cm, $groupmode, $currentgroup, $modcontext=nul
}
/**
* This function return the XML rss contents about the forum
@@ -285,8 +285,8 @@ function forum_rss_feed_contents($forum, $sql) {
$formatoptions = new object;
$items = array();
foreach ($recs as $rec) {
unset($item);
unset($user);
$item = new object();
$user = new object();
$item->title = format_string($rec->discussionname);
$user->firstname = $rec->userfirstname;
$user->lastname = $rec->userlastname;
@@ -310,7 +310,7 @@ function forum_rss_feed_contents($forum, $sql) {
$item->attachments = array();
}
}*/
$items[] = $item;
}
$recs->close();