Skip to content

Commit

Permalink
更新协议
Browse files Browse the repository at this point in the history
  • Loading branch information
lhs168 committed Jan 19, 2018
1 parent a32e0e5 commit fbfe749
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lhs168/fasim",
"description": "a fast and simple framework",
"type": "library",
"license": "GPL",
"license": "GPL-3.0-only",
"authors": [
{
"name": "Kevin Lai",
Expand Down
5 changes: 1 addition & 4 deletions src/Fasim/Core/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,9 @@ public function setContentType($contentType) {
* 显示输出
*/
public function display($html) {

$this->output->setContentType($this->contentType, $this->charset);
$this->output->appendOutput($html);
$this->output->display();


}


Expand All @@ -200,7 +197,7 @@ public function display($html) {
*/
public function redirect($nextUrl, $location = true, $data = null) {
if ($nextUrl{0} == '/') $nextUrl = substr($nextUrl, 1);
if (strlen($nextUrl) < 7 || substr($nextUrl, 0, 7) != 'http://') {
if (strlen($nextUrl) < 8 || substr($nextUrl, 0, 7) != 'http://' || substr($nextUrl, 0, 8) != 'https://') {
$nextUrl = $this->config->baseUrl().$nextUrl;
}
if ($location) {
Expand Down
4 changes: 2 additions & 2 deletions src/Fasim/Library/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function pagecute() {
$toPage = $this->page - 1;
$html .= "<a href=\"".str_replace('{page}', $toPage, $this->url)."\" rel=\"nofollow\" title=\"{$tips[1]}\">{$texts[1]}</a>";
} else if ($showExt) {
$html .= "<span title=\"{$tips[1]}\"></span>";
$html .= "<span title=\"{$tips[1]}\">{$texts[1]}</span>";
}
//列页
if ($this->style == self::Popular && $s != 1) {
Expand Down Expand Up @@ -147,7 +147,7 @@ public function pagecute() {
$html = str_replace('</span>', '</span></li>', $html);
$html = str_replace('<strong', '<li class="active"><span', $html);
$html = str_replace('</strong>', '</span></li>', $html);
$html = '<ul>' . $html . '</ul>';
$html = '<ul class="pagination">' . $html . '</ul>';
}

return $html;
Expand Down

0 comments on commit fbfe749

Please sign in to comment.