--- fenglin/bbs/section_setting.php 2025/04/09 04:10:57 1.3 +++ fenglin/bbs/section_setting.php 2025/04/12 06:52:54 1.6 @@ -1,5 +1,6 @@ checkpriv($section["SID"], S_POST | S_MAN_S); + }, + function (array $section, array $filter_param) : mixed + { + return null; + }, + $db_conn); - $rs = mysqli_query($db_conn, $sql); - if ($rs == false) + if ($ret == false) { $result_set["return"]["code"] = -2; $result_set["return"]["message"] = "Query section error: " . mysqli_error($db_conn); @@ -103,48 +109,6 @@ exit(json_encode($result_set)); } - $last_cid = -1; - $last_c_title = ""; - $section_list = array(); - while ($row = mysqli_fetch_array($rs)) - { - if ($row["CID"] != $last_cid) - { - if (count($section_list) > 0) - { - array_push($result_set["data"]["section_hierachy"], array( - "cid" => $last_cid, - "title" => $last_c_title, - "sections" => $section_list, - )); - - $section_list = array(); - } - - $last_cid = $row["CID"]; - $last_c_title = $row["c_title"]; - } - - if ($_SESSION["BBS_priv"]->checkpriv($row["SID"], S_POST | S_MAN_S)) - { - array_push($section_list, array( - "sid" => $row["SID"], - "title" => $row["s_title"], - )); - } - } - - if (count($section_list) > 0) - { - array_push($result_set["data"]["section_hierachy"], array( - "cid" => $last_cid, - "title" => $last_c_title, - "sections" => $section_list, - )); - } - - mysqli_free_result($rs); - mysqli_close($db_conn); // Output with theme view