diff options
author | Yorhel <git@yorhel.nl> | 2020-08-05 16:48:25 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-08-06 13:30:16 +0200 |
commit | 96084614898f30f06b63fe121b36ba1a25c4f9e7 (patch) | |
tree | 068424a36fd3afa66857e0925a5c353419002323 /elm | |
parent | ad0819cc292b25190233e837b8b653ba77710ddd (diff) |
SQL: Use vndbid for thread identifiers
Also drop the thread_poll_votes.tid column, as it's not really
necessary.
And add ON DELETE CASCADEs to threads_posts and threads_boards to
simplify thread deletion.
Relatively invasive change, prolly broke something.
Diffstat (limited to 'elm')
-rw-r--r-- | elm/Discussions/Edit.elm | 4 | ||||
-rw-r--r-- | elm/Discussions/Reply.elm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/elm/Discussions/Edit.elm b/elm/Discussions/Edit.elm index f8873fa7..c825506e 100644 --- a/elm/Discussions/Edit.elm +++ b/elm/Discussions/Edit.elm @@ -25,7 +25,7 @@ main = Browser.element type alias Model = { state : Api.State - , tid : Maybe Int + , tid : Maybe String , num : Maybe Int , can_mod : Bool , can_private : Bool @@ -215,7 +215,7 @@ view model = , table [ class "formtable" ] <| [ if thread then formField "title::Thread title" [ inputText "title" (Maybe.withDefault "" model.title) Title (style "width" "400px" :: required True :: GDE.valTitle) ] - else formField "Topic" [ a [ href <| "/t" ++ String.fromInt (Maybe.withDefault 0 model.tid) ] [ text (Maybe.withDefault "" model.title) ] ] + else formField "Topic" [ a [ href <| "/" ++ Maybe.withDefault "" model.tid ] [ text (Maybe.withDefault "" model.title) ] ] , if thread && model.can_mod then formField "" [ label [] [ inputCheck "" model.locked Locked, text " Locked" ] ] else text "" diff --git a/elm/Discussions/Reply.elm b/elm/Discussions/Reply.elm index a8d25434..3581c91f 100644 --- a/elm/Discussions/Reply.elm +++ b/elm/Discussions/Reply.elm @@ -22,7 +22,7 @@ main = Browser.element type alias Model = { state : Api.State - , tid : Int + , tid : String , old : Bool , msg : TP.Model } |