Fixed the dynamicGet ajax to now get field values from the new admin_fields table

This commit is contained in:
Llewellyn van der Merwe 2017-10-13 01:39:04 +02:00
parent 35482416cb
commit fc41ba85d8
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
22 changed files with 50 additions and 60 deletions

View File

@ -114,7 +114,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.5.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*: **123443**
+ *Line count*: **123433**
+ *File count*: **740**
+ *Folder count*: **129**

View File

@ -114,7 +114,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.5.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*: **123443**
+ *Line count*: **123433**
+ *File count*: **740**
+ *Folder count*: **129**

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage dynamic_get.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage dynamic_gets.css

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage dynamic_get.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage dynamic_gets.php

View File

@ -499,17 +499,18 @@ class ComponentbuilderModelAjax extends JModelList
}
// Used in dynamic_get
public function getViewTableColumns($id, $as, $type)
public function getViewTableColumns($admin_view, $as, $type)
{
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('addfields', 'name_single')));
$query->from($db->quoteName('#__componentbuilder_admin_view'));
$query->where($db->quoteName('published') . ' = 1');
$query->where($db->quoteName('id') . ' = '. $id);
$query->select($db->quoteName(array('a.addfields', 'b.name_single')));
$query->from($db->quoteName('#__componentbuilder_admin_fields', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_admin_view', 'b') . ' ON (' . $db->quoteName('a.admin_view') . ' = ' . $db->quoteName('b.id') . ')');
$query->where($db->quoteName('b.published') . ' = 1');
$query->where($db->quoteName('a.admin_view') . ' = '. (int) $admin_view);
// Reset the query using our newly populated query object.
$db->setQuery($query);
@ -854,7 +855,7 @@ class ComponentbuilderModelAjax extends JModelList
return false;
}
protected function setListMethodName($names,$table,$as,$type)
protected function setListMethodName($names, $table, $as, $type)
{
$methodNames = array();
if (ComponentbuilderHelper::checkArray($names))
@ -901,21 +902,10 @@ class ComponentbuilderModelAjax extends JModelList
protected function getViewName($id)
{
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('name_single')));
$query->from($db->quoteName('#__componentbuilder_admin_view'));
$query->where($db->quoteName('id') . ' = '. (int) $id);
// Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
// Get the view name
if ($name = ComponentbuilderHelper::getVar('admin_view', (int) $id, 'id', 'name_single'))
{
return $db->loadResult();
return $name;
}
return '';
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage dynamic_get.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage dynamic_gets.php

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage dynamic_get.js

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage dynamic_get.php

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage submitbutton.js

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage edit.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage view.html.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage default.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage default_batch_body.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage default_batch_footer.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage default_body.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage default_foot.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage default_head.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage default_toolbar.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 10th October, 2017
@version @update number 97 of this MVC
@build 12th October, 2017
@created 21st May, 2015
@package Component Builder
@subpackage view.html.php