Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/authentication/cookie/cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function onUserAfterLogin($options)
return false;
}

if (isset($options['responseType']) && $options['responseType'] == 'Cookie')
if (isset($options['responseType']) && $options['responseType'] === 'Cookie')
{
// Logged in using a cookie
$cookieName = 'joomla_remember_me_' . JUserHelper::getShortHashedUserAgent();
Expand Down
4 changes: 2 additions & 2 deletions plugins/authentication/joomla/joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function onUserAuthenticate($credentials, $options, &$response)
}

// Check if the user has enabled two factor authentication
if (empty($otpConfig->method) || ($otpConfig->method == 'none'))
if (empty($otpConfig->method) || ($otpConfig->method === 'none'))
{
// Warn the user if they are using a secret code but they have not
// enabled two factor auth in their account.
Expand Down Expand Up @@ -170,7 +170,7 @@ public function onUserAuthenticate($credentials, $options, &$response)
// Did the user use an OTEP instead?
if (empty($otpConfig->otep))
{
if (empty($otpConfig->method) || ($otpConfig->method == 'none'))
if (empty($otpConfig->method) || ($otpConfig->method === 'none'))
{
// Two factor authentication is not enabled on this account.
// Any string is assumed to be a valid OTEP.
Expand Down
4 changes: 2 additions & 2 deletions plugins/captcha/recaptcha/recaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function onInit($id = 'dynamic_recaptcha_1')
throw new Exception(JText::_('PLG_RECAPTCHA_ERROR_NO_PUBLIC_KEY'));
}

if ($this->params->get('version', '1.0') == '1.0')
if ($this->params->get('version', '1.0') === '1.0')
{
JHtml::_('jquery.framework');

Expand Down Expand Up @@ -82,7 +82,7 @@ public function onInit($id = 'dynamic_recaptcha_1')
*/
public function onDisplay($name = null, $id = 'dynamic_recaptcha_1', $class = '')
{
if ($this->params->get('version', '1.0') == '1.0')
if ($this->params->get('version', '1.0') === '1.0')
{
return '<div id="' . $id . '" ' . $class . '></div>';
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/content/emailcloak/emailcloak.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PlgContentEmailcloak extends JPlugin
public function onContentPrepare($context, &$row, &$params, $page = 0)
{
// Don't run this plugin when the content is being indexed
if ($context == 'com_finder.indexer')
if ($context === 'com_finder.indexer')
{
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/content/joomla/joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PlgContentJoomla extends JPlugin
public function onContentAfterSave($context, $article, $isNew)
{
// Check we are handling the frontend edit form.
if ($context != 'com_content.form')
if ($context !== 'com_content.form')
{
return true;
}
Expand Down Expand Up @@ -108,7 +108,7 @@ public function onContentAfterSave($context, $article, $isNew)
public function onContentBeforeDelete($context, $data)
{
// Skip plugin if we are deleting something other than categories
if ($context != 'com_categories.category')
if ($context !== 'com_categories.category')
{
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/content/loadmodule/loadmodule.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PlgContentLoadmodule extends JPlugin
public function onContentPrepare($context, &$article, &$params, $page = 0)
{
// Don't run this plugin when the content is being indexed
if ($context == 'com_finder.indexer')
if ($context === 'com_finder.indexer')
{
return true;
}
Expand Down
6 changes: 3 additions & 3 deletions plugins/content/pagebreak/pagebreak.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PlgContentPagebreak extends JPlugin
*/
public function onContentPrepare($context, &$row, &$params, $page = 0)
{
$canProceed = $context == 'com_content.article';
$canProceed = $context === 'com_content.article';

if (!$canProceed)
{
Expand Down Expand Up @@ -87,7 +87,7 @@ public function onContentPrepare($context, &$row, &$params, $page = 0)
$page = 0;
}

if ($params->get('intro_only') || $params->get('popup') || $full || $view != 'article')
if ($params->get('intro_only') || $params->get('popup') || $full || $view !== 'article')
{
$row->text = preg_replace($regex, '', $row->text);

Expand Down Expand Up @@ -158,7 +158,7 @@ public function onContentPrepare($context, &$row, &$params, $page = 0)
// Reset the text, we already hold it in the $text array.
$row->text = '';

if ($style == 'pages')
if ($style === 'pages')
{
// Display TOC.
if ($hasToc)
Expand Down
4 changes: 2 additions & 2 deletions plugins/content/pagenavigation/pagenavigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function onContentBeforeDisplay($context, &$row, &$params, $page = 0)
return false;
}

if (($context == 'com_content.article') && ($view == 'article') && $params->get('show_item_navigation'))
if (($context === 'com_content.article') && ($view === 'article') && $params->get('show_item_navigation'))
{
$db = JFactory::getDbo();
$user = JFactory::getUser();
Expand Down Expand Up @@ -70,7 +70,7 @@ public function onContentBeforeDisplay($context, &$row, &$params, $page = 0)
}

// Additional check for invalid sort ordering.
if ($order_method == 'front')
if ($order_method === 'front')
{
$order_method = '';
}
Expand Down
8 changes: 4 additions & 4 deletions plugins/content/vote/vote.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct(&$subject, $config)
*/
public function onContentBeforeDisplay($context, &$row, &$params, $page = 0)
{
if ($this->votingPosition != 'top')
if ($this->votingPosition !== 'top')
{
return '';
}
Expand All @@ -83,7 +83,7 @@ public function onContentBeforeDisplay($context, &$row, &$params, $page = 0)
*/
public function onContentAfterDisplay($context, &$row, &$params, $page = 0)
{
if ($this->votingPosition != 'bottom')
if ($this->votingPosition !== 'bottom')
{
return '';
}
Expand All @@ -107,7 +107,7 @@ private function displayVotingData($context, &$row, &$params, $page)
{
$parts = explode('.', $context);

if ($parts[0] != 'com_content')
if ($parts[0] !== 'com_content')
{
return false;
}
Expand All @@ -128,7 +128,7 @@ private function displayVotingData($context, &$row, &$params, $page)
include $path;
$html = ob_get_clean();

if ($this->app->input->getString('view', '') == 'article' && $row->state == 1)
if ($this->app->input->getString('view', '') === 'article' && $row->state == 1)
{
// Get the path for the voting form layout file
$path = JPluginHelper::getLayoutPath('content', 'vote', 'vote');
Expand Down
14 changes: 7 additions & 7 deletions plugins/editors/tinymce/tinymce.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ public function onDisplay($name, $content, $width, $height, $col, $row, $buttons
}

// Is Joomla installed in subdirectory
if (JUri::root(true) != '/')
if (JUri::root(true) !== '/')
{
$isSubDir = JUri::root(true);
}
Expand Down Expand Up @@ -702,7 +702,7 @@ private function tinyButtons($name, $excluded)
$options = $button->get('options');
$icon = $button->get('name');

if ($button->get('link') != '#')
if ($button->get('link') !== '#')
{
$href = JUri::base() . $button->get('link');
}
Expand Down Expand Up @@ -836,11 +836,11 @@ protected static function getGlobalFilters()
$filterData = $filters->$groupId;
$filterType = strtoupper($filterData->filter_type);

if ($filterType == 'NH')
if ($filterType === 'NH')
{
// Maximum HTML filtering.
}
elseif ($filterType == 'NONE')
elseif ($filterType === 'NONE')
{
// No HTML filtering.
$unfiltered = true;
Expand Down Expand Up @@ -876,13 +876,13 @@ protected static function getGlobalFilters()

// Collect the blacklist or whitelist tags and attributes.
// Each list is cummulative.
if ($filterType == 'BL')
if ($filterType === 'BL')
{
$blackList = true;
$blackListTags = array_merge($blackListTags, $tempTags);
$blackListAttributes = array_merge($blackListAttributes, $tempAttributes);
}
elseif ($filterType == 'CBL')
elseif ($filterType === 'CBL')
{
// Only set to true if Tags or Attributes were added
if ($tempTags || $tempAttributes)
Expand All @@ -892,7 +892,7 @@ protected static function getGlobalFilters()
$customListAttributes = array_merge($customListAttributes, $tempAttributes);
}
}
elseif ($filterType == 'WL')
elseif ($filterType === 'WL')
{
$whiteList = true;
$whiteListTags = array_merge($whiteListTags, $tempTags);
Expand Down
12 changes: 6 additions & 6 deletions plugins/finder/categories/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ class PlgFinderCategories extends FinderIndexerAdapter
*/
public function onFinderDelete($context, $table)
{
if ($context == 'com_categories.category')
if ($context === 'com_categories.category')
{
$id = $table->id;
}
elseif ($context == 'com_finder.index')
elseif ($context === 'com_finder.index')
{
$id = $table->link_id;
}
Expand Down Expand Up @@ -123,7 +123,7 @@ public function onFinderDelete($context, $table)
public function onFinderAfterSave($context, $row, $isNew)
{
// We only want to handle categories here.
if ($context == 'com_categories.category')
if ($context === 'com_categories.category')
{
// Check if the access levels are different.
if (!$isNew && $this->old_access != $row->access)
Expand Down Expand Up @@ -161,7 +161,7 @@ public function onFinderAfterSave($context, $row, $isNew)
public function onFinderBeforeSave($context, $row, $isNew)
{
// We only want to handle categories here.
if ($context == 'com_categories.category')
if ($context === 'com_categories.category')
{
// Query the database for the old access level and the parent if the item isn't new.
if (!$isNew)
Expand Down Expand Up @@ -190,7 +190,7 @@ public function onFinderBeforeSave($context, $row, $isNew)
public function onFinderChangeState($context, $pks, $value)
{
// We only want to handle categories here.
if ($context == 'com_categories.category')
if ($context === 'com_categories.category')
{
/*
* The category published state is tied to the parent category
Expand Down Expand Up @@ -224,7 +224,7 @@ public function onFinderChangeState($context, $pks, $value)
}

// Handle when the plugin is disabled.
if ($context == 'com_plugins.plugin' && $value === 0)
if ($context === 'com_plugins.plugin' && $value === 0)
{
$this->pluginDisable($pks);
}
Expand Down
18 changes: 9 additions & 9 deletions plugins/finder/contacts/contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class PlgFinderContacts extends FinderIndexerAdapter
public function onFinderCategoryChangeState($extension, $pks, $value)
{
// Make sure we're handling com_contact categories
if ($extension == 'com_contact')
if ($extension === 'com_contact')
{
$this->categoryStateChange($pks, $value);
}
Expand All @@ -113,11 +113,11 @@ public function onFinderCategoryChangeState($extension, $pks, $value)
*/
public function onFinderAfterDelete($context, $table)
{
if ($context == 'com_contact.contact')
if ($context === 'com_contact.contact')
{
$id = $table->id;
}
elseif ($context == 'com_finder.index')
elseif ($context === 'com_finder.index')
{
$id = $table->link_id;
}
Expand All @@ -144,7 +144,7 @@ public function onFinderAfterDelete($context, $table)
public function onFinderAfterSave($context, $row, $isNew)
{
// We only want to handle contacts here
if ($context == 'com_contact.contact')
if ($context === 'com_contact.contact')
{
// Check if the access levels are different
if (!$isNew && $this->old_access != $row->access)
Expand All @@ -158,7 +158,7 @@ public function onFinderAfterSave($context, $row, $isNew)
}

// Check for access changes in the category
if ($context == 'com_categories.category')
if ($context === 'com_categories.category')
{
// Check if the access levels are different
if (!$isNew && $this->old_cataccess != $row->access)
Expand Down Expand Up @@ -187,7 +187,7 @@ public function onFinderAfterSave($context, $row, $isNew)
public function onFinderBeforeSave($context, $row, $isNew)
{
// We only want to handle contacts here
if ($context == 'com_contact.contact')
if ($context === 'com_contact.contact')
{
// Query the database for the old access level if the item isn't new
if (!$isNew)
Expand All @@ -197,7 +197,7 @@ public function onFinderBeforeSave($context, $row, $isNew)
}

// Check for access levels from the category
if ($context == 'com_categories.category')
if ($context === 'com_categories.category')
{
// Query the database for the old access level if the item isn't new
if (!$isNew)
Expand Down Expand Up @@ -225,13 +225,13 @@ public function onFinderBeforeSave($context, $row, $isNew)
public function onFinderChangeState($context, $pks, $value)
{
// We only want to handle contacts here
if ($context == 'com_contact.contact')
if ($context === 'com_contact.contact')
{
$this->itemStateChange($pks, $value);
}

// Handle when the plugin is disabled
if ($context == 'com_plugins.plugin' && $value === 0)
if ($context === 'com_plugins.plugin' && $value === 0)
{
$this->pluginDisable($pks);
}
Expand Down
Loading