<commit_before><?php

class SiteStatistics
{
    private $mysqli;
    
    public function __construct()
    {
        $this->mysqli =& $GLOBALS['mysqli_connection'];
    }
    
    public function insert_stats()
    {
        $stats = array();
        //$stats['id'] = ;
        //$stats['active'] = ;
        $stats['taxa_count'] =                                      $this->total_pages();
        $stats['taxa_text'] =                                       $this->pages_with_text();
        $stats['taxa_images'] =                                     $this->pages_with_images();
        $stats['taxa_text_images'] =                                $this->pages_with_text_and_images();
        $stats['taxa_BHL_no_text'] =                                $this->pages_with_bhl_no_text();
        $stats['taxa_links_no_text'] =                              $this->pages_with_links_no_text();
        $stats['taxa_images_no_text'] =                             $this->pages_with_images_no_text();
        $stats['taxa_text_no_images'] =                             $this->pages_with_text_no_images();
        $stats['vet_obj_only_1cat_inCOL'] =                         $this->pages_in_col_one_category();
        $stats['vet_obj_only_1cat_notinCOL'] =                      $this->pages_not_in_col_one_category();
        $stats['vet_obj_morethan_1cat_inCOL'] =                     $this->pages_in_col_more_categories();
        $stats['vet_obj_morethan_1cat_notinCOL'] =                  $this->pages_not_in_col_more_categories();
        $stats['vet_obj'] =                                         $this->pages_with_vetted_objects();
        $stats['no_vet_obj2'] =                                     $this->pages_in_col_no_content();
        $stats['with_BHL'] =                                        $this->pages_with_bhl();
        $stats['vetted_not_published'] =                            $this->pages_awaiting_publishing();
        $stats['vetted_unknown_published_visible_inCol'] =          $this->col_content_needs_curation();
        $stats['vetted_unknown_published_visible_notinCol'] =       $this->non_col_content_needs_curation();
        //$stats['date_created'] =                                    $this->();
        //$stats['time_created'] =                                    $this->();
        $stats['pages_incol'] =                                     $this->total_pages_in_col();
        $stats['pages_not_incol'] =                                 $this->total_pages_not_in_col();
        //$stats['a_taxa_with_text'] =                                $this->();
        //$stats['timestamp'] =                                       $this->();
        //$stats['a_vetted_not_published'] =                          $this->();
        //$stats['a_vetted_unknown_published_visible_notinCol'] =     $this->();
        //$stats['a_vetted_unknown_published_visible_inCol'] =        $this->();
        $stats['lifedesk_taxa'] =                                   $this->lifedesk_taxa();
        $stats['lifedesk_dataobject'] =                             $this->lifedesk_data_objects();<commit_msg>fixed assignment, should be  taxa_count = pages_with_content()<commit_after><?php

class SiteStatistics
{
    private $mysqli;
    
    public function __construct()
    {
        $this->mysqli =& $GLOBALS['mysqli_connection'];
    }
    
    public function insert_stats()
    {
        $stats = array();
        //$stats['id'] = ;
        //$stats['active'] = ;
        $stats['taxa_count'] =                                      $this->pages_with_content();
        $stats['taxa_text'] =                                       $this->pages_with_text();
        $stats['taxa_images'] =                                     $this->pages_with_images();
        $stats['taxa_text_images'] =                                $this->pages_with_text_and_images();
        $stats['taxa_BHL_no_text'] =                                $this->pages_with_bhl_no_text();
        $stats['taxa_links_no_text'] =                              $this->pages_with_links_no_text();
        $stats['taxa_images_no_text'] =                             $this->pages_with_images_no_text();
        $stats['taxa_text_no_images'] =                             $this->pages_with_text_no_images();
        $stats['vet_obj_only_1cat_inCOL'] =                         $this->pages_in_col_one_category();
        $stats['vet_obj_only_1cat_notinCOL'] =                      $this->pages_not_in_col_one_category();
        $stats['vet_obj_morethan_1cat_inCOL'] =                     $this->pages_in_col_more_categories();
        $stats['vet_obj_morethan_1cat_notinCOL'] =                  $this->pages_not_in_col_more_categories();
        $stats['vet_obj'] =                                         $this->pages_with_vetted_objects();
        $stats['no_vet_obj2'] =                                     $this->pages_in_col_no_content();
        $stats['with_BHL'] =                                        $this->pages_with_bhl();
        $stats['vetted_not_published'] =                            $this->pages_awaiting_publishing();
        $stats['vetted_unknown_published_visible_inCol'] =          $this->col_content_needs_curation();
        $stats['vetted_unknown_published_visible_notinCol'] =       $this->non_col_content_needs_curation();
        //$stats['date_created'] =                                    $this->();
        //$stats['time_created'] =                                    $this->();
        $stats['pages_incol'] =                                     $this->total_pages_in_col();
        $stats['pages_not_incol'] =                                 $this->total_pages_not_in_col();
        //$stats['a_taxa_with_text'] =                                $this->();
        //$stats['timestamp'] =                                       $this->();
        //$stats['a_vetted_not_published'] =                          $this->();
        //$stats['a_vetted_unknown_published_visible_notinCol'] =     $this->();
        //$stats['a_vetted_unknown_published_visible_inCol'] =        $this->();
        $stats['lifedesk_taxa'] =                                   $this->lifedesk_taxa();
        $stats['lifedesk_dataobject'] =                             $this->lifedesk_data_objects();
{'fraction_non_alphanumeric': 0.13140311804008908, 'fraction_numerical': 0.001590836780146357, 'mean_word_length': 1.4830173775671407, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 38, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1430913', 'n_tokens_mistral': 1789, 'n_tokens_neox': 1732, 'n_words': 154}