<commit_before><?php
/**
 * @version     $Id: html.php 1481 2012-02-10 01:46:24Z johanjanssens $
 * @package     Nooku_Server
 * @subpackage  Default
 * @copyright   Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Syndicate Module Html View Class
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @package     Nooku_Modules
 * @subpackage  Default
 */
 
class ModSyndicateHtml extends ModDefaultHtml
{
    public function display()
    {
        $this->module->params->set('text', 'Feed Entries');

        if($link = $this->getLink($this->module->params))
        {
            $this->assign('link'  , $link);

            return parent::display();
        }
    }

    function getLink($params)
    {
        $document = JFactory::getDocument();

        foreach($document->_links as $link)
        {
            if(strpos($link, 'application/rss+xml'))
            {
                preg_match("#href=\"(.*?)\"#s", $link, $matches);
                return $matches[1];
            }
        }

    }
} <commit_msg>re #234 : Added TODO<commit_after><?php
/**
 * @version     $Id: html.php 1481 2012-02-10 01:46:24Z johanjanssens $
 * @package     Nooku_Server
 * @subpackage  Default
 * @copyright   Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Syndicate Module Html View Class
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @package     Nooku_Modules
 * @subpackage  Default
 */
 
class ModSyndicateHtml extends ModDefaultHtml
{
    public function display()
    {
        $this->module->params->set('text', 'Feed Entries');

        if($link = $this->getLink($this->module->params))
        {
            $this->assign('link'  , $link);

            return parent::display();
        }
    }

    public function getLink($params)
    {
        //@TODO : This is no longer working. Implement differently
        $document = JFactory::getDocument();

        foreach($document->_links as $link)
        {
            if(strpos($link, 'application/rss+xml'))
            {
                preg_match("#href=\"(.*?)\"#s", $link, $matches);
                return $matches[1];
            }
        }

    }
} 
{'fraction_non_alphanumeric': 0.1568706931495744, 'fraction_numerical': 0.023915687069314958, 'mean_word_length': 2.1479591836734695, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 2}, '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': '1445362', 'n_tokens_mistral': 844, 'n_tokens_neox': 781, 'n_words': 152}