<commit_before><?php
/**
 * Nooku Framework - http://www.nooku.org
 *
 * @copyright	Copyright (C) 2011 - 2013 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		git://git.assembla.com/nooku-framework.git for the canonical source repository
 */

use Nooku\Library;

/**
 * Date Template Helper
 *
 * @author  <NAME> <http://nooku.assembla.com/profile/arunasmazeika>
 * @package Component\Articles
 */
class ArticlesTemplateHelperDate extends Library\TemplateHelperDate
{
    public function timestamp($config = array())
    {
        $config = new Library\ObjectConfig($config);

        $params = $this->getObject('application.pages')->getActive()->getParams('page');

        $config->append(array('parameters' => $params))
               ->append(array(
                    'show_create_date' => $config->parameters->get('show_create_date', false),
                    'show_modify_date' => $config->parameters->get('show_modify_date', false)
                ));

        $article = $config->row;

        $html = array();

        if ($config->show_create_date) {
            $html[] = '<span class="timestamp">';
            $html[] = $this->format(array('date'=> $article->ordering_date, 'format' => $this->translate('DATE_FORMAT_LC5')));
        }

        if ($config->get('show_modify_date') && $config->show_create_date && ($modified_on = $article->modified_on) && (intval($modified_on) != 0))
        {
            $html[] = $this->getObject('translator')
                      ->translate('Last Updated on {date}', array(
                'date' => $this->format(array(
                    'date' => $article->modified_on,
                    'format' => $this->translate('DATE_FORMAT_LC5')))));
        }
        
        if ($config->show_create_date) {
            $html[] = '</span>';
        }

        return implode(' ', $html);
    }
}<commit_msg>re #302 Replaced legacy keys.<commit_after><?php
/**
 * Nooku Framework - http://www.nooku.org
 *
 * @copyright	Copyright (C) 2011 - 2013 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		git://git.assembla.com/nooku-framework.git for the canonical source repository
 */

use Nooku\Library;

/**
 * Date Template Helper
 *
 * @author  <NAME> <http://nooku.assembla.com/profile/arunasmazeika>
 * @package Component\Articles
 */
class ArticlesTemplateHelperDate extends Library\TemplateHelperDate
{
    public function timestamp($config = array())
    {
        $config = new Library\ObjectConfig($config);

        $params = $this->getObject('application.pages')->getActive()->getParams('page');

        $config->append(array('parameters' => $params))
               ->append(array(
                    'show_create_date' => $config->parameters->get('show_create_date', false),
                    'show_modify_date' => $config->parameters->get('show_modify_date', false)
                ));

        $article = $config->row;

        $html = array();

        if ($config->show_create_date) {
            $html[] = '<span class="timestamp">';
            $html[] = $this->format(array('date'=> $article->ordering_date, 'format' => $this->translate('Timestamp Date Format')));
        }

        if ($config->get('show_modify_date') && $config->show_create_date && ($modified_on = $article->modified_on) && (intval($modified_on) != 0))
        {
            $html[] = $this->getObject('translator')
                      ->translate('Last Updated on {date}', array(
                'date' => $this->format(array(
                    'date' => $article->modified_on,
                    'format' => $this->translate('Timestamp Date Format')))));
        }
        
        if ($config->show_create_date) {
            $html[] = '</span>';
        }

        return implode(' ', $html);
    }
}
{'fraction_non_alphanumeric': 0.17453798767967146, 'fraction_numerical': 0.006416837782340862, 'mean_word_length': 2.4856887298747763, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '1460873', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1143, 'n_words': 204}