Skip to content

Commit

Permalink
Merge branch 'staging' into a11y_templates
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman committed May 22, 2017
2 parents 9cb2030 + 090e602 commit 7f34c22
Show file tree
Hide file tree
Showing 654 changed files with 13,211 additions and 7,322 deletions.
6 changes: 3 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ install:
$VC = "vc14"
$PHPBuild = "x64"
}
- cinst -y sqlite
- appveyor-retry cinst -y sqlite
- cd C:\tools\php
# Get the MSSQL DLL's
- ps: >-
If ($env:PHP -eq "1") {
If ($env:php_ver_target -eq "5.6") {
appveyor DownloadFile https://files.nette.org/misc/php-sqlsrv.zip
appveyor-retry appveyor DownloadFile https://cdn.joomla.org/ci/php-sqlsrv.zip
7z x -y php-sqlsrv.zip > $null
copy SQLSRV\php_sqlsrv_56_nts.dll ext\php_sqlsrv_nts.dll
copy SQLSRV\php_pdo_sqlsrv_56_nts.dll ext\php_pdo_sqlsrv_nts.dll
Expand Down Expand Up @@ -83,7 +83,7 @@ install:
If ($env:PHP -eq "1") {
If ($env:php_ver_target -eq "5.6") {$wincache = "1.3.7.12"} Else {$wincache = "2.0.0.8"}
cd c:\tools\php\ext
appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip
appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip
7z x -y php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip > $null
Remove-Item C:\tools\php\ext* -include .zip
cd c:\tools\php}
Expand Down
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Contributing to the Joomla! CMS™
===============
You are welcome to submit a contribution for review and possible inclusion in the Joomla! CMS but, before it will be accepted, we ask that you follow these simple steps:

1) Open an issue on our [Issue Tracker](https://issues.joomla.org/) or here on GitHub. If you can, please provide a fix and create a pull request (PR) instead; this will automatically create an issue for you.
1) Open an issue on our [Issue Tracker](https://issues.joomla.org/) or here on GitHub. If you can, please provide a fix and create a pull request (PR) instead; this will automatically create an issue for you so you do not have to create an issue if you are creating a pull request.

2) Follow the [Joomla! Coding Standards](https://joomla.github.io/coding-standards).
2) Follow the [Joomla! Coding Standards](https://developer.joomla.org/coding-standards.html).

3) When filing an issue or opening a PR, please include a clear title and description. The title should be a short summary of an issue and, if possible, should include a reference to an open issue. For example, `Invalid Query in com_admin (Ref #1234)` would be sufficient. All issues and PRs should include a description with as much detail as possible.
If it is a PR, include what the issue is, what the PR is addressing, testing instructions and environmental information (PHP version, database driver and version, and other data you can retrieve from your site's system information view) in case the issue is specific to certain environments. If additional information is needed, please be prepared to provide it as our community members review your submission.
3) When filing an issue or opening a PR, please include a clear title and description. The title should be a short summary of an issue and, if possible, should include a reference to an open issue. For example, `Invalid Query in com_admin (Ref #1234)` would be sufficient. All issues and PRs should include a description with as much detail as possible.
If it is a PR, include what the issue is, what the PR is addressing, testing instructions and environmental information (PHP version, database driver and version, and other data you can retrieve from your site's system information view) in case the issue is specific to certain environments. If additional information is needed, please be prepared to provide it as our community members review your submission.

4) Report security issues to the Joomla! Security Strike Team (JSST) at security@joomla.org or use the [JSST contact form](https://developer.joomla.org/contact-security-team.html). Please do not use the public tracker for security issues.

Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ phpdoc-*
# Install from Web plugin #
/plugins/installer/webinstaller

# Languages #
administrator/language/*
!administrator/language/en-GB
administrator/manifests/packages/*
!administrator/manifests/packages/pkg_en-GB.xml
!administrator/language/overrides/index.html
language/*
!language/en-GB
!language/overrides/index.html

# OSX #
._*
.Spotlight-V100
Expand Down
15 changes: 5 additions & 10 deletions administrator/components/com_admin/models/sysinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,18 +482,13 @@ public function getExtensions()
'authorUrl' => 'unknown',
);

$manifest = json_decode($extension->manifest_cache);

if (!$manifest instanceof stdClass)
{
continue;
}
$manifest = new Registry($extension->manifest_cache);

$extraData = array(
'author' => $manifest->author,
'version' => $manifest->version,
'creationDate' => $manifest->creationDate,
'authorUrl' => $manifest->authorUrl,
'author' => $manifest->get('author', ''),
'version' => $manifest->get('version', ''),
'creationDate' => $manifest->get('creationDate', ''),
'authorUrl' => $manifest->get('authorUrl', '')
);

$installed[$extension->name] = array_merge($installed[$extension->name], $extraData);
Expand Down
24 changes: 0 additions & 24 deletions administrator/components/com_admin/postinstall/phpversion.php

This file was deleted.

21 changes: 20 additions & 1 deletion administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -1747,11 +1747,28 @@ public function deleteUnexistingFiles()
'/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',
// Joomla 3.7.0
'/administrator/modules/mod_menu/tmpl/default_enabled.php',
'/administrator/modules/mod_menu/tmpl/default_disabled.php',
'/administrator/templates/hathor/html/mod_menu/default_enabled.php',
'/administrator/components/com_users/models/fields/components.php',
'/administrator/components/com_installer/controllers/languages.php',
'/administrator/components/com_media/views/medialist/tmpl/thumbs_doc.php',
'/administrator/components/com_media/views/medialist/tmpl/thumbs_folder.php',
'/administrator/components/com_media/views/medialist/tmpl/thumbs_img.php',
'/administrator/components/com_media/views/medialist/tmpl/thumbs_video.php',
'/media/editors/none/none.js',
'/media/editors/none/none.min.js',
'/media/editors/tinymce/plugins/media/moxieplayer.swf',
'/media/system/js/tiny-close.js',
'/media/system/js/tiny-close.min.js',
'/administrator/components/com_messages/layouts/toolbar/mysettings.php',
'/media/editors/tinymce/plugins/jdragdrop/plugin.js',
'/media/editors/tinymce/plugins/jdragdrop/plugin.min.js',
// Joomla 3.7.1
'/media/editors/tinymce/langs/uk-UA.js',
'/media/system/js/fields/calendar-locales/zh.js',
// Joomla 3.7.3
'/administrator/components/com_admin/postinstall/phpversion.php',
);

// TODO There is an issue while deleting folders using the ftp mode
Expand Down Expand Up @@ -1879,6 +1896,8 @@ public function deleteUnexistingFiles()
'/administrator/components/com_templates/layouts/joomla',
'/administrator/components/com_templates/layouts',
'/administrator/templates/hathor/html/mod_menu',
'/administrator/components/com_messages/layouts/toolbar',
'/administrator/components/com_messages/layouts',
);

jimport('joomla.filesystem.file');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
CREATE TABLE IF NOT EXISTS `#__fields` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`asset_id` int(10) NOT NULL DEFAULT 0,
`asset_id` int(10) unsigned NOT NULL DEFAULT 0,
`context` varchar(255) NOT NULL DEFAULT '',
`group_id` int(10) NOT NULL DEFAULT 0,
`group_id` int(10) unsigned NOT NULL DEFAULT 0,
`title` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(255) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`label` varchar(255) NOT NULL DEFAULT '',
`default_value` text NOT NULL DEFAULT '',
`type` varchar(255) NOT NULL DEFAULT 'text',
Expand All @@ -28,19 +28,19 @@ CREATE TABLE IF NOT EXISTS `#__fields` (
KEY `idx_state` (`state`),
KEY `idx_created_user_id` (`created_user_id`),
KEY `idx_access` (`access`),
KEY `idx_context` (`context`),
KEY `idx_context` (`context`(191)),
KEY `idx_language` (`language`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `#__fields_categories` (
CREATE TABLE IF NOT EXISTS `#__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,
`asset_id` int(10) unsigned NOT NULL DEFAULT 0,
`context` varchar(255) NOT NULL DEFAULT '',
`title` varchar(255) NOT NULL DEFAULT '',
`note` varchar(255) NOT NULL DEFAULT '',
Expand All @@ -60,16 +60,16 @@ CREATE TABLE IF NOT EXISTS `#__fields_groups` (
KEY `idx_state` (`state`),
KEY `idx_created_by` (`created_by`),
KEY `idx_access` (`access`),
KEY `idx_context` (`context`),
KEY `idx_context` (`context`(191)),
KEY `idx_language` (`language`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `#__fields_values` (
`field_id` int(10) unsigned NOT NULL,
`item_id` varchar(255) NOT NULL COMMENT 'Allow references to items which have strings as ids, eg. none db systems.',
`value` text NOT NULL DEFAULT '',
KEY (`field_id`),
KEY (`item_id`)
KEY `idx_field_id` (`field_id`),
KEY `idx_item_id` (`item_id`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

INSERT INTO `#__extensions` (`extension_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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INSERT INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`)
VALUES
(700, 'TPL_HATHOR_MESSAGE_POSTINSTALL_TITLE', 'TPL_HATHOR_MESSAGE_POSTINSTALL_BODY', 'TPL_HATHOR_MESSAGE_POSTINSTALL_ACTION', 'tpl_hathor', 1, 'action', 'admin://templates/hathor/postinstall/hathormessage.php', 'hathormessage_postinstall_action', 'admin://templates/hathor/postinstall/hathormessage.php', 'hathormessage_postinstall_condition', '3.7.0', 1);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Set integer field default values.
UPDATE `#__extensions` SET `params` = '{"multiple":"0","first":"1","last":"100","step":"1"}' WHERE `name` = 'plg_fields_integer';

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CREATE TABLE "#__fields" (
"context" varchar(255) DEFAULT '' NOT NULL,
"group_id" bigint DEFAULT 0 NOT NULL,
"title" varchar(255) DEFAULT '' NOT NULL,
"alias" varchar(255) DEFAULT '' NOT NULL,
"name" varchar(255) DEFAULT '' NOT NULL,
"label" varchar(255) DEFAULT '' NOT NULL,
"default_value" text DEFAULT '' NOT NULL,
"type" varchar(255) DEFAULT 'text' NOT NULL,
Expand Down Expand Up @@ -66,12 +66,12 @@ CREATE TABLE "#__fields_groups" (
"access" bigint DEFAULT 0 NOT NULL,
PRIMARY KEY ("id")
);
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_context" ON "#__fields_groups" ("context");
CREATE INDEX "#__fields_idx_language" ON "#__fields_groups" ("language");
CREATE INDEX "#__fields_groups_idx_checked_out" ON "#__fields_groups" ("checked_out");
CREATE INDEX "#__fields_groups_idx_state" ON "#__fields_groups" ("state");
CREATE INDEX "#__fields_groups_idx_created_by" ON "#__fields_groups" ("created_by");
CREATE INDEX "#__fields_groups_idx_access" ON "#__fields_groups" ("access");
CREATE INDEX "#__fields_groups_idx_context" ON "#__fields_groups" ("context");
CREATE INDEX "#__fields_groups_idx_language" ON "#__fields_groups" ("language");

--
-- Table: #__fields_values
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled")
VALUES
(700, 'TPL_HATHOR_MESSAGE_POSTINSTALL_TITLE', 'TPL_HATHOR_MESSAGE_POSTINSTALL_BODY', 'TPL_HATHOR_MESSAGE_POSTINSTALL_ACTION', 'tpl_hathor', 1, 'action', 'admin://templates/hathor/postinstall/hathormessage.php', 'hathormessage_postinstall_action', 'admin://templates/hathor/postinstall/hathormessage.php', 'hathormessage_postinstall_condition', '3.7.0', 1);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Set integer field default values.
UPDATE `#__extensions` SET `params` = '{"multiple":"0","first":"1","last":"100","step":"1"}' WHERE `name` = 'plg_fields_integer';
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CREATE TABLE [#__fields] (
[context] [nvarchar](255) NOT NULL DEFAULT '',
[group_id] [int] NOT NULL DEFAULT 0,
[title] [nvarchar](255) NOT NULL DEFAULT '',
[alias] [nvarchar](255) NOT NULL DEFAULT '',
[name] [nvarchar](255) NOT NULL DEFAULT '',
[label] [nvarchar](255) NOT NULL DEFAULT '',
[default_value] [nvarchar](max) NOT NULL DEFAULT '',
[type] [nvarchar](255) NOT NULL DEFAULT '',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled")
VALUES
(700, 'TPL_HATHOR_MESSAGE_POSTINSTALL_TITLE', 'TPL_HATHOR_MESSAGE_POSTINSTALL_BODY', 'TPL_HATHOR_MESSAGE_POSTINSTALL_ACTION', 'tpl_hathor', 1, 'action', 'admin://templates/hathor/postinstall/hathormessage.php', 'hathormessage_postinstall_action', 'admin://templates/hathor/postinstall/hathormessage.php', 'hathormessage_postinstall_condition', '3.7.0', 1);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Set integer field default values.
UPDATE [#__extensions] SET [params] = '{"multiple":"0","first":"1","last":"100","step":"1"}' WHERE [name] = 'plg_fields_integer';

Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ public function display($tpl = null)
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));

return false;
throw new Exception(implode("\n", $errors), 500);
}

$this->form->setValue('password', null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function display($tpl = null)
// Access check.
if (!JFactory::getUser()->authorise('core.admin'))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}

$this->php_settings = $this->get('PhpSettings');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function display($tpl = null)
// Access check.
if (!JFactory::getUser()->authorise('core.admin'))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}

header('MIME-Version: 1.0');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function display($tpl = null)
// Access check.
if (!JFactory::getUser()->authorise('core.admin'))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}

header('Content-Type: text/plain; charset=utf-8');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class AssociationsControllerAssociation extends JControllerForm
*/
public function edit($key = null, $urlVar = null)
{
list($extensionName, $typeName) = explode('.', $this->input->get('itemtype'));
list($extensionName, $typeName) = explode('.', $this->input->get('itemtype', '', 'string'));

$id = $this->input->get('id', 0);
$id = $this->input->get('id', 0, 'int');

// Check if reference item can be edited.
if (!AssociationsHelper::allowEdit($extensionName, $typeName, $id))
Expand All @@ -60,7 +60,7 @@ public function cancel($key = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

list($extensionName, $typeName) = explode('.', $this->input->get('itemtype'));
list($extensionName, $typeName) = explode('.', $this->input->get('itemtype', '', 'string'));

// Only check in, if component item type allows to check out.
if (AssociationsHelper::typeSupportsCheckout($extensionName, $typeName))
Expand All @@ -73,7 +73,7 @@ public function cancel($key = null)
$ids = array_unique(explode(',', $targetId));
}

$ids[] = $this->input->get('id', 0);
$ids[] = $this->input->get('id', 0, 'int');

foreach ($ids as $key => $id)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,63 @@ public function clean()
$this->getModel('associations')->clean();
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false));
}

/**
* Method to check in an item from the association item overview.
*
* @return void
*
* @since 3.7.1
*/
public function checkin()
{
// Set the redirect so we can just stop processing when we find a condition we can't process
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false));

// Figure out if the item supports checking and check it in
$type = null;

list($extensionName, $typeName) = explode('.', $this->input->get('itemtype'));

$extension = AssociationsHelper::getSupportedExtension($extensionName);
$types = $extension->get('types');

if (!array_key_exists($typeName, $types))
{
return;
}

if (AssociationsHelper::typeSupportsCheckout($extensionName, $typeName) === false)
{
// How on earth we came to that point, eject internet
return;
}

$cid = $this->input->get('cid', array(), 'array');

if (empty($cid))
{
// Seems we don't have an id to work with.
return;
}

// We know the first element is the one we need because we don't allow multi selection of rows
$id = $cid[0];

if (AssociationsHelper::canCheckinItem($extensionName, $typeName, $id) === true)
{
$item = AssociationsHelper::getItem($extensionName, $typeName, $id);

$item->checkIn($id);

return;
}

$this->setRedirect(
JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list),
JText::_('COM_ASSOCIATIONS_YOU_ARE_NOT_ALLOWED_TO_CHECKIN_THIS_ITEM')
);

return;
}
}

0 comments on commit 7f34c22

Please sign in to comment.