Skip to content

Commit

Permalink
Merge branch 'staging' into com_finder
Browse files Browse the repository at this point in the history
# Conflicts:
#	administrator/components/com_finder/controller.php
#	administrator/components/com_finder/controllers/filter.php
  • Loading branch information
frankmayer committed Jan 6, 2017
2 parents 35d8843 + 76a14e4 commit cd48014
Show file tree
Hide file tree
Showing 908 changed files with 12,645 additions and 10,005 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Desktop.ini
/libraries/vendor/ircmaxell/password-compat/phpunit.xml.dist
/libraries/vendor/ircmaxell/password-compat/README.md
/libraries/vendor/ircmaxell/password-compat/version-test.php
/libraries/vendor/joomla/*/.github
/libraries/vendor/joomla/*/.gitignore
/libraries/vendor/joomla/*/.gitmodules
/libraries/vendor/joomla/*/docs
Expand All @@ -70,6 +71,7 @@ Desktop.ini
/libraries/vendor/joomla/*/composer.json
/libraries/vendor/joomla/*/phpunit.xml.dist
/libraries/vendor/joomla/*/README.md
/libraries/vendor/joomla/session/Joomla/Session/.github
/libraries/vendor/joomla/session/Joomla/Session/_Tests
/libraries/vendor/joomla/session/Joomla/Session/build
/libraries/vendor/joomla/session/Joomla/Session/Tests
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_admin/models/sysinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public function &getInfo()
'sapi_name' => php_sapi_name(),
'version' => $version->getLongVersion(),
'platform' => $platform->getLongVersion(),
'useragent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "",
'useragent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',
);

return $this->info;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function admin_postinstall_languageaccess340_condition()
$query = $db->getQuery(true)
->select($db->quoteName('access'))
->from($db->quoteName('#__languages'))
->where($db->quoteName('access') . " = " . $db->quote('0'));
->where($db->quoteName('access') . ' = ' . $db->quote('0'));
$db->setQuery($query);
$db->execute();
$numRows = $db->getNumRows();
Expand Down
54 changes: 41 additions & 13 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ protected function clearStatsCache()
*/
protected function updateDatabase()
{
$db = JFactory::getDbo();

if (strpos($db->name, 'mysql') !== false)
if (JFactory::getDbo()->getServerType() === 'mysql')
{
$this->updateDatabaseMysql();
}
Expand Down Expand Up @@ -208,7 +206,7 @@ protected function uninstallEosPlugin()
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 3.7.0
*/
protected function removeJedUpdateserver()
{
Expand All @@ -225,14 +223,14 @@ protected function removeJedUpdateserver()
)->loadResult();

// Delete from update sites
$result = $db->setQuery(
$db->setQuery(
$db->getQuery(true)
->delete($db->quoteName('#__update_sites'))
->where($db->quoteName('update_site_id') . ' = ' . $id)
)->execute();

// Delete from update sites extensions
$result = $db->setQuery(
$db->setQuery(
$db->getQuery(true)
->delete($db->quoteName('#__update_sites_extensions'))
->where($db->quoteName('update_site_id') . ' = ' . $id)
Expand Down Expand Up @@ -1220,6 +1218,11 @@ public function deleteUnexistingFiles()
'/libraries/joomla/registry/format/json.php',
'/libraries/joomla/registry/format/php.php',
'/libraries/joomla/registry/format/xml.php',
'/libraries/joomla/github/users.php',
'/media/system/js/validate-jquery-uncompressed.js',
'/templates/beez3/html/message.php',
'/libraries/fof/platform/joomla.php',
'/libraries/fof/readme.txt',
// Joomla 3.3.1
'/administrator/templates/isis/html/message.php',
// Joomla 3.3.6
Expand Down Expand Up @@ -1546,7 +1549,7 @@ public function deleteUnexistingFiles()
// Joomla! 3.6.3
'/media/editors/codemirror/mode/jade/jade.js',
'/media/editors/codemirror/mode/jade/jade.min.js',
// Joomla __DEPLOY_VERSION__
// Joomla 3.7.0
'/libraries/joomla/user/authentication.php',
'/libraries/platform.php',
'/libraries/joomla/data/data.php',
Expand Down Expand Up @@ -1590,6 +1593,16 @@ public function deleteUnexistingFiles()
'/components/com_users/views/remind/metadata.xml',
'/components/com_users/views/reset/metadata.xml',
'/components/com_wrapper/metadata.xml',
'/administrator/components/com_cache/layouts/joomla/searchtools/default/bar.php',
'/administrator/components/com_cache/layouts/joomla/searchtools/default.php',
'/administrator/components/com_languages/layouts/joomla/searchtools/default/bar.php',
'/administrator/components/com_languages/layouts/joomla/searchtools/default.php',
'/administrator/components/com_menus/layouts/joomla/searchtools/default/bar.php',
'/administrator/components/com_menus/layouts/joomla/searchtools/default.php',
'/administrator/components/com_modules/layouts/joomla/searchtools/default/bar.php',
'/administrator/components/com_modules/layouts/joomla/searchtools/default.php',
'/administrator/components/com_templates/layouts/joomla/searchtools/default/bar.php',
'/administrator/components/com_templates/layouts/joomla/searchtools/default.php',
);

// TODO There is an issue while deleting folders using the ftp mode
Expand Down Expand Up @@ -1699,8 +1712,25 @@ public function deleteUnexistingFiles()
'/libraries/simplepie',
// Joomla! 3.6.3
'/media/editors/codemirror/mode/jade',
// Joomla! __DEPLOY_VERSION__
// Joomla! 3.7.0
'/libraries/joomla/data',
'/administrator/components/com_cache/layouts/joomla/searchtools/default',
'/administrator/components/com_cache/layouts/joomla/searchtools',
'/administrator/components/com_cache/layouts/joomla',
'/administrator/components/com_cache/layouts',
'/administrator/components/com_languages/layouts/joomla/searchtools/default',
'/administrator/components/com_languages/layouts/joomla/searchtools',
'/administrator/components/com_languages/layouts/joomla',
'/administrator/components/com_languages/layouts',
'/administrator/components/com_menus/layouts/joomla/searchtools/default',
'/administrator/components/com_menus/layouts/joomla/searchtools',
'/administrator/components/com_modules/layouts/joomla/searchtools/default',
'/administrator/components/com_modules/layouts/joomla/searchtools',
'/administrator/components/com_modules/layouts/joomla',
'/administrator/components/com_templates/layouts/joomla/searchtools/default',
'/administrator/components/com_templates/layouts/joomla/searchtools',
'/administrator/components/com_templates/layouts/joomla',
'/administrator/components/com_templates/layouts',
);

jimport('joomla.filesystem.file');
Expand Down Expand Up @@ -1836,12 +1866,10 @@ public function flushSessions()

try
{
switch ($db->name)
switch ($db->getServerType())
{
// MySQL database, use TRUNCATE (faster, more resilient)
case 'pdomysql':
case 'mysql':
case 'mysqli':
$db->truncateTable('#__session');
break;

Expand Down Expand Up @@ -1924,7 +1952,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
}

// Step 1: Drop indexes later to be added again with column lengths limitations at step 2
$fileName1 = JPATH_ROOT . "/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql";
$fileName1 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql';

if (is_file($fileName1))
{
Expand All @@ -1948,7 +1976,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
}

// Step 2: Perform the index modifications and conversions
$fileName2 = JPATH_ROOT . "/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql";
$fileName2 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql';

if (is_file($fileName2))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ALTER TABLE `#__updates` ADD COLUMN `infourl` text NOT NULL AFTER `detailsurl`;
ALTER TABLE `#__updates` ADD COLUMN `infourl` text NOT NULL AFTER `detailsurl`;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ CREATE TABLE IF NOT EXISTS `#__fields` (
`asset_id` int(10) NOT NULL DEFAULT 0,
`context` varchar(255) NOT NULL DEFAULT '',
`group_id` int(10) NOT NULL DEFAULT 0,
`assigned_cat_ids` varchar(255) NOT NULL DEFAULT '',
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`label` varchar(255) NOT NULL DEFAULT '',
Expand Down Expand Up @@ -38,10 +37,16 @@ CREATE TABLE IF NOT EXISTS `#__fields` (
KEY `idx_language` (`language`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `#__fields_categories` (
`field_id` int(11) NOT NULL DEFAULT 0,
`category_id` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`field_id`,`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `#__fields_groups` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`asset_id` int(10) NOT NULL DEFAULT 0,
`extension` varchar(255) NOT NULL DEFAULT '',
`context` varchar(255) NOT NULL DEFAULT '',
`title` varchar(255) NOT NULL DEFAULT '',
`note` varchar(255) NOT NULL DEFAULT '',
`description` text NOT NULL,
Expand All @@ -60,7 +65,7 @@ CREATE TABLE IF NOT EXISTS `#__fields_groups` (
KEY `idx_state` (`state`),
KEY `idx_created_by` (`created_by`),
KEY `idx_access` (`access`),
KEY `idx_extension` (`extension`),
KEY `idx_context` (`context`),
KEY `idx_language` (`language`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-- Replace language image UNIQUE index for a normal INDEX.
ALTER TABLE `#__languages` DROP INDEX `idx_image`;
ALTER TABLE `#__languages` ADD INDEX `idx_image` (`image`);
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ CREATE TABLE "#__fields" (
"asset_id" bigint DEFAULT 0 NOT NULL,
"context" varchar(255) DEFAULT '' NOT NULL,
"group_id" bigint DEFAULT 0 NOT NULL,
"assigned_cat_ids" varchar(255) DEFAULT '' NOT NULL,
"title" varchar(255) DEFAULT '' NOT NULL,
"alias" varchar(255) DEFAULT '' NOT NULL,
"label" varchar(255) DEFAULT '' NOT NULL,
Expand Down Expand Up @@ -41,13 +40,22 @@ CREATE INDEX "#__fields_idx_access" ON "#__fields" ("access");
CREATE INDEX "#__fields_idx_context" ON "#__fields" ("context");
CREATE INDEX "#__fields_idx_language" ON "#__fields" ("language");

--
-- Table: #__fields_categories
--
CREATE TABLE "#__fields_categories" (
"field_id" bigint DEFAULT 0 NOT NULL,
"category_id" bigint DEFAULT 0 NOT NULL,
PRIMARY KEY ("field_id", "category_id")
);

--
-- Table: #__fields_groups
--
CREATE TABLE "#__fields_groups" (
"id" serial NOT NULL,
"asset_id" bigint DEFAULT 0 NOT NULL,
"extension" varchar(255) DEFAULT '' NOT NULL,
"context" varchar(255) DEFAULT '' NOT NULL,
"title" varchar(255) DEFAULT '' NOT NULL,
"note" varchar(255) DEFAULT '' NOT NULL,
"description" text DEFAULT '' NOT NULL,
Expand All @@ -67,7 +75,7 @@ CREATE INDEX "#__fields_idx_checked_out" ON "#__fields_groups" ("checked_out");
CREATE INDEX "#__fields_idx_state" ON "#__fields_groups" ("state");
CREATE INDEX "#__fields_idx_created_by" ON "#__fields_groups" ("created_by");
CREATE INDEX "#__fields_idx_access" ON "#__fields_groups" ("access");
CREATE INDEX "#__fields_idx_extension" ON "#__fields_groups" ("extension");
CREATE INDEX "#__fields_idx_context" ON "#__fields_groups" ("context");
CREATE INDEX "#__fields_idx_language" ON "#__fields_groups" ("language");

--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
ALTER TABLE "#__session" ALTER COLUMN "client_id" DROP NOT NULL;
ALTER TABLE "#__session" ALTER COLUMN "client_id" SET DEFAULT NULL;
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-- Replace language image UNIQUE index for a normal INDEX.
ALTER TABLE "#__languages" DROP CONSTRAINT "#__idx_image";
CREATE INDEX "#__idx_image" ON "#__languages" ("image");
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
-- Replace language image UNIQUE index for a normal INDEX.
ALTER TABLE [#__languages] DROP CONSTRAINT [#__languages$idx_image];
CREATE NONCLUSTERED INDEX [idx_image] ON [#__languages] (
[image] ASC
) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);
10 changes: 5 additions & 5 deletions administrator/components/com_admin/views/help/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
<div class="clearfix"></div>
<div class="sidebar-nav">
<ul class="nav nav-list">
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_START_HERE'), JText::_('COM_ADMIN_START_HERE'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', $this->latest_version_check, JText::_('COM_ADMIN_LATEST_VERSION_CHECK'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', 'http://www.gnu.org/licenses/gpl-2.0.html', JText::_('COM_ADMIN_LICENSE'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_GLOSSARY'), JText::_('COM_ADMIN_GLOSSARY'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_START_HERE'), JText::_('COM_ADMIN_START_HERE'), array('target' => 'helpFrame')); ?></li>
<li><?php echo JHtml::_('link', $this->latest_version_check, JText::_('COM_ADMIN_LATEST_VERSION_CHECK'), array('target' => 'helpFrame')); ?></li>
<li><?php echo JHtml::_('link', 'http://www.gnu.org/licenses/gpl-2.0.html', JText::_('COM_ADMIN_LICENSE'), array('target' => 'helpFrame')); ?></li>
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_GLOSSARY'), JText::_('COM_ADMIN_GLOSSARY'), array('target' => 'helpFrame')); ?></li>
<hr class="hr-condensed" />
<li class="nav-header"><?php echo JText::_('COM_ADMIN_ALPHABETICAL_INDEX'); ?></li>
<?php foreach ($this->toc as $k => $v): ?>
<?php foreach ($this->toc as $k => $v) : ?>
<li>
<?php $url = JHelp::createUrl('JHELP_' . strtoupper($k)); ?>
<?php echo JHtml::_('link', $url, $v, array('target' => 'helpFrame')); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<div class="control-group">
<div class="controls"><?php echo $field->input; ?></div>
</div>
<?php else: ?>
<?php else : ?>
<div class="control-group">
<div class="control-label"><?php echo $field->label; ?></div>
<div class="controls"><?php echo $field->input; ?></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</tr>
</tfoot>
<tbody>
<?php foreach ($this->config as $key => $value): ?>
<?php foreach ($this->config as $key => $value) : ?>
<tr>
<td>
<?php echo $key; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function display($tpl = null)
}

header('MIME-Version: 1.0');
header('Content-Disposition: attachment; filename="systeminfo-' . date("c") . '.json"');
header('Content-Disposition: attachment; filename="systeminfo-' . date('c') . '.json"');
header('Content-Transfer-Encoding: binary');

$data = $this->getLayoutData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function display($tpl = null)

header('Content-Type: text/plain; charset=utf-8');
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename="systeminfo-' . date("c") . '.txt"');
header('Content-Disposition: attachment; filename="systeminfo-' . date('c') . '.txt"');
header('Cache-Control: must-revalidate');

$data = $this->getLayoutData();
Expand Down Expand Up @@ -117,9 +117,9 @@ protected function renderSection($sectionName, $sectionData, $level = 0)

$margin = ($level > 0) ? str_repeat("\t", $level) : null;

$lines[] = $margin . "=============";
$lines[] = $margin . '=============';
$lines[] = $margin . $sectionName;
$lines[] = $margin . "=============";
$lines[] = $margin . '=============';
$level++;

foreach ($sectionData as $name => $value)
Expand All @@ -131,7 +131,7 @@ protected function renderSection($sectionName, $sectionData, $level = 0)
continue;
}

$lines[] = "";
$lines[] = '';
$lines[] = $this->renderSection($name, $value, $level);
}
else
Expand Down
12 changes: 6 additions & 6 deletions administrator/components/com_banners/helpers/banners.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,23 @@ public static function updateReset()

foreach ($rows as $row)
{
$purchase_type = $row->purchase_type;
$purchaseType = $row->purchase_type;

if ($purchase_type < 0 && $row->cid)
if ($purchaseType < 0 && $row->cid)
{
/** @var BannersTableClient $client */
$client = JTable::getInstance('Client', 'BannersTable');
$client->load($row->cid);
$purchase_type = $client->purchase_type;
$purchaseType = $client->purchase_type;
}

if ($purchase_type < 0)
if ($purchaseType < 0)
{
$params = JComponentHelper::getParams('com_banners');
$purchase_type = $params->get('purchase_type');
$purchaseType = $params->get('purchase_type');
}

switch ($purchase_type)
switch ($purchaseType)
{
case 1:
$reset = $nullDate;
Expand Down

0 comments on commit cd48014

Please sign in to comment.