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
Expand Up @@ -86,14 +86,14 @@ class comment {
* @var bool * @var bool
*/ */
protected $notoggle = false; protected $notoggle = false;

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

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

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

// setup notoggle // setup notoggle
if (!empty($options->autostart)) { if (!empty($options->autostart)) {
$this->set_autostart($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')); $link->remove_params(array('nonjscomment', 'comment_page'));
return $link; return $link;
} }

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

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


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

$this->initialise_javascript($PAGE); $this->initialise_javascript($PAGE);


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

0 comments on commit d664d67

Please sign in to comment.