Skip to content

Commit

Permalink
Merge branch 'staging' into uneeded-data
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepereiradasilva committed Nov 4, 2016
2 parents 506ab66 + 4e7e05b commit 84abd14
Show file tree
Hide file tree
Showing 504 changed files with 31,477 additions and 22,962 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -48,7 +48,6 @@ matrix:
- redis-server
env: INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" # Disabled items that currently do not work in travis-ci hhvm
allow_failures:
- php: 7.1
- php: hhvm
- node_js: 6.1

Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -16,7 +16,7 @@ What is this?
What is Joomla?
---------------------
* [Joomla!](https://www.joomla.org/about-joomla.html) is a **Content Management System** (CMS) which enables you to build websites and powerful online applications.
* It is a simple and powerful web server application which requires a server with PHP and either MySQL, PostgreSQL or SQL Server to run. You can find [full technical requirements here](https://www.joomla.org/about-joomla/technical-requirements.html).
* It is a simple and powerful web server application which requires a server with PHP and either MySQL, PostgreSQL or SQL Server to run. You can find [full technical requirements here](https://downloads.joomla.org/technical-requirements).
* Joomla! is **free and Open Source software** distributed under the GNU General Public License version 2 or later.

Is Joomla! for you?
Expand Down Expand Up @@ -50,14 +50,14 @@ Is it easy to change the layout display?

Ready to install Joomla?
---------------------
* Check the [minimum requirements](https://www.joomla.org/about-joomla/technical-requirements.html).
* Check the [minimum requirements](https://downloads.joomla.org/technical-requirements).
* How do you [install Joomla](https://docs.joomla.org/J3.x:Installing_Joomla)?
* You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Installing_Joomla_locally).
When ready, it can be moved to an online hosting account of your choice.

Updates are free!
---------------------
* Always use the [latest version](https://www.joomla.org/download.html).
* Always use the [latest version](https://downloads.joomla.org/latest).

Where can you get support and help?
---------------------
Expand Down
6 changes: 3 additions & 3 deletions README.txt
Expand Up @@ -8,7 +8,7 @@
* Joomla! is a Content Management System (CMS) which enables you to build Web sites and powerful online applications.
* It's a free and Open Source software, distributed under the GNU General Public License version 2 or later.
* This is a simple and powerful web server application and it requires a server with PHP and either MySQL, PostgreSQL or SQL Server to run.
You can find full technical requirements here: https://www.joomla.org/about-joomla/technical-requirements.html.
You can find full technical requirements here: https://downloads.joomla.org/technical-requirements.

3- Is Joomla! for you?
* Joomla! is the right solution for most content web projects: https://docs.joomla.org/Portal:Learn_More
Expand All @@ -35,14 +35,14 @@
* Check out the template management information: https://docs.joomla.org/Portal:Template_Management

8- Ready to install Joomla?
* Check the minimum requirements here: https://www.joomla.org/about-joomla/technical-requirements.html
* Check the minimum requirements here: https://downloads.joomla.org/technical-requirements
* How do you install Joomla - https://docs.joomla.org/J3.x:Installing_Joomla
* You could start your Joomla! experience building your site on a local test server.
When ready it can be moved to an online hosting account of your choice.
See the tutorial: https://docs.joomla.org/Installing_Joomla_locally

9- Updates are free!
* Always use the latest version: https://www.joomla.org/download.html
* Always use the latest version: https://downloads.joomla.org/latest

10- Where can you get support and help?
* The Joomla! Documentation: https://docs.joomla.org/Main_Page
Expand Down
50 changes: 50 additions & 0 deletions administrator/components/com_admin/postinstall/joomla40checks.php
@@ -0,0 +1,50 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* This file contains post-installation message handling for Joomla 4.0 pre checks
*/

defined('_JEXEC') or die;

/**
* Checks if the installation meats the current requirements for Joomla 4
*
* @return boolean True if any check fails.
*
* @since 3.7
*
* @see https://developer.joomla.org/news/658-joomla4-manifesto.html
*/
function admin_postinstall_joomla40checks_condition()
{
$db = JFactory::getDbo();
$serverType = $db->getServerType();
$serverVersion = $db->getVersion();

if ($serverType == 'mssql')
{
// MS SQL support will be dropped
return true;
}

if ($serverType == 'postgresql' && version_compare($serverVersion, '9.2', 'lt'))
{
// PostgreSQL minimum version is 9.2
return true;
}


if ($serverType == 'mysql' && version_compare($serverVersion, '5.5.3', 'lt'))
{
// MySQL minimum version is 5.5.3
return true;
}

// PHP minimum version is 5.5
return version_compare(PHP_VERSION, '5.5.9', 'lt');
}
8 changes: 6 additions & 2 deletions administrator/components/com_admin/script.php
Expand Up @@ -242,6 +242,7 @@ protected function updateManifestCaches()
array('component', 'com_contenthistory', '', 1),
array('component', 'com_postinstall', '', 1),
array('component', 'com_joomlaupdate', '', 1),
array('component', 'com_fields', '', 1),

// Libraries
array('library', 'phputf8', '', 0),
Expand Down Expand Up @@ -349,6 +350,8 @@ protected function updateManifestCaches()
array('plugin', 'phpversioncheck', 'quickicon', 0),
array('plugin', 'menu', 'editors-xtd', 0),
array('plugin', 'contact', 'editors-xtd', 0),
array('plugin', 'fields', 'system', 0),
array('plugin', 'gallery', 'fields', 0),

// Templates
array('template', 'beez3', '', 0),
Expand Down Expand Up @@ -1449,7 +1452,7 @@ public function deleteUnexistingFiles()
'/media/editors/tinymce/plugins/compat3x/editable_selects.js',
'/media/editors/tinymce/plugins/compat3x/form_utils.js',
'/media/editors/tinymce/plugins/compat3x/mctabs.js',
'/media/editors/tinymce/plugins/compat3x/tiny_mce_popup.js',
'/media/editors/tinymce/plugins/compat3x/tiny_mce_popup.js',
'/media/editors/tinymce/plugins/compat3x/validate.js',
'/libraries/vendor/symfony/yaml/Symfony/Component/Yaml/Dumper.php',
'/libraries/vendor/symfony/yaml/Symfony/Component/Yaml/Escaper.php',
Expand Down Expand Up @@ -1695,7 +1698,8 @@ public function updateAssets()
'com_tags',
'com_contenthistory',
'com_ajax',
'com_postinstall'
'com_postinstall',
'com_fields',
);

foreach ($newComponents as $component)
Expand Down
@@ -0,0 +1,56 @@
CREATE TABLE IF NOT EXISTS `#__fields` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`asset_id` int(10) NOT NULL DEFAULT 0,
`context` varchar(255) NOT NULL DEFAULT '',
`catid` 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 '',
`default_value` text NOT NULL DEFAULT '',
`type` varchar(255) NOT NULL DEFAULT 'text',
`options` varchar(255) NOT NULL DEFAULT '',
`note` varchar(255) NOT NULL DEFAULT '',
`description` text NOT NULL,
`state` tinyint(1) NOT NULL DEFAULT '0',
`required` tinyint(1) NOT NULL DEFAULT '0',
`checked_out` int(11) NOT NULL DEFAULT '0',
`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text NOT NULL,
`fieldparams` text NOT NULL,
`attributes` text NOT NULL,
`language` char(7) NOT NULL DEFAULT '',
`created_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_user_id` int(10) unsigned NOT NULL DEFAULT '0',
`created_by_alias` varchar(255) NOT NULL DEFAULT '',
`modified_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified_by` int(10) unsigned NOT NULL DEFAULT '0',
`publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`access` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_state` (`state`),
KEY `idx_created_user_id` (`created_user_id`),
KEY `idx_access` (`access`),
KEY `idx_context` (`context`),
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,
`context` varchar(255) 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 (`context`),
KEY (`item_id`)
) 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
(33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
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
(461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
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
(462, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
@@ -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, 'COM_CPANEL_MSG_JOOMLA40_PRE_CHECKS_TITLE', 'COM_CPANEL_MSG_JOOMLA40_PRE_CHECKS_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/joomla40checks.php', 'admin_postinstall_joomla40checks_condition', '3.7.0', 1);
@@ -0,0 +1,61 @@
--
-- Table: #__fields
--
CREATE TABLE "#__fields" (
"id" serial NOT NULL,
"asset_id" bigint DEFAULT 0 NOT NULL,
"context" varchar(255) DEFAULT '' NOT NULL,
"catid" 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,
"default_value" text DEFAULT '' NOT NULL,
"type" varchar(255) DEFAULT 'text' NOT NULL,
"options" varchar(255) DEFAULT '' NOT NULL,
"note" varchar(255) DEFAULT '' NOT NULL,
"description" text DEFAULT '' NOT NULL,
"state" smallint DEFAULT 0 NOT NULL,
"required" smallint DEFAULT 0 NOT NULL,
"checked_out" integer DEFAULT 0 NOT NULL,
"checked_out_time" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL,
"ordering" bigint DEFAULT 0 NOT NULL,
"params" text DEFAULT '' NOT NULL,
"fieldparams" text DEFAULT '' NOT NULL,
"attributes" text DEFAULT '' NOT NULL,
"language" varchar(7) DEFAULT '' NOT NULL,
"created_time" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL,
"created_user_id" bigint DEFAULT 0 NOT NULL,
"created_by_alias" varchar(255) DEFAULT '' NOT NULL,
"modified_time" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL,
"modified_by" bigint DEFAULT 0 NOT NULL,
"publish_up" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL,
"publish_down" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL,
"access" bigint DEFAULT 0 NOT NULL,
PRIMARY KEY ("id")
);
CREATE INDEX "#__fields_idx_checked_out" ON "#__fields" ("checked_out");
CREATE INDEX "#__fields_idx_state" ON "#__fields" ("state");
CREATE INDEX "#__fields_idx_created_user_id" ON "#__fields" ("created_user_id");
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_values
--
CREATE TABLE "#__fields_values" (
"field_id" bigint DEFAULT 0 NOT NULL,
"item_id" varchar(255) DEFAULT '' NOT NULL,
"context" varchar(255) DEFAULT '' NOT NULL,
"value" text DEFAULT '' NOT NULL
);
CREATE INDEX "#__fields_values_idx_field_id" ON "#__fields_values" ("field_id");
CREATE INDEX "#__fields_values_idx_context" ON "#__fields_values" ("context");
CREATE INDEX "#__fields_values_idx_item_id" ON "#__fields_values" ("item_id");

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
(33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 1, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0),
(462, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);

@@ -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, 'COM_CPANEL_MSG_JOOMLA40_PRE_CHECKS_TITLE', 'COM_CPANEL_MSG_JOOMLA40_PRE_CHECKS_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/joomla40checks.php', 'admin_postinstall_joomla40checks_condition', '3.7.0', 1);
@@ -0,0 +1,6 @@
SET IDENTITY_INSERT [#__postinstall_messages] ON;

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])
SELECT 700, 'COM_CPANEL_MSG_JOOMLA40_PRE_CHECKS_TITLE', 'COM_CPANEL_MSG_JOOMLA40_PRE_CHECKS_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/joomla40checks.php', 'admin_postinstall_joomla40checks_condition', '3.7.0', 1;

SET IDENTITY_INSERT [#__postinstall_messages] OFF;
Expand Up @@ -54,7 +54,7 @@ class AdminViewHelp extends JViewLegacy
* @var string
* @since 1.6
*/
protected $latest_version_check = 'https://www.joomla.org/download.html';
protected $latest_version_check = 'https://downloads.joomla.org/latest';

/**
* URL for the start here link
Expand Down
Expand Up @@ -9,16 +9,14 @@

defined('JPATH_BASE') or die;

JFormHelper::loadFieldClass('list');

JLoader::register('BannersHelper', JPATH_ADMINISTRATOR . '/components/com_banners/helpers/banners.php');

/**
* Bannerclient Field class for the Joomla Framework.
*
* @since 1.6
*/
class JFormFieldBannerClient extends JFormFieldList
class JFormFieldBannerClient extends JFormAbstractlist
{
/**
* The form field type.
Expand Down
Expand Up @@ -370,13 +370,19 @@ public function getItems()
*/
public function countItems(&$items, $extension)
{
$parts = explode('.', $extension);
$parts = explode('.', $extension, 2);
$component = $parts[0];
$section = null;

if (count($parts) > 1)
{
$section = $parts[1];

// If the section ends with .fields, then the category belongs to com_fields
if (substr($section, -strlen('.fields')) === '.fields')
{
$component = 'com_fields';
}
}

// Try to find the component helper.
Expand Down
34 changes: 14 additions & 20 deletions administrator/components/com_categories/models/category.php
Expand Up @@ -425,28 +425,25 @@ protected function preprocessForm(JForm $form, $data, $group = 'content')
$form->setFieldAttribute('rules', 'section', $name);

// Association category items
$assoc = $this->getAssoc();

if ($assoc)
if ($this->getAssoc())
{
$languages = JLanguageHelper::getLanguages('lang_code');
$addform = new SimpleXMLElement('<form />');
$fields = $addform->addChild('fields');
$fields->addAttribute('name', 'associations');
$fieldset = $fields->addChild('fieldset');
$fieldset->addAttribute('name', 'item_associations');
$fieldset->addAttribute('description', 'COM_CATEGORIES_ITEM_ASSOCIATIONS_FIELDSET_DESC');
$add = false;

foreach ($languages as $tag => $language)
$languages = JLanguageHelper::getContentLanguages(false, true, null, 'ordering', 'asc');

if (count($languages) > 1)
{
if (empty($data->language) || $tag != $data->language)
$addform = new SimpleXMLElement('<form />');
$fields = $addform->addChild('fields');
$fields->addAttribute('name', 'associations');
$fieldset = $fields->addChild('fieldset');
$fieldset->addAttribute('name', 'item_associations');
$fieldset->addAttribute('description', 'COM_CATEGORIES_ITEM_ASSOCIATIONS_FIELDSET_DESC');

foreach ($languages as $language)
{
$add = true;
$field = $fieldset->addChild('field');
$field->addAttribute('name', $tag);
$field->addAttribute('name', $language->lang_code);
$field->addAttribute('type', 'modal_category');
$field->addAttribute('language', $tag);
$field->addAttribute('language', $language->lang_code);
$field->addAttribute('label', $language->title);
$field->addAttribute('translate_label', 'false');
$field->addAttribute('extension', $extension);
Expand All @@ -455,10 +452,7 @@ protected function preprocessForm(JForm $form, $data, $group = 'content')
$field->addAttribute('edit', 'true');
$field->addAttribute('clear', 'true');
}
}

if ($add)
{
$form->load($addform, false);
}
}
Expand Down
Expand Up @@ -11,14 +11,12 @@

use Joomla\Utilities\ArrayHelper;

JFormHelper::loadFieldClass('list');

/**
* Form Field class for the Joomla Framework.
*
* @since 1.6
*/
class JFormFieldCategoryEdit extends JFormFieldList
class JFormFieldCategoryEdit extends JFormAbstractlist
{
/**
* To allow creation of new categories.
Expand Down

0 comments on commit 84abd14

Please sign in to comment.