Skip to content

Commit

Permalink
trim content
Browse files Browse the repository at this point in the history
  • Loading branch information
osben committed Feb 28, 2018
1 parent 0c82ece commit 567c7a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions view/IndexView.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function fetch()
if (is_file($this->modules_dir."$module.php")) {
include_once($this->modules_dir."$module.php");
if (class_exists($module)) {
$this->main = new $module($this);
$view = new $module($this);
} else {
return false;
}
Expand All @@ -57,7 +57,7 @@ public function fetch()
}

// Создаем основной блок страницы
if (!$content = $this->main->fetch()) {
if (!$content = $view->fetch()) {
return false;
}

Expand All @@ -74,9 +74,9 @@ public function fetch()
}

if (!empty($wrapper)) {
return $this->body = $this->design->fetch($wrapper);
return $this->design->fetch($wrapper);
} else {
return $this->body = $content;
return trim($content);
}
}
}

0 comments on commit 567c7a0

Please sign in to comment.