Skip to content

Commit

Permalink
Fix #332: PHP warnings on post preview (#333)
Browse files Browse the repository at this point in the history
Resolves #332
  • Loading branch information
lairdshaw authored Jun 6, 2023
1 parent 6f4018b commit 90db745
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions upload/inc/plugins/thankyoulike.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
{
$plugins->add_hook("global_start", "thankyoulike_templatelist");
$plugins->add_hook("postbit","thankyoulike_postbit");
$plugins->add_hook("postbit_prev", "thankyoulike_postbit_prev");
$plugins->add_hook("postbit_prev","thankyoulike_postbit_udetails");
$plugins->add_hook("postbit_pm","thankyoulike_postbit_udetails");
$plugins->add_hook("forumdisplay_thread_end","thankyoulike_threads_udetails");
Expand Down Expand Up @@ -2285,6 +2286,11 @@ function thankyoulike_postbit(&$post)
return $post;
}

function thankyoulike_postbit_prev(&$post)
{
$post['styleclass'] = $post['button_tyl'] = $post['tyl_display'] = $post['thankyoulike_data'] = '';
}

/**
* Add a support for displaying total number of tyl for the first post of the thread in the forumdisplay_thread and/or search_results_threads_thread template.
*/
Expand Down

0 comments on commit 90db745

Please sign in to comment.