Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
99 changed files
with
1,843 additions
and
662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-31.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
(478, 'plg_content_fields', 'plugin', 'fields', 'content', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); |
2 changes: 2 additions & 0 deletions
2
administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-31.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
(478, 'plg_content_fields', 'plugin', 'fields', 'content', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); |
6 changes: 6 additions & 0 deletions
6
administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-31.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 478, 'plg_content_fields', 'plugin', 'fields', 'content', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; | ||
|
||
SET IDENTITY_INSERT #__extensions OFF; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
administrator/components/com_menus/models/fields/componentscategory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_menus | ||
* | ||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('JPATH_BASE') or die; | ||
|
||
use Joomla\Utilities\ArrayHelper; | ||
|
||
JFormHelper::loadFieldClass('list'); | ||
|
||
/** | ||
* Form Field class for the Joomla Framework. | ||
* | ||
* @since 1.6 | ||
*/ | ||
class JFormFieldComponentsCategory extends JFormFieldList | ||
{ | ||
/** | ||
* The form field type. | ||
* | ||
* @var string | ||
* @since 3.7.0 | ||
*/ | ||
protected $type = 'ComponentsCategory'; | ||
|
||
/** | ||
* Method to get a list of options for a list input. | ||
* | ||
* @return array An array of JHtml options. | ||
* | ||
* @since 3.7.0 | ||
*/ | ||
protected function getOptions() | ||
{ | ||
// Initialise variable. | ||
$db = JFactory::getDbo(); | ||
$query = $db->getQuery(true) | ||
->select('DISTINCT a.name AS text, a.element AS value') | ||
->from('#__extensions as a') | ||
->where('a.enabled >= 1') | ||
->where('a.type =' . $db->quote('component')) | ||
->join('INNER', '#__categories as b ON a.element=b.extension'); | ||
|
||
$items = $db->setQuery($query)->loadObjectList(); | ||
|
||
if (count($items)) | ||
{ | ||
$lang = JFactory::getLanguage(); | ||
|
||
foreach ($items as &$item) | ||
{ | ||
// Load language | ||
$extension = $item->value; | ||
$source = JPATH_ADMINISTRATOR . '/components/' . $extension; | ||
$lang->load("$extension.sys", JPATH_ADMINISTRATOR, null, false, true) | ||
|| $lang->load("$extension.sys", $source, null, false, true); | ||
|
||
// Translate component name | ||
$item->text = JText::_($item->text); | ||
} | ||
|
||
// Sort by component name | ||
$items = ArrayHelper::sortObjects($items, 'text', 1, true, true); | ||
} | ||
|
||
// Merge any additional options in the XML definition. | ||
$options = array_merge(parent::getOptions(), $items); | ||
|
||
return $options; | ||
} | ||
} |
Oops, something went wrong.