Skip to content

Commit

Permalink
Add nl2br to version changelog [close #11]
Browse files Browse the repository at this point in the history
  • Loading branch information
Septdir committed Dec 28, 2018
1 parent 3ace11f commit 7dd80c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions com_swjprojects/site/models/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ public function getItem($pk = null)
// Set changelog
$registry = new Registry($data->changelog);
$data->changelog = $registry->toArray();
foreach ($data->changelog as &$changelog)
{
$changelog['description'] = nl2br($changelog['description']);
}

// Set project
$data->project = new stdClass();
Expand Down
4 changes: 4 additions & 0 deletions com_swjprojects/site/models/versions.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ public function getItems()
// Set changelog
$registry = new Registry($item->changelog);
$item->changelog = $registry->toArray();
foreach ($item->changelog as &$changelog)
{
$changelog['description'] = nl2br($changelog['description']);
}

// Set project
$item->project = new stdClass();
Expand Down

0 comments on commit 7dd80c0

Please sign in to comment.