star7th 9 years ago
parent
commit
34ff611d01

+ 2 - 4
Application/Common/Conf/config.php

@@ -1,12 +1,10 @@
 <?php
 return array(
     //'配置项'=>'配置值'
-    //使用sqlite数据库(ShowDoc默认)
+    //使用sqlite数据库
     'DB_TYPE'   => 'Sqlite', 
     'DB_NAME'   => 'Sqlite/showdoc.db.php', 
-    //使用mysql数据库
-    //'DB_TYPE'   => 'mysql', 
-    //'DB_NAME'   => 'showdoc',
+    //showdoc不再支持mysql http://www.showdoc.cc/help?page_id=31990
     'DB_HOST'   => 'localhost',
     'DB_USER'   => 'showdoc', 
     'DB_PWD'    => 'showdoc123456',

+ 5 - 0
Application/Home/Controller/BaseController.class.php

@@ -10,6 +10,11 @@ class BaseController extends Controller {
 	}
 
 	public function checkLogin($redirect = true){
+    	if (strtolower(C("DB_TYPE")) == 'mysql' ) {
+            echo 'ShowDoc does not support mysql any more . http://www.showdoc.cc/help?page_id=31990 ';
+            clear_runtime();
+            exit();
+    	}
 		if ( ! session("login_user")) {
 			$cookie_token = cookie('cookie_token');
 			if ($cookie_token) {

+ 1 - 1
Application/Home/Controller/UpdateController.class.php

@@ -8,7 +8,7 @@ class UpdateController extends BaseController {
         $this->_clear_runtime();
     	if (strtolower(C("DB_TYPE")) == 'mysql' ) {
     		//$this->mysql();
-            echo 'ShowDoc does not support mysql any more';
+            echo 'ShowDoc does not support mysql any more . http://www.showdoc.cc/help?page_id=31990 ';
     	}
         elseif (strtolower(C("DB_TYPE")) == 'sqlite' ) {
             $this->sqlite();

+ 1 - 1
composer.json

@@ -5,7 +5,7 @@
     "description": "ShowDoc is a tool greatly applicable for an IT team to share documents online",
     "keywords": ["showdoc","documents","Api"],
     "homepage": "https://github.com/star7th/showdoc",
-    "version":"v1.2.2",
+    "version":"v1.2.3",
     "license": "Apache-2.0",
     "authors": [
         {

+ 3 - 5
install/ajax.php

@@ -43,7 +43,7 @@ if ($db_type == "sqlite") {
     user_sqlite();
 }
 elseif ($db_type == "mysql") {
-    //user_mysql();
+    //showdoc不再支持mysql http://www.showdoc.cc/help?page_id=31990
 }
 function user_sqlite(){
         clear_runtime();//清除缓存
@@ -53,12 +53,10 @@ function user_sqlite(){
 <?php
 return array(
     //'配置项'=>'配置值'
-    //使用sqlite数据库(ShowDoc默认)
+    //使用sqlite数据库
     'DB_TYPE'   => 'Sqlite', 
     'DB_NAME'   => 'Sqlite/showdoc.db.php', 
-    //使用mysql数据库
-    //'DB_TYPE'   => 'mysql', 
-    //'DB_NAME'   => 'showdoc',
+    //showdoc不再支持mysql http://www.showdoc.cc/help?page_id=31990
     'DB_HOST'   => 'localhost',
     'DB_USER'   => 'showdoc', 
     'DB_PWD'    => 'showdoc123456',

+ 1 - 1
install/database.php

@@ -189,7 +189,7 @@ if (!$go) {
     install();
     return false;
   });
-
+  //showdoc不再支持mysql,所以不再让用户选择数据库,而是直接跳过去.
   install();
 
  });