eksopl / fuuka

Fuuka Imageboard Archiver
http://code.google.com/p/fuuka/
Other
58 stars 7 forks source link

deadlink class #69

Closed voh closed 11 years ago

voh commented 11 years ago

the span class for dead links has been changed from "quote deadlink" to "deadlink" at the moment.

oohnoitz commented 11 years ago

It's a very simple fix that you can make yourself.

https://github.com/eksopl/fuuka/blob/master/Board/Yotsuba.pm#L443 Change it to s!<span class="deadlink">(.*?)</span>!$1!g; or add it after that line just in case.

voh commented 11 years ago

I know, I did it the instant I noticed.

More for people who haven't noticed

It would be great to know is some SQL to fix posts without screwing with spoilers, though. Even some vague pointer.

eksopl commented 11 years ago

Fixed.

Live posts will fix themselves, you can also write a short SQL script that uses something like the MySQL REPLACE() function to update the broken comments in question.

eksopl commented 11 years ago
UPDATE `cgl` 
  SET comment = REPLACE(REPLACE(REPLACE(comment, '<span class="quote deadlink">', ''), '[/spoiler]', ''), '<span class="deadlink">', '') 
  WHERE timestamp > 1350469990 AND comment LIKE "%deadlink%"

This fixes posts.

Replace 1350469990 with the timestamp of your first deadlink, cgl with your board. Will be slow.