<commit_before><?php
/**
 * @version        $Id$
 * @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\Library;

/**
 * Files Html View
 *
 * @author  <NAME> <http://nooku.assembla.com/profile/arunasmazeika>
 * @package Component\Files
 */
class FilesViewDirectoryHtml extends Library\ViewHtml
{
	public function render()
	{
        $page = $this->getObject('application.pages')->getActive();
        $params = new JParameter($page->params);

        $folders       = $this->_getFolders();
        $this->folders = $folders['items'];

        $files       = $this->_getFiles();
        $this->files = $files['items'];
        $this->total = $files['total'];

        $folder = $this->getModel()->getRow();

        if ($page->getLink()->query['folder'] !== $folder->path)
		{
			$path   = explode('/', $folder->path);
			$parent = count($path) > 1 ? implode('/', array_slice($path, 0, count($path)-1)) : '';
		} else {
            $parent = null;
        }

        $this->parent         = $parent;
        $this->params         = $params;<commit_msg>Fixed page title<commit_after><?php
/**
 * @version        $Id$
 * @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\Library;

/**
 * Files Html View
 *
 * @author  <NAME> <http://nooku.assembla.com/profile/arunasmazeika>
 * @package Component\Files
 */
class FilesViewDirectoryHtml extends Library\ViewHtml
{
	public function render()
	{
        $page = $this->getObject('application.pages')->getActive();
        $params = new JParameter($page->params);

        $folders       = $this->_getFolders();
        $this->folders = $folders['items'];

        $files       = $this->_getFiles();
        $this->files = $files['items'];
        $this->total = $files['total'];

        $folder = $this->getModel()->getRow();

        if ($page->getLink()->query['folder'] !== $folder->path)
		{
			$path   = explode('/', $folder->path);
			$parent = count($path) > 1 ? implode('/', array_slice($path, 0, count($path)-1)) : '';

            $params->set('page_title', ucfirst(end($path)));
		} else {
            $parent = null;

            $params->set('page_title', $page->title);
        }

        $this->parent         = $parent;
        $this->params         = $params;
{'fraction_non_alphanumeric': 0.18670649738610903, 'fraction_numerical': 0.008961911874533234, 'mean_word_length': 2.4083969465648853, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 46, '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': '3952216', 'n_tokens_mistral': 890, 'n_tokens_neox': 843, 'n_words': 159}