Added (Linked To) back in related areas, so we can see where what is linked. Added ajax fields to the custom admin view. Added some backward compatibility to stylesheets and scripts being added, resolved gh-217. Fixed gh-212 no access lang string. Added the site CSS area to Joomla Component view resolved gh-216.
This commit is contained in:
@@ -64,6 +64,11 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
public function getTable($type = 'dynamic_get', $prefix = 'ComponentbuilderTable', $config = array())
|
||||
{
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
public function getVDM()
|
||||
{
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,6 +100,22 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
$item->metadata = $registry->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->join_view_table))
|
||||
{
|
||||
// Convert the join_view_table field to an array.
|
||||
$join_view_table = new Registry;
|
||||
$join_view_table->loadString($item->join_view_table);
|
||||
$item->join_view_table = $join_view_table->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->join_db_table))
|
||||
{
|
||||
// Convert the join_db_table field to an array.
|
||||
$join_db_table = new Registry;
|
||||
$join_db_table->loadString($item->join_db_table);
|
||||
$item->join_db_table = $join_db_table->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->filter))
|
||||
{
|
||||
// Convert the filter field to an array.
|
||||
@@ -127,22 +148,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
$item->global = $global->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->join_db_table))
|
||||
{
|
||||
// Convert the join_db_table field to an array.
|
||||
$join_db_table = new Registry;
|
||||
$join_db_table->loadString($item->join_db_table);
|
||||
$item->join_db_table = $join_db_table->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->join_view_table))
|
||||
{
|
||||
// Convert the join_view_table field to an array.
|
||||
$join_view_table = new Registry;
|
||||
$join_view_table->loadString($item->join_view_table);
|
||||
$item->join_view_table = $join_view_table->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->php_custom_get))
|
||||
{
|
||||
// base64 Decode php_custom_get.
|
||||
@@ -185,6 +190,27 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
$item->php_calculation = base64_decode($item->php_calculation);
|
||||
}
|
||||
|
||||
|
||||
if (empty($item->id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('dynamic_get__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
|
||||
ComponentbuilderHelper::set('dynamic_get__'.$id, $this->vastDevMod);
|
||||
}
|
||||
|
||||
// update the fields
|
||||
$objectUpdate = new stdClass();
|
||||
$objectUpdate->id = (int) $item->id;
|
||||
@@ -944,6 +970,32 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
$data['metadata'] = (string) $metadata;
|
||||
}
|
||||
|
||||
// Set the join_view_table items to data.
|
||||
if (isset($data['join_view_table']) && is_array($data['join_view_table']))
|
||||
{
|
||||
$join_view_table = new JRegistry;
|
||||
$join_view_table->loadArray($data['join_view_table']);
|
||||
$data['join_view_table'] = (string) $join_view_table;
|
||||
}
|
||||
elseif (!isset($data['join_view_table']))
|
||||
{
|
||||
// Set the empty join_view_table to data
|
||||
$data['join_view_table'] = '';
|
||||
}
|
||||
|
||||
// Set the join_db_table items to data.
|
||||
if (isset($data['join_db_table']) && is_array($data['join_db_table']))
|
||||
{
|
||||
$join_db_table = new JRegistry;
|
||||
$join_db_table->loadArray($data['join_db_table']);
|
||||
$data['join_db_table'] = (string) $join_db_table;
|
||||
}
|
||||
elseif (!isset($data['join_db_table']))
|
||||
{
|
||||
// Set the empty join_db_table to data
|
||||
$data['join_db_table'] = '';
|
||||
}
|
||||
|
||||
// Set the filter items to data.
|
||||
if (isset($data['filter']) && is_array($data['filter']))
|
||||
{
|
||||
@@ -996,32 +1048,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
$data['global'] = '';
|
||||
}
|
||||
|
||||
// Set the join_db_table items to data.
|
||||
if (isset($data['join_db_table']) && is_array($data['join_db_table']))
|
||||
{
|
||||
$join_db_table = new JRegistry;
|
||||
$join_db_table->loadArray($data['join_db_table']);
|
||||
$data['join_db_table'] = (string) $join_db_table;
|
||||
}
|
||||
elseif (!isset($data['join_db_table']))
|
||||
{
|
||||
// Set the empty join_db_table to data
|
||||
$data['join_db_table'] = '';
|
||||
}
|
||||
|
||||
// Set the join_view_table items to data.
|
||||
if (isset($data['join_view_table']) && is_array($data['join_view_table']))
|
||||
{
|
||||
$join_view_table = new JRegistry;
|
||||
$join_view_table->loadArray($data['join_view_table']);
|
||||
$data['join_view_table'] = (string) $join_view_table;
|
||||
}
|
||||
elseif (!isset($data['join_view_table']))
|
||||
{
|
||||
// Set the empty join_view_table to data
|
||||
$data['join_view_table'] = '';
|
||||
}
|
||||
|
||||
// Set the php_custom_get string to base64 string.
|
||||
if (isset($data['php_custom_get']))
|
||||
{
|
||||
|
Reference in New Issue
Block a user