<commit_before><?php

class Homepage extends Page
{
    private static $db = array(
        'FeaturedButtonTitle' => 'Varchar(1000)',
        'InfotextTitle' => 'Varchar(1000)',
        'MainBannerContent' => 'Text',
        'HeadlineContent' => 'Text'
    );

    private static $has_one = array(
        'FeaturedPage' => 'Page'
    );

    public function getCMSFields() {
        $fields = parent::getCMSFields();

        $fields->addFieldToTab('Root.Main', new TreeDropdownField('FeaturedPageID', 'Featured Page', 'Page'), 'Content');
        $fields->addFieldToTab('Root.Main', new TextField('FeaturedButtonTitle', 'Featured Button Title'), 'Content');
        $fields->addFieldToTab('Root.Main', new TextField('InfotextTitle', 'Infotext Title'), 'Content');
        $fields->addFieldToTab('Root.Main', new TextareaField('MainBannerContent', 'MainBannerContent'));
        $fields->addFieldToTab('Root.Main', new TextareaField('HeadlineContent', 'HeadlineContent'));
        $fields->renameField('Content', 'Infotext Content');

        return $fields;
    }

    public function getActionGroups()
    {
        $result = new ArrayList();
        $action_groups = ActionGroup::get()->innerJoin('Action', 'ActionGroup.ID = Action.GroupID')->where("Action.Date >= '" . date('Y-m-d') . "'");

        foreach ($action_groups as $action_group)
        {
            $result->add(new ArrayData(array(
                'Group' => $action_group,
                'Custom' => true,
            )));
        }

        /**$other_actions = Action::get()->where('GroupID IS NULL OR GroupID = 0');

        if ($other_actions->count() > 0)
        {
            $result->add(new ArrayData(array(
                'Group' => ActionGroup::getOtherActionsGroup(),
                'Custom' => false,
            )));
        }*/

        return $result;
    }
    
    public function getOtherActionGroups()
    {
        $result = new ArrayList();
        $other_actions = Action::get()->where('GroupID IS NULL OR GroupID = 0');

        if ($other_actions->count() > 0)
        {
            $result->add(new ArrayData(array(
                'Group' => ActionGroup::getOtherActionsGroup(),
                'Custom' => false,
            )));
        }

        return $result;
    }
}

class Homepage_Controller extends Page_Controller
{
}
<commit_msg>Added custom content to Homepage<commit_after><?php

class Homepage extends Page
{
    private static $db = array(
        'FeaturedButtonTitle' => 'Varchar(1000)',
        'InfotextTitle' => 'Varchar(1000)',
        'MainBannerContent' => 'Text',
        'HeadlineContent' => 'Text',
        'CustomContent' => 'Text'
    );

    private static $has_one = array(
        'FeaturedPage' => 'Page'
    );

    public function getCMSFields() {
        $fields = parent::getCMSFields();

        $fields->addFieldToTab('Root.Main', new TreeDropdownField('FeaturedPageID', 'Featured Page', 'Page'), 'Content');
        $fields->addFieldToTab('Root.Main', new TextField('FeaturedButtonTitle', 'Featured Button Title'), 'Content');
        $fields->addFieldToTab('Root.Main', new TextField('InfotextTitle', 'Infotext Title'), 'Content');
        $fields->addFieldToTab('Root.Main', new TextareaField('MainBannerContent', 'MainBannerContent'));
        $fields->addFieldToTab('Root.Main', new TextareaField('HeadlineContent', 'HeadlineContent'));
        $fields->addFieldToTab('Root.Main', new TextareaField('CustomContent', 'CustomContent'));
        $fields->renameField('Content', 'Infotext Content');

        return $fields;
    }

    public function getActionGroups()
    {
        $result = new ArrayList();
        $action_groups = ActionGroup::get()->innerJoin('Action', 'ActionGroup.ID = Action.GroupID')->where("Action.Date >= '" . date('Y-m-d') . "'");

        foreach ($action_groups as $action_group)
        {
            $result->add(new ArrayData(array(
                'Group' => $action_group,
                'Custom' => true,
            )));
        }

        /**$other_actions = Action::get()->where('GroupID IS NULL OR GroupID = 0');

        if ($other_actions->count() > 0)
        {
            $result->add(new ArrayData(array(
                'Group' => ActionGroup::getOtherActionsGroup(),
                'Custom' => false,
            )));
        }*/

        return $result;
    }
    
    public function getOtherActionGroups()
    {
        $result = new ArrayList();
        $other_actions = Action::get()->where('GroupID IS NULL OR GroupID = 0');

        if ($other_actions->count() > 0)
        {
            $result->add(new ArrayData(array(
                'Group' => ActionGroup::getOtherActionsGroup(),
                'Custom' => false,
            )));
        }

        return $result;
    }
}

class Homepage_Controller extends Page_Controller
{
}

{'fraction_non_alphanumeric': 0.1567411083540116, 'fraction_numerical': 0.004962779156327543, 'mean_word_length': 2.515261627906977, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3354824', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1351, 'n_words': 266}