forked from joomla/Component-Builder
Fixed gh-467 so that the XML build of fields will work correctly with the new groupedlist field type. Added placeholders to class comments.
This commit is contained in:
parent
d2f94d84fa
commit
9fcc5c3930
@ -146,14 +146,14 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 22nd August, 2019
|
||||
+ *Last Build*: 26th August, 2019
|
||||
+ *Version*: 2.10.0
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **247612**
|
||||
+ *Line count*: **247882**
|
||||
+ *Field count*: **1343**
|
||||
+ *File count*: **1604**
|
||||
+ *Folder count*: **250**
|
||||
+ *File count*: **1608**
|
||||
+ *Folder count*: **253**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
|
@ -146,14 +146,14 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 22nd August, 2019
|
||||
+ *Last Build*: 26th August, 2019
|
||||
+ *Version*: 2.10.0
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **247612**
|
||||
+ *Line count*: **247882**
|
||||
+ *Field count*: **1343**
|
||||
+ *File count*: **1604**
|
||||
+ *Folder count*: **250**
|
||||
+ *File count*: **1608**
|
||||
+ *Folder count*: **253**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
|
@ -862,7 +862,7 @@ class Get
|
||||
end($version);
|
||||
$key = key($version);
|
||||
// just increment the last
|
||||
$version[$key] ++;
|
||||
$version[$key]++;
|
||||
// set the old version
|
||||
$this->componentData->old_component_version = $this->componentData->component_version;
|
||||
// set the new version, and set update switch
|
||||
@ -5695,8 +5695,8 @@ class Get
|
||||
/**
|
||||
* Set a type of placeholder with set of values
|
||||
*
|
||||
* @param string $key The main string for placeholder key
|
||||
* @param array $values The values to add
|
||||
* @param string $key The main string for placeholder key
|
||||
* @param array $values The values to add
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@ -6283,6 +6283,14 @@ class Get
|
||||
$plugin->file_name = strtolower($plugin->code_name);
|
||||
// set official_name lang strings
|
||||
$this->setLangContent($plugin->key, $this->langPrefix, $plugin->official_name);
|
||||
// set some placeholder for this plugin
|
||||
$this->placeholders[$this->bbb . 'Plugin_name' . $this->ddd] = $plugin->official_name;
|
||||
$this->placeholders[$this->bbb . 'Plugin' . $this->ddd] = ucfirst($plugin->code_name);
|
||||
$this->placeholders[$this->bbb . 'plugin' . $this->ddd] = strtolower($plugin->code_name);
|
||||
$this->placeholders[$this->bbb . 'Plugin_group' . $this->ddd] = ucfirst($plugin->group);
|
||||
$this->placeholders[$this->bbb . 'plugin_group' . $this->ddd] = strtolower($plugin->group);
|
||||
$this->placeholders[$this->bbb . 'plugin.version' . $this->ddd] = $plugin->plugin_version;
|
||||
$this->placeholders[$this->bbb . 'plugin_version' . $this->ddd] = str_replace('.', '_', $plugin->plugin_version);
|
||||
// set description (TODO) add description field to plugin
|
||||
if (!isset($plugin->description) || !ComponentbuilderHelper::checkString($plugin->description))
|
||||
{
|
||||
@ -6592,6 +6600,14 @@ class Get
|
||||
$this->lang = $_backup_lang;
|
||||
$this->langPrefix = $_backup_langPrefix;
|
||||
|
||||
unset($this->placeholders[$this->bbb . 'Plugin_name' . $this->ddd]);
|
||||
unset($this->placeholders[$this->bbb . 'Plugin' . $this->ddd]);
|
||||
unset($this->placeholders[$this->bbb . 'plugin' . $this->ddd]);
|
||||
unset($this->placeholders[$this->bbb . 'Plugin_group' . $this->ddd]);
|
||||
unset($this->placeholders[$this->bbb . 'plugin_group' . $this->ddd]);
|
||||
unset($this->placeholders[$this->bbb . 'plugin.version' . $this->ddd]);
|
||||
unset($this->placeholders[$this->bbb . 'plugin_version' . $this->ddd]);
|
||||
|
||||
$this->joomlaPlugins[$id] = $plugin;
|
||||
|
||||
return true;
|
||||
|
@ -1800,7 +1800,7 @@ class Fields extends Structure
|
||||
|
||||
foreach ($grouped_[$key_][$_id] as $option_)
|
||||
{
|
||||
$groupOptionXML = $groupXML->fieldXML->addChild('option');
|
||||
$groupOptionXML = $groupXML->addChild('option');
|
||||
$groupOptionXML->addAttribute('value', $option_['value']);
|
||||
$groupOptionXML[] = $option_['text'];
|
||||
}
|
||||
|
@ -361,7 +361,9 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
// set the correct order
|
||||
ksort($comment);
|
||||
return implode(PHP_EOL, $comment);
|
||||
$replace = array('Foo' => '[[[Plugin_name]]]', '[PACKAGE_NAME]' => '[[[Plugin]]]', '1.0.0' => '[[[plugin.version]]]', '1.0' => '[[[plugin.version]]]');
|
||||
// now update with JCB placeholders
|
||||
return str_replace(array_keys($replace), array_values($replace), implode(PHP_EOL, $comment));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5213,6 +5215,9 @@ abstract class ComponentbuilderHelper
|
||||
&& ($timestamp <= PHP_INT_MAX)
|
||||
&& ($timestamp >= ~PHP_INT_MAX);
|
||||
}
|
||||
|
||||
|
||||
// Privacy integration with Joomla Privacy suite
|
||||
|
||||
/**
|
||||
* Load the Component xml manifest.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>22nd August, 2019</creationDate>
|
||||
<creationDate>26th August, 2019</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
|
@ -361,7 +361,9 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
// set the correct order
|
||||
ksort($comment);
|
||||
return implode(PHP_EOL, $comment);
|
||||
$replace = array('Foo' => '[[[Plugin_name]]]', '[PACKAGE_NAME]' => '[[[Plugin]]]', '1.0.0' => '[[[plugin.version]]]', '1.0' => '[[[plugin.version]]]');
|
||||
// now update with JCB placeholders
|
||||
return str_replace(array_keys($replace), array_values($replace), implode(PHP_EOL, $comment));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5213,6 +5215,9 @@ abstract class ComponentbuilderHelper
|
||||
&& ($timestamp <= PHP_INT_MAX)
|
||||
&& ($timestamp >= ~PHP_INT_MAX);
|
||||
}
|
||||
|
||||
|
||||
// Privacy integration with Joomla Privacy suite
|
||||
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
|
||||
|
Loading…
Reference in New Issue
Block a user