Wikieditish Part 2

If this shows up with a current timestamp, then my hack worked. Fingers crossed.

Alright, that was successful. For the record, there is the change that fixed it. I changed this line:

my $ mtime = (stat "$ blosxom::datadir $ path/$ fn. $ file_extension")[9];

to

my $ mtime = (stat "$ blosxom::datadir $ path/ $ fn. $ file_extension")[9] || time();

If there is no timestamp on the file (such as if it doesn’t yet exist), then the time() function is called to use the current time. Voila!

Update: simple presenting those two lines of code has been highly challenging. I had that that they were getting interpolated by wikieditish at the time I posted, but that turns out not to be the case. They actually were being interpolated at view time as I found out this morning when everything was broken again. I had fixed everything, and then the next time I posted something from my Mac with Blapp I overwrote this post with an older version. I’m going to have to figure out some way to reconcile the wikieditish editing directly on the server with the Blapp client. This might be trickier than it seemed.

Published by

dave

Dave Slusher is a blogger, podcaster, computer programmer, author, science fiction fan and father. Member of the Podcast Hall of Fame class of 2022.