dever 7 سال پیش
والد
کامیت
30c529976e
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/Top.php

+ 2 - 2
src/Top.php

@@ -82,7 +82,7 @@ class Top
                     $c = 0;
                     foreach ($child[$v['id']] as $i => $j) {
                         $i = str_replace('/', '-', $i);
-                        if (($auth && strpos($auth, $i) === false) || ($info && $info['id'] == $j['id'])) {
+                        if (($auth && strpos($auth . ',', $i . ',') === false) || ($info && $info['id'] == $j['id'])) {
 
                         } elseif (!$info && $c == 0) {
                             $top[$k]['name'] = $j['name'];
@@ -183,7 +183,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)) {
+            if ($info && $info['top_id'] > 0 && (!$auth || strpos($auth . ',', $info['key'] . ',') !== false)) {
                 Dever::load('manage/auth._setTop', $info);
             }