From fbfe749210994f24f0dcabdf166efdc24c767a04 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 19 Jan 2018 23:42:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 2 +- src/Fasim/Core/Controller.php | 5 +---- src/Fasim/Library/Pager.php | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 64ec3e6..fb0965b 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/Fasim/Core/Controller.php b/src/Fasim/Core/Controller.php index fecc4bb..c81c952 100644 --- a/src/Fasim/Core/Controller.php +++ b/src/Fasim/Core/Controller.php @@ -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(); - - } @@ -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) { diff --git a/src/Fasim/Library/Pager.php b/src/Fasim/Library/Pager.php index 990258a..35ef292 100644 --- a/src/Fasim/Library/Pager.php +++ b/src/Fasim/Library/Pager.php @@ -91,7 +91,7 @@ public function pagecute() { $toPage = $this->page - 1; $html .= "url)."\" rel=\"nofollow\" title=\"{$tips[1]}\">{$texts[1]}"; } else if ($showExt) { - $html .= ""; + $html .= "{$texts[1]}"; } //列页 if ($this->style == self::Popular && $s != 1) { @@ -147,7 +147,7 @@ public function pagecute() { $html = str_replace('', '', $html); $html = str_replace('', '', $html); - $html = '
    ' . $html . '
'; + $html = '
    ' . $html . '
'; } return $html;