changed component table name to joomla-component to add history/version tracking back to components

This commit is contained in:
2017-02-16 16:02:23 +02:00
parent 79ab3164a6
commit a197f503a9
231 changed files with 4445 additions and 4289 deletions

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 55 of this MVC
@build 13th February, 2017
@build 16th February, 2017
@created 11th October, 2016
@package Component Builder
@subpackage custom_code.php

View File

@ -10,11 +10,11 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 81 of this MVC
@build 13th February, 2017
@version @update number 84 of this MVC
@build 16th February, 2017
@created 6th May, 2015
@package Component Builder
@subpackage component.php
@subpackage joomla_component.php
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -32,9 +32,9 @@ use Joomla\Registry\Registry;
jimport('joomla.database.table');
/**
* Components Table class
* Joomla_components Table class
*/
class ComponentbuilderTableComponent extends JTable
class ComponentbuilderTableJoomla_component extends JTable
{
/**
* Ensure the params and metadata in json encoded in the bind method
@ -51,10 +51,10 @@ class ComponentbuilderTableComponent extends JTable
*/
function __construct(&$db)
{
parent::__construct('#__componentbuilder_component', 'id', $db);
parent::__construct('#__componentbuilder_joomla_component', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.component'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.joomla_component'));
}
public function bind($array, $ignore = '')
@ -84,7 +84,7 @@ class ComponentbuilderTableComponent extends JTable
}
/**
* Overload the store method for the Component table.
* Overload the store method for the Joomla_component table.
*
* @param boolean Toggle whether null values should be updated.
* @return boolean True on success, false on failure.
@ -103,7 +103,7 @@ class ComponentbuilderTableComponent extends JTable
}
else
{
// New component. A component created and created_by field can be set by the user,
// New joomla_component. A joomla_component created and created_by field can be set by the user,
// so we don't touch either of these if they are set.
if (!(int) $this->created)
{
@ -118,11 +118,11 @@ class ComponentbuilderTableComponent extends JTable
if (isset($this->alias))
{
// Verify that the alias is unique
$table = JTable::getInstance('component', 'ComponentbuilderTable');
$table = JTable::getInstance('joomla_component', 'ComponentbuilderTable');
if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->setError(JText::_('COM_COMPONENTBUILDER_COMPONENT_ERROR_UNIQUE_ALIAS'));
$this->setError(JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ERROR_UNIQUE_ALIAS'));
return false;
}
}
@ -153,7 +153,7 @@ class ComponentbuilderTableComponent extends JTable
// Generate a valid alias
$this->generateAlias();
$table = JTable::getInstance('component', 'componentbuilderTable');
$table = JTable::getInstance('joomla_component', 'componentbuilderTable');
while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
@ -202,7 +202,7 @@ class ComponentbuilderTableComponent extends JTable
// If we don't have any access rules set at this point just use an empty JAccessRules class
if (!$this->getRules())
{
$rules = $this->getDefaultAssetValues('com_componentbuilder.component.'.$this->id);
$rules = $this->getDefaultAssetValues('com_componentbuilder.joomla_component.'.$this->id);
$this->setRules($rules);
}
@ -293,7 +293,7 @@ class ComponentbuilderTableComponent extends JTable
protected function _getAssetName()
{
$k = $this->_tbl_key;
return 'com_componentbuilder.component.'.(int) $this->$k;
return 'com_componentbuilder.joomla_component.'.(int) $this->$k;
}
/**