/[LeafOK_CVS]/fenglin/bbs/section_service_setting.php
ViewVC logotype

Diff of /fenglin/bbs/section_service_setting.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 by sysadm, Tue Jun 24 09:15:26 2025 UTC Revision 1.5 by sysadm, Wed Feb 11 10:59:14 2026 UTC
# Line 161  Line 161 
161                  }                  }
162    
163                  $i = 1;                  $i = 1;
164                  $sid_disabled_list = "-1";                  $sid_disabled_list = array(-1);
165                  $real_sort_order = 0;                  $real_sort_order = 0;
166                  while ($row = mysqli_fetch_array($rs))                  while ($row = mysqli_fetch_array($rs))
167                  {                  {
# Line 184  Line 184 
184                          {                          {
185                                  if ($row["sort_order"] != 0)                                  if ($row["sort_order"] != 0)
186                                  {                                  {
187                                          $sid_disabled_list .= (", " . $row["SID"]);                                          array_push($sid_disabled_list, $row["SID"]);
188                                  }                                  }
189                                  continue;                                  continue;
190                          }                          }
# Line 232  Line 232 
232                  }                  }
233    
234                  // Enforce sort_order of disabled sections to 0                  // Enforce sort_order of disabled sections to 0
235                  if ($sid_disabled_list != "-1")                  if (count($sid_disabled_list) > 1)
236                  {                  {
237                          $sql = "UPDATE section_config SET sort_order = 0 WHERE SID IN ($sid_disabled_list)";                          $sql = "UPDATE section_config SET sort_order = 0 WHERE SID IN (" .
238                                            implode(",", $sid_disabled_list) .
239                                            ")";
240    
241                          $rs = mysqli_query($db_conn, $sql);                          $rs = mysqli_query($db_conn, $sql);
242                          if ($rs == false)                          if ($rs == false)


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1