diff --git a/README.md b/README.md index 05b08ec07..e6cc0d228 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.6) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.7) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -127,10 +127,10 @@ Component Builder is mapped as a component in itself on my local development env + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 + *Last Build*: 2nd May, 2018 -+ *Version*: 2.7.6 ++ *Version*: 2.7.7 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **193883** ++ *Line count*: **193930** + *Field count*: **1027** + *File count*: **1201** + *Folder count*: **193** diff --git a/admin/README.txt b/admin/README.txt index 05b08ec07..e6cc0d228 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.6) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.7) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -127,10 +127,10 @@ Component Builder is mapped as a component in itself on my local development env + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 + *Last Build*: 2nd May, 2018 -+ *Version*: 2.7.6 ++ *Version*: 2.7.7 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **193883** ++ *Line count*: **193930** + *Field count*: **1027** + *File count*: **1201** + *Folder count*: **193** diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index d16eab8fd..9e4f0563b 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -163,40 +163,9 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $keyNotice = '
' . JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEYBR_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY') . ''; // set the package owner info - if ((isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company'])) || (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner']))) + if (componentbuilderHelper::getPackageOwnerValue('owner', $model->info) || componentbuilderHelper::getPackageOwnerValue('company', $model->info)) { - $ownerDetails = '
' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . '
'; - } - elseif (!isset($owner) && $trust) - { - $ownerDetails = ''; + $ownerDetails = '' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . '
'; + } } return $ownerDetails; } + public static function getPackageOwnerValue($key, &$info) + { + $source = (isset($info['source']) && isset($info['source'][$key])) ? 'source' : ((isset($info['getKeyFrom']) && isset($info['getKeyFrom'][$key])) ? 'getKeyFrom' : false); + if ($source && self::checkString($info[$source][$key])) + { + return $info[$source][$key]; + } + return false; + } + + /** + * get the JCB package component key status + **/ + public static function getPackageComponentsKeyStatus(&$info) + { + // check the package key status + if (!isset($info['key'])) + { + if (isset($info['getKeyFrom']) && isset($info['getKeyFrom']['owner'])) + { + // this just confirms it for older packages + $info['key'] = true; + } + else + { + // this just confirms it for older packages + $info['key'] = false; + } + } + return $info['key']; + } + /** * get the JCB package component details display **/ public static function getPackageComponentsDetailsDisplay(&$info) { + // check if these components need a key + $needKey = self::getPackageComponentsKeyStatus($info); if (isset($info['name']) && self::checkArray($info['name'])) { $cAmount = count((array) $info['name']); @@ -2141,6 +2163,14 @@ abstract class ComponentbuilderHelper $display[] = ''; $display[] = $info['short_description'][$key]; $display[] = '
%s
"
COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the zipped package is: %s
The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml
index e6e3ef180..14c0ca072 100644
--- a/componentbuilder_update_server.xml
+++ b/componentbuilder_update_server.xml
@@ -344,10 +344,10 @@
' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . ' ' . JText::_('COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE') . ' ';
$display[] = $info['short_description'][$key];
$display[] = ' Please setup curl on your system, or componentbuilder will not function correctly!Upgrade to Version 2.7.6 Was Successful! Let us know if anything is not working as expected.
';
+ Upgrade to Version 2.7.7 Was Successful! Let us know if anything is not working as expected.
';
}
}
diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php
index 53f5e1789..bbe085c20 100644
--- a/site/helpers/componentbuilder.php
+++ b/site/helpers/componentbuilder.php
@@ -2042,57 +2042,47 @@ abstract class ComponentbuilderHelper
return false;
}
+ protected static $pkOwnerSearch = array(
+ 'company' => 'COM_COMPONENTBUILDER_EMCOMPANYEM_BSB',
+ 'owner' => 'COM_COMPONENTBUILDER_EMOWNEREM_BSB',
+ 'website' => 'COM_COMPONENTBUILDER_EMWEBSITEEM_BSB',
+ 'email' => 'COM_COMPONENTBUILDER_EMEMAILEM_BSB',
+ 'license' => 'COM_COMPONENTBUILDER_EMLICENSEEM_BSB',
+ 'copyright' => 'COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB'
+ );
+
/**
* get the JCB package owner details display
**/
public static function getPackageOwnerDetailsDisplay(&$info, $trust = false)
{
+ $hasOwner = false;
$ownerDetails = '' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . '
';
$ownerDetails .= '';
- if (isset($info['getKeyFrom']['company']) && self::checkString($info['getKeyFrom']['company']))
+ // load the list items
+ foreach (self::$pkOwnerSearch as $key => $li)
{
- $owner = $info['getKeyFrom']['company'];
- $ownerDetails .= '
';
// provide some details to how the user can get a key
- if (isset($info['getKeyFrom']['buy_link']) && self::checkString($info['getKeyFrom']['buy_link']))
+ if ($hasOwner && isset($info['getKeyFrom']['buy_link']) && self::checkString($info['getKeyFrom']['buy_link']))
{
$ownerDetails .= '
';
$ownerDetails .= JText::sprintf('COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA', $info['getKeyFrom']['buy_link'], $owner, $owner);
}
// add more custom links
- elseif (isset($info['getKeyFrom']['buy_links']) && self::checkArray($info['getKeyFrom']['buy_links']))
+ elseif ($hasOwner && isset($info['getKeyFrom']['buy_links']) && self::checkArray($info['getKeyFrom']['buy_links']))
{
$buttons = array();
foreach ($info['getKeyFrom']['buy_links'] as $keyName => $link)
@@ -2102,25 +2092,57 @@ abstract class ComponentbuilderHelper
$ownerDetails .= '
';
$ownerDetails .= implode('
', $buttons);
}
-
// return the owner details
- if (!isset($owner) && !$trust)
+ if (!$hasOwner)
{
- $ownerDetails = '' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND') . '
';
- $ownerDetails .= '' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND') . '
';
+ if (!$trust)
+ {
+ $ownerDetails .= '';
$display[] = JText::sprintf('COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM', $value . ' v' . $info['component_version'][$key]);
+ if ($needKey)
+ {
+ $display[] = ' - ' . JText::sprintf('COM_COMPONENTBUILDER_PAIDLOCKED') . '';
+ }
+ else
+ {
+ $display[] = ' - ' . JText::sprintf('COM_COMPONENTBUILDER_FREEOPEN') . '';
+ }
$display[] = '
Curl Not Found!
You can add an access token to getBible global options to make authenticated requests. An access token with only public access will do."
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it."