comment MDL-27024 Fixed up whitespace issues
This commit is contained in:
+12
-12
@@ -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;
|
||||
@@ -187,12 +187,12 @@ class comment {
|
||||
} 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);
|
||||
@@ -311,26 +311,26 @@ EOD;
|
||||
$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;
|
||||
@@ -338,7 +338,7 @@ EOD;
|
||||
|
||||
/**
|
||||
* Initialises the JavaScript that enchances the comment API.
|
||||
*
|
||||
*
|
||||
* @param moodle_page $page The moodle page object that the JavaScript should be
|
||||
* initialised for.
|
||||
*/
|
||||
@@ -369,7 +369,7 @@ EOD;
|
||||
public function output($return = true) {
|
||||
global $PAGE, $OUTPUT;
|
||||
static $template_printed;
|
||||
|
||||
|
||||
$this->initialise_javascript($PAGE);
|
||||
|
||||
if (!empty(self::$nonjs)) {
|
||||
|
||||
Reference in New Issue
Block a user