From e73539d38d6098fd84f2f49d32adb61c1e94e686 Mon Sep 17 00:00:00 2001 From: b Date: Sat, 12 Aug 2023 17:19:22 +0000 Subject: [PATCH] Preserve original post time when editing --- makefile | 3 ++- makefile.1.mak | 3 ++- post.1.c | 9 +++++++-- settings.txt | 1 - 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/makefile b/makefile index 5d203dc..0fd343d 100644 --- a/makefile +++ b/makefile @@ -197,7 +197,8 @@ verify.awk\ view.1.c\ view.1.awk\ www\ -bot2m.1.pl +bot2m.1.pl\ +config DIR=\ diff --git a/makefile.1.mak b/makefile.1.mak index 96a32bf..83fd594 100644 --- a/makefile.1.mak +++ b/makefile.1.mak @@ -197,7 +197,8 @@ verify.awk\ view.1.c\ view.1.awk\ www\ -bot2m.1.pl +bot2m.1.pl\ +config DIR=\ diff --git a/post.1.c b/post.1.c index 1feb226..247f55a 100644 --- a/post.1.c +++ b/post.1.c @@ -1,8 +1,7 @@ // OTT mirror -// Copyright (C) 2014, 2022 Balthasar Szczepański +// Copyright (C) 2014, 2022, 2023 Balthasar Szczepański // post.c automatically generated from post.1.c // write posts from the mirror. -// 09.10.2022 // // This file is part of OTT mirror. // @@ -231,10 +230,16 @@ void submit() unsigned long lastpage; unsigned short postslast; char listpath[N_STRBUF]; + long long time_n; posttime=time(NULL); if(forceID[0]!='\0') + { snprintf(timenumber,N_STRBUF_SH,"%s",forceID); + time_n = atoll(forceID); + if (time_n != 0) + posttime = (time_t) time_n; + } else snprintf(timenumber,N_STRBUF_SH,"%llu",(unsigned long long)posttime); strftime(timetext,N_STRBUF-1,"%a %b %d, %Y %I:%M %p %Z",gmtime(&posttime)); diff --git a/settings.txt b/settings.txt index 4cce191..847fb68 100644 --- a/settings.txt +++ b/settings.txt @@ -129,7 +129,6 @@ _www_sig_path_ = @_PATH($_www_sig_path, ) _www_up_path_ = @_PATH($_www_up_path, ) -MAKE_CONFIGURE = CONFIGURE =$configure MAKE_TARGET = TARGET =$target MAKE_CHMOD = CHMOD=$chmod -- 2.30.2