<commit_before><?php
require 'Include/Config.php';
require 'Include/Functions.php';

use ChurchCRM\dto\SystemConfig;
use ChurchCRM\FamilyQuery;
use Propel\Runtime\ActiveQuery\Criteria;

$sMode = 'Active';
// Filter received user input as needed
if (isset($_GET['mode'])) {
    $sMode = FilterInput($_GET['mode']);
}
if (strtolower($sMode) == 'inactive') {
    $families = FamilyQuery::create()
            ->filterByDateDeactivated(null)
            ->orderByName()
            ->find();
} else {
    $sMode = 'Active';
    $families = FamilyQuery::create()
            ->filterByDateDeactivated(null, Criteria::ISNOTNULL)
            ->orderByName()
            ->find();
}

// Set the page title and include HTML header
$sPageTitle = gettext(ucfirst($sMode)) . ' ' . gettext('Family List');
require 'Include/Header.php'; ?>

<div class="pull-right">
  <a class="btn btn-success" role="button" href="FamilyEditor.php"> <span class="fa fa-plus"
                                                                          aria-hidden="true"></span><?= gettext('Add Family') ?>
  </a>
</div>
<p><br/><br/></p>
<div class="box">
    <div class="box-body"><commit_msg>fixed bad refactor of active vs inactive<commit_after><?php
require 'Include/Config.php';
require 'Include/Functions.php';

use ChurchCRM\dto\SystemConfig;
use ChurchCRM\FamilyQuery;
use Propel\Runtime\ActiveQuery\Criteria;

$sMode = 'Active';
// Filter received user input as needed
if (isset($_GET['mode'])) {
    $sMode = FilterInput($_GET['mode']);
}
if (strtolower($sMode) == 'inactive') {
    $families = FamilyQuery::create()
        ->filterByDateDeactivated(null, Criteria::ISNOTNULL)
        ->orderByName()
        ->find();
} else {
    $sMode = 'Active';
    $families = FamilyQuery::create()
        ->filterByDateDeactivated(null)
        ->orderByName()
        ->find();
}

// Set the page title and include HTML header
$sPageTitle = gettext(ucfirst($sMode)) . ' ' . gettext('Family List');
require 'Include/Header.php'; ?>

<div class="pull-right">
  <a class="btn btn-success" role="button" href="FamilyEditor.php"> <span class="fa fa-plus"
                                                                          aria-hidden="true"></span><?= gettext('Add Family') ?>
  </a>
</div>
<p><br/><br/></p>
<div class="box">
    <div class="box-body">
{'fraction_non_alphanumeric': 0.17619252256123766, 'fraction_numerical': 0.0, 'mean_word_length': 2.9390862944162435, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2312870', 'n_tokens_mistral': 712, 'n_tokens_neox': 706, 'n_words': 153}