<commit_before><?php
defined('mnminclude') or die();

if (empty($posts)) {
    return Haanga::Load('user/empty.html');
}

if ($current_user->user_id > 0) {
    $post = new Post;
    $post->author = $current_user->user_id;
    $post->print_edit_form();
}

$all_ids = array_map(function ($value) {
    return $value->id;
}, $posts);

$pollCollection = new PollCollection;
$pollCollection->loadFromRelatedIds('post_id', $all_ids);

$ids = array();

echo '<ol class="comments-list">';

$time_read = 0;

foreach ($posts as $post) {
    echo '<li>';

    $post->poll = $pollCollection->get($post->id);
    $post->print_summary();

    if ($view == 'notes_votes') {
        if ($p->value >0){
            echo '<i class="fa fa-arrow-circle-up" style="color:green;position:relative;top: -29px;"></i>';
        } else {
            echo '<i class="fa fa-arrow-circle-down" style="color:red;position:relative;top: -29px;"></i>';
        }
    }

    echo '</li>';

    if ($post->date > $time_read) {
        $time_read = $post->date;
    }

    $ids[] = $post->id;
}

echo "</ol>\n";<commit_msg>Corrected color vote in post list for user<commit_after><?php
defined('mnminclude') or die();

if (empty($posts)) {
    return Haanga::Load('user/empty.html');
}

if ($current_user->user_id > 0) {
    $post = new Post;
    $post->author = $current_user->user_id;
    $post->print_edit_form();
}

$all_ids = array_map(function ($value) {
    return $value->id;
}, $posts);

$pollCollection = new PollCollection;
$pollCollection->loadFromRelatedIds('post_id', $all_ids);

$ids = array();

echo '<ol class="comments-list">';

$time_read = 0;

foreach ($posts as $post) {
    echo '<li>';

    $post->poll = $pollCollection->get($post->id);
    $post->print_summary();

    if ($view == 'notes_votes') {
        if ($post->value > 0){
            echo '<i class="fa fa-arrow-circle-up" style="color:green;position:relative;top: -29px;"></i>';
        } else {
            echo '<i class="fa fa-arrow-circle-down" style="color:red;position:relative;top: -29px;"></i>';
        }
    }

    echo '</li>';

    if ($post->date > $time_read) {
        $time_read = $post->date;
    }

    $ids[] = $post->id;
}

echo "</ol>\n";
{'fraction_non_alphanumeric': 0.21043083900226758, 'fraction_numerical': 0.006349206349206349, 'mean_word_length': 3.2341650671785027, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 53, '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': '2208100', 'n_tokens_mistral': 799, 'n_tokens_neox': 778, 'n_words': 154}