diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php
index 68c01359721..222a104d0cd 100644
--- a/blocks/admin_tree/block_admin_tree.php
+++ b/blocks/admin_tree/block_admin_tree.php
@@ -34,9 +34,9 @@ class block_admin_tree extends block_base {
$strfolderopened = s(get_string('folderopened'));
for ($i = 0; $i < $this->currentdepth; $i++) {
- $this->tempcontent .= " ";
+ $this->tempcontent .= " ";
}
- $this->tempcontent .= '';
+ $this->tempcontent .= '';
$this->tempcontent .= '
';
$this->tempcontent .= $visiblename . '
' . "\n";
$this->currentdepth++;
@@ -51,7 +51,7 @@ class block_admin_tree extends block_base {
function create_item($visiblename,$link,$icon,$class) {
global $CFG;
for ($i = 0; $i < $this->currentdepth; $i++) {
- $this->tempcontent .= " ";
+ $this->tempcontent .= " ";
}
$this->tempcontent .= '
'.
$visiblename.'
'."\n";
@@ -168,7 +168,7 @@ class block_admin_tree extends block_base {
$this->content->text .= '}' . "\n";
$this->content->text .= 'function collapseall() {' . "\n";
- $this->content->text .= ' for (i = vh_numspans; i > 0; i=i-1 ) {' . "\n";
+ $this->content->text .= ' for (i = vh_numspans; i > 0; i--) {' . "\n";
$this->content->text .= ' collapse("vh_span" + String(i));' . "\n";
$this->content->text .= ' }' . "\n";
$this->content->text .= '}' . "\n";