From 20fc0f26552bb08f8697aecb58d2ec6f0935526d Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Wed, 15 Mar 2006 08:49:33 +0000 Subject: [PATCH] took out courseid and groupid --- blog/class.BlogEntry.php | 19 +------------------ blog/edit.php | 2 -- blog/lib.php | 9 +-------- 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/blog/class.BlogEntry.php b/blog/class.BlogEntry.php index 7eafa51a55..59330a23ad 100755 --- a/blog/class.BlogEntry.php +++ b/blog/class.BlogEntry.php @@ -39,13 +39,9 @@ class BlogEntry { // member variables var $entryId; // post.id var $entryBody; // post.summary - var $entryExtendedBody; // post.content var $entryTitle; // post.subject - var $entryKarma; // post.rating var $entryFormat; // post.format var $entryuserid; // post.author - var $entryGroupId; // post.groupid - var $entryCourseId; // post.courseid var $entryPublishState; // post.publishstate var $entryAuthorName; // blog_users.name var $entryAuthorEmail; // blog_users.email @@ -100,11 +96,6 @@ class BlogEntry { // print_object($this->entryCategoryIds); //debug $this->entryBody = ereg_replace('', "'", stripslashes_safe($entrydetails->summary)); - if (isset($entrydetails->extendedbody)) { - $this->entryExtendedBody = ereg_replace('', "'", stripslashes_safe($entrydetails->extendedbody)); - } else { - $this->entryExtendedBody = ''; - } $strftimedaydatetime = get_string('strftimedaydatetime'); $this->entryLastModified = $entrydetails->lastmodified; @@ -122,14 +113,6 @@ class BlogEntry { $this->entryFormat = $entrydetails->format; - //Daryl Hawes additions: course and group ids - if (isset($entrydetails->groupid) ) { - $this->entryGroupId = $entrydetails->groupid; - } - if (isset($entrydetails->courseid) ) { - $this->entryCourseId = $entrydetails->courseid; - } - if (isset($entrydetails->publishstate) ) { $this->entryPublishState = $entrydetails->publishstate; } else { @@ -377,7 +360,7 @@ class BlogEntry { $menu = ''; if ($this->user_can_change_publish_state() && blog_isediting() ) { $menu .= '
'. get_string('publishto', 'blog').': '; - $options = blog_applicable_publish_states($this->entryCourseId); + $options = blog_applicable_publish_states(); $menu .= choose_from_menu($options, $this->entryuserid .'-'. $this->entryId, $this->entryPublishState, '', '', '0', true); $menu .= "\n".'
'."\n"; if ($includehelp) { diff --git a/blog/edit.php b/blog/edit.php index 2e0c6c805f..56f9173a01 100755 --- a/blog/edit.php +++ b/blog/edit.php @@ -139,8 +139,6 @@ if ($editid != '') { // User is editing a post $post->categoryid = $blogEntry->entryCategoryIds; $post->format = $blogEntry->entryFormat; $post->publishstate = $blogEntry->entryPublishState; - $post->courseid = $blogEntry->entryCourseId; - $post->groupid = (int)$blogEntry->entryGroupId; } if (isset($post->postid) && ($post->postid != -1) ) { diff --git a/blog/lib.php b/blog/lib.php index 2f3ac46664..c39a5e83f8 100755 --- a/blog/lib.php +++ b/blog/lib.php @@ -384,13 +384,11 @@ function blog_print_entry(&$blogEntry, $viewtype='full', $filtertype='', $filter $template['title'] .= ''; // add editing controls if allowed - $template['courseid'] = $blogEntry->entryCourseId; $template['userid'] = $blogEntry->entryuserid; $template['author'] = $blogEntry->entryAuthorName; $template['lastmod'] = $blogEntry->formattedEntryLastModified; $template['created'] = $blogEntry->formattedEntryCreated; $template['publishtomenu'] = $blogEntry->get_publish_to_menu(true, true); - $template['groupid'] = $blogEntry->entryGroupId; //forum style printing of blogs blog_print_entry_content ($template, $blogEntry->entryId, $filtertype, $filterselect); @@ -408,7 +406,7 @@ function blog_print_entry_content ($template, $entryid, $filtertype='', $filters echo '
'; echo ''; echo ''; echo '
'; - print_user_picture($template['userid'], $template['courseid'], $user->picture); + print_user_picture($template['userid'], SITEID, $user->picture); echo '
'.$template['title'].'
'; @@ -420,11 +418,6 @@ function blog_print_entry_content ($template, $entryid, $filtertype='', $filters echo '
'; - if ($group = get_record('groups','id',$template['groupid'])) { - print_group_picture($group, $course->id, false, false, true); - } else { - echo ' '; - } /// Actual content -- 2.39.5