<commit_before><?php
/**
 * @category       Nooku
 * @package        Nooku_Server
 * @subpackage     Articles
 * @copyright      Copyright (C) 2009 - 2012 Timble CVBA and Contributors. (http://www.timble.net)
 * @license        GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link           http://www.nooku.org
 */

use Nooku\Framework;

/**
 * Publishable Database Behavior Class
 *
 * Auto publishes/un-publishes items.
 *
 * @author     <NAME> <http://nooku.assembla.com/profile/arunasmazeika>
 * @category   Nooku
 * @package    Nooku_Server
 * @subpackage Articles
 */
class ComArticlesDatabaseBehaviorPublishable extends KDatabaseBehaviorAbstract
{
    /**
     * Track updated status
     *
     * Variable keeps track of the updated status of the items table. A value of true indicates that items are
     * already up to date, i.e. published and unpublished according with the current timestamp.
     *
     * @var bool
     */
    protected $_uptodate = false;

    /**
     * The name of the table containing the publishable items.
     *
     * @var string
     */
    protected $_table;

    /**
     * The current date.
     *
     * @var Framework\Date The current date.
     */
    protected $_date;

    public function __construct(Framework\Config $config)
    {
        parent::__construct($config);
        
        $this->_table = $config->table;
        $this->_date  = new Framework\Date(array('timezone' => 'GMT'));
    }

    protected function _initialize(Framework\Config $config)
    {
        $config->append(array(
            'table'=> 'articles'
        ));

        parent::_initialize($config);
    }

    protected function _afterTableSelect(Framework\CommandContext $context)
    {
        if (!$this->_uptodate) {

        if ($data instanceof KDatabaseRowsetInterface && !$this->_uptodate)
        {
            $this->_publishItems();
            $this->_unpublishItems();
<commit_msg>Fixed merge typo's.<commit_after><?php
/**
 * @category       Nooku
 * @package        Nooku_Server
 * @subpackage     Articles
 * @copyright      Copyright (C) 2009 - 2012 Timble CVBA and Contributors. (http://www.timble.net)
 * @license        GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link           http://www.nooku.org
 */

use Nooku\Framework;

/**
 * Publishable Database Behavior Class
 *
 * Auto publishes/un-publishes items.
 *
 * @author     <NAME> <http://nooku.assembla.com/profile/arunasmazeika>
 * @category   Nooku
 * @package    Nooku_Server
 * @subpackage Articles
 */
class ComArticlesDatabaseBehaviorPublishable extends Framework\DatabaseBehaviorAbstract
{
    /**
     * Track updated status
     *
     * Variable keeps track of the updated status of the items table. A value of true indicates that items are
     * already up to date, i.e. published and unpublished according with the current timestamp.
     *
     * @var bool
     */
    protected $_uptodate = false;

    /**
     * The name of the table containing the publishable items.
     *
     * @var string
     */
    protected $_table;

    /**
     * The current date.
     *
     * @var Framework\Date The current date.
     */
    protected $_date;

    public function __construct(Framework\Config $config)
    {
        parent::__construct($config);
        
        $this->_table = $config->table;
        $this->_date  = new Framework\Date(array('timezone' => 'GMT'));
    }

    protected function _initialize(Framework\Config $config)
    {
        $config->append(array(
            'table'=> 'articles'
        ));

        parent::_initialize($config);
    }

    protected function _afterTableSelect(Framework\CommandContext $context)
    {
        $data = $context->data;

        if ($data instanceof KDatabaseRowsetInterface && !$this->_uptodate)
        {
            $this->_publishItems();
            $this->_unpublishItems();

{'fraction_non_alphanumeric': 0.11615900877645845, 'fraction_numerical': 0.004646360351058337, 'mean_word_length': 2.3842794759825328, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 29, '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': '6817931', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1101, 'n_words': 282}