dever 7 éve
szülő
commit
926a8f806e
3 módosított fájl, 11 hozzáadás és 3 törlés
  1. 1 1
      assets/moltran/html/list.html
  2. 7 2
      src/Auth.php
  3. 3 0
      src/Top.php

+ 1 - 1
assets/moltran/html/list.html

@@ -71,7 +71,7 @@
                                     <span>project</span>
                                 </a>
 
-                              <ul class="dropdown-menu">
+                              <ul class="dropdown-menu" style="overflow: auto;max-height: 350px;">
                                 <li><a href="javascript:;">Users</a></li>
                               </ul>
                             </li>

+ 7 - 2
src/Auth.php

@@ -462,8 +462,9 @@ class Auth
                 $key = $info['key'][0];
             }
 
+            $data = $this->data();
 
-            $this->save->add($this->name . '_topgetv1_' . $key, $info, 3600 * 24 * 365);
+            $this->save->add($this->name . '_topgetv1_' . $key . '_a' . $data['id'], $info, 3600 * 24 * 365);
         }
     }
 
@@ -475,7 +476,11 @@ class Auth
             $key = $key[0];
             $state = true;
         }
-        $data = $this->save->get($this->name . '_topgetv1_' . $key);
+
+        $data = $this->data();
+
+        $key = str_replace('/', '-', $key);
+        $data = $this->save->get($this->name . '_topgetv1_' . $key . '_a' . $data['id']);
 
         # 当数据不存在时,先从数据库里取出一个最新的
         if (!$data && $state == true) {

+ 3 - 0
src/Top.php

@@ -101,6 +101,8 @@ class Top
             }
         }
 
+        //print_r($top);die;
+
         return $top;
     }
 
@@ -180,6 +182,7 @@ class Top
 
             $info = Dever::db('manage/top')->one($id);
 
+            $info['key'] = str_replace('/', '-', $info['key']);
             if ($info && $info['top_id'] > 0 && (!$auth || strpos($auth, $info['key']) !== false)) {
                 Dever::load('manage/auth._setTop', $info);
             }