Skip to content

Commit

Permalink
Update Framework packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Babker committed Mar 18, 2018
1 parent e3fb27e commit 09347f4
Show file tree
Hide file tree
Showing 70 changed files with 1,572 additions and 1,586 deletions.
188 changes: 94 additions & 94 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions libraries/vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@
'Joomla\\Database\\QueryInterface' => $vendorDir . '/joomla/database/src/QueryInterface.php',
'Joomla\\Database\\QueryMonitorInterface' => $vendorDir . '/joomla/database/src/QueryMonitorInterface.php',
'Joomla\\Database\\Query\\LimitableInterface' => $vendorDir . '/joomla/database/src/Query/LimitableInterface.php',
'Joomla\\Database\\Query\\MysqlQueryBuilder' => $vendorDir . '/joomla/database/src/Query/MysqlQueryBuilder.php',
'Joomla\\Database\\Query\\PostgresqlQueryBuilder' => $vendorDir . '/joomla/database/src/Query/PostgresqlQueryBuilder.php',
'Joomla\\Database\\Query\\PreparableInterface' => $vendorDir . '/joomla/database/src/Query/PreparableInterface.php',
'Joomla\\Database\\Query\\QueryElement' => $vendorDir . '/joomla/database/src/Query/QueryElement.php',
'Joomla\\Database\\Service\\DatabaseProvider' => $vendorDir . '/joomla/database/src/Service/DatabaseProvider.php',
Expand Down
2 changes: 2 additions & 0 deletions libraries/vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,8 @@ class ComposerStaticInit8462306b3e4ab2d2c9bfd5cc383e4b0c
'Joomla\\Database\\QueryInterface' => __DIR__ . '/..' . '/joomla/database/src/QueryInterface.php',
'Joomla\\Database\\QueryMonitorInterface' => __DIR__ . '/..' . '/joomla/database/src/QueryMonitorInterface.php',
'Joomla\\Database\\Query\\LimitableInterface' => __DIR__ . '/..' . '/joomla/database/src/Query/LimitableInterface.php',
'Joomla\\Database\\Query\\MysqlQueryBuilder' => __DIR__ . '/..' . '/joomla/database/src/Query/MysqlQueryBuilder.php',
'Joomla\\Database\\Query\\PostgresqlQueryBuilder' => __DIR__ . '/..' . '/joomla/database/src/Query/PostgresqlQueryBuilder.php',
'Joomla\\Database\\Query\\PreparableInterface' => __DIR__ . '/..' . '/joomla/database/src/Query/PreparableInterface.php',
'Joomla\\Database\\Query\\QueryElement' => __DIR__ . '/..' . '/joomla/database/src/Query/QueryElement.php',
'Joomla\\Database\\Service\\DatabaseProvider' => __DIR__ . '/..' . '/joomla/database/src/Service/DatabaseProvider.php',
Expand Down
188 changes: 94 additions & 94 deletions libraries/vendor/composer/installed.json

Large diffs are not rendered by default.

29 changes: 16 additions & 13 deletions libraries/vendor/joomla/application/src/AbstractWebApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ protected function compress()

// Set the encoding headers.
$this->setHeader('Content-Encoding', $encoding);
$this->setHeader('Vary', 'Accept-Encoding');
$this->setHeader('X-Content-Encoded-By', 'Joomla');

// Replace the output with the encoded data.
Expand Down Expand Up @@ -416,7 +417,7 @@ public function redirect($url, $status = 303)
echo "<script>document.location.href='$url';</script>\n";
}
// We have to use a JavaScript redirect here because MSIE doesn't play nice with UTF-8 URLs.
elseif (($this->client->engine == Web\WebClient::TRIDENT) && !$this->isAscii($url))
elseif (($this->client->engine == Web\WebClient::TRIDENT) && !static::isAscii($url))
{
$html = '<html><head>';
$html .= '<meta http-equiv="content-type" content="text/html; charset=' . $this->charSet . '" />';
Expand Down Expand Up @@ -997,30 +998,29 @@ protected function loadSystemUris($requestUri = null)
/**
* Checks for a form token in the request.
*
* Use in conjunction with getFormToken.
*
* @param string $method The request method in which to look for the token key.
*
* @return boolean True if found and valid, false otherwise.
* @return boolean
*
* @since 1.0
*/
public function checkToken($method = 'post')
{
$token = $this->getFormToken();

if (!$this->input->$method->get($token, '', 'alnum'))
{
if ($this->getSession()->isNew())
{
// Redirect to login screen.
$this->redirect('index.php');
}
// Support a token sent via the X-CSRF-Token header, then fall back to a token in the request
$requestToken = $this->input->server->get(
'HTTP_X_CSRF_TOKEN',
$this->input->$method->get($token, '', 'alnum'),
'alnum'
);

if (!$requestToken)
{
return false;
}

return true;
return $this->getSession()->hasToken($token);
}

/**
Expand All @@ -1032,7 +1032,10 @@ public function checkToken($method = 'post')
*
* @since 1.0
*/
abstract public function getFormToken($forceNew = false);
public function getFormToken($forceNew = false)
{
return $this->getSession()->getToken($forceNew);
}

/**
* Tests whether a string contains only 7bit ASCII bytes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function getError(): \Throwable
*/
public function getExitCode(): int
{
return $this->exitCode ?: ($this->error->getCode() ?: 1);
return $this->exitCode ?: (is_int($this->error->getCode()) && $this->error->getCode() !== 0 ? $this->error->getCode() : 1);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion libraries/vendor/joomla/crypt/src/Cipher/Crypto.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down
1 change: 1 addition & 0 deletions libraries/vendor/joomla/crypt/src/Cipher/OpenSSL.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Joomla\Crypt\Cipher;

use Joomla\Crypt\CipherInterface;
use Joomla\Crypt\Exception\InvalidKeyTypeException;
use Joomla\Crypt\Key;

/**
Expand Down
14 changes: 7 additions & 7 deletions libraries/vendor/joomla/crypt/src/Cipher/Sodium.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand All @@ -16,15 +16,15 @@
/**
* Cipher for sodium algorithm encryption, decryption and key generation.
*
* @since __DEPLOY_VERSION__
* @since 1.4.0
*/
class Sodium implements CipherInterface
{
/**
* The message nonce to be used with encryption/decryption
*
* @var string
* @since __DEPLOY_VERSION__
* @since 1.4.0
*/
private $nonce;

Expand All @@ -36,7 +36,7 @@ class Sodium implements CipherInterface
*
* @return string The decrypted data string.
*
* @since __DEPLOY_VERSION__
* @since 1.4.0
* @throws \RuntimeException
*/
public function decrypt($data, Key $key)
Expand Down Expand Up @@ -74,7 +74,7 @@ public function decrypt($data, Key $key)
*
* @return string The encrypted data string.
*
* @since __DEPLOY_VERSION__
* @since 1.4.0
* @throws \RuntimeException
*/
public function encrypt($data, Key $key)
Expand Down Expand Up @@ -104,7 +104,7 @@ public function encrypt($data, Key $key)
*
* @return Key
*
* @since __DEPLOY_VERSION__
* @since 1.4.0
* @throws RuntimeException
*/
public function generateKey(array $options = array())
Expand Down Expand Up @@ -134,7 +134,7 @@ public static function isSupported(): bool
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 1.4.0
*/
public function setNonce($nonce)
{
Expand Down
2 changes: 1 addition & 1 deletion libraries/vendor/joomla/crypt/src/CipherInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion libraries/vendor/joomla/crypt/src/Crypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Part of the Joomla Framework Crypt Package
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand All @@ -11,7 +11,7 @@
/**
* Exception representing an invalid Joomla\Crypt\Key type for a cipher
*
* @since __DEPLOY_VERSION__
* @since 1.4.0
*/
class InvalidKeyTypeException extends \InvalidArgumentException
{
Expand All @@ -21,7 +21,7 @@ class InvalidKeyTypeException extends \InvalidArgumentException
* @param string $expectedKeyType The expected key type.
* @param string $actualKeyType The actual key type.
*
* @since __DEPLOY_VERSION__
* @since 1.4.0
*/
public function __construct($expectedKeyType, $actualKeyType)
{
Expand Down
12 changes: 6 additions & 6 deletions libraries/vendor/joomla/data/src/DataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ public function getObjectsKeys($type = 'all')

foreach ($this->objects as $object)
{
$object_vars = json_decode(json_encode($object), true);
$objectVars = json_decode(json_encode($object), true);

$keys = (is_null($keys)) ? $object_vars : $function($keys, $object_vars);
$keys = (is_null($keys)) ? $objectVars : $function($keys, $objectVars);
}

return array_keys($keys);
Expand Down Expand Up @@ -249,19 +249,19 @@ public function toArray($associative = true, $k = null)

foreach ($this->objects as $key => $object)
{
$array_item = [];
$arrayItem = [];

$key = ($associative) ? $key : $i++;

$j = 0;

foreach ($keys as $property)
{
$property_key = ($associative) ? $property : $j++;
$array_item[$property_key] = (isset($object->$property)) ? $object->$property : null;
$propertyKey = ($associative) ? $property : $j++;
$arrayItem[$propertyKey] = (isset($object->$property)) ? $object->$property : null;
}

$return[$key] = $array_item;
$return[$key] = $arrayItem;
}

return $return;
Expand Down
25 changes: 18 additions & 7 deletions libraries/vendor/joomla/database/src/DatabaseDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ abstract class DatabaseDriver implements DatabaseInterface, DispatcherAwareInter
*
* @var DatabaseDriver[]
* @since 1.0
* @deprecated 3.0 Singleton storage will no longer be supported.
*/
protected static $instances = [];

Expand Down Expand Up @@ -266,9 +267,19 @@ public static function getConnectors()
*
* @since 1.0
* @throws \RuntimeException
* @deprecated 3.0 Use DatabaseFactory::getDriver() instead
*/
public static function getInstance(array $options = [])
{
@trigger_error(
sprintf(
'%1$s() is deprecated and will be removed in 3.0, use %2$s::getDriver() instead.',
__METHOD__,
DatabaseFactory::class
),
E_USER_DEPRECATED
);

// Sanitize the database connector options.
$options['driver'] = isset($options['driver']) ? preg_replace('/[^A-Z0-9_\.-]/i', '', $options['driver']) : 'mysqli';
$options['database'] = isset($options['database']) ? $options['database'] : null;
Expand Down Expand Up @@ -876,9 +887,9 @@ public function hasUtfSupport()
/**
* Inserts a row into a table based on an object's properties.
*
* @param string $table The name of the database table to insert into.
* @param object &$object A reference to an object whose public properties match the table fields.
* @param string $key The name of the primary key. If provided the object property is updated.
* @param string $table The name of the database table to insert into.
* @param object $object A reference to an object whose public properties match the table fields.
* @param string $key The name of the primary key. If provided the object property is updated.
*
* @return boolean
*
Expand Down Expand Up @@ -1572,10 +1583,10 @@ public function truncateTable($table)
/**
* Updates a row in a table based on an object's properties.
*
* @param string $table The name of the database table to update.
* @param object &$object A reference to an object whose public properties match the table fields.
* @param array $key The name of the primary key.
* @param boolean $nulls True to update null fields or false to ignore them.
* @param string $table The name of the database table to update.
* @param object $object A reference to an object whose public properties match the table fields.
* @param array $key The name of the primary key.
* @param boolean $nulls True to update null fields or false to ignore them.
*
* @return boolean True on success.
*
Expand Down
14 changes: 7 additions & 7 deletions libraries/vendor/joomla/database/src/DatabaseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ public function insertid();
/**
* Inserts a row into a table based on an object's properties.
*
* @param string $table The name of the database table to insert into.
* @param object &$object A reference to an object whose public properties match the table fields.
* @param string $key The name of the primary key. If provided the object property is updated.
* @param string $table The name of the database table to insert into.
* @param object $object A reference to an object whose public properties match the table fields.
* @param string $key The name of the primary key. If provided the object property is updated.
*
* @return boolean
*
Expand Down Expand Up @@ -515,10 +515,10 @@ public function unlockTables();
/**
* Updates a row in a table based on an object's properties.
*
* @param string $table The name of the database table to update.
* @param object &$object A reference to an object whose public properties match the table fields.
* @param array $key The name of the primary key.
* @param boolean $nulls True to update null fields or false to ignore them.
* @param string $table The name of the database table to update.
* @param object $object A reference to an object whose public properties match the table fields.
* @param array $key The name of the primary key.
* @param boolean $nulls True to update null fields or false to ignore them.
*
* @return boolean
*
Expand Down
8 changes: 4 additions & 4 deletions libraries/vendor/joomla/database/src/Mysql/MysqlExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ protected function buildXmlStructure()

foreach ($fields as $field)
{
$buffer[] = ' <field Field="' . $field->Field . '"' . ' Type="' . $field->Type . '"' . ' Null="' . $field->Null . '"' . ' Key="' .
$buffer[] = ' <field Field="' . $field->Field . '" Type="' . $field->Type . '" Null="' . $field->Null . '" Key="' .
$field->Key . '"' . (isset($field->Default) ? ' Default="' . $field->Default . '"' : '') . ' Extra="' . $field->Extra . '"' .
' />';
}

foreach ($keys as $key)
{
$buffer[] = ' <key Table="' . $table . '"' . ' Non_unique="' . $key->Non_unique . '"' . ' Key_name="' . $key->Key_name . '"' .
' Seq_in_index="' . $key->Seq_in_index . '"' . ' Column_name="' . $key->Column_name . '"' . ' Collation="' . $key->Collation . '"' .
' Null="' . $key->Null . '"' . ' Index_type="' . $key->Index_type . '"' .
$buffer[] = ' <key Table="' . $table . '" Non_unique="' . $key->Non_unique . '" Key_name="' . $key->Key_name . '"' .
' Seq_in_index="' . $key->Seq_in_index . '" Column_name="' . $key->Column_name . '" Collation="' . $key->Collation . '"' .
' Null="' . $key->Null . '" Index_type="' . $key->Index_type . '"' .
' Comment="' . htmlspecialchars($key->Comment, ENT_COMPAT, 'UTF-8') . '"' .
' />';
}
Expand Down

0 comments on commit 09347f4

Please sign in to comment.