$missmatch['value'] = $cat->get_content_amount(); $missmatch['should_be'] = $should_be; $missmatch_array[] = $missmatch; } // check child_content_amount $calc_child_content_amount = $cat->calc_child_content_amount(); if ($calc_child_content_amount != $cat->get_child_content_amount()) { $missmatch['type'] = CHILD_CONTENT_IN_CAT_AMOUNT; $missmatch['id'] = $cat->id; $missmatch['name'] = $cat->get_name(); $missmatch['value'] = $cat->get_child_content_amount(); $missmatch['should_be'] = $calc_child_content_amount; $missmatch_array[] = $missmatch; } // check child comment amount $calc_child_comments_amount = $cat->calc_child_comments_amount(); if ($calc_child_comments_amount != $cat->get_child_comments_amount()) { $missmatch['type'] = CHILD_COMMENTS_IN_CAT_AMOUNT; $missmatch['id'] = $cat->id; $missmatch['name'] = $cat->get_name(); $missmatch['value'] = $cat->get_child_comments_amount(); $missmatch['should_be'] = $calc_child_comments_amount; $missmatch_array[] = $missmatch; } } // get all content $sql = "SELECT id FROM " . $config_vars['table_prefix'] . "content"; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Coudnt get content", '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) {