Skip to content

Commit

Permalink
fix: strict standards compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
kulbakin committed Jan 2, 2014
1 parent 4016441 commit fd98a41
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 123 deletions.
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
<?php defined('KOOWA') or die('Restricted access'); ?>
<?php defined('KOOWA') or die('Restricted access') ?>
<?php
$sort = '';
$direction = '';
?>
<form id="" action="<?= @route()?>" method="post" class="-koowa-grid " data-token-name="_token" data-token-value="<?=JUtility::getToken()?>">
<table class="adminlist" style="clear: both;">
<thead>
<tr>
<th width="1%"><?= @text('NUM'); ?></th>
<th width="80%"><?= @text('Name')?></th>
<th width="1%"><?= @helper('grid.sort', array('column'=>'order', 'sort'=>$sort, 'direction'=>$direction)); ?></th>
<th width="1%"><?= @text('ID')?></th>
</tr>
</thead>
<tbody>
<?php $i = 0?>
<? foreach ($components as $component) : ?>
<tr class="-koowa-grid-checkbox">
<td align="center"><?= ++$i; ?></td>
<td>
<span class="editlinktip hasTip" title="<?= @escape($component->getName()); ?>">
<a href="<?= @route('view=component&id='.$component->id.'&hidemainmenu=1')?>">
<?= @escape($component->getName()); ?>
</a>
</span>
</td>
<td align="center">
<?= @helper('grid.order', $component); ?>
</td>
<td align="center"><?= $component->id; ?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan="6">
&nbsp;
</td>
</tr>
</tfoot>
</table>
<form id="" action="<?= @route()?>" method="post" class="-koowa-grid " data-token-name="_token" data-token-value="<?= JUtility::getToken() ?>">
<table class="adminlist" style="clear: both;">
<thead>
<tr>
<th width="1%"><?= @text('NUM'); ?></th>
<th width="80%"><?= @text('Name')?></th>
<th width="1%"><?= @helper('grid.sort', array('column' => 'order', 'sort'=>$sort, 'direction' => $direction)) ?></th>
<th width="1%"><?= @text('ID')?></th>
</tr>
</thead>
<tbody>
<?php $i = 0 ?>
<?php foreach ($components as $component): ?>
<tr class="-koowa-grid-checkbox">
<td align="center"><?= ++$i; ?></td>
<td>
<span class="editlinktip hasTip" title="<?= @escape($component->getName()); ?>">
<a href="<?= @route('view=component&id='.$component->id.'&hidemainmenu=1')?>">
<?= @escape($component->getName()); ?>
</a>
</span>
</td>
<td align="center">
<?= @helper('grid.order', $component) ?>
</td>
<td align="center"><?= $component->id; ?></td>
</tr>
<?php endforeach ?>
</tbody>
<tfoot>
<tr>
<td colspan="6">
&nbsp;
</td>
</tr>
</tfoot>
</table>
</form>
2 changes: 1 addition & 1 deletion src/site/modules/mod_viewer/html/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<script data-inline>
(function(){
var metaTitle = document.getElement('title').innerHTML;

(function(){
new Request.JSON({
url : '<?= @route("option=com_notifications&view=notifications&get=count") ?>',
Expand Down
127 changes: 58 additions & 69 deletions vendor/joomla/administrator/components/com_login/admin.login.php
Original file line number Diff line number Diff line change
@@ -1,85 +1,74 @@
<?php
/**
* @version $Id: admin.login.php 14401 2010-01-26 14:10:00Z louis $
* @package Joomla
* @subpackage Joomla.Extensions
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
* @package Joomla
* @subpackage Joomla.Extensions
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

switch ( JRequest::getCmd('task'))
{
case 'login' :
LoginController::login();
break;

case 'logout' :
LoginController::logout();
break;

default :
LoginController::display();
break;
switch (JRequest::getCmd('task')) {
case 'login':
LoginController::login();
break;
case 'logout':
LoginController::logout();
break;
default:
LoginController::display();
break;
}


/**
* Static class to hold controller functions for the Login component
*
* @static
* @package Joomla
* @subpackage Login
* @since 1.5
* @package Joomla
* @subpackage Login
* @since 1.5
*/
class LoginController
{
function display()
{
jimport('joomla.application.module.helper');
$module = & JModuleHelper::getModule('mod_login');
$module = JModuleHelper::renderModule($module, array('style' => 'rounded', 'id' => 'section-box'));
echo $module;
}

function login()
{
global $mainframe;

// Check for request forgeries
JRequest::checkToken('request') or jexit( 'Invalid Token' );

$credentials = array();

$credentials['username'] = JRequest::getVar('username', '', 'method', 'username');
$credentials['password'] = JRequest::getVar('passwd', '', 'post', 'string', JREQUEST_ALLOWRAW);

$result = $mainframe->login($credentials);

if (!JError::isError($result)) {
$mainframe->redirect('index.php');
}

LoginController::display();
}

function logout()
{
global $mainframe;

$result = $mainframe->logout();

if (!JError::isError($result)) {
$mainframe->redirect('index.php?option=com_login');
}

LoginController::display();
}
public static function display()
{
jimport('joomla.application.module.helper');
$module = & JModuleHelper::getModule('mod_login');
$module = JModuleHelper::renderModule($module, array('style' => 'rounded', 'id' => 'section-box'));
echo $module;
}
public static function login()
{
global $mainframe;
// Check for request forgeries
JRequest::checkToken('request') or jexit( 'Invalid Token' );
$credentials = array();
$credentials['username'] = JRequest::getVar('username', '', 'method', 'username');
$credentials['password'] = JRequest::getVar('passwd', '', 'post', 'string', JREQUEST_ALLOWRAW);
$result = $mainframe->login($credentials);
if ( ! JError::isError($result)) {
$mainframe->redirect('index.php');
}
LoginController::display();
}
public static function logout()
{
global $mainframe;
$result = $mainframe->logout();
if ( ! JError::isError($result)) {
$mainframe->redirect('index.php?option=com_login');
}
LoginController::display();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public static function viewTemplates()
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
$limitstart = $mainframe->getUserStateFromRequest($option.'.'.$client->id.'.limitstart', 'limitstart', 0, 'int');

$select[] = JHTML::_('select.option', '0', JText::_('Site'));
$select[] = JHTML::_('select.option', '1', JText::_('Administrator'));
$lists['client'] = JHTML::_('select.genericlist', $select, 'client', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $client->id);
$select[] = JHTML::_('select.option', '0', JText::_('Site'));
$select[] = JHTML::_('select.option', '1', JText::_('Administrator'));
$lists['client'] = JHTML::_('select.genericlist', $select, 'client', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $client->id);

$tBaseDir = $client->path.DS.'templates';

Expand All @@ -37,8 +37,8 @@ public static function viewTemplates()

// set dynamic template information
for ($i = 0; $i < count($rows); $i++) {
$rows[$i]->assigned = TemplatesHelper::isTemplateAssigned($rows[$i]->directory);
$rows[$i]->published = TemplatesHelper::isTemplateDefault($rows[$i]->directory, $client->id);
$rows[$i]->assigned = TemplatesHelper::isTemplateAssigned($rows[$i]->directory);
$rows[$i]->published = TemplatesHelper::isTemplateDefault($rows[$i]->directory, $client->id);
}

jimport('joomla.html.pagination');
Expand Down Expand Up @@ -153,7 +153,7 @@ public static function editTemplate()

if ($default) {
$row->pages = 'all';
} elseif (!$assigned) {
} elseif ( ! $assigned) {
$row->pages = 'none';
} else {
$row->pages = null;
Expand Down Expand Up @@ -229,7 +229,7 @@ public static function saveTemplate()
$db->query();

$query = 'INSERT INTO #__templates_menu' .
' SET client_id = 0, template = '. $db->Quote( $template ) .', menuid = '.(int) $menuid;
' SET client_id = 0, template = '.$db->Quote( $template ).', menuid = '.(int)$menuid;
$db->setQuery($query);
$db->query();
}
Expand Down
9 changes: 3 additions & 6 deletions vendor/mc/rt_missioncontrol_j15/ajax-models/updater.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
<?php
/**
* @version 1.5.2 June 9, 2011
* @author � �RocketTheme https://www.rockettheme.com
* @version 1.5.2 June 9, 2011
* @author RocketTheme https://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2011 RocketTheme, LLC
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted index access' );

require_once(dirname(__FILE__).DS.'..'.DS.'lib'.DS.'rtmcupdater.class.php');

echo MCUpdater::display(true);

?>

0 comments on commit fd98a41

Please sign in to comment.