diff --git a/src/models/Package.php b/src/models/Package.php index 5807fbe..048d6e2 100644 --- a/src/models/Package.php +++ b/src/models/Package.php @@ -328,6 +328,7 @@ class Package extends ActiveRecord if ($text) { $this->readme = Git::getFile($this->url, $file); if ($this->readme) { + $this->readme_format = 'text'; break; } } @@ -462,7 +463,7 @@ class Package extends ActiveRecord } if ($this->readme_format == 'text') { $readme = preg_replace('@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', '$1', $this->readme); - return '
' . $readme . ''; + return '
' . $readme . ''; } } return ''; diff --git a/src/views/mod/view.php b/src/views/mod/view.php index 1f39844..113a9f5 100644 --- a/src/views/mod/view.php +++ b/src/views/mod/view.php @@ -19,12 +19,13 @@ $this->params['breadcrumbs'][] = $this->title; = $model->getReadmeHtml() ?> readme) { + echo '
README.md
or README.txt
file. If you are the owner please consider adding one to the repository.',
]);
}
?>
@@ -78,7 +79,7 @@ $this->params['breadcrumbs'][] = $this->title;
'class' => 'alert-info',
],
'closeButton' => false,
- 'body' => 'This mod has no valid bower.json file. If you are the owner please consider adding one to the repository, then click Update.',
+ 'body' => 'This mod has no valid bower.json
file. If you are the owner please consider adding one to the repository, then click Update.',
]); ?>