<commit_before><?php
require_once dirname(__FILE__) . '/../videos/configuration.php';

require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
require_once $global['systemRootPath'] . 'objects/video.php';

$catLink = "";
if (!empty($_GET['catName'])) {
    $catLink = "cat/{$_GET['catName']}/";
}

if (empty($_GET['page'])) {
    $_GET['page'] = 1;
} else {
    $_GET['page'] = intval($_GET['page']);
}
$_POST['rowCount'] = 10;
$_POST['current'] = $_GET['page'];
$_POST['sort']['created'] = 'desc';

$videos = Video::getAllVideos("viewableNotAd");
$total = Video::getTotalVideos("viewableNotAd");
$totalPages = ceil($total / $_POST['rowCount']);

$videoName = "";
if (!empty($video['clean_title'])) {
    $videoName = $video['clean_title'];
} else if (!empty($_GET['videoName'])) {
    $videoName = $_GET['videoName'];
}

?>
<select class="form-control" id="sortBy">
    <option value="newest"><?php echo __("Date Added (newest)"); ?></option>
    <option value="oldest"><?php echo __("Date Added (oldest)"); ?></option>
    <option value="popular"><?php echo __("Most Popular"); ?></option>
</select>
<select class="form-control" id="rowCount">
    <option>10</option>
    <option>20</option>
    <option>30</option>
    <option>50</option>
</select>
<?php
<commit_msg>Do not create element if is not necessary<commit_after><?php
require_once dirname(__FILE__) . '/../videos/configuration.php';

require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/functions.php';
require_once $global['systemRootPath'] . 'objects/video.php';

$catLink = "";
if (!empty($_GET['catName'])) {
    $catLink = "cat/{$_GET['catName']}/";
}

if (empty($_GET['page'])) {
    $_GET['page'] = 1;
} else {
    $_GET['page'] = intval($_GET['page']);
}
$_POST['rowCount'] = 10;
$_POST['current'] = $_GET['page'];
$_POST['sort']['created'] = 'desc';

$videos = Video::getAllVideos("viewableNotAd");
$total = Video::getTotalVideos("viewableNotAd");
$totalPages = ceil($total / $_POST['rowCount']);

$videoName = "";
if (!empty($video['clean_title'])) {
    $videoName = $video['clean_title'];
} else if (!empty($_GET['videoName'])) {
    $videoName = $_GET['videoName'];
}

?>
<!--
<select class="form-control" id="sortBy">
    <option value="newest"><?php echo __("Date Added (newest)"); ?></option>
    <option value="oldest"><?php echo __("Date Added (oldest)"); ?></option>
    <option value="popular"><?php echo __("Most Popular"); ?></option>
</select>
<select class="form-control" id="rowCount">
    <option>10</option>
    <option>20</option>
    <option>30</option>
    <option>50</option>
</select>
-->
<?php

{'fraction_non_alphanumeric': 0.24163295329165135, 'fraction_numerical': 0.008091210003677823, 'mean_word_length': 5.699507389162561, 'pattern_counts': {'":': 0, '<': 50, '<?xml version=': 0, '>': 48, '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': '1028412', 'n_tokens_mistral': 938, 'n_tokens_neox': 925, 'n_words': 169}