Skip to content

Commit

Permalink
more cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
toyomoyo committed Mar 16, 2006
1 parent 2ea3451 commit c077890
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 61 deletions.
59 changes: 0 additions & 59 deletions blog/class.BlogEntry.php
Expand Up @@ -10,7 +10,6 @@
* @package blog
******************************************************************/

global $CFG;
include_once($CFG->dirroot .'/blog/lib.php');

/**
Expand All @@ -30,7 +29,6 @@
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();
Expand Down Expand Up @@ -181,43 +179,6 @@ function get_unformatted_entry_body() {
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.
Expand All @@ -228,16 +189,6 @@ function set_body($body) {
$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.
Expand All @@ -247,16 +198,6 @@ function set_extendedbody($extendedbody) {
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.
Expand Down
2 changes: 0 additions & 2 deletions blog/header.php
@@ -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');
Expand Down

0 comments on commit c077890

Please sign in to comment.