Skip to content

Commit

Permalink
Merge branch 'staging' of github.com:joomla/joomla-cms into com_contact
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Aug 14, 2017
2 parents dd99ba1 + c481183 commit 7f517fd
Show file tree
Hide file tree
Showing 18 changed files with 84 additions and 5,399 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ INSERT INTO `#__extensions`
(`extension_id`, `package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`)
VALUES
(318, 0, 'mod_sampledata', 'module', 'mod_sampledata', '', 1, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(479, 0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(480, 0, 'plg_sampledata_testing', 'plugin', 'testing', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
(479, 0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ INSERT INTO "#__extensions"
("extension_id", "package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state")
VALUES
(318, 0, 'mod_sampledata', 'module', 'mod_sampledata', '', 1, 0, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(479, 0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(480, 0, 'plg_sampledata_testing', 'plugin', 'testing', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);
(479, 0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
INSERT INTO "#__extensions" ("extension_id", "package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state")
VALUES
(318, 0, 'mod_sampledata', 'module', 'mod_sampledata', '', 1, 0, 1, 0, '', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0),
(479, 0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0),
(480, 0, 'plg_sampledata_testing', 'plugin', 'testing', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0);
(479, 0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0);
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public function start()
// Send the response.
static::sendResponse($state);
}

// Catch an exception and return the response.
catch (Exception $e)
{
Expand Down Expand Up @@ -217,6 +218,7 @@ public function batch()
// Send the response.
static::sendResponse($state);
}

// Catch an exception and return the response.
catch (Exception $e)
{
Expand Down Expand Up @@ -266,6 +268,7 @@ public function optimize()
// Send the response.
static::sendResponse($state);
}

// Catch an exception and return the response.
catch (Exception $e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,24 +117,24 @@ public function index($item, $format = 'html')
->insert($db->quoteName('#__finder_links'))
->columns($columnsArray)
->values(
$db->quote($item->url) . ', '
. $db->quote($item->route) . ', '
. $db->quote($item->title) . ', '
. $db->quote($item->description) . ', '
. $query->currentTimestamp() . ', '
. '1, '
. (int) $item->state . ', '
. (int) $item->access . ', '
. $db->quote($item->language) . ', '
. (int) $item->type_id . ', '
. $db->quote(serialize($item)) . ', '
. $db->quote($item->publish_start_date) . ', '
. $db->quote($item->publish_end_date) . ', '
. $db->quote($item->start_date) . ', '
. $db->quote($item->end_date) . ', '
. (double) ($item->list_price ?: 0) . ', '
. (double) ($item->sale_price ?: 0)
);
$db->quote($item->url) . ', '
. $db->quote($item->route) . ', '
. $db->quote($item->title) . ', '
. $db->quote($item->description) . ', '
. $query->currentTimestamp() . ', '
. '1, '
. (int) $item->state . ', '
. (int) $item->access . ', '
. $db->quote($item->language) . ', '
. (int) $item->type_id . ', '
. $db->quote(serialize($item)) . ', '
. $db->quote($item->publish_start_date) . ', '
. $db->quote($item->publish_end_date) . ', '
. $db->quote($item->start_date) . ', '
. $db->quote($item->end_date) . ', '
. (double) ($item->list_price ?: 0) . ', '
. (double) ($item->sale_price ?: 0)
);
$db->setQuery($query);
$db->execute();

Expand Down Expand Up @@ -320,7 +320,8 @@ public function index($item, $format = 'html')
* table have a term of 0, then no term record exists for that
* term so we need to add it to the terms table.
*/
/* Emulation of IGNORE INTO behaviour */
// Emulation of IGNORE INTO behaviour

$db->setQuery(
' SELECT ta.term' .
' FROM ' . $db->quoteName('#__finder_tokens_aggregate') . ' AS ta' .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,24 +125,24 @@ public function index($item, $format = 'html')
->insert($db->quoteName('#__finder_links'))
->columns($columnsArray)
->values(
$db->quote($item->url) . ', '
. $db->quote($item->route) . ', '
. $db->quote($item->title) . ', '
. $db->quote($item->description) . ', '
. $query->currentTimestamp() . ', '
. '1, '
. (int) $item->state . ', '
. (int) $item->access . ', '
. $db->quote($item->language) . ', '
. (int) $item->type_id . ', '
. $db->quote(serialize($item)) . ', '
. $db->quote($item->publish_start_date) . ', '
. $db->quote($item->publish_end_date) . ', '
. $db->quote($item->start_date) . ', '
. $db->quote($item->end_date) . ', '
. (double) ($item->list_price ?: 0) . ', '
. (double) ($item->sale_price ?: 0)
);
$db->quote($item->url) . ', '
. $db->quote($item->route) . ', '
. $db->quote($item->title) . ', '
. $db->quote($item->description) . ', '
. $query->currentTimestamp() . ', '
. '1, '
. (int) $item->state . ', '
. (int) $item->access . ', '
. $db->quote($item->language) . ', '
. (int) $item->type_id . ', '
. $db->quote(serialize($item)) . ', '
. $db->quote($item->publish_start_date) . ', '
. $db->quote($item->publish_end_date) . ', '
. $db->quote($item->start_date) . ', '
. $db->quote($item->end_date) . ', '
. (double) ($item->list_price ?: 0) . ', '
. (double) ($item->sale_price ?: 0)
);
$db->setQuery($query);
$db->execute();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ protected function processString($input, $lang, $mode)
}

break;
}
}
}

// Clean up the input string again.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,31 +95,31 @@ private static function step1ab($word)
if (substr($word, -1) == 's')
{
self::replace($word, 'sses', 'ss')
or self::replace($word, 'ies', 'i')
or self::replace($word, 'ss', 'ss')
or self::replace($word, 's', '');
|| self::replace($word, 'ies', 'i')
|| self::replace($word, 'ss', 'ss')
|| self::replace($word, 's', '');
}

// Part b
if (substr($word, -2, 1) != 'e' or !self::replace($word, 'eed', 'ee', 0))
if (substr($word, -2, 1) != 'e' || !self::replace($word, 'eed', 'ee', 0))
{
// First rule
$v = self::$regex_vowel;

// Words ending with ing and ed
// Note use of && and OR, for precedence reasons
if (preg_match("#$v+#", substr($word, 0, -3)) && self::replace($word, 'ing', '')
or preg_match("#$v+#", substr($word, 0, -2)) && self::replace($word, 'ed', ''))
|| preg_match("#$v+#", substr($word, 0, -2)) && self::replace($word, 'ed', ''))
{
// If one of above two test successful
if (!self::replace($word, 'at', 'ate') and !self::replace($word, 'bl', 'ble') and !self::replace($word, 'iz', 'ize'))
if (!self::replace($word, 'at', 'ate') && !self::replace($word, 'bl', 'ble') && !self::replace($word, 'iz', 'ize'))
{
// Double consonant ending
if (self::doubleConsonant($word) and substr($word, -2) != 'll' and substr($word, -2) != 'ss' and substr($word, -2) != 'zz')
if (self::doubleConsonant($word) && substr($word, -2) != 'll' && substr($word, -2) != 'ss' && substr($word, -2) != 'zz')
{
$word = substr($word, 0, -1);
}
elseif (self::m($word) == 1 and self::cvc($word))
elseif (self::m($word) == 1 && self::cvc($word))
{
$word .= 'e';
}
Expand Down Expand Up @@ -166,11 +166,11 @@ private static function step2($word)
{
case 'a':
self::replace($word, 'ational', 'ate', 0)
or self::replace($word, 'tional', 'tion', 0);
|| self::replace($word, 'tional', 'tion', 0);
break;
case 'c':
self::replace($word, 'enci', 'ence', 0)
or self::replace($word, 'anci', 'ance', 0);
|| self::replace($word, 'anci', 'ance', 0);
break;
case 'e':
self::replace($word, 'izer', 'ize', 0);
Expand All @@ -180,26 +180,26 @@ private static function step2($word)
break;
case 'l':
self::replace($word, 'entli', 'ent', 0)
or self::replace($word, 'ousli', 'ous', 0)
or self::replace($word, 'alli', 'al', 0)
or self::replace($word, 'bli', 'ble', 0)
or self::replace($word, 'eli', 'e', 0);
|| self::replace($word, 'ousli', 'ous', 0)
|| self::replace($word, 'alli', 'al', 0)
|| self::replace($word, 'bli', 'ble', 0)
|| self::replace($word, 'eli', 'e', 0);
break;
case 'o':
self::replace($word, 'ization', 'ize', 0)
or self::replace($word, 'ation', 'ate', 0)
or self::replace($word, 'ator', 'ate', 0);
|| self::replace($word, 'ation', 'ate', 0)
|| self::replace($word, 'ator', 'ate', 0);
break;
case 's':
self::replace($word, 'iveness', 'ive', 0)
or self::replace($word, 'fulness', 'ful', 0)
or self::replace($word, 'ousness', 'ous', 0)
or self::replace($word, 'alism', 'al', 0);
|| self::replace($word, 'fulness', 'ful', 0)
|| self::replace($word, 'ousness', 'ous', 0)
|| self::replace($word, 'alism', 'al', 0);
break;
case 't':
self::replace($word, 'biliti', 'ble', 0)
or self::replace($word, 'aliti', 'al', 0)
or self::replace($word, 'iviti', 'ive', 0);
|| self::replace($word, 'aliti', 'al', 0)
|| self::replace($word, 'iviti', 'ive', 0);
break;
}

Expand Down Expand Up @@ -227,7 +227,7 @@ private static function step3($word)
break;
case 't':
self::replace($word, 'icate', 'ic', 0)
or self::replace($word, 'iciti', 'ic', 0);
|| self::replace($word, 'iciti', 'ic', 0);
break;
case 'u':
self::replace($word, 'ful', '', 0);
Expand Down Expand Up @@ -261,7 +261,7 @@ private static function step4($word)
break;
case 'c':
self::replace($word, 'ance', '', 1)
or self::replace($word, 'ence', '', 1);
|| self::replace($word, 'ence', '', 1);
break;
case 'e':
self::replace($word, 'er', '', 1);
Expand All @@ -271,16 +271,16 @@ private static function step4($word)
break;
case 'l':
self::replace($word, 'able', '', 1)
or self::replace($word, 'ible', '', 1);
|| self::replace($word, 'ible', '', 1);
break;
case 'n':
self::replace($word, 'ant', '', 1)
or self::replace($word, 'ement', '', 1)
or self::replace($word, 'ment', '', 1)
or self::replace($word, 'ent', '', 1);
|| self::replace($word, 'ement', '', 1)
|| self::replace($word, 'ment', '', 1)
|| self::replace($word, 'ent', '', 1);
break;
case 'o':
if (substr($word, -4) == 'tion' or substr($word, -4) == 'sion')
if (substr($word, -4) == 'tion' || substr($word, -4) == 'sion')
{
self::replace($word, 'ion', '', 1);
}
Expand All @@ -294,7 +294,7 @@ private static function step4($word)
break;
case 't':
self::replace($word, 'ate', '', 1)
or self::replace($word, 'iti', '', 1);
|| self::replace($word, 'iti', '', 1);
break;
case 'u':
self::replace($word, 'ous', '', 1);
Expand Down Expand Up @@ -338,7 +338,7 @@ private static function step5($word)
}

// Part b
if (self::m($word) > 1 and self::doubleConsonant($word) and substr($word, -1) == 'l')
if (self::m($word) > 1 && self::doubleConsonant($word) && substr($word, -1) == 'l')
{
$word = substr($word, 0, -1);
}
Expand Down Expand Up @@ -369,7 +369,7 @@ private static function replace(&$str, $check, $repl, $m = null)
{
$substr = substr($str, 0, $len);

if (is_null($m) or self::m($substr) > $m)
if (is_null($m) || self::m($substr) > $m)
{
$str = $substr . $repl;
}
Expand Down Expand Up @@ -423,7 +423,7 @@ private static function doubleConsonant($str)
{
$c = self::$regex_consonant;

return preg_match("#$c{2}$#", $str, $matches) and $matches[0]{0} == $matches[0]{1};
return preg_match("#$c{2}$#", $str, $matches) && $matches[0]{0} == $matches[0]{1};
}

/**
Expand All @@ -440,7 +440,7 @@ private static function cvc($str)
$c = self::$regex_consonant;
$v = self::$regex_vowel;

return preg_match("#($c$v$c)$#", $str, $matches) and strlen($matches[1]) == 3 and $matches[1]{2} != 'w' and $matches[1]{2} != 'x'
and $matches[1]{2} != 'y';
return preg_match("#($c$v$c)$#", $str, $matches) && strlen($matches[1]) == 3 && $matches[1]{2} != 'w' && $matches[1]{2} != 'x'
&& $matches[1]{2} != 'y';
}
}
1 change: 1 addition & 0 deletions administrator/components/com_finder/helpers/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public static function branchLanguageTitle($branchName)
else
{
$languages = JLanguageHelper::getLanguages('lang_code');

if (isset($languages[$branchName]))
{
$title = $languages[$branchName]->title;
Expand Down

0 comments on commit 7f517fd

Please sign in to comment.