]> git.mjollnir.org Git - moodle.git/commitdiff
more cleaning
authortoyomoyo <toyomoyo>
Thu, 16 Mar 2006 03:42:56 +0000 (03:42 +0000)
committertoyomoyo <toyomoyo>
Thu, 16 Mar 2006 03:42:56 +0000 (03:42 +0000)
blog/class.BlogEntry.php
blog/header.php

index 59330a23adfb559063d696160dc89a7098070b45..aced56596ddf028bfd1222bf0e9ee36ea09ed9e5 100755 (executable)
@@ -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 .'&amp;postid='. $this->entryId;
-    }
-
 
     /**
      * BlogEntry setters do not save to the database.
index aab76ac9e8a13f9b1ed258c7d4f3935c64483652..45e8fc2d610bbef188d57d4d243f2c78eb1c5daf 100755 (executable)
@@ -1,7 +1,5 @@
 <?php //$Id$
 
-global $CFG, $USER;
-
 require_once($CFG->dirroot .'/blog/lib.php');
 require_once($CFG->libdir .'/pagelib.php');
 require_once($CFG->dirroot .'/blog/blogpage.php');