diff --git a/blog/blogpage.php b/blog/blogpage.php
index c52f6bb7286..cb08d9e8f02 100644
--- a/blog/blogpage.php
+++ b/blog/blogpage.php
@@ -142,7 +142,7 @@ class page_blog extends page_base {
$blocknames = $CFG->{'defaultblocks_'. $this->get_type()};
} else {
/// Failsafe - in case nothing was defined.
- $blocknames = 'admin,calendar_month,blog_member_list:login,online_users,blog_menu,blog_categories,blog_recent_entries,blog_news_feeds';
+ $blocknames = 'admin,calendar_month,online_users,blog_menu';
}
return $blocknames;
@@ -176,4 +176,4 @@ class page_blog extends page_base {
return $editformstring;
}
}
-?>
\ No newline at end of file
+?>
diff --git a/blog/class.BlogFilter.php b/blog/class.BlogFilter.php
index cce776228bf..2dfff0b4cef 100755
--- a/blog/class.BlogFilter.php
+++ b/blog/class.BlogFilter.php
@@ -51,7 +51,7 @@ class BlogFilter {
* @param int $courseid = if needed the entries can be restricted to those associated with a given course.
* @param int $postid = a specific blog entry that is being sought
*/
- function BlogFilter($userid='', $postid='', $fetchlimit='', $fetchstart='', $filtertype='', $filterselect='', $tagid='', $tag ='', $sort='lastmodified DESC') {
+ function BlogFilter($userid='', $postid='', $fetchlimit=10, $fetchstart='', $filtertype='', $filterselect='', $tagid='', $tag ='', $sort='lastmodified DESC') {
global $CFG; //filter settings to be pass in for baseurl
@@ -73,12 +73,8 @@ class BlogFilter {
} else {
$this->fetchstart = $fetchstart;
}
-
- if (!is_numeric($fetchlimit) ) {
- $this->fetchlimit = $CFG->blog_default_fetch_num_entries;
- } else {
- $this->fetchlimit = $fetchlimit;
- }
+
+ $this->fetchlimit = $fetchlimit;
$this->postid = $postid;
diff --git a/blog/class.BlogInfo.php b/blog/class.BlogInfo.php
index 54c3ba2cd28..6083ef501cf 100755
--- a/blog/class.BlogInfo.php
+++ b/blog/class.BlogInfo.php
@@ -81,13 +81,7 @@ class BlogInfo {
$this->blogEntries = array();
$this->userid = $userid;
- $this->blogtitle = stripslashes_safe(get_user_preferences('blogtitle', $CFG->blog_default_title, $userid));
- $this->blogtagline = stripslashes_safe(get_user_preferences('blogtagline', '', $userid));
- $this->bloguseextendedbody = get_user_preferences('bloguseextendedbody', false, $userid);
- $this->blogtheme = get_user_preferences('blogtheme', 0, $userid); //Daryl Hawes note: investigate blogtheme usage again
-/* if ($this->userid == 0) {
- $this->userid = 1;
- }*/
+
}
////////// getters and setters ///////////////
diff --git a/blog/lib.php b/blog/lib.php
index c39a5e83f8a..cdbbb3a5ed9 100755
--- a/blog/lib.php
+++ b/blog/lib.php
@@ -33,45 +33,6 @@ $BLOG_YES_NO_MODES = array ( '0' => get_string('no'),
if (empty($SESSION->blog_editing_enabled)) {
$SESSION->blog_editing_enabled = false;
}
-if (!(isset($CFG->blog_enable_trackback_in) )) {
- $CFG->blog_enable_trackback_in = 0; //default is 0 == do not allow for site
-}
-if (!(isset($CFG->blog_enable_moderation) )) {
- $CFG->blog_enable_moderation = 0; //default is 0 == do not enable blog moderation on this site
-}
-if (!(isset($CFG->blog_enable_pingback_in) )) {
- $CFG->blog_enable_pingback_in = 0; //default is 0 == do not allow for site
-}
-if (!(isset($CFG->blog_enable_trackback_out) )) {
- $CFG->blog_enable_trackback_out = 0; //default is 0 == do not allow for site
-}
-if (!(isset($CFG->blog_enable_pingback_out) )) {
- $CFG->blog_enable_pingback_out = 0; //default is 0 == do not allow for site
-}
-if (!(isset($CFG->blog_enable_moderation) )) {
- $CFG->blog_enable_moderation = 0; //default is 0 == do not turn on moderation for site
-}
-if (!(isset($CFG->blog_useweblog_rpc) )) {
- $CFG->blog_useweblog_rpc = 0;//default is 0 == do not publish to weblogs.com
-}
-if (empty($CFG->blog_ratename) ) {
- $CFG->blog_ratename = 'Rating'; //default name for entry ratings
-}
-if (empty($CFG->blog_default_title) ) {
- $CFG->blog_default_title = 'Moodle Blog'; //default blog title
-}
-if (empty($CFG->blog_blogurl) ) {
- $CFG->blog_blogurl = $CFG->wwwroot.'/blog/index.php';
-}
-if (!(isset($CFG->blog_enable_trackback) )) {
- $CFG->blog_enable_trackback = 0;
-}
-if (!(isset($CFG->blog_enable_pingback) )) {
- $CFG->blog_enable_pingback = 0;
-}
-if (empty($CFG->blog_default_fetch_num_entries) ) {
- $CFG->blog_default_fetch_num_entries = 8;
-}
/**
* Verify that a user is logged in based on the session
@@ -176,83 +137,6 @@ function blog_user_bloginfo($userid='') {
return $thisbloginfo;
}
-/**
- * build and return list of all member blogs
- *
- * @param stdObject $memberrecords An object of record entries as output from the get_member_list() function in BlogFilter (->id, ->title are the required variables).
- * @param int $format - 0, 1 or 2; 0 = hyperlinked list of members, 1 = select element, 2 = select element wrapped in entire form
- * @param bool $return indicates whether the function should return the text
- * as a string or echo it directly to the page being rendered
- * @param BlogFilter $blogFilter - a BlogFilter object with the details of the members listed in $memberrecords.
- * @param string $hyperlink This is the target link to be used - there is a sensible default for each format.
- */
-function blog_member_list(&$blogFilter, &$memberrecords, $format=1, $return=true, $hyperlink='') {
- global $CFG, $USER;
-
-//echo "userid = $blogFilter->userid"; //debug
-//print_object($memberrecords); //debug
- $returnstring = '';
- if (!empty($memberrecords)) {
- switch($format) {
- case '0':
- foreach($memberrecords as $record) {
- if (empty($hyperlink)) {
- $CFG->wwwroot .'/blog/index.php?userid='. $record->id;
- }
- $returnstring .= ''. stripslashes_safe($record->title) .'
';
- }
- break;
- case '2':
- $selected = '';
- $options = array('' => 'All Member Blogs');
- $formlink = $hyperlink; //TESTING
- if (empty($hyperlink)) {
- $getvars = $blogFilter->get_getvars('userid');
- $self = basename($_SERVER['PHP_SELF']);
- $formlink = $self . $getvars .'&userid=';
- }
- foreach($memberrecords as $record) {
- $id = $record->id;
- if (blog_isLoggedIn() && $id == $USER->id ) {
- $optiontitle = 'My Blog';
- } else {
- $optiontitle = stripslashes_safe($record->title);
- }
- $options[$id] = $optiontitle; //TESTING
- if ( ($blogFilter->userid == $record->id) && ($blogFilter->userid != 0) ) {
- $selected = $id;
- }
- }
-
- //attach a random number to the popup function's form name
- //becuase there may be multiple instances of this form on each page
- $returnstring = popup_form($formlink,
- $options, 'blog_member_list'. mt_rand(), $selected, '', '', '', true);
- $returnstring = str_replace('