<commit_before><?php
/**
 * HUBzero CMS
 *
 * Copyright 2005-2011 Purdue University. All rights reserved.
 *
 * This file is part of: The HUBzero(R) Platform for Scientific Collaboration
 *
 * The HUBzero(R) Platform for Scientific Collaboration (HUBzero) is free
 * software: you can redistribute it and/or modify it under the terms of
 * the GNU Lesser General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any
 * later version.
 *
 * HUBzero is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    <NAME> <<EMAIL>>
 * @copyright Copyright 2005-2011 Purdue University. All rights reserved.
 * @license   http://www.gnu.org/licenses/lgpl-3.0.html LGPLv3
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

$juser =& JFactory::getUser();
//$database =& JFactory::getDBO();

$dateFormat = '%d %b %Y';
$timeFormat = '%I:%M %p';
$tz = 0;
if (version_compare(JVERSION, '1.6', 'ge'))
{
	$dateFormat = 'd M Y';
	$timeFormat = 'H:i p';
	$tz = true;
}

JPluginHelper::importPlugin('hubzero');
$dispatcher =& JDispatcher::getInstance();

$status = SupportHtml::getStatus($this->row->open, $this->row->status);

$unknown = 1;
$name = JText::_('Unknown');

$submitter = new Hubzero_User_Profile();
if ($this->row->login) 
{
	//$juseri =& JUser::getInstance($comment->created_by);
	$submitter->load($this->row->login);
	if (is_object($submitter) && $submitter->get('name')) 
	{
		$name = '<a rel="profile" href="' . JRoute::_('index.php?option=com_members&id=' . $submitter->get('uidNumber')) . '">' . $this->escape(stripslashes($submitter->get('name'))) . ' (' . $this->escape(stripslashes($this->row->login)) . ')</a>';
		$unknown = 0;
	} 
	else 
	{
		$name  = '<a rel="email" href="mailto:'. $this->row->email .'">';
		$name .= ($this->row->login) ? $this->escape(stripslashes($this->row->name)) . ' (' . $this->escape(stripslashes($this->row->login)) . ')' : $this->escape(stripslashes($this->row->name));
		$name .= '</a>';
	}
} 
else 
{
	$name  = '<a rel="email" href="mailto:'. $this->row->email .'">';
	$name .= ($this->row->login) ? $this->escape(stripslashes($this->row->name)) . ' (' . $this->escape(stripslashes($this->row->login)) . ')' : $this->escape(stripslashes($this->row->name));
	$name .= '</a>';
}

$prev = null;
$next = null;

$sq = new SupportQuery(JFactory::getDBO());
$sq->load($this->filters['show']);
if ($sq->conditions)
{
	$sq->query = $sq->getQuery($sq->conditions);

	$this->filters['sort']    = $sq->sort;
	$this->filters['sortdir'] = $sq->sort_dir;
	if ($rows = $this->row->getRecords($sq->query, $this->filters))
	{
		foreach ($rows as $key => $row)
		{
			if ($row->id == $this->row->id)
			{
				if (isset($rows[$key - 1]))
				{
					$prev = $rows[$key - 1];
				}
				if (isset($rows[$key + 1]))
				{
					$next = $rows[$key + 1];
				}
				break;
			}
		}
		unset($rows);<commit_msg>Had prev and next tickts backwards<commit_after><?php
/**
 * HUBzero CMS
 *
 * Copyright 2005-2011 Purdue University. All rights reserved.
 *
 * This file is part of: The HUBzero(R) Platform for Scientific Collaboration
 *
 * The HUBzero(R) Platform for Scientific Collaboration (HUBzero) is free
 * software: you can redistribute it and/or modify it under the terms of
 * the GNU Lesser General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any
 * later version.
 *
 * HUBzero is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    <NAME> <<EMAIL>>
 * @copyright Copyright 2005-2011 Purdue University. All rights reserved.
 * @license   http://www.gnu.org/licenses/lgpl-3.0.html LGPLv3
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

$juser =& JFactory::getUser();
//$database =& JFactory::getDBO();

$dateFormat = '%d %b %Y';
$timeFormat = '%I:%M %p';
$tz = 0;
if (version_compare(JVERSION, '1.6', 'ge'))
{
	$dateFormat = 'd M Y';
	$timeFormat = 'H:i p';
	$tz = true;
}

JPluginHelper::importPlugin('hubzero');
$dispatcher =& JDispatcher::getInstance();

$status = SupportHtml::getStatus($this->row->open, $this->row->status);

$unknown = 1;
$name = JText::_('Unknown');

$submitter = new Hubzero_User_Profile();
if ($this->row->login) 
{
	//$juseri =& JUser::getInstance($comment->created_by);
	$submitter->load($this->row->login);
	if (is_object($submitter) && $submitter->get('name')) 
	{
		$name = '<a rel="profile" href="' . JRoute::_('index.php?option=com_members&id=' . $submitter->get('uidNumber')) . '">' . $this->escape(stripslashes($submitter->get('name'))) . ' (' . $this->escape(stripslashes($this->row->login)) . ')</a>';
		$unknown = 0;
	} 
	else 
	{
		$name  = '<a rel="email" href="mailto:'. $this->row->email .'">';
		$name .= ($this->row->login) ? $this->escape(stripslashes($this->row->name)) . ' (' . $this->escape(stripslashes($this->row->login)) . ')' : $this->escape(stripslashes($this->row->name));
		$name .= '</a>';
	}
} 
else 
{
	$name  = '<a rel="email" href="mailto:'. $this->row->email .'">';
	$name .= ($this->row->login) ? $this->escape(stripslashes($this->row->name)) . ' (' . $this->escape(stripslashes($this->row->login)) . ')' : $this->escape(stripslashes($this->row->name));
	$name .= '</a>';
}

$prev = null;
$next = null;

$sq = new SupportQuery(JFactory::getDBO());
$sq->load($this->filters['show']);
if ($sq->conditions)
{
	$sq->query = $sq->getQuery($sq->conditions);

	$this->filters['sort']    = $sq->sort;
	$this->filters['sortdir'] = $sq->sort_dir;
	if ($rows = $this->row->getRecords($sq->query, $this->filters))
	{
		foreach ($rows as $key => $row)
		{
			if ($row->id == $this->row->id)
			{
				if (isset($rows[$key - 1]))
				{
					$next = $rows[$key - 1];
				}
				if (isset($rows[$key + 1]))
				{
					$prev = $rows[$key + 1];
				}
				break;
			}
		}
		unset($rows);
{'fraction_non_alphanumeric': 0.2033397369587705, 'fraction_numerical': 0.00857100635436678, 'mean_word_length': 4.028231797919762, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 145, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '7553158', 'n_tokens_mistral': 2496, 'n_tokens_neox': 2322, 'n_words': 584}