修改简体中文语言文件。

+YUCHENG HU+



git-svn-id: https://svn.code.sf.net/p/hawebs/svn@525 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
YuCheng Hu
2010-07-30 04:13:46 +00:00
parent 83344c4eae
commit 7b9f1c06a5
59 changed files with 950 additions and 791 deletions
+4 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: CHANGELOG.php 18151 2010-07-15 09:33:47Z dextercowley $
* @version $Id: CHANGELOG.php 18172 2010-07-17 19:46:57Z ian $
* @package Joomla
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
@@ -37,6 +37,9 @@ $ -> Language fix or change
! -> Note
-------------------- 1.5.20 Stable Release [18-July-2010] ------------------
-------------------- 1.5.19 Stable Release [15-July-2010] ------------------
15-July-2010 Mark Dexter
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: admin.admin.html.php 14401 2010-01-26 14:10:00Z louis $
* @version $Id: admin.admin.html.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Admin
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -137,6 +137,8 @@ class HTML_admin_misc
$fullhelpurl = $helpurl . '/index2.php?option=com_content&amp;task=findkey&amp;pop=1&amp;keyref=';
$helpsearch = JRequest::getString('helpsearch');
$helpsearch = str_replace(array('=', '<', '"'), '', $helpsearch);
$page = JRequest::getCmd('page', 'joomla.whatsnew15.html');
$toc = getHelpToc( $helpsearch );
$lang =& JFactory::getLanguage();
@@ -159,7 +161,7 @@ class HTML_admin_misc
<td>
<strong><?php echo JText::_( 'Search' ); ?>:</strong>
<input class="text_area" type="hidden" name="option" value="com_admin" />
<input type="text" name="helpsearch" value="<?php echo $helpsearch;?>" class="inputbox" />
<input type="text" name="helpsearch" value="<?php echo htmlspecialchars($helpsearch);?>" class="inputbox" />
<input type="submit" value="<?php echo JText::_( 'Go' ); ?>" class="button" />
<input type="button" value="<?php echo JText::_( 'Clear Results' ); ?>" class="button" onclick="f=document.adminForm;f.helpsearch.value='';f.submit()" />
</td>
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: banner.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: banner.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Banners
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -78,6 +78,12 @@ class BannerControllerBanner extends JController
}
$where = count( $where ) ? ' WHERE ' . implode( ' AND ', $where ) : '';
// sanitize $filter_order
if (!in_array($filter_order, array('b.name', 'c.name', 'cc.title', 'b.showBanner', 'b.ordering', 'b.sticky', 'b.impmade', 'b.clicks', 'b.bid'))) {
$filter_order = 'cc.title';
}
$orderby = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', b.ordering';
// get the total number of records
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: client.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: client.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Banners
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -59,6 +59,11 @@ class BannerControllerClient extends JController
}
$where = ( count( $where ) ? ' WHERE ' . implode( ' AND ', $where ) : '' );
if (!in_array($filter_order, array('a.name', 'a.contact', 'bid', 'a.cid'))) {
$filter_order = 'a.name';
}
$orderby = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', a.cid';
// get the total number of records
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: banner.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: banner.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Banners
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -139,25 +139,25 @@ class BannersViewBanner
<?php echo $checked; ?>
</td>
<td>
<span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit' );?>::<?php echo $row->name; ?>">
<span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit' );?>::<?php echo htmlspecialchars($row->name); ?>">
<?php
if ( JTable::isCheckedOut($user->get ('id'), $row->checked_out ) ) {
echo $row->name;
echo htmlspecialchars($row->name);
} else {
?>
<a href="<?php echo $link; ?>">
<?php echo $row->name; ?></a>
<?php echo htmlspecialchars($row->name); ?></a>
<?php
}
?>
</span>
</td>
<td align="center">
<?php echo $row->client_name;?>
<?php echo htmlspecialchars($row->client_name);?>
</td>
<td align="center">
<?php echo $row->category_name;?>
<?php echo htmlspecialchars($row->category_name);?>
</td>
<td align="center">
<?php echo $published;?>
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: client.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: client.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Banners
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -102,9 +102,9 @@ class BannersViewClients
echo $row->name;
} else {
?>
<span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit' );?>::<?php echo $row->name; ?>">
<span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit' );?>::<?php echo htmlspecialchars($row->name); ?>">
<a href="<?php echo $link; ?>">
<?php echo $row->name; ?></a>
<?php echo htmlspecialchars($row->name); ?></a>
</span>
<?php
}
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: admin.categories.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: admin.categories.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Categories
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -128,6 +128,16 @@ function showCategories( $section, $option )
$section_name = '';
$content_add = '';
$content_join = '';
// ensure we have a good value for $filter_order
if (!in_array($filter_order, array('c.title', 'c.published', 'c.ordering', 'groupname', 'section_name', 'c.id'))) {
$filter_order = 'c.ordering';
}
if (intval($section) <= 0 && $section != 'com_content' && $filter_order == 'section_name') {
$filter_order = 'c.ordering';
}
$order = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', c.ordering';
if (intval( $section ) > 0) {
$table = 'content';
@@ -193,6 +203,7 @@ function showCategories( $section, $option )
$content_add = ' , z.title AS section_name';
$content_join = ' LEFT JOIN #__sections AS z ON z.id = c.section';
$where = ' WHERE c.section NOT LIKE "%com_%"';
if ($filter_order == 'c.ordering'){
$order = ' ORDER BY z.title, c.ordering '. $filter_order_Dir;
} else {
@@ -424,7 +435,7 @@ function saveCategory()
// Initialize variables
$db =& JFactory::getDBO();
$menu = JRequest::getCmd( 'menu', 'mainmenu', 'post' );
$menu = JRequest::getVar( 'menu', 'mainmenu', 'post', 'menutype' );
$menuid = JRequest::getVar( 'menuid', 0, 'post', 'int' );
$redirect = JRequest::getCmd( 'redirect', '', 'post' );
$oldtitle = JRequest::getString( 'oldtitle', '', 'post' );
@@ -489,11 +500,14 @@ function saveCategory()
switch ( JRequest::getCmd('task') )
{
case 'go2menu':
$mainframe->redirect( 'index.php?option=com_menus&menutype='. $menu );
$mainframe->redirect('index.php?option=com_menus&menutype=' . $menu);
break;
case 'go2menuitem':
$mainframe->redirect( 'index.php?option=com_menus&menutype='. $menu .'&task=edit&id='. $menuid );
$mainframe->redirect(
'index.php?option=com_menus&menutype=' . $menu
. '&task=edit&id='. $menuid
);
break;
case 'apply':
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: admin.contact.html.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: admin.contact.html.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Contact
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -114,12 +114,12 @@ class HTML_contact
<td>
<?php
if (JTable::isCheckedOut($user->get ('id'), $row->checked_out )) :
echo $row->name;
echo htmlspecialchars($row->name);
else :
?>
<span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit Contact' );?>::<?php echo $row->name; ?>">
<span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit Contact' );?>::<?php echo htmlspecialchars($row->name); ?>">
<a href="<?php echo $link; ?>">
<?php echo $row->name; ?></a> </span>
<?php echo htmlspecialchars($row->name); ?></a> </span>
<?php
endif;
?>
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: admin.contact.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: admin.contact.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Contact
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -131,6 +131,11 @@ function showContacts( $option )
}
}
// sanitize $filter_order
if (!in_array($filter_order, array('cd.name', 'cd.published', 'cd.ordering', 'cd.access', 'category', 'user', 'cd.id'))) {
$filter_order = 'cd.ordering';
}
$where = ( count( $where ) ? ' WHERE ' . implode( ' AND ', $where ) : '' );
if ($filter_order == 'cd.ordering'){
$orderby = ' ORDER BY category, cd.ordering';
@@ -1,7 +1,7 @@
<?php
/**
* @version $Id: admin.content.php 14401 2010-01-26 14:10:00Z louis $
* @version $Id: admin.content.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Content
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -87,10 +87,6 @@ switch (strtolower($task))
ContentController::orderContent(1);
break;
//case 'showarchive' :
// JContentController::viewArchive();
// break;
case 'movesect' :
ContentController::moveSection();
break;
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: controller.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: controller.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Content
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -75,9 +75,14 @@ class ContentController extends JController
//$where[] = "c.state >= 0";
$where[] = 'c.state != -2';
if (!$filter_order) {
// ensure we have a valid value for filter_order
if (!in_array($filter_order, array('c.title', 'c.state', 'frontpage', 'c.ordering', 'groupname',
'section_name', 'cc.title', 'author', 'c.created', 'c.hits', 'c.id')))
{
$filter_order = 'section_name';
}
if ($filter_order == 'c.ordering') {
$order = ' ORDER BY section_name, cc.title, c.ordering '. $filter_order_Dir;
} else {
@@ -202,142 +207,6 @@ class ContentController extends JController
ContentView::showContent($rows, $lists, $pagination, $redirect);
}
/**
* Shows a list of archived articles
* @param int The section id
*/
function viewArchive()
{
global $mainframe;
// Initialize variables
$db =& JFactory::getDBO();
$sectionid = JRequest::getVar( 'sectionid', 0, '', 'int' );
$option = JRequest::getCmd( 'option' );
$filter_order = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.filter_order", 'filter_order', 'sectname', 'cmd');
$filter_order_Dir = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.filter_order_Dir", 'filter_order_Dir', '', 'word');
$catid = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.catid", 'catid', 0, 'int');
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
$limitstart = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.limitstart", 'limitstart', 0, 'int');
$filter_authorid = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.filter_authorid", 'filter_authorid', 0, 'int');
$filter_sectionid = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.filter_sectionid", 'filter_sectionid', 0, 'int');
$search = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.search", 'search', '', 'string');
if (strpos($search, '"') !== false) {
$search = str_replace(array('=', '<'), '', $search);
}
$search = JString::strtolower($search);
$redirect = $sectionid;
// A section id of zero means view all articles [all sections]
if ($sectionid == 0)
{
$where = array ('c.state = -1', 'c.catid = cc.id', 'cc.section = s.id', 's.scope = "content"');
$filter = ' , #__sections AS s WHERE s.id = c.section';
$all = 1;
}
else
{
//We are viewing a specific section
$where = array ('c.state = -1', 'c.catid = cc.id', 'cc.section = s.id', 's.scope = "content"', 'c.sectionid= '.(int) $sectionid);
$filter = ' WHERE section = '.$db->Quote($sectionid);
$all = NULL;
}
// Section filter
if ($filter_sectionid > 0)
{
$where[] = 'c.sectionid = ' . (int) $filter_sectionid;
}
// Author filter
if ($filter_authorid > 0)
{
$where[] = 'c.created_by = ' . (int) $filter_authorid;
}
// Category filter
if ($catid > 0)
{
$where[] = 'c.catid = ' . (int) $catid;
}
// Keyword filter
if ($search)
{
$where[] = 'LOWER( c.title ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false );
}
// TODO: Sanitise $filter_order
$filter_order_Dir = ($filter_order_Dir == 'ASC' ? 'ASC' : 'DESC');
$orderby = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', sectname, cc.name, c.ordering';
$where = (count($where) ? ' WHERE '.implode(' AND ', $where) : '');
// get the total number of records
$query = 'SELECT COUNT(*)' .
' FROM #__content AS c' .
' LEFT JOIN #__categories AS cc ON cc.id = c.catid' .
' LEFT JOIN #__sections AS s ON s.id = c.sectionid' .
$where;
$db->setQuery($query);
$total = $db->loadResult();
jimport('joomla.html.pagination');
$pagination = new JPagination($total, $limitstart, $limit);
$query = 'SELECT c.*, g.name AS groupname, cc.name, v.name AS author, s.title AS sectname' .
' FROM #__content AS c' .
' LEFT JOIN #__categories AS cc ON cc.id = c.catid' .
' LEFT JOIN #__sections AS s ON s.id = c.sectionid' .
' LEFT JOIN #__groups AS g ON g.id = c.access' .
' LEFT JOIN #__users AS v ON v.id = c.created_by' .
$where .
$orderby;
$db->setQuery($query, $pagination->limitstart, $pagination->limit);
$rows = $db->loadObjectList();
// If there is a database query error, throw a HTTP 500 and exit
if ($db->getErrorNum())
{
JError::raiseError( 500, $db->stderr() );
return false;
}
// get list of categories for dropdown filter
$query = 'SELECT c.id AS value, c.title AS text' .
' FROM #__categories AS c' .
$filter .
' ORDER BY c.ordering';
$lists['catid'] = ContentHelper::filterCategory($query, $catid);
// get list of sections for dropdown filter
$javascript = 'onchange="document.adminForm.submit();"';
$lists['sectionid'] = JAdminMenus::SelectSection('filter_sectionid', $filter_sectionid, $javascript);
$section = & JTable::getInstance('section');
$section->load($sectionid);
// get list of Authors for dropdown filter
$query = 'SELECT c.created_by, u.name' .
' FROM #__content AS c' .
' INNER JOIN #__sections AS s ON s.id = c.sectionid' .
' LEFT JOIN #__users AS u ON u.id = c.created_by' .
' WHERE c.state = -1' .
' GROUP BY u.name' .
' ORDER BY u.name';
$db->setQuery($query);
$authors[] = JHTML::_('select.option', '0', '- '.JText::_('Select Author').' -', 'created_by', 'name');
$authors = array_merge($authors, $db->loadObjectList());
$lists['authorid'] = JHTML::_('select.genericlist', $authors, 'filter_authorid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'created_by', 'name', $filter_authorid);
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// search filter
$lists['search'] = $search;
ContentView::showArchive($rows, $section, $lists, $pagination, $option, $all, $redirect);
}
/**
* Compiles information to add or edit the record
*
@@ -604,7 +473,7 @@ class ContentController extends JController
$task = JRequest::getCmd( 'task' );
$sectionid = JRequest::getVar( 'sectionid', 0, '', 'int' );
$redirect = JRequest::getVar( 'redirect', $sectionid, 'post', 'int' );
$menu = JRequest::getVar( 'menu', 'mainmenu', 'post', 'cmd' );
$menu = JRequest::getVar( 'menu', 'mainmenu', 'post', 'menutype' );
$menuid = JRequest::getVar( 'menuid', 0, 'post', 'int' );
$nullDate = $db->getNullDate();
@@ -763,11 +632,14 @@ class ContentController extends JController
switch ($task)
{
case 'go2menu' :
$mainframe->redirect('index.php?option=com_menus&menutype='.$menu);
$mainframe->redirect('index.php?option=com_menus&menutype=' . $menu);
break;
case 'go2menuitem' :
$mainframe->redirect('index.php?option=com_menus&menutype='.$menu.'&task=edit&id='.$menuid);
$mainframe->redirect(
'index.php?option=com_menus&menutype=' . $menu
. '&task=edit&id=' . $menuid
);
break;
case 'menulink' :
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: helper.php 14401 2010-01-26 14:10:00Z louis $
* @version $Id: helper.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Content
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -83,6 +83,54 @@ class ContentHelper
return true;
}
/**
* Applies the content tag filters to arbitrary text as per settings for current user group
* @param text The string to filter
* @return string The filtered string
*/
function filterText( $text )
{
// Filter settings
jimport( 'joomla.application.component.helper' );
$config = JComponentHelper::getParams( 'com_content' );
$user = &JFactory::getUser();
$gid = $user->get( 'gid' );
$filterGroups = $config->get( 'filter_groups' );
// convert to array if one group selected
if ( (!is_array($filterGroups) && (int) $filterGroups > 0) ) {
$filterGroups = array($filterGroups);
}
if (is_array($filterGroups) && in_array( $gid, $filterGroups ))
{
$filterType = $config->get( 'filter_type' );
$filterTags = preg_split( '#[,\s]+#', trim( $config->get( 'filter_tags' ) ) );
$filterAttrs = preg_split( '#[,\s]+#', trim( $config->get( 'filter_attritbutes' ) ) );
switch ($filterType)
{
case 'NH':
$filter = new JFilterInput();
break;
case 'WL':
$filter = new JFilterInput( $filterTags, $filterAttrs, 0, 0, 0); // turn off xss auto clean
break;
case 'BL':
default:
$filter = new JFilterInput( $filterTags, $filterAttrs, 1, 1 );
break;
}
$text = $filter->clean( $text );
} elseif(empty($filterGroups) && $gid != '25') { // no default filtering for super admin (gid=25)
$filter = new JFilterInput( array(), array(), 1, 1 );
$text = $filter->clean( $text );
}
return $text;
}
/**
* Function to reset Hit count of an article
*
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: admin.frontpage.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: admin.frontpage.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Content
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -135,6 +135,12 @@ function viewFrontPage( $option )
}
$where = ( count( $where ) ? ' WHERE ' . implode( ' AND ', $where ) : '' );
// ensure we have a good vale for $filter_order
if (!in_array($filter_order, array('c.title', 'c.state', 'fpordering', 'groupname', 'c.id', 'sect_name', 'cc.name', 'author'))) {
$filter_order = 'fpordering';
}
$orderby = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', fpordering';
// get the total number of records
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: ilink.php 14401 2010-01-26 14:10:00Z louis $
* @version $Id: ilink.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Menus
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -44,7 +44,7 @@ class iLink extends JTree
}
if ($menutype) {
$this->_menutype = "&amp;menutype=".$menutype;
$this->_menutype = "&amp;menutype=" . JFilterInput::clean($menutype, 'menutype');
} else {
$this->_menutype = null;
}
@@ -115,12 +115,20 @@ class iLink extends JTree
$this->_output .= "<li".$last.">\n";
// Print the url
if ($this->_current->hasChildren()) {
$this->_output .= "<div class=\"".$classes."\"><span></span><a class=\"hasTip\" title=\"". JText::_( $this->_current->title ) ."::". JText::_( $this->_current->msg ) ."\">". JText::_( $this->_current->title ) ."</a></div>";
} else {
$this->_output .= "<div class=\"".$classes."\"><span></span><a class=\"hasTip\" href=\"index.php?option=com_menus&amp;task=edit&amp;type=component&amp;".$this->_current->url.$this->_cid.$this->_menutype."\" title=\"". JText::_( $this->_current->title ) ."::". JText::_( $this->_current->msg ) ."\">". JText::_( $this->_current->title ) ."</a></div>";
$this->_output .= '<div class="' . $classes . '"><span></span>'
. '<a class="hasTip" ';
if (! $this->_current->hasChildren()) {
$this->_output .= 'href="index.php?option=com_menus'
. '&amp;task=edit&amp;type=component&amp;'
. $this->_current->url . $this->_cid
. $this->_menutype . '" '
;
}
$this->_output .= 'title="' . JText::_($this->_current->title)
. '::' . JText::_($this->_current->msg) . '">'
. JText::_($this->_current->title) . '</a></div>'
;
// Recurse through children if they exist
while ($this->_current->hasChildren())
{
File diff suppressed because it is too large Load Diff
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: item.php 14401 2010-01-26 14:10:00Z louis $
* @version $Id: item.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Menus
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -92,8 +92,8 @@ class MenusModelItem extends JModel
}
// Override the current item's menutype field if defined in the request
if ($menu_type = JRequest::getString('menutype')) {
$table->menutype = $menu_type;
if ($menutype = JRequest::getVar('menutype', '', '', 'menutype')) {
$table->menutype = $menutype;
}
switch ($table->type)
@@ -144,7 +144,7 @@ class MenusModelItem extends JModel
{
$item = &$this->getItem();
$return['option'] = JRequest::getCmd('expand');
$menutype = JRequest::getString('menutype');
$menutype = JRequest::getVar('menutype', '', '', 'menutype');
if ($return['option'])
{
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: list.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: list.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Menus
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -53,7 +53,7 @@ class MenusModelList extends JModel
$db =& $this->getDBO();
$menutype = $mainframe->getUserStateFromRequest( "com_menus.menutype", 'menutype', 'mainmenu', 'string' );
$menutype = $mainframe->getUserStateFromRequest( 'com_menus.menutype', 'menutype', 'mainmenu', 'menutype' );
$filter_order = $mainframe->getUserStateFromRequest( 'com_menus.'.$menutype.'.filter_order', 'filter_order', 'm.ordering', 'cmd' );
$filter_order_Dir = $mainframe->getUserStateFromRequest( 'com_menus.'.$menutype.'.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word' );
$filter_state = $mainframe->getUserStateFromRequest( 'com_menus.'.$menutype.'.filter_state', 'filter_state', '', 'word' );
@@ -76,6 +76,11 @@ class MenusModelList extends JModel
}
}
// ensure $filter_order has a good value
if (!in_array($filter_order, array('m.name', 'm.published', 'm.ordering', 'groupname', 'm.type', 'm.id'))) {
$filter_order = 'm.ordering';
}
// just in case filter_order get's messed up
if ($filter_order) {
$orderby = ' ORDER BY '.$filter_order .' '. $filter_order_Dir .', m.parent, m.ordering';
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: menutype.php 14401 2010-01-26 14:10:00Z louis $
* @version $Id: menutype.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Menus
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -146,7 +146,7 @@ class MenusModelMenutype extends JModel
{
$table = & $this->getTable();
if ($table->menutype == '') {
$table->menutype = JRequest::getString('menutype');
$table->menutype = JRequest::getVar('menutype', '', '', 'menutype');
}
$db = &$this->getDBO();
@@ -56,7 +56,7 @@ function submitbutton(pressbutton) {
<?php echo JText::_( 'Menu Item Type' ); ?>
</legend>
<div style="float:right">
<button type="button" onclick="location.href='index.php?option=com_menus&amp;task=type&amp;menutype=<?php echo $this->item->menutype;?><?php echo $this->item->expansion; ?>&amp;cid[]=<?php echo $this->item->id; ?>';">
<button type="button" onclick="location.href='index.php?option=com_menus&amp;task=type&amp;menutype=<?php echo htmlspecialchars($this->item->menutype);?><?php echo $this->item->expansion; ?>&amp;cid[]=<?php echo $this->item->id; ?>';">
<?php echo JText::_( 'Change Type' ); ?></button>
</div>
<h2><?php echo $this->name; ?></h2>
@@ -1,46 +1,53 @@
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
<!--
Window.onDomReady(function(){
//document.treemanager.expandAll('menu-item');
});
//-->
</script>
<form action="index.php" method="post" name="adminForm">
<table class="admintable" width="100%">
<tr valign="top">
<td width="60%">
<!-- Menu Item Type Section -->
<fieldset>
<legend><?php echo JText::_( 'Select Menu Item Type' ); ?></legend>
<ul id="menu-item" class="jtree">
<li id="internal-node"><div class="node-open"><span></span><a href="#"><?php echo JText::_('Internal Link'); ?></a></div>
<ul>
<?php for ($i=0,$n=count($this->components);$i<$n;$i++) : ?>
<?php if($this->components[$i]->legacy) : ?>
<li><div class="node-open"><span></span><a href="index.php?option=com_menus&amp;task=edit&amp;type=component&amp;url[option]=<?php echo $this->components[$i]->option; ?>&amp;menutype=<?php echo $this->item->menutype; ?>&amp;cid[]=<?php echo $this->item->id; ?>" id="<?php echo str_replace('com_', '', $this->components[$i]->option); ?>"><?php echo $this->components[$i]->name; ?></a></div>
<?php elseif ($this->expansion['option'] == str_replace('com_', '', $this->components[$i]->option)) : ?>
<li <?php echo ($i == $n-1)? 'class="last"' : '' ?>><div class="node-open"><span></span><a id="<?php echo str_replace('com_', '', $this->components[$i]->option); ?>"><?php echo JText::_($this->components[$i]->name); ?></a></div>
<?php echo $this->expansion['html']; ?>
<?php else : ?>
<li <?php echo ($i == $n-1)? 'class="last"' : '' ?>><div class="node"><span></span><a href="index.php?option=com_menus&amp;task=type&amp;menutype=<?php echo $this->item->menutype; ?>&amp;cid[]=<?php echo $this->item->id; ?>&amp;expand=<?php echo str_replace('com_', '', $this->components[$i]->option); ?>" id="<?php echo str_replace('com_', '', $this->components[$i]->option); ?>"><?php echo JText::_($this->components[$i]->name); ?></a></div>
<?php endif; ?>
</li>
<?php endfor; ?>
</ul>
</li>
<li id="external-node"><div class="base"><span></span><a href="index.php?option=com_menus&amp;task=edit&amp;type=url&amp;menutype=<?php echo $this->item->menutype; ?>&amp;cid[]=<?php echo $this->item->id; ?>"><?php echo JText::_('External Link'); ?></a></div></li>
<li id="separator-node"><div class="base"><span></span><a href="index.php?option=com_menus&amp;task=edit&amp;type=separator&amp;menutype=<?php echo $this->item->menutype; ?>&amp;cid[]=<?php echo $this->item->id; ?>"><?php echo JText::_('Separator'); ?></a></div></li>
<li id="link-node" class="last"><div class="base"><span></span><a href="index.php?option=com_menus&amp;task=edit&amp;type=menulink&amp;menutype=<?php echo $this->item->menutype; ?>&amp;cid[]=<?php echo $this->item->id; ?>"><?php echo JText::_('Alias'); ?></a></div></li>
</ul>
</fieldset>
</td>
<td width="40%">
</td>
</tr>
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="task" value="" />
<?php echo JHTML::_( 'form.token' ); ?>
<?php
defined('_JEXEC') or die('Restricted access');
// Precompute the menu type and CID
$typeCid = '&amp;menutype=' . htmlspecialchars($this->item->menutype)
. '&amp;cid[]=' . $this->item->id
;
?>
<script language="javascript" type="text/javascript">
<!--
Window.onDomReady(function(){
//document.treemanager.expandAll('menu-item');
});
//-->
</script>
<form action="index.php" method="post" name="adminForm">
<table class="admintable" width="100%">
<tr valign="top">
<td width="60%">
<!-- Menu Item Type Section -->
<fieldset>
<legend><?php echo JText::_( 'Select Menu Item Type' ); ?></legend>
<ul id="menu-item" class="jtree">
<li id="internal-node"><div class="node-open"><span></span><a href="#"><?php echo JText::_('Internal Link'); ?></a></div>
<ul>
<?php for ($i=0,$n=count($this->components);$i<$n;$i++) : ?>
<?php if($this->components[$i]->legacy) : ?>
<li><div class="node-open"><span></span><a href="index.php?option=com_menus&amp;task=edit&amp;type=component&amp;url[option]=<?php echo $this->components[$i]->option . $typeCid; ?>" id="<?php echo str_replace('com_', '', $this->components[$i]->option); ?>"><?php echo $this->components[$i]->name; ?></a></div>
<?php elseif ($this->expansion['option'] == str_replace('com_', '', $this->components[$i]->option)) : ?>
<li <?php echo ($i == $n-1)? 'class="last"' : '' ?>><div class="node-open"><span></span><a id="<?php echo str_replace('com_', '', $this->components[$i]->option); ?>"><?php echo JText::_($this->components[$i]->name); ?></a></div>
<?php echo $this->expansion['html']; ?>
<?php else : ?>
<li <?php echo ($i == $n-1)? 'class="last"' : '' ?>><div class="node"><span></span><a href="index.php?option=com_menus&amp;task=type<?php echo $typeCid; ?>&amp;expand=<?php echo str_replace('com_', '', $this->components[$i]->option); ?>" id="<?php echo str_replace('com_', '', $this->components[$i]->option); ?>"><?php echo JText::_($this->components[$i]->name); ?></a></div>
<?php endif; ?>
</li>
<?php endfor; ?>
</ul>
</li>
<li id="external-node"><div class="base"><span></span><a href="index.php?option=com_menus&amp;task=edit&amp;type=url<?php echo $typeCid; ?>"><?php echo JText::_('External Link'); ?></a></div></li>
<li id="separator-node"><div class="base"><span></span><a href="index.php?option=com_menus&amp;task=edit&amp;type=separator<?php echo $typeCid; ?>"><?php echo JText::_('Separator'); ?></a></div></li>
<li id="link-node" class="last"><div class="base"><span></span><a href="index.php?option=com_menus&amp;task=edit&amp;type=menulink<?php echo $typeCid; ?>"><?php echo JText::_('Alias'); ?></a></div></li>
</ul>
</fieldset>
</td>
<td width="40%">
</td>
</tr>
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="task" value="" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
@@ -1,50 +1,50 @@
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancelItem') {
submitform( pressbutton );
return;
}
// do field validation
if (!getSelectedValue( 'adminForm', 'menu' )) {
alert( "<?php echo JText::_( 'Please select a menu from the list', true ); ?>" );
} else {
submitform( pressbutton );
}
}
</script>
<form action="index.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<td width="3%"></td>
<td valign="top" width="30%">
<strong><?php echo JText::_( 'Copy to Menu' ); ?>:</strong>
<br />
<?php echo $this->MenuList; ?>
<br /><br />
</td>
<td valign="top">
<strong><?php echo JText::_( 'Menu Items being copied' ); ?>:</strong>
<br />
<ol>
<?php foreach ( $this->items as $item ) : ?>
<li><?php echo $item->name; ?></li>
<?php endforeach; ?>
</ol>
</td>
</tr>
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="menutype" value="<?php echo $this->menutype; ?>" />
<input type="hidden" name="task" value="" />
<?php foreach ( $this->items as $item ) : ?>
<input type="hidden" name="cid[]" value="<?php echo $item->id; ?>" />
<?php endforeach; ?>
<?php echo JHTML::_( 'form.token' ); ?>
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancelItem') {
submitform( pressbutton );
return;
}
// do field validation
if (!getSelectedValue( 'adminForm', 'menu' )) {
alert( "<?php echo JText::_( 'Please select a menu from the list', true ); ?>" );
} else {
submitform( pressbutton );
}
}
</script>
<form action="index.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<td width="3%"></td>
<td valign="top" width="30%">
<strong><?php echo JText::_( 'Copy to Menu' ); ?>:</strong>
<br />
<?php echo $this->MenuList; ?>
<br /><br />
</td>
<td valign="top">
<strong><?php echo JText::_( 'Menu Items being copied' ); ?>:</strong>
<br />
<ol>
<?php foreach ( $this->items as $item ) : ?>
<li><?php echo $item->name; ?></li>
<?php endforeach; ?>
</ol>
</td>
</tr>
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="menutype" value="<?php echo htmlspecialchars($this->menutype); ?>" />
<input type="hidden" name="task" value="" />
<?php foreach ( $this->items as $item ) : ?>
<input type="hidden" name="cid[]" value="<?php echo $item->id; ?>" />
<?php endforeach; ?>
<?php echo JHTML::_( 'form.token' ); ?>
</form>
@@ -1,6 +1,6 @@
<?php defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php?option=com_menus&amp;menutype=<?php echo $this->menutype; ?>" method="post" name="adminForm">
<form action="index.php?option=com_menus&amp;menutype=<?php echo htmlspecialchars($this->menutype); ?>" method="post" name="adminForm">
<table>
<tr>
@@ -83,7 +83,7 @@
<?php echo $row->treename; ?>
<?php else : ?>
<span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit Menu' );?>::<?php echo $row->treename; ?>">
<a href="<?php echo JRoute::_( 'index.php?option=com_menus&menutype='.$row->menutype.'&task=edit&cid[]='.$row->id ); ?>"><?php echo $row->treename; ?></a></span>
<a href="<?php echo JRoute::_('index.php?option=com_menus&menutype=' . htmlspecialchars($row->menutype) . '&task=edit&cid[]=' . $row->id); ?>"><?php echo $row->treename; ?></a></span>
<?php endif; ?>
</td>
<td align="center">
@@ -121,7 +121,7 @@
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="menutype" value="<?php echo $this->menutype; ?>" />
<input type="hidden" name="menutype" value="<?php echo htmlspecialchars($this->menutype); ?>" />
<input type="hidden" name="task" value="view" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
@@ -1,52 +1,52 @@
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancelItem') {
submitform( pressbutton );
return;
}
// do field validation
if (!getSelectedValue( 'adminForm', 'menu' )) {
alert( "<?php echo JText::_( 'Please select a menu from the list', true ); ?>" );
} else {
submitform( pressbutton );
}
}
</script>
<form action="index.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<td width="3%"></td>
<td valign="top" width="30%">
<strong><?php echo JText::_( 'Move to Menu' ); ?>:</strong>
<br />
<?php echo $this->MenuList ?>
<br /><br />
</td>
<td valign="top">
<strong>
<?php echo JText::_( 'Menu Items being moved' ); ?>:
</strong>
<br />
<ol>
<?php foreach ( $this->items as $item ) : ?>
<li><?php echo $item->name; ?></li>
<?php endforeach; ?>
</ol>
</td>
</tr>
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="boxchecked" value="1" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="menutype" value="<?php echo $this->menutype; ?>" />
<?php foreach ( $this->items as $item ) : ?>
<input type="hidden" name="cid[]" value="<?php echo $item->id; ?>" />
<?php endforeach; ?>
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancelItem') {
submitform( pressbutton );
return;
}
// do field validation
if (!getSelectedValue( 'adminForm', 'menu' )) {
alert( "<?php echo JText::_( 'Please select a menu from the list', true ); ?>" );
} else {
submitform( pressbutton );
}
}
</script>
<form action="index.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<td width="3%"></td>
<td valign="top" width="30%">
<strong><?php echo JText::_( 'Move to Menu' ); ?>:</strong>
<br />
<?php echo $this->MenuList ?>
<br /><br />
</td>
<td valign="top">
<strong>
<?php echo JText::_( 'Menu Items being moved' ); ?>:
</strong>
<br />
<ol>
<?php foreach ( $this->items as $item ) : ?>
<li><?php echo $item->name; ?></li>
<?php endforeach; ?>
</ol>
</td>
</tr>
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="boxchecked" value="1" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="menutype" value="<?php echo htmlspecialchars($this->menutype); ?>" />
<?php foreach ( $this->items as $item ) : ?>
<input type="hidden" name="cid[]" value="<?php echo $item->id; ?>" />
<?php endforeach; ?>
<?php echo JHTML::_( 'form.token' ); ?>
</form>
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: view.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: view.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Menus
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -35,7 +35,7 @@ class MenusViewList extends JView
/*
* Set toolbar items for the page
*/
$menutype = $mainframe->getUserStateFromRequest( 'com_menus.menutype', 'menutype', 'mainmenu', 'string' );
$menutype = $mainframe->getUserStateFromRequest('com_menus.menutype', 'menutype', 'mainmenu', 'menutype');
JToolBarHelper::title( JText::_( 'MENU ITEM MANAGER' ) .': <small><small>['.$menutype.']</small></small>', 'menu.png' );
@@ -102,7 +102,7 @@ class MenusViewList extends JView
$document = & JFactory::getDocument();
$document->setTitle(JText::_('Copy Menu Items'));
$menutype = $mainframe->getUserStateFromRequest( 'com_menus.menutype', 'menutype', 'mainmenu', 'string' );
$menutype = $mainframe->getUserStateFromRequest('com_menus.menutype', 'menutype', 'mainmenu', 'menutype');
// Build the menutypes select list
$menuTypes = MenusHelper::getMenuTypes();
@@ -138,7 +138,7 @@ class MenusViewList extends JView
$document = & JFactory::getDocument();
$document->setTitle(JText::_('Move Menu Items'));
$menutype = $mainframe->getUserStateFromRequest( 'com_menus.menutype', 'menutype', 'mainmenu', 'string' );
$menutype = $mainframe->getUserStateFromRequest('com_menus.menutype', 'menutype', 'mainmenu', 'menutype');
// Build the menutypes select list
$menuTypes = MenusHelper::getMenuTypes();
@@ -162,7 +162,7 @@ class MenusViewList extends JView
global $mainframe;
$db =& JFactory::getDBO();
$menutype = $mainframe->getUserStateFromRequest( "com_menus.menutype", 'menutype', 'mainmenu', 'string' );
$menutype = $mainframe->getUserStateFromRequest( 'com_menus.menutype', 'menutype', 'mainmenu', 'menutype' );
$filter_order = $mainframe->getUserStateFromRequest( "com_menus.$menutype.filter_order", 'filter_order', 'm.ordering', 'cmd' );
$filter_order_Dir = $mainframe->getUserStateFromRequest( "com_menus.$menutype.filter_order_Dir", 'filter_order_Dir', 'ASC', 'word' );
$filter_state = $mainframe->getUserStateFromRequest( "com_menus.$menutype.filter_state", 'filter_state', '', 'word' );
@@ -173,6 +173,11 @@ class MenusViewList extends JView
}
$search = JString::strtolower($search);
// ensure $filter_order has a good value
if (!in_array($filter_order, array('m.name', 'm.published', 'm.ordering', 'groupname', 'm.type', 'm.id'))) {
$filter_order = 'm.ordering';
}
// level limit filter
$lists['levellist'] = JHTML::_('select.integerlist', 1, 20, 1, 'levellimit', 'size="1" onchange="document.adminForm.submit();"', $levellimit );
@@ -1,63 +1,63 @@
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
<!--
function submitbutton(pressbutton) {
if (pressbutton == 'doCopyMenu') {
if ( document.adminForm.menu_name.value == '' ) {
alert( "<?php echo JText::_( 'Please enter a name for the copy of the Menu', true ); ?>" );
return;
} else if ( document.adminForm.module_name.value == '' ) {
alert( "<?php echo JText::_( 'Please enter a name for the new Module', true ); ?>" );
return;
} else {
submitform( 'doCopyMenu' );
}
} else {
submitform( pressbutton );
}
}
//-->
</script>
<form action="index.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<td width="3%"></td>
<td valign="top" width="30%">
<strong><?php echo JText::_( 'New Menu Name' ); ?>:</strong>
<br />
<input class="inputbox" type="text" name="menu_name" size="30" value="" />
<br /><br /><br />
<strong><?php echo JText::_( 'New Module Name' ); ?>:</strong>
<br />
<input class="inputbox" type="text" name="module_name" size="30" value="" />
<br /><br />
</td>
<td valign="top" width="25%">
<strong><?php echo JText::_( 'Menu being copied' ); ?>:</strong>
<br />
<font color="#000066"><strong><?php echo $this->table->menutype; ?></strong></font>
<br /><br />
<strong><?php echo JText::_( 'Menu Items being copied' ); ?>:</strong>
<br />
<ol>
<?php foreach ($this->items as $item) : ?>
<li>
<font color="#000066"><?php echo $item->name; ?></font>
</li>
<input type="hidden" name="mids[]" value="<?php echo $item->id; ?>" />
<?php endforeach; ?>
</ol>
</td>
<td valign="top"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="type" value="<?php echo $this->table->menutype; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
<!--
function submitbutton(pressbutton) {
if (pressbutton == 'doCopyMenu') {
if ( document.adminForm.menu_name.value == '' ) {
alert( "<?php echo JText::_( 'Please enter a name for the copy of the Menu', true ); ?>" );
return;
} else if ( document.adminForm.module_name.value == '' ) {
alert( "<?php echo JText::_( 'Please enter a name for the new Module', true ); ?>" );
return;
} else {
submitform( 'doCopyMenu' );
}
} else {
submitform( pressbutton );
}
}
//-->
</script>
<form action="index.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<td width="3%"></td>
<td valign="top" width="30%">
<strong><?php echo JText::_( 'New Menu Name' ); ?>:</strong>
<br />
<input class="inputbox" type="text" name="menu_name" size="30" value="" />
<br /><br /><br />
<strong><?php echo JText::_( 'New Module Name' ); ?>:</strong>
<br />
<input class="inputbox" type="text" name="module_name" size="30" value="" />
<br /><br />
</td>
<td valign="top" width="25%">
<strong><?php echo JText::_( 'Menu being copied' ); ?>:</strong>
<br />
<font color="#000066"><strong><?php echo $this->table->menutype; ?></strong></font>
<br /><br />
<strong><?php echo JText::_( 'Menu Items being copied' ); ?>:</strong>
<br />
<ol>
<?php foreach ($this->items as $item) : ?>
<li>
<font color="#000066"><?php echo $item->name; ?></font>
</li>
<input type="hidden" name="mids[]" value="<?php echo $item->id; ?>" />
<?php endforeach; ?>
</ol>
</td>
<td valign="top"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="type" value="<?php echo htmlspecialchars($this->table->menutype); ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
@@ -1,135 +1,135 @@
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
<!--
function submitbutton(task)
{
var f = document.adminForm;
if (task == 'deleteconfirm') {
id = radioGetCheckedValue( f.id );
//document.popup.show('index.php?option=com_menus&tmpl=component&task=deleteconfirm&id='+id, 700, 500, null);
} else {
submitform(task);
}
}
function menu_listItemTask( id, task, option )
{
var f = document.adminForm;
cb = eval( 'f.' + id );
if (cb) {
cb.checked = true;
submitbutton(task);
}
return false;
}
//-->
</script>
<form action="index.php" method="post" name="adminForm">
<table class="adminlist">
<thead>
<tr>
<th width="20">
<?php echo JText::_( 'NUM' ); ?>
</th>
<th width="20">
&nbsp;
</th>
<th class="title" nowrap="nowrap">
<?php echo JText::_( 'Title' ); ?>
</th>
<th class="title" nowrap="nowrap">
<?php echo JText::_( 'Type' ); ?>
</th>
<th width="5%" nowrap="nowrap">
<?php echo JText::_( 'Menu Items' ); ?>
</th>
<th width="10%">
<?php echo JText::_( 'NUM Published' ); ?>
</th>
<th width="15%">
<?php echo JText::_( 'NUM Unpublished' ); ?>
</th>
<th width="15%">
<?php echo JText::_( 'NUM Trash' ); ?>
</th>
<th width="15%">
<?php echo JText::_( 'NUM Modules' ); ?>
</th>
<th width="3%">
<?php echo JText::_( 'ID' ); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="13">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php $i = 0; $k = 0; ?>
<?php foreach ($this->menus as $menu) : ?>
<?php
// Get the current iteration and set a few values
$link = 'index.php?option=com_menus&amp;task=editMenu&amp;id='. $menu->id;
$linkA = 'index.php?option=com_menus&amp;task=view&amp;menutype='. $menu->menutype;
?>
<tr class="<?php echo "row". $k; ?>">
<td align="center" width="30">
<?php echo $this->pagination->limitstart + 1 + $i; ?>
</td>
<td width="30" align="center">
<input type="radio" id="cb<?php echo $i;?>" name="id" value="<?php echo $menu->id; ?>" onclick="isChecked(this.checked);" />
</td>
<td>
<span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit Menu Name' );?>::<?php echo $menu->title; ?>">
<a href="<?php echo $link; ?>">
<?php echo $menu->title; ?></a></span>
</td>
<td>
<?php echo $menu->menutype; ?>
</td>
<td align="center">
<a href="<?php echo $linkA; ?>" title="<?php echo JText::_( 'Edit Menu Items' ); ?>">
<img src="<?php echo JURI::root(); ?>includes/js/ThemeOffice/mainmenu.png" border="0" /></a>
</td>
<td align="center">
<?php
echo $menu->published;
?>
</td>
<td align="center">
<?php
echo $menu->unpublished;
?>
</td>
<td align="center">
<?php
echo $menu->trash;
?>
</td>
<td align="center">
<?php
echo $menu->modules;
?>
</td>
<td align="center">
<?php
echo $menu->id;
?>
</td>
</tr>
<?php $i++; $k = 1 - $k; ?>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
<!--
function submitbutton(task)
{
var f = document.adminForm;
if (task == 'deleteconfirm') {
id = radioGetCheckedValue( f.id );
//document.popup.show('index.php?option=com_menus&tmpl=component&task=deleteconfirm&id='+id, 700, 500, null);
} else {
submitform(task);
}
}
function menu_listItemTask( id, task, option )
{
var f = document.adminForm;
cb = eval( 'f.' + id );
if (cb) {
cb.checked = true;
submitbutton(task);
}
return false;
}
//-->
</script>
<form action="index.php" method="post" name="adminForm">
<table class="adminlist">
<thead>
<tr>
<th width="20">
<?php echo JText::_( 'NUM' ); ?>
</th>
<th width="20">
&nbsp;
</th>
<th class="title" nowrap="nowrap">
<?php echo JText::_( 'Title' ); ?>
</th>
<th class="title" nowrap="nowrap">
<?php echo JText::_( 'Type' ); ?>
</th>
<th width="5%" nowrap="nowrap">
<?php echo JText::_( 'Menu Items' ); ?>
</th>
<th width="10%">
<?php echo JText::_( 'NUM Published' ); ?>
</th>
<th width="15%">
<?php echo JText::_( 'NUM Unpublished' ); ?>
</th>
<th width="15%">
<?php echo JText::_( 'NUM Trash' ); ?>
</th>
<th width="15%">
<?php echo JText::_( 'NUM Modules' ); ?>
</th>
<th width="3%">
<?php echo JText::_( 'ID' ); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="13">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php $i = 0; $k = 0; ?>
<?php foreach ($this->menus as $menu) : ?>
<?php
// Get the current iteration and set a few values
$link = 'index.php?option=com_menus&amp;task=editMenu&amp;id='. $menu->id;
$linkA = 'index.php?option=com_menus&amp;task=view&amp;menutype='. htmlspecialchars($menu->menutype);
?>
<tr class="<?php echo "row". $k; ?>">
<td align="center" width="30">
<?php echo $this->pagination->limitstart + 1 + $i; ?>
</td>
<td width="30" align="center">
<input type="radio" id="cb<?php echo $i;?>" name="id" value="<?php echo $menu->id; ?>" onclick="isChecked(this.checked);" />
</td>
<td>
<span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit Menu Name' );?>::<?php echo htmlspecialchars($menu->title); ?>">
<a href="<?php echo $link; ?>">
<?php echo htmlspecialchars($menu->title); ?></a></span>
</td>
<td>
<?php echo htmlspecialchars($menu->menutype); ?>
</td>
<td align="center">
<a href="<?php echo $linkA; ?>" title="<?php echo JText::_( 'Edit Menu Items' ); ?>">
<img src="<?php echo JURI::root(); ?>includes/js/ThemeOffice/mainmenu.png" border="0" /></a>
</td>
<td align="center">
<?php
echo $menu->published;
?>
</td>
<td align="center">
<?php
echo $menu->unpublished;
?>
</td>
<td align="center">
<?php
echo $menu->trash;
?>
</td>
<td align="center">
<?php
echo $menu->modules;
?>
</td>
<td align="center">
<?php
echo $menu->id;
?>
</td>
</tr>
<?php $i++; $k = 1 - $k; ?>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
@@ -1,88 +1,88 @@
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
<!--
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'savemenu') {
if ( form.menutype.value == '' ) {
alert( '<?php echo JText::_( 'Please enter a menu name', true ); ?>' );
form.menutype.focus();
return;
}
var r = new RegExp("[\']", "i");
if ( r.exec(form.menutype.value) ) {
alert( '<?php echo JText::_( 'The menu name cannot contain a \'', true ); ?>' );
form.menutype.focus();
return;
}
<?php if ($this->isnew) : ?>
if ( form.title.value == '' ) {
alert( '<?php echo JText::_( 'Please enter a module name for your menu', true ); ?>' );
form.title.focus();
return;
}
<?php endif; ?>
submitform( 'savemenu' );
} else {
submitform( pressbutton );
}
}
//-->
</script>
<form action="index.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<td width="100" >
<label for="menutype">
<strong><?php echo JText::_( 'Menu Type' ); ?>:</strong>
</label>
</td>
<td>
<input class="inputbox" type="text" name="menutype" id="menutype" size="30" maxlength="25" value="<?php echo $this->row->menutype; ?>" /> <?php echo JHTML::_('tooltip', JText::_( 'TIPNAMEUSEDTOIDENTIFYMENU' )); ?>
</td>
</tr>
<tr>
<td width="100" >
<label for="title">
<strong><?php echo JText::_( 'Title' ); ?>:</strong>
</label>
</td>
<td>
<input class="inputbox" type="text" name="title" id="title" size="30" maxlength="255" value="<?php echo $this->row->title; ?>" />
<?php echo JHTML::_('tooltip', JText::_( 'A proper title for the Menu' ) ); ?>
</td>
</tr>
<tr>
<td width="100" >
<label for="description">
<strong><?php echo JText::_( 'Description' ); ?>:</strong>
</label>
</td>
<td>
<input class="inputbox" type="text" name="description" id="description" size="30" maxlength="255" value="<?php echo $this->row->description; ?>" />
<?php echo JHTML::_('tooltip', JText::_( 'A description for the Menu' ) ); ?>
</td>
</tr>
<?php if ($this->isnew) : ?>
<tr>
<td width="100" valign="top">
<label for="module_title">
<strong><?php echo JText::_( 'Module Title' ); ?>:</strong>
</label>
</td>
<td>
<input class="inputbox" type="text" name="module_title" id="module_title" size="30" value="" />
<?php echo JHTML::_('tooltip', JText::_( 'TIPTITLEMAINMENUMODULEREQUIRED' ) ); ?>
</td>
</tr>
<?php endif; ?>
</table>
<input type="hidden" name="id" value="<?php echo $this->row->id; ?>" />
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="task" value="savemenu" />
<?php echo JHTML::_( 'form.token' ); ?>
<?php defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">
<!--
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'savemenu') {
if ( form.menutype.value == '' ) {
alert( '<?php echo JText::_( 'Please enter a menu name', true ); ?>' );
form.menutype.focus();
return;
}
var r = new RegExp("[\']", "i");
if ( r.exec(form.menutype.value) ) {
alert( '<?php echo JText::_( 'The menu name cannot contain a \'', true ); ?>' );
form.menutype.focus();
return;
}
<?php if ($this->isnew) : ?>
if ( form.title.value == '' ) {
alert( '<?php echo JText::_( 'Please enter a module name for your menu', true ); ?>' );
form.title.focus();
return;
}
<?php endif; ?>
submitform( 'savemenu' );
} else {
submitform( pressbutton );
}
}
//-->
</script>
<form action="index.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<td width="100" >
<label for="menutype">
<strong><?php echo JText::_( 'Menu Type' ); ?>:</strong>
</label>
</td>
<td>
<input class="inputbox" type="text" name="menutype" id="menutype" size="30" maxlength="25" value="<?php echo htmlspecialchars($this->row->menutype); ?>" /> <?php echo JHTML::_('tooltip', JText::_( 'TIPNAMEUSEDTOIDENTIFYMENU' )); ?>
</td>
</tr>
<tr>
<td width="100" >
<label for="title">
<strong><?php echo JText::_( 'Title' ); ?>:</strong>
</label>
</td>
<td>
<input class="inputbox" type="text" name="title" id="title" size="30" maxlength="255" value="<?php echo $this->escape($this->row->title); ?>" />
<?php echo JHTML::_('tooltip', JText::_( 'A proper title for the Menu' ) ); ?>
</td>
</tr>
<tr>
<td width="100" >
<label for="description">
<strong><?php echo JText::_( 'Description' ); ?>:</strong>
</label>
</td>
<td>
<input class="inputbox" type="text" name="description" id="description" size="30" maxlength="255" value="<?php echo $this->escape($this->row->description); ?>" />
<?php echo JHTML::_('tooltip', JText::_( 'A description for the Menu' ) ); ?>
</td>
</tr>
<?php if ($this->isnew) : ?>
<tr>
<td width="100" valign="top">
<label for="module_title">
<strong><?php echo JText::_( 'Module Title' ); ?>:</strong>
</label>
</td>
<td>
<input class="inputbox" type="text" name="module_title" id="module_title" size="30" value="" />
<?php echo JHTML::_('tooltip', JText::_( 'TIPTITLEMAINMENUMODULEREQUIRED' ) ); ?>
</td>
</tr>
<?php endif; ?>
</table>
<input type="hidden" name="id" value="<?php echo $this->row->id; ?>" />
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="task" value="savemenu" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: admin.messages.html.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: admin.messages.html.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Messages
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -100,7 +100,7 @@ class HTML_messages
</td>
<td>
<a href="#edit" onclick="return listItemTask('cb<?php echo $i;?>','view')">
<?php echo $row->subject; ?></a>
<?php echo htmlspecialchars($row->subject); ?></a>
</td>
<td align="center">
<a href="javascript: void(0);">
@@ -209,7 +209,7 @@ class HTML_messages
<?php echo JText::_( 'Subject' ); ?>:
</td>
<td bgcolor="#ffffff">
<?php echo $row->subject;?>
<?php echo htmlspecialchars($row->subject);?>
</td>
</tr>
<tr>
@@ -227,7 +227,7 @@ class HTML_messages
<input type="hidden" name="boxchecked" value="1" />
<input type="hidden" name="cid[]" value="<?php echo $row->message_id; ?>" />
<input type="hidden" name="userid" value="<?php echo $row->user_id_from; ?>" />
<input type="hidden" name="subject" value="Re: <?php echo $row->subject; ?>" />
<input type="hidden" name="subject" value="Re: <?php echo htmlspecialchars($row->subject); ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php
@@ -1,6 +1,6 @@
<?php
/**
* @version $Id: admin.messages.php 17299 2010-05-27 16:06:54Z ian $
* @version $Id: admin.messages.php 18162 2010-07-16 07:00:47Z ian $
* @package Joomla
* @subpackage Messages
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
@@ -95,6 +95,12 @@ function showMessages( $option )
}
$where = ( count( $where ) ? ' WHERE ' . implode( ' AND ', $where ) : '' );
// sanitize $filter_order``
if (!in_array($filter_order, array('a.subject', 'a.state', 'user_from', 'a.date_time'))) {
$filter_order = 'a.date_time';
}
$orderby = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', a.date_time DESC';
$query = 'SELECT COUNT(*)'

Some files were not shown because too many files have changed in this diff Show More