Browse files

[imp] Codestyle fixes for plugins. Fixes #3322. Fixes #3323. Fixes #3324

. Fixes #3325. Fixes #3326. Fixes #3327. Fixes #3328. Fixes #3329


@package     Joomla.Plugin
@subpackage  System.p3p

CodeStyle correction

@package     Joomla.Plugin
@subpackage  System.languagefilter

CodeStyle correction

@package     Joomla.Plugin
@subpackage  System.sef

CodeStyle correction

@package     Joomla.Plugin
@subpackage  System.cache

CodeStyle correction

@package     Joomla.Plugin
@subpackage  System.languagecode

CodeStyle correction

@package     Joomla.Plugin
@subpackage  System.logout

CodeStyle correction

@package     Joomla.Plugin
@subpackage  System.Highlight

CodeStyle correction

@package     Joomla.Plugin
@subpackage  System.Debug

CodeStyle correction

@package     Joomla.Plugin
@subpackage  System.redirect

CodeStyle correction

@package     Joomla.Plugin
@subpackage  System.log

CodeStyle correction

@package     Joomla.Plugin
@subpackage  System.remember

[CodeStyle] Add description for onUserLogout

[CodeStyle] add variable description

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Twofactorauth.totp

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Twofactorauth.yubikey

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Search.weblinks

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Search.categories

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Search.contacts

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Search.content

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Search.newsfeeds

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Finder.Categories

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Finder.Contacts

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Finder.Content

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Finder.Newsfeeds

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Finder.Tags

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Finder.Weblinks

Fix word spelling

[UNDO] Codestyle changes

Reason:
#3326 (comment)

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Extension.Joomla

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Content.Contact

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Content.emailcloak

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Content.loadmodule

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Content.vote

[CodeStyle] add variable description

[CodeStyle] change variable description

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Authentication.joomla

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Authentication.cookie

[CodeStyle] additional CodeStyle according shopfe/joomla-cms@8da6fe6#commitcomment-5721073

CodeStyle correction

@package     Joomla.Plugin
@subpackage  Editors.none

[CodeStyle] Add description for onGetInsertMethod
  • Loading branch information...
1 parent 74a70d4 commit 54972ff4f10622009dc7957e899431bc96ef191b Sebastian Hopfe committed with phproberto Mar 18, 2014
Showing with 168 additions and 81 deletions.
  1. +19 −23 plugins/authentication/cookie/cookie.php
  2. +1 −1 plugins/authentication/joomla/joomla.php
  3. +4 −2 plugins/content/contact/contact.php
  4. +2 −2 plugins/content/emailcloak/emailcloak.php
  5. +1 −1 plugins/content/loadmodule/loadmodule.php
  6. +1 −0 plugins/content/vote/vote.php
  7. +2 −0 plugins/editors/none/none.php
  8. +4 −3 plugins/extension/joomla/joomla.php
  9. +7 −3 plugins/finder/categories/categories.php
  10. +3 −2 plugins/finder/contacts/contacts.php
  11. +2 −2 plugins/finder/content/content.php
  12. +2 −2 plugins/finder/newsfeeds/newsfeeds.php
  13. +2 −1 plugins/finder/tags/tags.php
  14. +2 −2 plugins/finder/weblinks/weblinks.php
  15. +7 −0 plugins/search/categories/categories.php
  16. +4 −0 plugins/search/contacts/contacts.php
  17. +9 −0 plugins/search/content/content.php
  18. +7 −0 plugins/search/newsfeeds/newsfeeds.php
  19. +8 −0 plugins/search/weblinks/weblinks.php
  20. +1 −1 plugins/system/cache/cache.php
  21. +7 −4 plugins/system/debug/debug.php
  22. +1 −0 plugins/system/highlight/highlight.php
  23. +8 −1 plugins/system/languagecode/languagecode.php
  24. +39 −19 plugins/system/languagefilter/languagefilter.php
  25. +3 −1 plugins/system/log/log.php
  26. +2 −0 plugins/system/logout/logout.php
  27. +1 −1 plugins/system/p3p/p3p.php
  28. +1 −1 plugins/system/redirect/redirect.php
  29. +7 −0 plugins/system/remember/remember.php
  30. +7 −5 plugins/system/sef/sef.php
  31. +2 −2 plugins/twofactorauth/totp/totp.php
  32. +2 −2 plugins/twofactorauth/yubikey/yubikey.php
View
42 plugins/authentication/cookie/cookie.php
@@ -59,8 +59,8 @@ public function onUserAuthenticate($credentials, $options, &$response)
// Get cookie
$cookieName = JUserHelper::getShortHashedUserAgent();
-
$cookieValue = $this->app->input->cookie->get($cookieName);
+
if (!$cookieValue)
{
return;
@@ -95,7 +95,6 @@ public function onUserAuthenticate($credentials, $options, &$response)
->where($this->db->quoteName('series') . ' = ' . $this->db->quote($series))
->where($this->db->quoteName('uastring') . ' = ' . $this->db->quote($cookieName))
->order($this->db->quoteName('time') . ' DESC');
-
$results = $this->db->setQuery($query)->loadObjectList();
if (count($results) !== 1)
@@ -111,6 +110,7 @@ public function onUserAuthenticate($credentials, $options, &$response)
else
{
$token = JUserHelper::hashPassword($cookieArray[0]);
+
if (!JUserHelper::verifyPassword($cookieArray[0], $results[0]->token))
{
// This is a real attack! Either the series was guessed correctly or a cookie was stolen and used twice (once by attacker and once by victim).
@@ -124,10 +124,8 @@ public function onUserAuthenticate($credentials, $options, &$response)
$this->app->input->cookie->set($cookieName, false, time() - 42000, $this->app->get('cookie_path', '/'), $this->app->get('cookie_domain'));
// Issue warning by email to user and/or admin?
-
JLog::add(JText::sprintf('PLG_AUTH_COOKIE_ERROR_LOG_LOGIN_FAILED', $results[0]->user_id), JLog::WARNING, 'security');
-
- $response->status = JAuthentication::STATUS_FAILURE;
+ $response->status = JAuthentication::STATUS_FAILURE;
return false;
}
@@ -138,7 +136,6 @@ public function onUserAuthenticate($credentials, $options, &$response)
->select($this->db->quoteName(array('id', 'username', 'password')))
->from($this->db->quoteName('#__users'))
->where($this->db->quoteName('username') . ' = ' . $this->db->quote($results[0]->user_id));
-
$result = $this->db->setQuery($query)->loadObject();
if ($result)
@@ -147,11 +144,11 @@ public function onUserAuthenticate($credentials, $options, &$response)
$user = JUser::getInstance($result->id);
// Set response data.
- $response->username = $result->username;
- $response->email = $user->email;
- $response->fullname = $user->name;
- $response->password = $result->password;
- $response->language = $user->getParam('language');
+ $response->username = $result->username;
+ $response->email = $user->email;
+ $response->fullname = $user->name;
+ $response->password = $result->password;
+ $response->language = $user->getParam('language');
// Set response status.
$response->status = JAuthentication::STATUS_SUCCESS;
@@ -169,7 +166,7 @@ public function onUserAuthenticate($credentials, $options, &$response)
* We set a new cookie either for a user with no cookies or one
* where the user used a cookie to authenticate.
*
- * @param array options Array holding options
+ * @param array $options Array holding options
*
* @return boolean True on success
*
@@ -191,6 +188,7 @@ public function onUserAfterLogin($options)
// We need the old data to get the existing series
$cookieValue = $this->app->input->cookie->get($cookieName);
$cookieArray = explode('.', $cookieValue);
+
// Filter series since we're going to use it in the query
$filter = new JFilterInput;
$series = $filter->clean($cookieArray[1], 'ALNUM');
@@ -202,22 +200,22 @@ public function onUserAfterLogin($options)
// Create an unique series which will be used over the lifespan of the cookie
$unique = false;
+
do
{
$series = JUserHelper::genRandomPassword(20);
-
$query = $this->db->getQuery(true)
->select($this->db->quoteName('series'))
->from($this->db->quoteName('#__user_keys'))
->where($this->db->quoteName('series') . ' = ' . $this->db->quote($series));
-
$results = $this->db->setQuery($query)->loadResult();
if (is_null($results))
{
$unique = true;
}
}
+
while ($unique === false);
}
else
@@ -226,18 +224,17 @@ public function onUserAfterLogin($options)
}
// Get the parameter values
- $lifetime = $this->params->get('cookie_lifetime', '60') * 24 * 60 * 60;
- $length = $this->params->get('key_length', '16');
+ $lifetime = $this->params->get('cookie_lifetime', '60') * 24 * 60 * 60;
+ $length = $this->params->get('key_length', '16');
// Generate new cookie
- $token = JUserHelper::genRandomPassword($length);
- $cookieValue = $token . '.' . $series;
+ $token = JUserHelper::genRandomPassword($length);
+ $cookieValue = $token . '.' . $series;
// Overwrite existing cookie with new value
$this->app->input->cookie->set(
$cookieName, $cookieValue, time() + $lifetime, $this->app->get('cookie_path', '/'), $this->app->get('cookie_domain'), $this->app->isSSLConnection()
);
-
$query = $this->db->getQuery(true);
if (!empty($options['remember']))
@@ -263,7 +260,6 @@ public function onUserAfterLogin($options)
$hashed_token = JUserHelper::hashPassword($token);
$query
->set($this->db->quoteName('token') . ' = ' . $this->db->quote($hashed_token));
-
$this->db->setQuery($query)->execute();
return true;
@@ -288,6 +284,7 @@ public function onUserAfterLogout($options)
$cookieName = JUserHelper::getShortHashedUserAgent();
$cookieValue = $this->app->input->cookie->get($cookieName);
+
// There are no cookies to delete.
if (!$cookieValue)
{
@@ -297,15 +294,14 @@ public function onUserAfterLogout($options)
$cookieArray = explode('.', $cookieValue);
// Filter series since we're going to use it in the query
- $filter = new JFilterInput;
- $series = $filter->clean($cookieArray[1], 'ALNUM');
+ $filter = new JFilterInput;
+ $series = $filter->clean($cookieArray[1], 'ALNUM');
// Remove the record from the database
$query = $this->db->getQuery(true);
$query
->delete('#__user_keys')
->where($this->db->quoteName('series') . ' = ' . $this->db->quote($series));
-
$this->db->setQuery($query)->execute();
// Destroy the cookie
View
2 plugins/authentication/joomla/joomla.php
@@ -191,7 +191,7 @@ public function onUserAuthenticate($credentials, $options, &$response)
*/
return false;
}
- }
+ }
// Clean up the OTEP (remove dashes, spaces and other funny stuff
// our beloved users may have unwittingly stuffed in it)
View
6 plugins/content/contact/contact.php
@@ -31,6 +31,7 @@ class PlgContentContact extends JPlugin
public function onContentPrepare($context, &$row, $params, $page = 0)
{
$allowed_contexts = array('com_content.category', 'com_content.article', 'com_content.featured');
+
if (!in_array($context, $allowed_contexts))
{
return true;
@@ -69,14 +70,15 @@ public function onContentPrepare($context, &$row, $params, $page = 0)
/**
* Retrieve Contact
*
- * @param int $created_by
+ * @param int $created_by Id of the user who created the contact
*
* @return mixed|null|integer
*/
protected function getContactID($created_by)
{
static $contacts = array();
- if(isset($contacts[$created_by]))
+
+ if (isset($contacts[$created_by]))
{
return $contacts[$created_by];
}
View
4 plugins/content/emailcloak/emailcloak.php
@@ -116,10 +116,10 @@ protected function _cloak(&$text, &$params)
$mode = $this->params->def('mode', 1);
- // any@email.address.com
+ // Example: any@email.address.com
$searchEmail = '([\w\.\-]+\@(?:[a-z0-9\.\-]+\.)+(?:[a-zA-Z0-9\-]{2,10}))';
- // any@email.address.com?subject=anyText
+ // Example: any@email.address.com?subject=anyText
$searchEmailLink = $searchEmail . '([?&][\x20-\x7f][^"<>]+)';
// Any Text
View
2 plugins/content/loadmodule/loadmodule.php
@@ -173,7 +173,7 @@ protected function _loadmod($module, $title, $style = 'none')
// This allows people to enter it either way in the content
if (!isset($mod))
{
- $name = 'mod_'.$module;
+ $name = 'mod_' . $module;
$mod = JModuleHelper::getModule($name, $title);
}
View
1 plugins/content/vote/vote.php
@@ -41,6 +41,7 @@ class PlgContentVote extends JPlugin
public function onContentBeforeDisplay($context, &$row, &$params, $page=0)
{
$parts = explode(".", $context);
+
if ($parts[0] != 'com_content')
{
return false;
View
2 plugins/editors/none/none.php
@@ -92,6 +92,8 @@ public function onSetContent($id, $html)
}
/**
+ * Inserts html code into the editor
+ *
* @param string $id The id of the editor field
*
* @return boolean returns true when complete
View
7 plugins/extension/joomla/joomla.php
@@ -70,6 +70,7 @@ private function addUpdateSite($name, $type, $location, $enabled)
->columns(array($db->quoteName('name'), $db->quoteName('type'), $db->quoteName('location'), $db->quoteName('enabled')))
->values($db->quote($name) . ', ' . $db->quote($type) . ', ' . $db->quote($location) . ', ' . (int) $enabled);
$db->setQuery($query);
+
if ($db->execute())
{
// Link up this extension to the update site
@@ -88,6 +89,7 @@ private function addUpdateSite($name, $type, $location, $enabled)
->where('extension_id = ' . $this->eid);
$db->setQuery($query);
$tmpid = (int) $db->loadResult();
+
if (!$tmpid)
{
// Link this extension to the relevant update site
@@ -187,13 +189,12 @@ public function onExtensionAfterUninstall($installer, $eid, $result)
// Note: this might wipe out the entire table if there are no extensions linked
$db->setQuery($updatesite_delete);
$db->execute();
-
}
// Last but not least we wipe out any pending updates for the extension
$query->clear()
->delete('#__updates')
- ->where('extension_id = '. $eid);
+ ->where('extension_id = ' . $eid);
$db->setQuery($query);
$db->execute();
}
@@ -216,7 +217,7 @@ public function onExtensionAfterUpdate($installer, $eid)
$this->installer = $installer;
$this->eid = $eid;
- // handle any update sites
+ // Handle any update sites
$this->processUpdateSites();
}
}
View
10 plugins/finder/categories/categories.php
@@ -140,8 +140,8 @@ public function onFinderAfterSave($context, $row, $isNew)
{
$this->categoryAccessChange($row);
}
-
}
+
return true;
}
@@ -203,7 +203,6 @@ public function onFinderChangeState($context, $pks, $value)
$query = clone($this->getStateQuery());
$query->where('a.id = ' . (int) $pk);
- // Get the published states.
$this->db->setQuery($query);
$item = $this->db->loadObject();
*/
@@ -256,6 +255,7 @@ protected function index(FinderIndexerResult $item, $format = 'html')
// Need to import component route helpers dynamically, hence the reason it's handled here.
$path = JPATH_SITE . '/components/' . $item->extension . '/helpers/route.php';
+
if (is_file($path))
{
include_once $path;
@@ -285,6 +285,8 @@ protected function index(FinderIndexerResult $item, $format = 'html')
$item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc');
$item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
$item->addInstruction(FinderIndexer::META_CONTEXT, 'author');
+
+ // Deactivated Methods
// $item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_alias');
// Trigger the onContentPrepare event.
@@ -294,6 +296,7 @@ protected function index(FinderIndexerResult $item, $format = 'html')
$item->url = $this->getURL($item->id, $item->extension, $this->layout);
$class = $extension . 'HelperRoute';
+
if (class_exists($class) && method_exists($class, 'getCategoryRoute'))
{
$item->route = $class::getCategoryRoute($item->id, $item->language);
@@ -302,6 +305,7 @@ protected function index(FinderIndexerResult $item, $format = 'html')
{
$item->route = ContentHelperRoute::getCategoryRoute($item->slug, $item->catid);
}
+
$item->path = FinderIndexerHelper::getContentPath($item->route);
// Get the menu title if it exists.
@@ -371,7 +375,7 @@ protected function getListQuery($query = null)
$a_id = $query->castAsChar('a.id');
$case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':');
$case_when_item_alias .= ' ELSE ';
- $case_when_item_alias .= $a_id.' END as slug';
+ $case_when_item_alias .= $a_id . ' END as slug';
$query->select($case_when_item_alias)
->from('#__categories AS a')
->where($db->quoteName('a.id') . ' > 1');
View
5 plugins/finder/contacts/contacts.php
@@ -408,6 +408,7 @@ protected function setup()
protected function getListQuery($query = null)
{
$db = JFactory::getDbo();
+
// Check if we can use the supplied SQL query.
$query = $query instanceof JDatabaseQuery ? $query : $db->getQuery(true)
->select('a.id, a.name AS title, a.alias, a.con_position AS position, a.address, a.created AS start_date')
@@ -427,7 +428,7 @@ protected function getListQuery($query = null)
$a_id = $query->castAsChar('a.id');
$case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':');
$case_when_item_alias .= ' ELSE ';
- $case_when_item_alias .= $a_id.' END as slug';
+ $case_when_item_alias .= $a_id . ' END as slug';
$query->select($case_when_item_alias);
$case_when_category_alias = ' CASE WHEN ';
@@ -436,7 +437,7 @@ protected function getListQuery($query = null)
$c_id = $query->castAsChar('c.id');
$case_when_category_alias .= $query->concatenate(array($c_id, 'c.alias'), ':');
$case_when_category_alias .= ' ELSE ';
- $case_when_category_alias .= $c_id.' END as catslug';
+ $case_when_category_alias .= $c_id . ' END as catslug';
$query->select($case_when_category_alias)
->select('u.name')
View
4 plugins/finder/content/content.php
@@ -358,7 +358,7 @@ protected function getListQuery($query = null)
$a_id = $query->castAsChar('a.id');
$case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':');
$case_when_item_alias .= ' ELSE ';
- $case_when_item_alias .= $a_id.' END as slug';
+ $case_when_item_alias .= $a_id . ' END as slug';
$query->select($case_when_item_alias);
$case_when_category_alias = ' CASE WHEN ';
@@ -367,7 +367,7 @@ protected function getListQuery($query = null)
$c_id = $query->castAsChar('c.id');
$case_when_category_alias .= $query->concatenate(array($c_id, 'c.alias'), ':');
$case_when_category_alias .= ' ELSE ';
- $case_when_category_alias .= $c_id.' END as catslug';
+ $case_when_category_alias .= $c_id . ' END as catslug';
$query->select($case_when_category_alias)
->select('u.name AS author')
View
4 plugins/finder/newsfeeds/newsfeeds.php
@@ -349,7 +349,7 @@ protected function getListQuery($query = null)
$a_id = $query->castAsChar('a.id');
$case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':');
$case_when_item_alias .= ' ELSE ';
- $case_when_item_alias .= $a_id.' END as slug';
+ $case_when_item_alias .= $a_id . ' END as slug';
$query->select($case_when_item_alias);
$case_when_category_alias = ' CASE WHEN ';
@@ -358,7 +358,7 @@ protected function getListQuery($query = null)
$c_id = $query->castAsChar('c.id');
$case_when_category_alias .= $query->concatenate(array($c_id, 'c.alias'), ':');
$case_when_category_alias .= ' ELSE ';
- $case_when_category_alias .= $c_id.' END as catslug';
+ $case_when_category_alias .= $c_id . ' END as catslug';
$query->select($case_when_category_alias)
->from('#__newsfeeds AS a')
View
3 plugins/finder/tags/tags.php
@@ -292,6 +292,7 @@ protected function setup()
protected function getListQuery($query = null)
{
$db = JFactory::getDbo();
+
// Check if we can use the supplied SQL query.
$query = $query instanceof JDatabaseQuery ? $query : $db->getQuery(true)
->select('a.id, a.title, a.alias, a.description AS summary')
@@ -308,7 +309,7 @@ protected function getListQuery($query = null)
$a_id = $query->castAsChar('a.id');
$case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':');
$case_when_item_alias .= ' ELSE ';
- $case_when_item_alias .= $a_id.' END as slug';
+ $case_when_item_alias .= $a_id . ' END as slug';
$query->select($case_when_item_alias)
->from('#__tags AS a');
View
4 plugins/finder/weblinks/weblinks.php
@@ -341,7 +341,7 @@ protected function getListQuery($query = null)
$a_id = $query->castAsChar('a.id');
$case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':');
$case_when_item_alias .= ' ELSE ';
- $case_when_item_alias .= $a_id.' END as slug';
+ $case_when_item_alias .= $a_id . ' END as slug';
$query->select($case_when_item_alias);
$case_when_category_alias = ' CASE WHEN ';
@@ -350,7 +350,7 @@ protected function getListQuery($query = null)
$c_id = $query->castAsChar('c.id');
$case_when_category_alias .= $query->concatenate(array($c_id, 'c.alias'), ':');
$case_when_category_alias .= ' ELSE ';
- $case_when_category_alias .= $c_id.' END as catslug';
+ $case_when_category_alias .= $c_id . ' END as catslug';
$query->select($case_when_category_alias)
->from('#__weblinks AS a')
View
7 plugins/search/categories/categories.php
@@ -40,6 +40,7 @@ public function onContentSearchAreas()
static $areas = array(
'categories' => 'PLG_SEARCH_CATEGORIES_CATEGORIES'
);
+
return $areas;
}
@@ -78,10 +79,12 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$sArchived = $this->params->get('search_archived', 1);
$limit = $this->params->def('search_limit', 50);
$state = array();
+
if ($sContent)
{
$state[] = 1;
}
+
if ($sArchived)
{
$state[] = 2;
@@ -93,6 +96,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
}
$text = trim($text);
+
if ($text == '')
{
return array();
@@ -160,6 +164,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
)
->group('a.id, a.title, a.description, a.alias')
->order($order);
+
if ($app->isSite() && JLanguageMultilang::isEnabled())
{
$query->where('a.language in (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')');
@@ -169,9 +174,11 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$rows = $db->loadObjectList();
$return = array();
+
if ($rows)
{
$count = count($rows);
+
for ($i = 0; $i < $count; $i++)
{
$rows[$i]->href = ContentHelperRoute::getCategoryRoute($rows[$i]->slug);
View
4 plugins/search/contacts/contacts.php
@@ -38,6 +38,7 @@ public function onContentSearchAreas()
static $areas = array(
'contacts' => 'PLG_SEARCH_CONTACTS_CONTACTS'
);
+
return $areas;
}
@@ -77,10 +78,12 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$sArchived = $this->params->get('search_archived', 1);
$limit = $this->params->def('search_limit', 50);
$state = array();
+
if ($sContent)
{
$state[] = 1;
}
+
if ($sArchived)
{
$state[] = 2;
@@ -92,6 +95,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
}
$text = trim($text);
+
if ($text == '')
{
return array();
View
9 plugins/search/content/content.php
@@ -32,6 +32,7 @@ public function onContentSearchAreas()
static $areas = array(
'content' => 'JGLOBAL_ARTICLES'
);
+
return $areas;
}
@@ -61,6 +62,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
require_once JPATH_ADMINISTRATOR . '/components/com_search/helpers/search.php';
$searchText = $text;
+
if (is_array($areas))
{
if (!array_intersect($areas, array_keys($this->onContentSearchAreas())))
@@ -78,6 +80,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$now = $date->toSql();
$text = trim($text);
+
if ($text == '')
{
return array();
@@ -101,6 +104,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
default:
$words = explode(' ', $text);
$wheres = array();
+
foreach ($words as $word)
{
$word = $db->quote('%' . $db->escape($word, true) . '%', false);
@@ -112,6 +116,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$wheres2[] = 'a.metadesc LIKE ' . $word;
$wheres[] = implode(' OR ', $wheres2);
}
+
$where = '(' . implode(($phrase == 'all' ? ') AND (' : ') OR ('), $wheres) . ')';
break;
}
@@ -198,6 +203,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$list[$key]->href = ContentHelperRoute::getArticleRoute($item->slug, $item->catslug);
}
}
+
$rows[] = $list;
}
@@ -272,18 +278,21 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
}
$results = array();
+
if (count($rows))
{
foreach ($rows as $row)
{
$new_row = array();
+
foreach ($row as $article)
{
if (SearchHelper::checkNoHTML($article, $searchText, array('text', 'title', 'metadesc', 'metakey')))
{
$new_row[] = $article;
}
}
+
$results = array_merge($results, (array) $new_row);
}
}
View
7 plugins/search/newsfeeds/newsfeeds.php
@@ -38,6 +38,7 @@ public function onContentSearchAreas()
static $areas = array(
'newsfeeds' => 'PLG_SEARCH_NEWSFEEDS_NEWSFEEDS'
);
+
return $areas;
}
@@ -75,10 +76,12 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$sArchived = $this->params->get('search_archived', 1);
$limit = $this->params->def('search_limit', 50);
$state = array();
+
if ($sContent)
{
$state[] = 1;
}
+
if ($sArchived)
{
$state[] = 2;
@@ -90,6 +93,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
}
$text = trim($text);
+
if ($text == '')
{
return array();
@@ -110,6 +114,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
default:
$words = explode(' ', $text);
$wheres = array();
+
foreach ($words as $word)
{
$word = $db->quote('%' . $db->escape($word, true) . '%', false);
@@ -118,6 +123,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$wheres2[] = 'a.link LIKE ' . $word;
$wheres[] = implode(' OR ', $wheres2);
}
+
$where = '(' . implode(($phrase == 'all' ? ') AND (' : ') OR ('), $wheres) . ')';
break;
}
@@ -186,6 +192,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$rows[$key]->href = 'index.php?option=com_newsfeeds&view=newsfeed&catid=' . $row->catslug . '&id=' . $row->slug;
}
}
+
return $rows;
}
}
View
8 plugins/search/weblinks/weblinks.php
@@ -40,6 +40,7 @@ public function onContentSearchAreas()
static $areas = array(
'weblinks' => 'PLG_SEARCH_WEBLINKS_WEBLINKS'
);
+
return $areas;
}
@@ -79,10 +80,12 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$sArchived = $this->params->get('search_archived', 1);
$limit = $this->params->def('search_limit', 50);
$state = array();
+
if ($sContent)
{
$state[] = 1;
}
+
if ($sArchived)
{
$state[] = 2;
@@ -94,10 +97,12 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
}
$text = trim($text);
+
if ($text == '')
{
return array();
}
+
$searchWeblinks = JText::_('PLG_SEARCH_WEBLINKS');
switch ($phrase)
@@ -116,6 +121,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
default:
$words = explode(' ', $text);
$wheres = array();
+
foreach ($words as $word)
{
$word = $db->quote('%' . $db->escape($word, true) . '%', false);
@@ -125,6 +131,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$wheres2[] = 'a.title LIKE ' . $word;
$wheres[] = implode(' OR ', $wheres2);
}
+
$where = '(' . implode(($phrase == 'all' ? ') AND (' : ') OR ('), $wheres) . ')';
break;
}
@@ -191,6 +198,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$rows = $db->loadObjectList();
$return = array();
+
if ($rows)
{
foreach ($rows as $key => $row)
View
2 plugins/system/cache/cache.php
@@ -18,7 +18,6 @@
*/
class PlgSystemCache extends JPlugin
{
-
var $_cache = null;
var $_cache_key = null;
@@ -115,6 +114,7 @@ function onAfterRender()
}
$user = JFactory::getUser();
+
if ($user->get('guest'))
{
// We need to check again here, because auto-login plugins have not been fired before the first aid check.
View
11 plugins/system/debug/debug.php
@@ -94,6 +94,7 @@ public function __construct(&$subject, $config)
// Skip the plugin if debug is off
$app = JFactory::getApplication();
+
if ($app->getCfg('debug_lang') == '0' && $app->getCfg('debug') == '0')
{
return;
@@ -198,10 +199,10 @@ public function __destruct()
// No debug for Safari and Chrome redirection.
if (strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'webkit') !== false
- && substr($contents, 0, 50) == '<html><head><meta http-equiv="refresh" content="0;'
- )
+ && substr($contents, 0, 50) == '<html><head><meta http-equiv="refresh" content="0;')
{
echo $contents;
+
return;
}
@@ -1353,7 +1354,8 @@ public function mysqlDisconnectHandler(&$db)
$this->sqlShowProfileEach[0] = array(array('Error' => 'MySql have_profiling = off'));
}
}
- catch (Exception $e) {
+ catch (Exception $e)
+ {
$this->sqlShowProfileEach[0] = array(array('Error' => $e->getMessage()));
}
}
@@ -1373,7 +1375,8 @@ public function mysqlDisconnectHandler(&$db)
$db->setQuery('EXPLAIN ' . ($dbVersion56 ? 'EXTENDED ' : '') . $query);
$this->explains[$k] = $db->loadAssocList();
}
- catch (Exception $e) {
+ catch (Exception $e)
+ {
$this->explains[$k] = array(array('Error' => $e->getMessage()));
}
}
View
1 plugins/system/highlight/highlight.php
@@ -67,6 +67,7 @@ public function onAfterDispatch()
$filter = JFilterInput::getInstance();
$cleanTerms = array();
+
foreach ($terms as $term)
{
$cleanTerms[] = htmlspecialchars($filter->clean($term, 'string'));
View
9 plugins/system/languagecode/languagecode.php
@@ -62,25 +62,31 @@ public function onAfterRender()
// Replace codes in <link hreflang="" /> attributes.
preg_match_all(chr(1) . '(<link.*\s+hreflang=")([0-9a-z\-]*)(".*\s+rel="alternate".*/>)' . chr(1) . 'i', $body, $matches);
+
foreach ($matches[2] as $match)
{
$new_code = $this->params->get(strtolower($match));
+
if ($new_code)
{
$patterns[] = chr(1) . '(<link.*\s+hreflang=")(' . $match . ')(".*\s+rel="alternate".*/>)' . chr(1) . 'i';
$replace[] = '${1}' . $new_code . '${3}';
}
}
+
preg_match_all(chr(1) . '(<link.*\s+rel="alternate".*\s+hreflang=")([0-9A-Za-z\-]*)(".*/>)' . chr(1) . 'i', $body, $matches);
+
foreach ($matches[2] as $match)
{
$new_code = $this->params->get(strtolower($match));
+
if ($new_code)
{
$patterns[] = chr(1) . '(<link.*\s+rel="alternate".*\s+hreflang=")(' . $match . ')(".*/>)' . chr(1) . 'i';
$replace[] = '${1}' . $new_code . '${3}';
}
}
+
$app->setBody(preg_replace($patterns, $replace, $body));
}
}
@@ -101,6 +107,7 @@ public function onContentPrepareForm($form, $data)
if (!($form instanceof JForm))
{
$this->_subject->setError('JERROR_NOT_A_FORM');
+
return false;
}
@@ -125,7 +132,7 @@ public function onContentPrepareForm($form, $data)
description="PLG_SYSTEM_LANGUAGECODE_FIELDSET_DESC"
>
<field
- name="'.strtolower($tag).'"
+ name="' . strtolower($tag) . '"
type="text"
description="' . htmlspecialchars(JText::sprintf('PLG_SYSTEM_LANGUAGECODE_FIELD_DESC', $language['name']), ENT_COMPAT, 'UTF-8') . '"
translate_description="false"
View
58 plugins/system/languagefilter/languagefilter.php
@@ -54,6 +54,7 @@ public function __construct(&$subject, $config)
// Ensure that constructor is called one time.
self::$cookie = SID == '';
+
if (!self::$default_lang)
{
$app = JFactory::getApplication();
@@ -124,6 +125,7 @@ public function __construct(&$subject, $config)
$app->input->set('language', $lang_code);
}
}
+
parent::__construct($subject, $config);
// Detect browser feature.
@@ -160,6 +162,7 @@ public function onAfterInitialise()
// Add custom site name.
$languages = JLanguageHelper::getLanguages('lang_code');
+
if (isset($languages[self::$tag]) && $languages[self::$tag]->sitename)
{
JFactory::getConfig()->set('sitename', $languages[self::$tag]->sitename);
@@ -180,6 +183,7 @@ public function onAfterInitialise()
public function buildRule(&$router, &$uri)
{
$sef = $uri->getVar('lang');
+
if (empty($sef))
{
$sef = self::$lang_codes[self::$tag]->sef;
@@ -190,6 +194,7 @@ public function buildRule(&$router, &$uri)
}
$Itemid = $uri->getVar('Itemid');
+
if (!is_null($Itemid))
{
if ($item = JFactory::getApplication()->getMenu()->getItem($Itemid))
@@ -203,6 +208,7 @@ public function buildRule(&$router, &$uri)
{
$parts['query'] = str_replace('&amp;', '&', $parts['query']);
}
+
parse_str($parts['query'], $vars);
// Test if the url contains same vars as in menu link.
@@ -223,6 +229,7 @@ public function buildRule(&$router, &$uri)
{
$uri->delVar($key);
}
+
$uri->delVar('Itemid');
}
}
@@ -236,12 +243,11 @@ public function buildRule(&$router, &$uri)
if (self::$mode_sef)
{
$uri->delVar('lang');
- if (
- $this->params->get('remove_default_prefix', 0) == 0
+
+ if ($this->params->get('remove_default_prefix', 0) == 0
|| $sef != self::$default_sef
|| $sef != self::$lang_codes[self::$tag]->sef
- || $this->params->get('detect_browser', 1) && JLanguageHelper::detectLanguage() != self::$tag && !self::$cookie
- )
+ || $this->params->get('detect_browser', 1) && JLanguageHelper::detectLanguage() != self::$tag && !self::$cookie)
{
$uri->setPath($uri->getPath() . '/' . $sef . '/');
}
@@ -311,7 +317,7 @@ public function parseRule(&$router, &$uri)
else
{
$path = $uri->toString(array('path', 'query', 'fragment'));
- $app->redirect($uri->base() . 'index.php'.($path ? ('/' . $path) : ''));
+ $app->redirect($uri->base() . 'index.php' . ($path ? ('/' . $path) : ''));
}
}
}
@@ -325,12 +331,12 @@ public function parseRule(&$router, &$uri)
if ($app->getCfg('sef_rewrite'))
{
- $app->redirect($uri->base().$uri->toString(array('path', 'query', 'fragment')));
+ $app->redirect($uri->base() . $uri->toString(array('path', 'query', 'fragment')));
}
else
{
$path = $uri->toString(array('path', 'query', 'fragment'));
- $app->redirect($uri->base() . 'index.php'.($path ? ('/' . $path) : ''));
+ $app->redirect($uri->base() . 'index.php' . ($path ? ('/' . $path) : ''));
}
}
// Redirect if sef is the default one.
@@ -344,7 +350,7 @@ public function parseRule(&$router, &$uri)
if ($app->getCfg('sef_rewrite'))
{
- $app->redirect($uri->base().$uri->toString(array('path', 'query', 'fragment')));
+ $app->redirect($uri->base() . $uri->toString(array('path', 'query', 'fragment')));
}
else
{
@@ -356,6 +362,7 @@ public function parseRule(&$router, &$uri)
}
$lang_code = isset(self::$sefs[$sef]) ? self::$sefs[$sef]->lang_code : '';
+
if ($lang_code && JLanguage::exists($lang_code))
{
array_shift($parts);
@@ -365,18 +372,21 @@ public function parseRule(&$router, &$uri)
else
{
$sef = $uri->getVar('lang');
+
if (!isset(self::$sefs[$sef]))
{
$sef = isset(self::$lang_codes[$lang_code]) ? self::$lang_codes[$lang_code]->sef : self::$default_sef;
$uri->setVar('lang', $sef);
+
if ($app->input->getMethod() != "POST" || count($app->input->post) == 0)
{
- $app->redirect(JUri::base(true).'/index.php?'.$uri->getQuery());
+ $app->redirect(JUri::base(true) . '/index.php?' . $uri->getQuery());
}
}
}
$array = array('lang' => $sef);
+
return $array;
}
@@ -436,6 +446,7 @@ public function onUserAfterSave($user, $isnew, $success, $msg)
}
$app = JFactory::getApplication();
+
if ($lang_code == self::$_user_lang_code || !isset(self::$lang_codes[$lang_code]))
{
if ($app->isSite())
@@ -474,6 +485,7 @@ public function onUserLogin($user, $options = array())
{
$app = JFactory::getApplication();
$menu = $app->getMenu();
+
if ($app->isSite() && $this->params->get('automatic_change', 1))
{
// Load associations.
@@ -482,13 +494,15 @@ public function onUserLogin($user, $options = array())
if ($assoc)
{
$active = $menu->getActive();
+
if ($active)
{
$associations = MenusHelper::getAssociations($active->id);
}
}
$lang_code = $user['language'];
+
if (empty($lang_code))
{
$lang_code = self::$default_lang;
@@ -554,7 +568,7 @@ public function onAfterDispatch()
}
else
{
- $active_link = JRoute::_($active->link.'&Itemid=' . $active->id, false);
+ $active_link = JRoute::_($active->link . '&Itemid=' . $active->id, false);
}
if ($active_link == JUri::base(true) . '/')
@@ -564,6 +578,7 @@ public function onAfterDispatch()
// Get current link.
$current_link = JUri::getInstance()->toString(array('path', 'query'));
+
if ($current_link == JUri::base(true) . '/')
{
$current_link .= 'index.php';
@@ -576,8 +591,9 @@ public function onAfterDispatch()
unset($associations[$active->language]);
}
}
+
// Load component associations.
- $cName = JString::ucfirst($eName.'HelperAssociation');
+ $cName = JString::ucfirst($eName . 'HelperAssociation');
JLoader::register($cName, JPath::clean(JPATH_COMPONENT_SITE . '/helpers/association.php'));
if (class_exists($cName) && is_callable(array($cName, 'getAssociations')))
@@ -589,19 +605,22 @@ public function onAfterDispatch()
// No cookie - let's try to detect browser language or use site default.
if (!$lang_code)
{
- if ($this->params->get('detect_browser', 1)){
+ if ($this->params->get('detect_browser', 1))
+ {
$lang_code = JLanguageHelper::detectLanguage();
- } else {
+ }
+ else
+ {
$lang_code = self::$default_lang;
}
}
+
unset($cassociations[$lang_code]);
}
// Handle the default associations.
if ((!empty($associations) || !empty($cassociations)) && $this->params->get('item_associations'))
{
-
foreach (JLanguageHelper::getLanguages() as $language)
{
if (!JLanguage::exists($language->lang_code))
@@ -611,7 +630,7 @@ public function onAfterDispatch()
if (isset($cassociations[$language->lang_code]))
{
- $link = JRoute::_($cassociations[$language->lang_code].'&lang='.$language->sef);
+ $link = JRoute::_($cassociations[$language->lang_code] . '&lang=' . $language->sef);
$doc->addHeadLink($server . $link, 'alternate', 'rel', array('hreflang' => $language->lang_code));
}
elseif (isset($associations[$language->lang_code]))
@@ -622,12 +641,13 @@ public function onAfterDispatch()
{
if ($app->getCfg('sef'))
{
- $link = JRoute::_('index.php?Itemid=' . $item->id . '&lang='.$language->sef);
+ $link = JRoute::_('index.php?Itemid=' . $item->id . '&lang=' . $language->sef);
}
else
{
- $link = JRoute::_($item->link . '&Itemid=' . $item->id . '&lang='.$language->sef);
+ $link = JRoute::_($item->link . '&Itemid=' . $item->id . '&lang=' . $language->sef);
}
+
$doc->addHeadLink($server . $link, 'alternate', 'rel', array('hreflang' => $language->lang_code));
}
}
@@ -636,7 +656,6 @@ public function onAfterDispatch()
// Link to the home page of each language.
elseif ($active && $active->home)
{
-
foreach (JLanguageHelper::getLanguages() as $language)
{
if (!JLanguage::exists($language->lang_code))
@@ -654,8 +673,9 @@ public function onAfterDispatch()
}
else
{
- $link = JRoute::_($item->link.'&Itemid=' . $item->id . '&lang=' . $language->sef);
+ $link = JRoute::_($item->link . '&Itemid=' . $item->id . '&lang=' . $language->sef);
}
+
$doc->addHeadLink($server . $link, 'alternate', 'rel', array('hreflang' => $language->lang_code));
}
}
View
4 plugins/system/log/log.php
@@ -31,7 +31,7 @@ public function onUserLoginFailure($response)
{
$errorlog = array();
- switch($response['status'])
+ switch ($response['status'])
{
case JAuthentication::STATUS_SUCCESS:
$errorlog['status'] = $response['type'] . " CANCELED: ";
@@ -40,6 +40,7 @@ public function onUserLoginFailure($response)
case JAuthentication::STATUS_FAILURE:
$errorlog['status'] = $response['type'] . " FAILURE: ";
+
if ($this->params->get('log_username', 0))
{
$errorlog['comment'] = $response['error_message'] . ' ("' . $response['username'] . '")';
@@ -55,6 +56,7 @@ public function onUserLoginFailure($response)
$errorlog['comment'] = $response['error_message'];
break;
}
+
JLog::addLogger(array(), JLog::INFO);
JLog::add($errorlog['comment'], JLog::INFO, $errorlog['status']);
}
View
2 plugins/system/logout/logout.php
@@ -40,6 +40,7 @@ public function __construct(&$subject, $config)
$input = JFactory::getApplication()->input;
$hash = JApplication::getHash('PlgSystemLogout');
+
if (JFactory::getApplication()->isSite() && $input->cookie->getString($hash))
{
// Destroy the cookie.
@@ -74,6 +75,7 @@ public function onUserLogout($user, $options = array())
$cookie_path = $conf->get('config.cookie_path', '/');
setcookie($hash, true, time() + 86400, $cookie_path, $cookie_domain);
}
+
return true;
}
View
2 plugins/system/p3p/p3p.php
@@ -38,6 +38,6 @@ public function onAfterInitialise()
}
// Replace any existing P3P headers in the response.
- JFactory::getApplication()->setHeader('P3P', 'CP="'.$header.'"', true);
+ JFactory::getApplication()->setHeader('P3P', 'CP="' . $header . '"', true);
}
}
View
2 plugins/system/redirect/redirect.php
@@ -88,9 +88,9 @@ public static function handleError(&$error)
->where($db->quoteName('old_url') . ' = ' . $db->quote($current));
$db->setQuery($query);
$res = $db->loadResult();
+
if (!$res)
{
-
// If not, add the new url to the database.
$columns = array(
$db->quoteName('old_url'),
View
7 plugins/system/remember/remember.php
@@ -59,6 +59,13 @@ public function onAfterInitialise()
return false;
}
+ /**
+ * Imports the authentication plugin on user logout to make sure that the cookie is destroyed.
+ *
+ * @param array $options Array holding options (remember, autoregister, group)
+ *
+ * @return boolean
+ */
public function onUserLogout($options)
{
// No remember me for admin
View
12 plugins/system/sef/sef.php
@@ -69,7 +69,7 @@ public function onAfterRender()
}
// Replace src links.
- $base = JUri::base(true).'/';
+ $base = JUri::base(true) . '/';
$buffer = $app->getBody();
$regex = '#href="index.php\?([^"]*)#m';
@@ -88,12 +88,12 @@ public function onAfterRender()
// ONMOUSEOVER / ONMOUSEOUT
$regex = '#(onmouseover|onmouseout)="this.src=([\']+)(?!/|' . $protocols . '|\#|\')([^"]+)"#m';
- $buffer = preg_replace($regex, '$1="this.src=$2' . $base .'$3$4"', $buffer);
+ $buffer = preg_replace($regex, '$1="this.src=$2' . $base . '$3$4"', $buffer);
$this->checkBuffer($buffer);
// Background image.
$regex = '#style\s*=\s*[\'\"](.*):\s*url\s*\([\'\"]?(?!/|' . $protocols . '|\#)([^\)\'\"]+)[\'\"]?\)#m';
- $buffer = preg_replace($regex, 'style="$1: url(\'' . $base .'$2$3\')', $buffer);
+ $buffer = preg_replace($regex, 'style="$1: url(\'' . $base . '$2$3\')', $buffer);
$this->checkBuffer($buffer);
// OBJECT <param name="xx", value="yy"> -- fix it only inside the <param> tag.
@@ -103,7 +103,7 @@ public function onAfterRender()
// OBJECT <param value="xx", name="yy"> -- fix it only inside the <param> tag.
$regex = '#(<param\s+[^>]*)value\s*=\s*"(?!/|' . $protocols . '|\#|\')([^"]*)"\s*name\s*=\s*"(movie|src|url)"#m';
- $buffer = preg_replace($regex, '<param value="' . $base .'$2" name="$3"', $buffer);
+ $buffer = preg_replace($regex, '<param value="' . $base . '$2" name="$3"', $buffer);
$this->checkBuffer($buffer);
// OBJECT data="xx" attribute -- fix it only in the object tag.
@@ -112,6 +112,7 @@ public function onAfterRender()
$this->checkBuffer($buffer);
$app->setBody($buffer);
+
return true;
}
@@ -140,6 +141,7 @@ private function checkBuffer($buffer)
default:
$message = "Unknown PCRE error calling PCRE function";
}
+
throw new RuntimeException($message);
}
}
@@ -155,7 +157,7 @@ protected static function route(&$matches)
{
$url = $matches[1];
$url = str_replace('&amp;', '&', $url);
- $route = JRoute::_('index.php?'.$url);
+ $route = JRoute::_('index.php?' . $url);
return 'href="' . $route;
}
View
4 plugins/twofactorauth/totp/totp.php
@@ -256,8 +256,8 @@ public function onUserTwofactorApplyConfiguration($method)
* This method should handle any two factor authentication and report back
* to the subject.
*
- * @param array $credentials Array holding the user credentials
- * @param array $options Array of extra options
+ * @param array $credentials Array holding the user credentials
+ * @param array $options Array of extra options
*
* @return boolean True if the user is authorised with this two-factor authentication method
*
View
4 plugins/twofactorauth/yubikey/yubikey.php
@@ -225,8 +225,8 @@ public function onUserTwofactorApplyConfiguration($method)
* This method should handle any two factor authentication and report back
* to the subject.
*
- * @param array $credentials Array holding the user credentials
- * @param array $options Array of extra options
+ * @param array $credentials Array holding the user credentials
+ * @param array $options Array of extra options
*
* @return boolean True if the user is authorised with this two-factor authentication method
*

0 comments on commit 54972ff

Please sign in to comment.