-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i edit start and end date in already created topic? #7
Comments
This is already possible. But notice (see README.md): This extension is only in the stage of initial development. |
Dear Martti, thanks for that great extension! What is the procedure to modify the date of an existing post? thanks in advance |
@flo18 That should normally be possible when you hit "edit" for the first post. However, some people have reported that the date field(s) doesn't show up for them. |
thanks for reply- on my installation the field does not show up on edit. is there any chance to debug it? or can i edit it manually in the database? |
@flo18 So it is a bug. For the moment I don't know on what conditions it depends. The dates are stored as integer "Julian Days" (see PHP documentation) on the topics table. |
@marttiphpbb I believe this doesn't have to do with the way dates are being calculated, but with the way More specifically, it seems that some times If you cast everything to the same type, it seems to be working as expected: private function is_first_post(string $mode, int $post_id, $first_post_id):bool
{
if ($mode === 'edit' && (int)$post_id !== (int)$first_post_id)
{
return false;
}
if (!in_array($mode, ['post', 'edit']))
{
return false;
}
return true;
} I can push a PR that fixes it if you like. cc: @se-ti @flo18 |
So I've add the type casting now. Let's see. |
Feature request: I'd like to modify start/end date, when i alter first post of a topic with dates.
The text was updated successfully, but these errors were encountered: