<commit_before><?php
class Vps_Component_Abstract_ContentSender_Lightbox extends Vps_Component_Abstract_ContentSender_Default
{
    protected function _getOptions()
    {
        return array();
    }

    public function sendContent($includeMaster = true)
    {
        header('Content-Type: text/html; charset=utf-8');
        $parent = $this->_data->parent->getPage();

        //processInput parent *and* ourself
        if ($includeMaster) {
            $parentContentSender = Vpc_Abstract::getSetting($parent->componentClass, 'contentSender');
            $parentContentSender = new $parentContentSender($parent);
            $parentProcess = $parentContentSender->_callProcessInput();
        }
        $process = $this->_callProcessInput();

        $lightboxContent = $this->_data->render(null, false);
        if ($includeMaster) {
            $parentContent = $parent->render(null, true);

            //append lightbox after <body> in parent
            $options = $this->_getOptions();
            $style = '';
            if (isset($options['width'])) $style .= "width: $options[width]px;";
            if (isset($options['height'])) $style .= "height: $options[height]px";
            $class = 'vpsLightbox';
            if (isset($options['style'])) $class .= " vpsLightbox$options[style]";
            $options = htmlspecialchars(json_encode($options));
            $lightboxContent = "<div id=\"vpsLightbox\" class=\"$class\" style=\"$style\">\n".
                "<input type=\"hidden\" class=\"options\" value=\"$options\" />".
                "$lightboxContent\n</div>\n";
            echo preg_replace('#(<body[^>]*>)#', "\\1\n".$lightboxContent, $parentContent);
        } else {
            echo $lightboxContent;
        }

        if ($includeMaster) {
            $parentContentSender->_callPostProcessInput($parentProcess);
        }
        $this->_callPostProcessInput($process);
    }

    public function getLinkRel()
    {
        $ret = 'lightbox';
        if ($options = $this->_getOptions()) {
            $ret .= json_encode($options);<commit_msg>remove unneded id<commit_after><?php
class Vps_Component_Abstract_ContentSender_Lightbox extends Vps_Component_Abstract_ContentSender_Default
{
    protected function _getOptions()
    {
        return array();
    }

    public function sendContent($includeMaster = true)
    {
        header('Content-Type: text/html; charset=utf-8');
        $parent = $this->_data->parent->getPage();

        //processInput parent *and* ourself
        if ($includeMaster) {
            $parentContentSender = Vpc_Abstract::getSetting($parent->componentClass, 'contentSender');
            $parentContentSender = new $parentContentSender($parent);
            $parentProcess = $parentContentSender->_callProcessInput();
        }
        $process = $this->_callProcessInput();

        $lightboxContent = $this->_data->render(null, false);
        if ($includeMaster) {
            $parentContent = $parent->render(null, true);

            //append lightbox after <body> in parent
            $options = $this->_getOptions();
            $style = '';
            if (isset($options['width'])) $style .= "width: $options[width]px;";
            if (isset($options['height'])) $style .= "height: $options[height]px";
            $class = 'vpsLightbox';
            if (isset($options['style'])) $class .= " vpsLightbox$options[style]";
            $options = htmlspecialchars(json_encode($options));
            $lightboxContent = "<div class=\"$class\" style=\"$style\">\n".
                "<input type=\"hidden\" class=\"options\" value=\"$options\" />".
                "$lightboxContent\n</div>\n";
            echo preg_replace('#(<body[^>]*>)#', "\\1\n".$lightboxContent, $parentContent);
        } else {
            echo $lightboxContent;
        }

        if ($includeMaster) {
            $parentContentSender->_callPostProcessInput($parentProcess);
        }
        $this->_callPostProcessInput($process);
    }

    public function getLinkRel()
    {
        $ret = 'lightbox';
        if ($options = $this->_getOptions()) {
            $ret .= json_encode($options);
{'fraction_non_alphanumeric': 0.1572357332049121, 'fraction_numerical': 0.000963159162051529, 'mean_word_length': 2.544368600682594, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 41, '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': '3307277', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1105, 'n_words': 202}