<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' );

$this->css()
     ->css('vote.css', 'com_answers')
     ->js();

$jconfig = JFactory::getConfig();
$sitename = $jconfig->getValue('config.sitename');

$base = $this->wishlist->link();

$cloud = new WishlistModelTags($this->wishlist->get('id'));
$total = $this->wishlist->wishes('list', $this->filters);

/* Wish List */
if ($this->wishlist->exists())
{
	if (!$this->wishlist->isPublic() && !$this->wishlist->access('manage')) { ?>
		<section class="main section">
			<p class="waring"><?php echo JText::_('WARNING_NOT_AUTHORIZED_PRIVATE_LIST'); ?></p>
		</section><!-- / .main section -->
	<?php } else { ?>
		<header id="content-header">
			<h2><?php echo $this->title; ?></h2>

			<div id="content-header-extra">
				<ul id="useroptions">
					<li class="last">
						<a class="icon-add add btn" href="<?php echo JRoute::_($this->wishlist->link('new')); ?>">
							<?php echo JText::_('COM_WISHLIST_TASK_ADD'); ?>
						</a>
					</li>
				</ul>
			</div><!-- / #content-header-extra -->
		</header><!-- / #content-header -->

		<form method="get" action="<?php echo JRoute::_($base); ?>">
			<?php
			// Admin messages
			if ($this->wishlist->access('manage') && !$this->getError())
			{
				// Wish was deleted from the list
				if ($this->task == 'deletewish')
				{
					echo '<p class="passed">'.JText::_('COM_WISHLIST_NOTICE_WISH_DELETED').'</p>'."\n";
				}

				// Wish was moved to a new list
				if ($this->task == 'movewish')
				{
					echo '<p class="passed">'.JText::_('COM_WISHLIST_NOTICE_WISH_MOVED').'</p>'."\n";
				}

				switch ($this->wishlist->get('saved'))
				{
					case '1':
						// List settings saved
						echo '<p class="passed">'.JText::_('COM_WISHLIST_NOTICE_LIST_SETTINGS_SAVED').'</p>'."\n";
					break;
					case '2':
						// Changes to wish saved
						echo '<p class="passed">'.JText::_('COM_WISHLIST_NOTICE_WISH_CHANGES_SAVED').'</p>'."\n";
					break;
					case '3':
						// New wish posted
						echo '<p class="passed">'.JText::_('COM_WISHLIST_NOTICE_WISH_POSTED').'</p>'."\n";
					break;
				}
			}
			?>
			<?php if ($this->getError()) { ?>
				<p class="error"><?php echo $this->getError(); ?></p>
			<?php } ?>

			<section class="main section">
				<div class="subject">
					<div class="container data-entry">
						<input class="entry-search-submit" type="submit" value="<?php echo JText::_('COM_WISHLIST_SEARCH'); ?>" />
						<fieldset class="entry-search">
							<legend><?php echo JText::_('COM_WISHLIST_SEARCH_LEGEND'); ?></legend>

							<label for="entry-search-field"><?php echo JText::_('COM_WISHLIST_SEARCH_LABEL'); ?></label>
							<input type="text" name="search" id="entry-search-field" value="<?php echo $this->escape($this->filters['search']); ?>" placeholder="<?php echo JText::_('COM_WISHLIST_SEARCH_PLACEHOLDER'); ?>" />

							<input type="hidden" name="tags" value="<?php echo $this->escape($this->filters['tag']); /* xss fix for ticket 1413/1417 */ ?>" />
							<input type="hidden" name="sortby" value="<?php echo $this->escape($this->filters['sortby']); /* xss fix for ticket 1413/1417 */ ?>" />
							<input type="hidden" name="filterby" value="<?php echo $this->escape($this->filters['filterby']); /* xss fix for ticket 1412/1419 */?>" />

							<input type="hidden" name="task" value="<?php echo $this->escape($this->task); /* XSS fix, see ticket 1420*/ ?>" />
							<input type="hidden" name="newsearch" value="1" />
							<input type="hidden" name="option" value="<?php echo $this->option; ?>" />
						</fieldset>
						<?php if ($this->filters['tag']) { ?>
							<fieldset class="applied-tags">
								<ol class="tags">
								<?php
								$url  = $base;
								$url .= ($this->filters['search']   ? '&search=' . $this->escape($this->filters['search'])     : '');
								$url .= ($this->filters['sortby']   ? '&sortby=' . $this->escape($this->filters['sortby'])     : '');
								$url .= ($this->filters['filterby'] ? '&filterby=' . $this->escape($this->filters['filterby']) : '');

								$tags = $cloud->parseTags($this->filters['tag']);
								foreach ($tags as $tag)
								{
									?><commit_msg>[NANOHUB][#267429][COM_WISHLIST] another attempt to fix routing problem when searching in wish list<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' );

$this->css()
     ->css('vote.css', 'com_answers')
     ->js();

$jconfig = JFactory::getConfig();
$sitename = $jconfig->getValue('config.sitename');

$base = $this->wishlist->link();

$cloud = new WishlistModelTags($this->wishlist->get('id'));
$total = $this->wishlist->wishes('list', $this->filters);

/* Wish List */
if ($this->wishlist->exists())
{
	if (!$this->wishlist->isPublic() && !$this->wishlist->access('manage')) { ?>
		<section class="main section">
			<p class="waring"><?php echo JText::_('WARNING_NOT_AUTHORIZED_PRIVATE_LIST'); ?></p>
		</section><!-- / .main section -->
	<?php } else { ?>
		<header id="content-header">
			<h2><?php echo $this->title; ?></h2>

			<div id="content-header-extra">
				<ul id="useroptions">
					<li class="last">
						<a class="icon-add add btn" href="<?php echo JRoute::_($this->wishlist->link('new')); ?>">
							<?php echo JText::_('COM_WISHLIST_TASK_ADD'); ?>
						</a>
					</li>
				</ul>
			</div><!-- / #content-header-extra -->
		</header><!-- / #content-header -->

		<form method="get" action="<?php echo JRoute::_($base); ?>">
			<?php
			// Admin messages
			if ($this->wishlist->access('manage') && !$this->getError())
			{
				// Wish was deleted from the list
				if ($this->task == 'deletewish')
				{
					echo '<p class="passed">'.JText::_('COM_WISHLIST_NOTICE_WISH_DELETED').'</p>'."\n";
				}

				// Wish was moved to a new list
				if ($this->task == 'movewish')
				{
					echo '<p class="passed">'.JText::_('COM_WISHLIST_NOTICE_WISH_MOVED').'</p>'."\n";
				}

				switch ($this->wishlist->get('saved'))
				{
					case '1':
						// List settings saved
						echo '<p class="passed">'.JText::_('COM_WISHLIST_NOTICE_LIST_SETTINGS_SAVED').'</p>'."\n";
					break;
					case '2':
						// Changes to wish saved
						echo '<p class="passed">'.JText::_('COM_WISHLIST_NOTICE_WISH_CHANGES_SAVED').'</p>'."\n";
					break;
					case '3':
						// New wish posted
						echo '<p class="passed">'.JText::_('COM_WISHLIST_NOTICE_WISH_POSTED').'</p>'."\n";
					break;
				}
			}
			?>
			<?php if ($this->getError()) { ?>
				<p class="error"><?php echo $this->getError(); ?></p>
			<?php } ?>

			<section class="main section">
				<div class="subject">
					<div class="container data-entry">
						<input class="entry-search-submit" type="submit" value="<?php echo JText::_('COM_WISHLIST_SEARCH'); ?>" />
						<fieldset class="entry-search">
							<legend><?php echo JText::_('COM_WISHLIST_SEARCH_LEGEND'); ?></legend>

							<label for="entry-search-field"><?php echo JText::_('COM_WISHLIST_SEARCH_LABEL'); ?></label>
							<input type="text" name="search" id="entry-search-field" value="<?php echo $this->escape($this->filters['search']); ?>" placeholder="<?php echo JText::_('COM_WISHLIST_SEARCH_PLACEHOLDER'); ?>" />

							<input type="hidden" name="tags" value="<?php echo $this->escape($this->filters['tag']); /* xss fix for ticket 1413/1417 */ ?>" />
							<input type="hidden" name="sortby" value="<?php echo $this->escape($this->filters['sortby']); /* xss fix for ticket 1413/1417 */ ?>" />
							<input type="hidden" name="filterby" value="<?php echo $this->escape($this->filters['filterby']); /* xss fix for ticket 1412/1419 */?>" />

							<input type="hidden" name="task" value="<?php echo $this->escape($this->task); /* XSS fix, see ticket 1420*/ ?>" />
							<input type="hidden" name="newsearch" value="1" />
						</fieldset>
						<?php if ($this->filters['tag']) { ?>
							<fieldset class="applied-tags">
								<ol class="tags">
								<?php
								$url  = $base;
								$url .= ($this->filters['search']   ? '&search=' . $this->escape($this->filters['search'])     : '');
								$url .= ($this->filters['sortby']   ? '&sortby=' . $this->escape($this->filters['sortby'])     : '');
								$url .= ($this->filters['filterby'] ? '&filterby=' . $this->escape($this->filters['filterby']) : '');

								$tags = $cloud->parseTags($this->filters['tag']);
								foreach ($tags as $tag)
								{
									?>
{'fraction_non_alphanumeric': 0.20157992565055763, 'fraction_numerical': 0.010594795539033457, 'mean_word_length': 3.4744282744282744, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 260, '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': '3518146', 'n_tokens_mistral': 4225, 'n_tokens_neox': 3556, 'n_words': 851}