Added the options to include the xml files to also be target with custom code placeholders.

This commit is contained in:
Llewellyn van der Merwe 2019-05-20 14:14:43 +02:00
parent d3f623d184
commit d7d4ec43e6
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
4 changed files with 20 additions and 18 deletions

View File

@ -146,7 +146,7 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 16th May, 2019 + *Last Build*: 20th May, 2019
+ *Version*: 2.9.18 + *Version*: 2.9.18
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt

View File

@ -146,7 +146,7 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 16th May, 2019 + *Last Build*: 20th May, 2019
+ *Version*: 2.9.18 + *Version*: 2.9.18
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt

View File

@ -5743,7 +5743,7 @@ class Get
$joomla = getcwd(); $joomla = getcwd();
$counter = array(1 => 0, 2 => 0); $counter = array(1 => 0, 2 => 0);
// file types to get // file types to get
$fileTypes = array('\.php', '\.js'); $fileTypes = array('\.php', '\.js', '\.xml');
// set some local placeholders // set some local placeholders
$placeholders = array(); $placeholders = array();
$placeholders[ComponentbuilderHelper::safeString($this->componentCodeName, 'F') . 'Helper::'] = $this->bbb . 'Component' . $this->ddd . 'Helper::'; $placeholders[ComponentbuilderHelper::safeString($this->componentCodeName, 'F') . 'Helper::'] = $this->bbb . 'Component' . $this->ddd . 'Helper::';
@ -5756,8 +5756,11 @@ class Get
chdir($path); chdir($path);
foreach ($fileTypes as $type) foreach ($fileTypes as $type)
{ {
// get a list of files in the current directory tree (only PHP and JS for now) // get a list of files in the current directory tree (only PHP, JS and XML for now)
$files = JFolder::files('.', $type, true, true); $files = JFolder::files('.', $type, true, true);
// check if files found
if (ComponentbuilderHelper::checkArray($files))
{
foreach ($files as $file) foreach ($files as $file)
{ {
$this->searchFileContent($counter, $file, $target, $this->customCodePlaceholders, $placeholders, $today); $this->searchFileContent($counter, $file, $target, $this->customCodePlaceholders, $placeholders, $today);
@ -5774,6 +5777,7 @@ class Get
} }
} }
} }
}
// change back to Joomla working directory // change back to Joomla working directory
chdir($joomla); chdir($joomla);
// make sure all code is stored // make sure all code is stored
@ -6189,7 +6193,7 @@ class Get
* @param string $updateString The string to update * @param string $updateString The string to update
* @param string $string The string to use lang update * @param string $string The string to use lang update
* *
* @return array * @return string
* *
*/ */
protected function setReverseLangPlaceholders($updateString, $string) protected function setReverseLangPlaceholders($updateString, $string)
@ -6264,8 +6268,6 @@ class Get
* 2 -> Check if data string has placeholders * 2 -> Check if data string has placeholders
* 3 -> Remove placeholders not in data string * 3 -> Remove placeholders not in data string
* *
* @param int $langSwitch The lang switch
*
* @return string * @return string
* *
*/ */

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>16th May, 2019</creationDate> <creationDate>20th May, 2019</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl> <authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>