Skip to content

Commit

Permalink
Merge branch 'staging' of https://github.com/joomla/joomla-cms into p…
Browse files Browse the repository at this point in the history
…atch-15

Resolve conflicts
  • Loading branch information
matrikular committed Nov 27, 2016
2 parents c8f9c3a + f559da8 commit 617a3d9
Show file tree
Hide file tree
Showing 501 changed files with 28,507 additions and 25,106 deletions.
5 changes: 2 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ There are other branches available which serve specific purposes.

| Branch | Purpose |
| ------ | ------- |
| staging | Current codebase. |
| 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. |
| 2.5.x | Branch for the Joomla 2.5.x series. Support for this version has ended, no patches are accepted here. |
| 3.6.x | Branch for the next minor Joomla version. New backward compatible features go into this branch. Commits to staging will be applied to this branch as well. |
| 4.0-dev | Branch for the next major Joomla version. New backward incompatible features go into this branch. Commits to staging will be applied to this branch as well. |
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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');
}
29 changes: 28 additions & 1 deletion administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,33 @@ public function deleteUnexistingFiles()
'/administrator/components/com_redirect/views/links/tmpl/default_batch.php',
'/administrator/components/com_tags/views/tags/tmpl/default_batch.php',
'/administrator/components/com_users/views/users/tmpl/default_batch.php',
'/components/com_contact/metadata.xml',
'/components/com_contact/views/category/metadata.xml',
'/components/com_contact/views/contact/metadata.xml',
'/components/com_contact/views/featured/metadata.xml',
'/components/com_content/metadata.xml',
'/components/com_content/views/archive/metadata.xml',
'/components/com_content/views/article/metadata.xml',
'/components/com_content/views/categories/metadata.xml',
'/components/com_content/views/category/metadata.xml',
'/components/com_content/views/featured/metadata.xml',
'/components/com_content/views/form/metadata.xml',
'/components/com_finder/views/search/metadata.xml',
'/components/com_mailto/views/mailto/metadata.xml',
'/components/com_mailto/views/sent/metadata.xml',
'/components/com_newsfeeds/metadata.xml',
'/components/com_newsfeeds/views/category/metadata.xml',
'/components/com_newsfeeds/views/newsfeed/metadata.xml',
'/components/com_search/views/search/metadata.xml',
'/components/com_tags/metadata.xml',
'/components/com_tags/views/tag/metadata.xml',
'/components/com_users/metadata.xml',
'/components/com_users/views/login/metadata.xml',
'/components/com_users/views/profile/metadata.xml',
'/components/com_users/views/registration/metadata.xml',
'/components/com_users/views/remind/metadata.xml',
'/components/com_users/views/reset/metadata.xml',
'/components/com_wrapper/metadata.xml',
);

// TODO There is an issue while deleting folders using the ftp mode
Expand Down Expand Up @@ -1628,7 +1655,7 @@ public function deleteUnexistingFiles()
'/libraries/simplepie',
// Joomla! 3.6.3
'/media/editors/codemirror/mode/jade',
// Joomla __DEPLOY_VERSION__
// Joomla! __DEPLOY_VERSION__
'/libraries/joomla/data',
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ CREATE TABLE IF NOT EXISTS `#__fields` (
`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 '',
`version` int(10) unsigned NOT NULL DEFAULT '0',
`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',
`hits` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_state` (`state`),
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, '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);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `#__extensions` CHANGE `enabled` `enabled` TINYINT(3) NOT NULL DEFAULT '0';
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ CREATE TABLE "#__fields" (
"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,
"version" bigint DEFAULT 0 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,
"hits" integer DEFAULT 0 NOT NULL,
PRIMARY KEY ("id")
);
CREATE INDEX "#__fields_idx_checked_out" ON "#__fields" ("checked_out");
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, '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);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "#__extensions" ALTER COLUMN "enabled" SET DEFAULT 0;
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE [#__extensions] ALTER COLUMN [enabled] DEFAULT 0;
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion administrator/components/com_banners/models/tracks.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public function getContent()

foreach ($this->getItems() as $item)
{
$this->content .= '"' . str_replace('"', '""', $item->name) . '","'
$this->content .= '"' . str_replace('"', '""', $item->banner_name) . '","'
. str_replace('"', '""', $item->client_name) . '","'
. str_replace('"', '""', $item->category_title) . '","'
. str_replace('"', '""', ($item->track_type == 1 ? JText::_('COM_BANNERS_IMPRESSION') : JText::_('COM_BANNERS_CLICK'))) . '","'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

JHtml::_('jquery.framework');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select', null, array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', '#jform_catid', null, array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', 'select');

JFactory::getDocument()->addScriptDeclaration('
Joomla.submitbutton = function(task)
Expand Down
6 changes: 4 additions & 2 deletions administrator/components/com_categories/models/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,11 @@ public function getForm($data = array(), $loadData = true)
$data['extension'] = $extension;
}

$user = JFactory::getUser();
$categoryId = $jinput->get('id');
$parts = explode('.', $extension);
$assetKey = $categoryId ? $extension . '.category.' . $categoryId : $parts[0];

if (!$user->authorise('core.edit.state', $extension . '.category.' . $jinput->get('id')))
if (!JFactory::getUser()->authorise('core.edit.state', $assetKey))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function getInput()

// Add the modal field script to the document head.
JHtml::_('jquery.framework');
JHtml::_('script', 'system/modal-fields.js', false, true);
JHtml::_('script', 'system/modal-fields.js', array('version' => 'auto', 'relative' => true));

// Script to proxy the select modal function to the modal-fields.js file.
if ($allowSelect)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ protected function addToolbar()
$section = $this->state->get('filter.section');
$canDo = JHelperContent::getActions($component, 'category', $categoryId);
$user = JFactory::getUser();
$extension = JFactory::getApplication()->input->get('extension', '', 'word');

// Get the toolbar object instance
$bar = JToolbar::getInstance('toolbar');
Expand Down Expand Up @@ -182,7 +181,7 @@ protected function addToolbar()
}

// Load specific css component
JHtml::_('stylesheet', $component . '/administrator/categories.css', array(), true);
JHtml::_('stylesheet', $component . '/administrator/categories.css', array('version' => 'auto', 'relative' => true));

// Prepare the toolbar.
JToolbarHelper::title($title, 'folder categories ' . substr($component, 4) . ($section ? "-$section" : '') . '-categories');
Expand Down Expand Up @@ -210,9 +209,9 @@ protected function addToolbar()
}

// Add a batch button
if ($user->authorise('core.create', $extension)
&& $user->authorise('core.edit', $extension)
&& $user->authorise('core.edit.state', $extension))
if ($canDo->get('core.create')
&& $canDo->get('core.edit')
&& $canDo->get('core.edit.state'))
{
$title = JText::_('JTOOLBAR_BATCH');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ protected function addToolbar()
}

// Load specific css component
JHtml::_('stylesheet', $component . '/administrator/categories.css', array(), true);
JHtml::_('stylesheet', $component . '/administrator/categories.css', array('version' => 'auto', 'relative' => true));

// Prepare the toolbar.
JToolbarHelper::title(
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_config/model/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function save($data)
// If available in HTTPS check also the status code.
if (!in_array($response->code, array(200, 503, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 401), true))
{
throw new RuntimeException('HTTPS version of the site returned an invalid HTTP status code.');
throw new RuntimeException(JText::_('COM_CONFIG_ERROR_SSL_NOT_AVAILABLE_HTTP_CODE'));
}
}
catch (RuntimeException $e)
Expand All @@ -154,7 +154,7 @@ public function save($data)
$app->setUserState('com_config.config.global.data.force_ssl', 0);

// Inform the user
$app->enqueueMessage(JText::_('COM_CONFIG_ERROR_SSL_NOT_AVAILABLE'), 'warning');
$app->enqueueMessage(JText::sprintf('COM_CONFIG_ERROR_SSL_NOT_AVAILABLE', $e->getMessage()), 'warning');
}
}

Expand Down

0 comments on commit 617a3d9

Please sign in to comment.