Skip to content

Commit

Permalink
Fix PHPCS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Babker committed Nov 16, 2013
1 parent 81f1c40 commit bbb8424
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 22 deletions.
4 changes: 2 additions & 2 deletions administrator/components/com_menus/controllers/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function save($key = null, $urlVar = null)

if ($data['type'] == 'url')
{
$data['link'] = str_replace(array('"', '>', '<'), '', $data['link']);
$data['link'] = str_replace(array('"', '>', '<'), '', $data['link']);

if (strstr($data['link'], ':'))
{
Expand All @@ -184,7 +184,7 @@ public function save($key = null, $urlVar = null)
{
$app->enqueueMessage(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'warning');
$this->setRedirect(
JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId), false)
JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId), false)
);

return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@
<?php if ($assoc) : ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_MENUS_ITEM_ASSOCIATIONS_FIELDSET_LABEL'), '-options');?>
<?php echo $this->loadTemplate('associations'); ?>
<?php endif; ?>
<?php endif; ?>
1 change: 0 additions & 1 deletion components/com_config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@

// Perform the Request task
$controller->execute();

2 changes: 1 addition & 1 deletion components/com_config/view/cms/html.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function loadTemplate($tpl = null)
{
// Adding template paths
$this->paths->top();
$defaultPath =$this->paths->current();
$defaultPath = $this->paths->current();
$this->paths->next();
$templatePath = $this->paths->current();
$this->_path['template'] = array($defaultPath, $templatePath);
Expand Down
5 changes: 4 additions & 1 deletion libraries/cms/router/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,25 +284,28 @@ protected function parseSefRoute(&$uri)
$found = $item;
break;
}

// Partial route match. Item with highest level takes priority.
if (!$found || $found->level < $item->level)
{
$found = $item;
}
}
// Multilingual site.
else if ($item->language == '*' || $item->language == $lang_tag)
elseif ($item->language == '*' || $item->language == $lang_tag)
{
// Exact route match.
if ($item->route == $route_lowercase)
{
$found = $item;

// Break iteration only if language is matched.
if ($item->language == $lang_tag)
{
break;
}
}

// Partial route match. Item with highest level or same language takes priority.
if (!$found || $found->level < $item->level || $item->language == $lang_tag)
{
Expand Down
7 changes: 3 additions & 4 deletions libraries/cms/table/contenthistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
class JTableContenthistory extends JTable
{

/**
* Array of object fields to unset from the data object before calculating SHA1 hash. This allows us to detect a meaningful change
* in the database row using the hash. This can be read from the #__content_types content_history_options column.
Expand Down Expand Up @@ -95,9 +94,9 @@ public function getSha1($jsonData, JTableContenttype $typeTable)

if (isset($typeTable->content_history_options) && (is_object(json_decode($typeTable->content_history_options))))
{
$options = json_decode($typeTable->content_history_options);
$this->ignoreChanges = isset($options->ignoreChanges) ? $options->ignoreChanges : $this->ignoreChanges;
$this->convertToInt = isset($options->convertToInt) ? $options->convertToInt : $this->convertToInt;
$options = json_decode($typeTable->content_history_options);
$this->ignoreChanges = isset($options->ignoreChanges) ? $options->ignoreChanges : $this->ignoreChanges;
$this->convertToInt = isset($options->convertToInt) ? $options->convertToInt : $this->convertToInt;
}

foreach ($this->ignoreChanges as $remove)
Expand Down
1 change: 1 addition & 0 deletions libraries/cms/toolbar/button/confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function fetchButton($type = 'Confirm', $msg = '', $name = '', $text = ''
* Get the button CSS Id
*
* @param string $type Button type
* @param string $msg Message to display
* @param string $name Name to be used as apart of the id
* @param string $text Button text
* @param string $task The task associated with the button
Expand Down
1 change: 0 additions & 1 deletion libraries/joomla/form/fields/url.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<?php
/**
* @package Joomla.Platform
Expand Down
3 changes: 0 additions & 3 deletions libraries/joomla/user/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

defined('JPATH_PLATFORM') or die;

// Always make sure that the password hashing API has been defined.
// include_once JPATH_ROOT . '/libraries/compat/password/lib/password.php';

/**
* Authorisation helper class, provides static methods to perform various tasks relevant
* to the Joomla user and authorisation classes
Expand Down
4 changes: 2 additions & 2 deletions libraries/legacy/model/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ public function saveorder($pks = null, $order = null)
}

/**
* Method to creat a tags helper to ensure proper management of tags
* Method to create a tags helper to ensure proper management of tags
*
* @param JTableObserverTags $tagsObserver The tags observer for this table
* @param JUcmType $type The type for the table being processed
Expand All @@ -1224,7 +1224,7 @@ public function createTagsHelper($tagsObserver, $type, $pk, $typeAlias, $table)
{
if (!empty($tagsObserver) && !empty($type))
{
$table->tagsHelper = new JHelperTags();
$table->tagsHelper = new JHelperTags;
$table->tagsHelper->typeAlias = $typeAlias;
$table->tagsHelper->tags = explode(',', $table->tagsHelper->getTagIds($pk, $typeAlias));
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/authentication/cookie/cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public function onUserAuthenticate($credentials, $options, &$response)

if ($countResults !== 1)
{
$response->status = JAuthentication::STATUS_FAILURE;
$response->status = JAuthentication::STATUS_FAILURE;

return;
return;
}

// We have a user with one cookie with a valid series and a corresponding record in the database.
Expand Down
7 changes: 3 additions & 4 deletions plugins/twofactorauth/yubikey/yubikey.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ public function onUserTwofactorShowConfiguration($otpConfig, $user_id = null)
$yubikey = '';
}

// Is this a new TOTP setup? If so, we'll have to show the code
// validation field.
$new_totp = $otpConfig->method != $this->methodName;
// Is this a new TOTP setup? If so, we'll have to show the code validation field.
$new_totp = $otpConfig->method != $this->methodName;

// Start output buffering
@ob_start();
Expand Down Expand Up @@ -211,7 +210,7 @@ public function onUserTwofactorApplyConfiguration($method)
$yubikey = substr($data['securitycode'], 0, -32);

// Check succeedeed; return an OTP configuration object
$otpConfig = (object )array(
$otpConfig = (object) array(
'method' => $this->methodName,
'config' => array(
'yubikey' => $yubikey
Expand Down

0 comments on commit bbb8424

Please sign in to comment.