From c0778901fd811f20efe72c46beb4870de48de1a9 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Thu, 16 Mar 2006 03:42:56 +0000 Subject: [PATCH] more cleaning --- blog/class.BlogEntry.php | 59 ---------------------------------------- blog/header.php | 2 -- 2 files changed, 61 deletions(-) diff --git a/blog/class.BlogEntry.php b/blog/class.BlogEntry.php index 59330a23ad..aced56596d 100755 --- a/blog/class.BlogEntry.php +++ b/blog/class.BlogEntry.php @@ -10,7 +10,6 @@ * @package blog ******************************************************************/ -global $CFG; include_once($CFG->dirroot .'/blog/lib.php'); /** @@ -30,7 +29,6 @@ include_once($CFG->dirroot .'/blog/lib.php'); make sure that both the ->save and ->update function operate properly on an entry that does not yet exist! this way one could: $newEntry = new BlogEntry(); - $newEntry->set_title('a title'); $newEntry->set_body('a post here'); $newEntry->set_userid(2); $newEntry->save(); @@ -181,43 +179,6 @@ class BlogEntry { return $this->entryBody; } - /** - * get_formatted_entry_extended_body - * getter for ->entryExtendedBody - * - * @uses $CFG - * @return string Entry extended body/content run through moodle's format_text formatter and - * with slashes stripped from database entry - */ - function get_formatted_entry_extended_body() { - global $CFG; - include_once($CFG->libdir .'/weblib.php'); - if ( isset($this->entryFormat) ) { - return format_text($this->entryExtendedBody, $this->entryFormat); - } - return stripslashes_safe($this->entryExtendedBody); - } - - /** - * get_unformatted_entry_extended_body - * getter for ->entryExtendedBody - * - * @return string Entry extended body/content - raw string from database - */ - function get_unformatted_entry_extended_body() { - return $this->entryExtendedBody; - } - - /** - * BlogEntry setters do not save to the database. - * To save changes call the BlogEntry->save() function when ready. - * - * @param string $title New entry subject - */ - function set_title($title) { - $this->entryTitle = $title; - } - /** * BlogEntry setters do not save to the database. * To save changes call the BlogEntry->save() function when ready. @@ -228,16 +189,6 @@ class BlogEntry { $this->entryBody = $body; } - /** - * BlogEntry setters do not save to the database. - * To save changes call the BlogEntry->save() function when ready. - * - * @param string $extendedbody New entry content - */ - function set_extendedbody($extendedbody) { - $this->entryExtendedBody = $extendedbody; - } - /** * BlogEntry setters do not save to the database. * To save changes call the BlogEntry->save() function when ready. @@ -247,16 +198,6 @@ class BlogEntry { function set_format($format) { $this->entryFormat = $format; } - - /** - * - * @return string - */ - function get_entryurl() { - global $CFG; - return $CFG->wwwroot .'/blog/archive.php?userid='. $this->entryuserid .'&postid='. $this->entryId; - } - /** * BlogEntry setters do not save to the database. diff --git a/blog/header.php b/blog/header.php index aab76ac9e8..45e8fc2d61 100755 --- a/blog/header.php +++ b/blog/header.php @@ -1,7 +1,5 @@ dirroot .'/blog/lib.php'); require_once($CFG->libdir .'/pagelib.php'); require_once($CFG->dirroot .'/blog/blogpage.php'); -- 2.39.5