Skip to content

Commit

Permalink
Merge branch 'staging' into 3.8-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Mar 19, 2017
2 parents 76e99a0 + af1e590 commit f6f65be
Show file tree
Hide file tree
Showing 800 changed files with 20,419 additions and 21,043 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Expand Up @@ -21,5 +21,5 @@ There are other branches available which serve specific purposes.
| ------ | ------- |
| staging | Current codebase. Branch for the next minor Joomla version. New backward compatible features go into this branch. |
| master | Each commit made to staging gets tested if it passes unit tests and codestyle rules. It is then merged into master. This is done automatically. |
| 3.8.x | Branch for the next minor Joomla version. The 3.8.0 release will just include compatibility features for 4.0. Commits to staging will be applied to this branch as well. |
| 3.8-dev | Branch for the next minor Joomla version. The 3.8.0 release will only include compatibility features for 4.0. Commits to staging will be applied to this branch as well. |
| 4.0-dev | Branch for the next major Joomla version. New features go into this branch. Commits to staging will be applied to this branch as well. |
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,6 +5,7 @@
.settings
.DS_Store
.idea
.vscode

# Local System Files (i.e. cache, logs, etc.) #
/administrator/cache
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -71,7 +71,7 @@ Where can you get support and help?
* Find the [information you need](https://docs.joomla.org/Start_here);
* Find [help and other users](https://www.joomla.org/about-joomla/create-and-share.html);
* Post questions at [our forums](https://forum.joomla.org);
* [Joomla Resources Directory](http://resources.joomla.org/) (JRD).
* [Joomla Resources Directory](https://resources.joomla.org/) (JRD).

Do you already have a Joomla! site that isn't built with Joomla! 3.x?
---------------------
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Expand Up @@ -50,7 +50,7 @@
* Find the information you need: https://docs.joomla.org/Start_here
* Find help and other users: https://www.joomla.org/about-joomla/create-and-share.html
* Post questions at our forums: https://forum.joomla.org
* Joomla! Resources Directory (JRD): http://resources.joomla.org/
* Joomla! Resources Directory (JRD): https://resources.joomla.org/

11- Do you already have a Joomla! site that's not built with Joomla! 3.x ?
* What's new in Joomla! 3.x: https://www.joomla.org/3
Expand Down
33 changes: 28 additions & 5 deletions administrator/components/com_admin/script.php
Expand Up @@ -111,6 +111,26 @@ public function postflight($action, $installer)
{
if (!empty($this->fromVersion) && version_compare($this->fromVersion, '3.7.0', 'lt'))
{
/*
* Do a check if the menu item exists, skip if it does. Only needed when we are in pre stable state.
*/
$db = JFactory::getDbo();

$query = $db->getQuery(true)
->select('id')
->from($db->quoteName('#__menu'))
->where($db->quoteName('menutype') . ' = ' . $db->quote('main'))
->where($db->quoteName('title') . ' = ' . $db->quote('com_associations'))
->where($db->quoteName('client_id') . ' = 1')
->where($db->quoteName('component_id') . ' = 34');

$result = $db->setQuery($query)->loadResult();

if (!empty($result))
{
return true;
}

/*
* Add a menu item for com_associations, we need to do that here because with a plain sql statement we
* damage the nested set structure for the menu table
Expand Down Expand Up @@ -286,6 +306,7 @@ protected function uninstallEosPlugin()
->where('name = ' . $db->quote('PLG_EOSNOTIFY'))
)->loadResult();

// Skip update when id doesn’t exists
if (!$id)
{
return;
Expand Down Expand Up @@ -324,6 +345,12 @@ protected function removeJedUpdateserver()
->where($db->quoteName('location') . ' = ' . $db->quote('https://update.joomla.org/jed/list.xml'))
)->loadResult();

// Skip delete when id doesn’t exists
if (!$id)
{
return;
}

// Delete from update sites
$db->setQuery(
$db->getQuery(true)
Expand Down Expand Up @@ -500,7 +527,6 @@ protected function updateManifestCaches()
array('plugin', 'checkboxes', 'fields', 0),
array('plugin', 'color', 'fields', 0),
array('plugin', 'editor', 'fields', 0),
array('plugin', 'gallery', 'fields', 0),
array('plugin', 'imagelist', 'fields', 0),
array('plugin', 'integer', 'fields', 0),
array('plugin', 'list', 'fields', 0),
Expand Down Expand Up @@ -1717,8 +1743,6 @@ public function deleteUnexistingFiles()
'/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',
Expand All @@ -1727,6 +1751,7 @@ public function deleteUnexistingFiles()
'/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',
);

// TODO There is an issue while deleting folders using the ftp mode
Expand Down Expand Up @@ -1846,8 +1871,6 @@ public function deleteUnexistingFiles()
'/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',
Expand Down
Expand Up @@ -82,15 +82,14 @@ INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`
(463, 'plg_fields_checkboxes', 'plugin', 'checkboxes', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(464, 'plg_fields_color', 'plugin', 'color', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(465, 'plg_fields_editor', 'plugin', 'editor', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(466, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(467, 'plg_fields_imagelist', 'plugin', 'imagelist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(468, 'plg_fields_integer', 'plugin', 'integer', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(469, 'plg_fields_list', 'plugin', 'list', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(470, 'plg_fields_media', 'plugin', 'media', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(471, 'plg_fields_radio', 'plugin', 'radio', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(472, 'plg_fields_sql', 'plugin', 'sql', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(473, 'plg_fields_text', 'plugin', 'text', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(474, 'plg_fields_textarea', 'plugin', 'textarea', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(475, 'plg_fields_url', 'plugin', 'url', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(476, 'plg_fields_user', 'plugin', 'user', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(477, 'plg_fields_usergrouplist', 'plugin', 'usergrouplist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
(466, 'plg_fields_imagelist', 'plugin', 'imagelist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(467, 'plg_fields_integer', 'plugin', 'integer', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(468, 'plg_fields_list', 'plugin', 'list', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(469, 'plg_fields_media', 'plugin', 'media', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(470, 'plg_fields_radio', 'plugin', 'radio', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(471, 'plg_fields_sql', 'plugin', 'sql', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(472, 'plg_fields_text', 'plugin', 'text', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(473, 'plg_fields_textarea', 'plugin', 'textarea', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(474, 'plg_fields_url', 'plugin', 'url', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(475, 'plg_fields_user', 'plugin', 'user', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(476, 'plg_fields_usergrouplist', 'plugin', 'usergrouplist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
@@ -1,3 +1,3 @@
ALTER TABLE `#__menu_types` ADD `client_id` int(11) NOT NULL DEFAULT 0;
ALTER TABLE `#__menu_types` ADD COLUMN `client_id` int(11) NOT NULL DEFAULT 0;

UPDATE `#__menu` SET `published` = 1 WHERE `menutype` = 'main' OR `menutype` = 'menu';
@@ -1,2 +1,2 @@
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
(478, 'plg_content_fields', 'plugin', 'fields', 'content', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
(477, 'plg_content_fields', 'plugin', 'fields', 'content', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
@@ -1,2 +1,2 @@
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
(479, 'plg_editors-xtd_fields', 'plugin', 'fields', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
(478, 'plg_editors-xtd_fields', 'plugin', 'fields', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
@@ -0,0 +1,2 @@
-- Normalize redirect_links table default values.
ALTER TABLE `#__redirect_links` MODIFY `comment` varchar(255) NOT NULL DEFAULT '';
@@ -0,0 +1,5 @@
ALTER TABLE `#__languages` MODIFY `asset_id` int(10) unsigned NOT NULL DEFAULT 0;
ALTER TABLE `#__menu_types` MODIFY `asset_id` int(10) unsigned NOT NULL DEFAULT 0;

ALTER TABLE `#__content` MODIFY `xreference` varchar(50) NOT NULL DEFAULT '';
ALTER TABLE `#__newsfeeds` MODIFY `xreference` varchar(50) NOT NULL DEFAULT '';
@@ -0,0 +1,3 @@
ALTER TABLE "#__finder_links" ALTER COLUMN "title" TYPE character varying(400);
ALTER TABLE "#__finder_links" ALTER COLUMN "description" TYPE text;
ALTER TABLE "#__finder_links" ALTER COLUMN "description" SET NOT NULL;
Expand Up @@ -93,16 +93,15 @@ INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder"
(463, 'plg_fields_checkboxes', 'plugin', 'checkboxes', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(464, 'plg_fields_color', 'plugin', 'color', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(465, 'plg_fields_editor', 'plugin', 'editor', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(466, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(467, 'plg_fields_imagelist', 'plugin', 'imagelist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(468, 'plg_fields_integer', 'plugin', 'integer', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(469, 'plg_fields_list', 'plugin', 'list', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(470, 'plg_fields_media', 'plugin', 'media', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(471, 'plg_fields_radio', 'plugin', 'radio', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(472, 'plg_fields_sql', 'plugin', 'sql', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(473, 'plg_fields_text', 'plugin', 'text', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(474, 'plg_fields_textarea', 'plugin', 'textarea', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(475, 'plg_fields_url', 'plugin', 'url', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(476, 'plg_fields_user', 'plugin', 'user', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(477, 'plg_fields_usergrouplist', 'plugin', 'usergrouplist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);
(466, 'plg_fields_imagelist', 'plugin', 'imagelist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(467, 'plg_fields_integer', 'plugin', 'integer', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(468, 'plg_fields_list', 'plugin', 'list', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(469, 'plg_fields_media', 'plugin', 'media', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(470, 'plg_fields_radio', 'plugin', 'radio', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(471, 'plg_fields_sql', 'plugin', 'sql', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(472, 'plg_fields_text', 'plugin', 'text', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(473, 'plg_fields_textarea', 'plugin', 'textarea', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(474, 'plg_fields_url', 'plugin', 'url', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(475, 'plg_fields_user', 'plugin', 'user', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(476, 'plg_fields_usergrouplist', 'plugin', 'usergrouplist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);

@@ -1,2 +1,2 @@
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
(478, 'plg_content_fields', 'plugin', 'fields', 'content', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);
(477, 'plg_content_fields', 'plugin', 'fields', 'content', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);
@@ -1,2 +1,2 @@
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
(479, 'plg_editors-xtd_fields', 'plugin', 'fields', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);
(478, 'plg_editors-xtd_fields', 'plugin', 'fields', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);
@@ -0,0 +1,2 @@
-- Normalize redirect_links table default values.
ALTER TABLE "#__redirect_links" ALTER COLUMN "comment" SET DEFAULT '';
@@ -0,0 +1,5 @@
ALTER TABLE "#__extensions" ALTER COLUMN "custom_data" DROP DEFAULT;
ALTER TABLE "#__extensions" ALTER COLUMN "system_data" DROP DEFAULT;
ALTER TABLE "#__updates" ALTER COLUMN "data" DROP DEFAULT;

ALTER TABLE "#__newsfeeds" ALTER COLUMN "xreference" SET DEFAULT '';
@@ -1 +1,6 @@
ALTER TABLE [#__associations] ALTER COLUMN [id] INT;
ALTER TABLE [#__associations] DROP CONSTRAINT [PK_#__associations_context];
ALTER TABLE [#__associations] ALTER COLUMN [id] INT NOT NULL;
ALTER TABLE [#__associations] ADD CONSTRAINT [PK_#__associations_context] PRIMARY KEY CLUSTERED(
[context] ASC,
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY];
Expand Up @@ -322,5 +322,5 @@ SELECT 29, 'com_tags', 'component', 'com_tags', '', 1, 1, 1, 1, '{"name":"com_jo

SET IDENTITY_INSERT [#__extensions] OFF;

INSERT INTO [#__menu] ([menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [ordering], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id])
INSERT INTO [#__menu] ([menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id])
SELECT 'menu', 'com_tags', 'Tags', '', 'Tags', 'index.php?option=com_tags', 'component', 0, 1, 1, 29, 0, '1900-01-01 00:00:00', 0, 0, 'class:tags', 0, '', 43, 44, 0, '*', 1;

0 comments on commit f6f65be

Please sign in to comment.