<commit_before><?php

class Sidane_Threadmarks_Listener_Hook
{

  public static function templateCreate($templateName, array &$params, XenForo_Template_Abstract $template)
  {
    if ($templateName == 'page_nav')
    {
      $template->preloadTemplate('page_nav_threadmarks');
      $template->preloadTemplate('new_threadmark_control');
    }
  }

  public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
  {
    if ($hookName == 'post_pagination_links') {
      $hookParams['hide_menu_from_guests'] = XenForo_Application::get('options')->sidaneThreadmarksHideMenuFromGuests;
      $contents .= $template->create('page_nav_threadmarks', $hookParams);
    }

    if ($hookName == 'post_private_controls') {
      $contents .= $template->create('new_threadmark_control', $hookParams);
    }

    if ($hookName == 'thread_view_pagenav_before' && $hookParams['thread']['has_threadmarks']) {
      $contents .= $template->create('threadmarks_css', $hookParams);;
    }
  }

}<commit_msg>missing rename of has_threadmark -> threadmark_count<commit_after><?php

class Sidane_Threadmarks_Listener_Hook
{

  public static function templateCreate($templateName, array &$params, XenForo_Template_Abstract $template)
  {
    if ($templateName == 'page_nav')
    {
      $template->preloadTemplate('page_nav_threadmarks');
      $template->preloadTemplate('new_threadmark_control');
    }
  }

  public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
  {
    if ($hookName == 'post_pagination_links') {
      $hookParams['hide_menu_from_guests'] = XenForo_Application::get('options')->sidaneThreadmarksHideMenuFromGuests;
      $contents .= $template->create('page_nav_threadmarks', $hookParams);
    }

    if ($hookName == 'post_private_controls') {
      $contents .= $template->create('new_threadmark_control', $hookParams);
    }

    if ($hookName == 'thread_view_pagenav_before' && $hookParams['thread']['threadmark_count']) {
      $contents .= $template->create('threadmarks_css', $hookParams);;
    }
  }

}
{'fraction_non_alphanumeric': 0.1393596986817326, 'fraction_numerical': 0.0, 'mean_word_length': 5.231671554252199, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4934389', 'n_tokens_mistral': 653, 'n_tokens_neox': 634, 'n_words': 96}