Selaa lähdekoodia

fix some bugs

star7th 8 vuotta sitten
vanhempi
commit
5a6153476d

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

@@ -0,0 +1,4 @@
+<?php
+//showdoc not install 
+//
+//

+ 2 - 3
Application/Home/Controller/IndexController.class.php

@@ -3,12 +3,11 @@ namespace Home\Controller;
 use Think\Controller;
 class IndexController extends BaseController {
     public function index(){
-
-        if(!file_exists('./Application/Common/Conf/config.php')){
+        $tmp = @file_get_contents('./Application/Common/Conf/config.php');
+        if (strstr($tmp, "showdoc not install")) {
             header("location:./install");
             exit();
         }
-
     	$this->checkLogin(false);
     	$login_user = session("login_user");
     	$this->assign("login_user" ,$login_user);

+ 1 - 2
Application/Home/Controller/UserController.class.php

@@ -50,8 +50,7 @@ class UserController extends BaseController {
 			if ($cookie_token) {
 				$ret = D("UserToken")->getToken($cookie_token);
 				if ($ret && $ret['token_expire'] > time() ) {
-					$login_user = D("User")->where("uid = $ret[uid]")->find();
-					unset($ret['password']);
+					$login_user = D("User")->where(['uid' => $ret['uid']])->field('password', true)->find();
 					session("login_user" , $login_user);
 					$this->message(L('auto_login_succeeded'),U('Home/Item/index'));
 					exit();

+ 3 - 3
Application/Home/View/Item/show_regular.html

@@ -1,5 +1,5 @@
 <include file="Common/header" />
-<link rel="stylesheet" href="__PUBLIC__/css/item/show.css?1.1d.1thdddefgh" />
+<link rel="stylesheet" href="__PUBLIC__/css/item/show.css?1.1d.1thdddefghi" />
 
 <div class="doc-head row" >
   <div class="left "><h2>{$item.item_name}</h2></div>
@@ -13,7 +13,7 @@
               {$Think.Lang.item}
               <span class="caret"></span>
             </a>
-          <ul class="dropdown-menu">
+          <ul class="dropdown-menu left-dropdown-menu">
           <!-- dropdown menu links -->
             <li><a href="#" id="share">{$Think.Lang.share}</a></li>
              <li><a href="{:U('Home/Item/word',array('item_id'=>$item['item_id']))}">{$Think.Lang.export}</a></li>
@@ -119,7 +119,7 @@
                   <a class="btn btn-link dropdown-toggle" data-toggle="dropdown" href="#">
                     更多              <span class="caret"></span>
                   </a>
-                <ul class="dropdown-menu">
+                <ul class="dropdown-menu left-dropdown-menu">
                 <!-- dropdown menu links -->
                   <li><a href="" id="copy-link" title="{$Think.Lang.copy_interface_to_new}">{$Think.Lang.copy}</a></li>
 

+ 5 - 0
Public/css/item/show.css

@@ -151,4 +151,9 @@
   text-overflow:ellipsis; 
   -o-text-overflow:ellipsis; 
   overflow:hidden
+}
+
+.left-dropdown-menu{
+  left: auto;
+   right: 0;
 }

+ 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.3.0",
+    "version":"v1.3.1",
     "license": "Apache-2.0",
     "authors": [
         {