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 Oct 26, 2016
2 parents 2bd316d + 392d972 commit 32eb91b
Show file tree
Hide file tree
Showing 934 changed files with 29,916 additions and 20,361 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -10,7 +10,7 @@ What is this?
---------------------
* This is a Joomla! 3.x installation/upgrade package.
* Joomla's [Official website](https://www.joomla.org).
* Joomla! 3.6 [version history](https://docs.joomla.org/Joomla_3.6_version_history).
* Joomla! 3.7 [version history](https://docs.joomla.org/Joomla_3.7_version_history).
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/master).

What is Joomla?
Expand Down
2 changes: 1 addition & 1 deletion README.txt
@@ -1,7 +1,7 @@
1- What is this?
* This is a Joomla! installation/upgrade package to version 3.x
* Joomla! Official site: https://www.joomla.org
* Joomla! 3.6 version history - https://docs.joomla.org/Joomla_3.6_version_history
* Joomla! 3.7 version history - https://docs.joomla.org/Joomla_3.7_version_history
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/master

2- What is Joomla?
Expand Down
5 changes: 3 additions & 2 deletions administrator/components/com_admin/models/help.php
Expand Up @@ -9,6 +9,8 @@

defined('_JEXEC') or die;

use Joomla\String\StringHelper;

/**
* Admin Component Help Model
*
Expand Down Expand Up @@ -173,8 +175,7 @@ public function &getToc()
// Strip the extension
$file = preg_replace('#\.xml$|\.html$#', '', $file);

if ($help_search
&& JString::strpos(JString::strtolower(strip_tags($buffer)), JString::strtolower($help_search)) === false)
if ($help_search && StringHelper::strpos(StringHelper::strtolower(strip_tags($buffer)), StringHelper::strtolower($help_search)) === false)
{
continue;
}
Expand Down
Expand Up @@ -46,8 +46,7 @@ function admin_postinstall_eaccelerator_action()
$prev = ArrayHelper::fromObject(new JConfig);
$data = array_merge($prev, array('cacheHandler' => 'file'));

$config = new Registry('config');
$config->loadArray($data);
$config = new Registry($data);

jimport('joomla.filesystem.path');
jimport('joomla.filesystem.file');
Expand Down
28 changes: 25 additions & 3 deletions administrator/components/com_admin/script.php
Expand Up @@ -343,9 +343,12 @@ protected function updateManifestCaches()
array('plugin', 'updatenotification', 'system', 0),
array('plugin', 'module', 'editors-xtd', 0),
array('plugin', 'stats', 'system', 0),
array('plugin', 'packageinstaller','installer',0),
array('plugin', 'folderinstaller','installer', 0),
array('plugin', 'urlinstaller','installer', 0),
array('plugin', 'packageinstaller', 'installer', 0),
array('plugin', 'folderinstaller', 'installer', 0),
array('plugin', 'urlinstaller', 'installer', 0),
array('plugin', 'phpversioncheck', 'quickicon', 0),
array('plugin', 'menu', 'editors-xtd', 0),
array('plugin', 'contact', 'editors-xtd', 0),

// Templates
array('template', 'beez3', '', 0),
Expand Down Expand Up @@ -1496,6 +1499,23 @@ 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__
'/libraries/joomla/user/authentication.php',
'/libraries/platform.php',
'/libraries/joomla/data/data.php',
'/libraries/joomla/data/dumpable.php',
'/libraries/joomla/data/set.php',
'/administrator/components/com_banners/views/banners/tmpl/default_batch.php',
'/administrator/components/com_categories/views/category/tmpl/edit_extrafields.php',
'/administrator/components/com_categories/views/category/tmpl/edit_options.php',
'/administrator/components/com_categories/views/categories/tmpl/default_batch.php',
'/administrator/components/com_content/views/articles/tmpl/default_batch.php',
'/administrator/components/com_menus/views/items/tmpl/default_batch.php',
'/administrator/components/com_modules/views/modules/tmpl/default_batch.php',
'/administrator/components/com_newsfeeds/views/newsfeeds/tmpl/default_batch.php',
'/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',
);

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

jimport('joomla.filesystem.file');
Expand Down
@@ -0,0 +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
(458, 'plg_quickicon_phpversioncheck', 'plugin', 'phpversioncheck', 'quickicon', 0, 1, 1, 1, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
@@ -0,0 +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
(459, 'plg_editors-xtd_menu', 'plugin', 'menu', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
@@ -0,0 +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
(460, 'plg_editors-xtd_contact', 'plugin', 'contact', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
@@ -0,0 +1 @@
ALTER TABLE `#__session` MODIFY `client_id` tinyint(3) unsigned DEFAULT NULL;
@@ -0,0 +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
(458, 'plg_quickicon_phpversioncheck', 'plugin', 'phpversioncheck', 'quickicon', 0, 1, 1, 1, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);
@@ -0,0 +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
(459, 'plg_editors-xtd_menu', 'plugin', 'menu', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);
@@ -0,0 +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
(460, 'plg_editors-xtd_contact', 'plugin', 'contact', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0);
@@ -0,0 +1,2 @@
ALTER TABLE "#__session" ALTER COLUMN "client_id" DROP NOT NULL;
ALTER TABLE "#__session" ALTER COLUMN "client_id" SET DEFAULT NULL;
@@ -0,0 +1,6 @@
SET IDENTITY_INSERT #__extensions ON;

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])
SELECT 458, 'plg_quickicon_phpversioncheck', 'plugin', 'phpversioncheck', 'quickicon', 0, 1, 1, 1, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0;

SET IDENTITY_INSERT #__extensions OFF;
@@ -0,0 +1,6 @@
SET IDENTITY_INSERT [#__extensions] ON;

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])
SELECT 459, 'plg_editors-xtd_menu', 'plugin', 'menu', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0;

SET IDENTITY_INSERT [#__extensions] OFF;
@@ -0,0 +1,6 @@
SET IDENTITY_INSERT [#__extensions] ON;

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])
SELECT 460, 'plg_editors-xtd_contact', 'plugin', 'contact', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0;

SET IDENTITY_INSERT [#__extensions] OFF;
@@ -0,0 +1 @@
ALTER TABLE [#__session] ALTER COLUMN [client_id] [tinyint] NULL;
58 changes: 58 additions & 0 deletions administrator/components/com_banners/helpers/banners.php
Expand Up @@ -238,4 +238,62 @@ public static function countItems(&$items)

return $items;
}

/**
* Adds Count Items for Tag Manager.
*
* @param stdClass[] &$items The banner tag objects
* @param string $extension The name of the active view.
*
* @return stdClass[]
*
* @since 3.6
*/
public static function countTagItems(&$items, $extension)
{
$db = JFactory::getDbo();

foreach ($items as $item)
{
$item->count_trashed = 0;
$item->count_archived = 0;
$item->count_unpublished = 0;
$item->count_published = 0;
$query = $db->getQuery(true);
$query->select('published as state, count(*) AS count')
->from($db->qn('#__contentitem_tag_map') . 'AS ct ')
->where('ct.tag_id = ' . (int) $item->id)
->where('ct.type_alias =' . $db->q($extension))
->join('LEFT', $db->qn('#__categories') . ' AS c ON ct.content_item_id=c.id')
->group('state');

$db->setQuery($query);
$banners = $db->loadObjectList();

foreach ($banners as $banner)
{
if ($banner->state == 1)
{
$item->count_published = $banner->count;
}

if ($banner->state == 0)
{
$item->count_unpublished = $banner->count;
}

if ($banner->state == 2)
{
$item->count_archived = $banner->count;
}

if ($banner->state == -2)
{
$item->count_trashed = $banner->count;
}
}
}

return $items;
}
}
Expand Up @@ -92,7 +92,7 @@
description="COM_BANNERS_FIELD_DESCRIPTION_DESC"
filter="JComponentHelper::filterText"
buttons="true"
hide="readmore,pagebreak,module,article"
hide="readmore,pagebreak,module,article,contact,menu"
/>

<field
Expand Down
3 changes: 1 addition & 2 deletions administrator/components/com_banners/tables/banner.php
Expand Up @@ -129,8 +129,7 @@ public function bind($array, $ignore = array())
{
if (isset($array['params']) && is_array($array['params']))
{
$registry = new Registry;
$registry->loadArray($array['params']);
$registry = new Registry($array['params']);

if ((int) $registry->get('width', 0) < 0)
{
Expand Down
Expand Up @@ -10,6 +10,8 @@
defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

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

Expand Down
Expand Up @@ -62,7 +62,6 @@ public function display($tpl = null)
}

$this->addToolbar();
JHtml::_('jquery.framework');

return parent::display($tpl);
}
Expand Down
Expand Up @@ -163,13 +163,8 @@
<?php echo $item->clicks; ?> -
<?php echo sprintf('%.2f%%', $item->impmade ? 100 * $item->clicks / $item->impmade : 0); ?>
</td>

<td class="small nowrap hidden-phone">
<?php if ($item->language == '*'): ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else: ?>
<?php echo $item->language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . '&nbsp;' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif; ?>
<?php echo JLayoutHelper::render('joomla.content.language', $item); ?>
</td>
<td class="hidden-phone">
<?php echo $item->id; ?>
Expand Down

This file was deleted.

Expand Up @@ -177,15 +177,13 @@ protected function postSaveHook(JModelLegacy $model, $validData = array())

if (isset($item->params) && is_array($item->params))
{
$registry = new Registry;
$registry->loadArray($item->params);
$registry = new Registry($item->params);
$item->params = (string) $registry;
}

if (isset($item->metadata) && is_array($item->metadata))
{
$registry = new Registry;
$registry->loadArray($item->metadata);
$registry = new Registry($item->metadata);
$item->metadata = (string) $registry;
}
}
Expand Down
Expand Up @@ -47,11 +47,11 @@ public static function addSubmenu($extension)

if (file_exists($file))
{
require_once $file;

$prefix = ucfirst(str_replace('com_', '', $component));
$cName = $prefix . 'Helper';

JLoader::register($cName, $file);

if (class_exists($cName))
{
if (is_callable(array($cName, 'addSubmenu')))
Expand Down
Expand Up @@ -46,6 +46,7 @@ public static function association($catid, $extension = 'com_content')
$query = $db->getQuery(true)
->select('c.id, c.title')
->select('l.sef as lang_sef')
->select('l.lang_code')
->from('#__categories as c')
->where('c.id IN (' . implode(',', array_values($associations)) . ')')
->join('LEFT', '#__languages as l ON c.language=l.lang_code')
Expand All @@ -66,32 +67,18 @@ public static function association($catid, $extension = 'com_content')
{
foreach ($items as &$item)
{
$text = strtoupper($item->lang_sef);
$url = JRoute::_('index.php?option=com_categories&task=category.edit&id=' . (int) $item->id . '&extension=' . $extension);
$tooltipParts = array(
JHtml::_(
'image',
'mod_languages/' . $item->image . '.gif',
$item->language_title,
array('title' => $item->language_title),
true
),
$item->title
);
$text = $item->lang_sef ? strtoupper($item->lang_sef) : 'XX';
$url = JRoute::_('index.php?option=com_categories&task=category.edit&id=' . (int) $item->id . '&extension=' . $extension);
$classes = 'hasPopover label label-association label-' . $item->lang_sef;

$item->link = JHtml::_(
'tooltip',
implode(' ', $tooltipParts),
null,
null,
$text,
$url,
null,
'hasTooltip label label-association label-' . $item->lang_sef
);
$item->link = '<a href="' . $url . '" title="' . $item->language_title . '" class="' . $classes
. '" data-content="' . $item->title . '" data-placement="top">'
. $text . '</a>';
}
}

JHtml::_('bootstrap.popover');

$html = JLayoutHelper::render('joomla.content.associations', $items);
}

Expand Down

0 comments on commit 32eb91b

Please sign in to comment.