Fixed the clone method that gave the error Call to undefined method ComponentbuilderModelImport_joomla_components::updateAfter()

This commit is contained in:
Llewellyn van der Merwe 2018-05-04 22:27:49 +02:00
parent cc35295cf6
commit 7cb78222ea
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
10 changed files with 53 additions and 25 deletions

View File

@ -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.7) 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.8) 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*: 4th May, 2018
+ *Version*: 2.7.7
+ *Version*: 2.7.8
+ *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*: **193747**
+ *Line count*: **193786**
+ *Field count*: **1034**
+ *File count*: **1201**
+ *Folder count*: **193**

View File

@ -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.7) 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.8) 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*: 4th May, 2018
+ *Version*: 2.7.7
+ *Version*: 2.7.8
+ *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*: **193747**
+ *Line count*: **193786**
+ *Field count*: **1034**
+ *File count*: **1201**
+ *Folder count*: **193**

View File

@ -4269,6 +4269,7 @@ COM_COMPONENTBUILDER_IWEBSITEI_BSB="<i>Website</i>: <b>%s</b>"
COM_COMPONENTBUILDER_JCB_COMMUNITY="JCB Community"
COM_COMPONENTBUILDER_JCB_COMMUNITY_PACKAGES="JCB Community Packages"
COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS="JCB Community Snippets"
COM_COMPONENTBUILDER_JCB_PACKAGE_IMPORT="JCB Package Import"
COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_CONTINUEB_WITH_THE_IMPORT_OF_THE_SELECTED_PACKAGE="JCB Package info path does not work, we advice you <b>not to continue</b> with the import of the selected package!"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT="Joomla Component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS="Joomla Components"
@ -5487,6 +5488,7 @@ COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
COM_COMPONENTBUILDER_PUBLISHED="Published"
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
COM_COMPONENTBUILDER_REFRESH="Refresh"
COM_COMPONENTBUILDER_RELEASED_THIS="released this"
COM_COMPONENTBUILDER_RENAME="Rename"
COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: <b>%s</b>"

View File

@ -57,6 +57,8 @@ $query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.langtag ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
// make sure the English GB is added
$wasAdded = false;
$options = array();
if ($items)
{
@ -64,8 +66,17 @@ if ($items)
foreach($items as $item)
{
$options[] = JHtml::_('select.option', trim($item->langtag), $item->language_name . ' (' .$item->langtag.')');
if ('en-GB' === trim($item->langtag))
{
$wasAdded = true;
}
}
}
// now add it if not already added
if (!$wasAdded)
{
$options[] = JHtml::_('select.option', 'en-GB', 'English GB (en-GB)');
}
return $options;
}
}

View File

@ -875,7 +875,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
}
}
// do an after all run on all items that need it
$model->updateAfter();
$model->updateAfterAll();
// finally move the old datasets
$model->moveDivergedData();
// we had success

View File

@ -48,8 +48,16 @@ JHtml::_('behavior.keepalive');
form.submit();
};
<?php else: ?>
Joomla.submitbutton = function()
Joomla.submitbutton = function(task)
{
if ('refresh' === task){
jQuery('#loading').css('display', 'block');
// clear the history
jQuery.jStorage.flush();
// now start the update
autoJCBpackageInfo();
jQuery('#loading').hide();
} else {
var form = document.getElementById('adminForm');
// do field validation
if (form.import_package.value == "")
@ -62,6 +70,7 @@ JHtml::_('behavior.keepalive');
form.gettype.value = 'upload';
form.submit();
}
}
};
Joomla.submitbuttonDir = function()
{

View File

@ -62,15 +62,21 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
$this->state = &$state;
// get global action permissions
$this->canDo = ComponentbuilderHelper::getActions('import');
// load the application
$this->app = JFactory::getApplication();
// We don't need toolbar in the modal window.
if ($this->getLayout() !== 'modal')
{
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
// hide the main menu
$this->app->input->set('hidemainmenu', true);
// add title to the page
JToolbarHelper::title(JText::_('COM_COMPONENTBUILDER_JCB_PACKAGE_IMPORT'),'upload');
// add refesh button.
JToolBarHelper::custom('refresh', 'refresh', '', 'COM_COMPONENTBUILDER_REFRESH', false);
}
// load the application
$app = JFactory::getApplication();
// get the session object
$session = JFactory::getSession();
// check if it has package

View File

@ -7,9 +7,9 @@
<authorUrl>http://joomlacomponentbuilder.com</authorUrl>
<copyright>Copyright (C) 2015. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>2.7.7</version>
<version>2.7.8</version>
<description><![CDATA[
<h1>Component Builder (v.2.7.7)</h1>
<h1>Component Builder (v.2.7.8)</h1>
<div style="clear: both;"></div>
<p>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.

View File

@ -344,10 +344,10 @@
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.7.7</version>
<version>2.7.8</version>
<infourl title="Component Builder!">http://joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.7/JCB_v2.7.7.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.7.8/JCB_v2.7.8.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>

View File

@ -4878,7 +4878,7 @@ class com_componentbuilderInstallerScript
echo '<a target="_blank" href="http://joomlacomponentbuilder.com" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 2.7.7 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.7.8 Was Successful! Let us know if anything is not working as expected.</h3>';
}
}