Skip to content

Commit

Permalink
comment MDL-27024 Fixed up whitespace issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Apr 11, 2011
1 parent 116a48b commit d664d67
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions comment/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ class comment {
* @var bool
*/
protected $notoggle = false;

/**
* If set to true comments are automatically loaded as soon as the page loads.
* Normally this happens when the user expands the comment section.
* @var bool
*/
protected $autostart = false;

// static variable will be used by non-js comments UI
private static $nonjs = false;
private static $comment_itemid = null;
Expand Down Expand Up @@ -187,12 +187,12 @@ public function __construct($options) {
} else {
$this->ignore_permission = false;
}

// setup notoggle
if (!empty($options->notoggle)) {
$this->set_notoggle($options->notoggle);
}

// setup notoggle
if (!empty($options->autostart)) {
$this->set_autostart($options->autostart);
Expand Down Expand Up @@ -311,34 +311,34 @@ public function get_nojslink(moodle_page $page = null) {
$link->remove_params(array('nonjscomment', 'comment_page'));
return $link;
}

/**
* Sets the value of the notoggle option.
*
*
* If set to true then the user will not be able to expand and collase
* the comment section.
*
* @param bool $newvalue
* @param bool $newvalue
*/
public function set_notoggle($newvalue = true) {
$this->notoggle = (bool)$newvalue;
}

/**
* Sets the value of the autostart option.
*
*
* If set to true then the comments will be loaded during page load.
* Normally this happens only once the user expands the comment section.
*
* @param bool $newvalue
* @param bool $newvalue
*/
public function set_autostart($newvalue = true) {
$this->autostart = (bool)$newvalue;
}

/**
* Initialises the JavaScript that enchances the comment API.
*
*
* @param moodle_page $page The moodle page object that the JavaScript should be
* initialised for.
*/
Expand Down Expand Up @@ -369,7 +369,7 @@ public function initialise_javascript(moodle_page $page) {
public function output($return = true) {
global $PAGE, $OUTPUT;
static $template_printed;

$this->initialise_javascript($PAGE);

if (!empty(self::$nonjs)) {
Expand Down

0 comments on commit d664d67

Please sign in to comment.