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

Diff of /fenglin/bbs/list.php

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

Revision 1.9 by sysadm, Sat Jun 7 10:15:01 2025 UTC Revision 1.10 by sysadm, Wed Oct 1 12:40:03 2025 UTC
# Line 248  Line 248 
248    
249          while ($row = mysqli_fetch_array($rs))          while ($row = mysqli_fetch_array($rs))
250          {          {
251                    // Rewrite title with "Re: Re: " prefix into "Re: ... "
252                    $title = $row["title"];
253                    if ($row["TID"] != 0)
254                    {
255                            $j = 0;
256                            while (substr_compare($row["title"], "Re: ", $j, strlen("Re: ")) == 0)
257                            {
258                                    $j += strlen("Re: ");
259                            }
260                            if ($j >= strlen("Re: Re: "))
261                            {
262                                    $title = "Re: ... " . substr($row["title"], $j);
263                            }
264                    }
265    
266                  array_push($result_set["data"]["articles"], array(                  array_push($result_set["data"]["articles"], array(
267                          "aid" => $row["AID"],                          "aid" => $row["AID"],
268                          "tid" => $row["TID"],                          "tid" => $row["TID"],
269                          "title" => $row["title"],                          "title" => $title,
270                          "sub_dt" => (new DateTimeImmutable($row["sub_dt"]))->setTimezone($_SESSION["BBS_user_tz"]),                          "sub_dt" => (new DateTimeImmutable($row["sub_dt"]))->setTimezone($_SESSION["BBS_user_tz"]),
271                          "length" => $row["length"],                          "length" => $row["length"],
272                          "icon" => $row["icon"],                          "icon" => $row["icon"],
# Line 280  Line 295 
295                  {                  {
296                          $author_list[$row["last_reply_UID"]] = true;                          $author_list[$row["last_reply_UID"]] = true;
297                  }                  }
298    
299                    unset($title);
300          }          }
301          mysqli_free_result($rs);          mysqli_free_result($rs);
302    


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

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