Adds better options with custom get.Improved the auto checkin method.

This commit is contained in:
Llewellyn van der Merwe 2022-02-02 13:45:15 +02:00
parent 6a38523843
commit 758c0f38cf
Signed by untrusted user: Llewellyn
GPG Key ID: EFC0C720A240551C
51 changed files with 403 additions and 297 deletions

View File

@ -143,11 +143,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 21st January, 2022
+ *Last Build*: 2nd February, 2022
+ *Version*: 2.12.15
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **286035**
+ *Line count*: **286129**
+ *Field count*: **1572**
+ *File count*: **1829**
+ *Folder count*: **256**

View File

@ -143,11 +143,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 21st January, 2022
+ *Last Build*: 2nd February, 2022
+ *Version*: 2.12.15
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **286035**
+ *Line count*: **286129**
+ *Field count*: **1572**
+ *File count*: **1829**
+ *Folder count*: **256**

View File

@ -3731,11 +3731,17 @@ class Interpretation extends Fields
PHP_EOL . $this->_t(1) . $tab . $this->_t(1)
. "\$data = \$db->loadObject();";
// add the db set query to data
$getItem = str_replace(
array_keys($setQuery),
array_values($setQuery), $getItem
);
}
else
{
// remove our placeholder
$setQuery[$this->hhh . "DB_SET_QUERY_DATA" . $this->hhh] = '';
}
// add the db set query to data
$getItem = str_replace(
array_keys($setQuery),
array_values($setQuery), $getItem
);
$getItem .= PHP_EOL . PHP_EOL . $tab . $this->_t(2)
. "if (empty(\$data))";
$getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . "{";
@ -21699,7 +21705,7 @@ class Interpretation extends Fields
public function setCheckinCall()
{
$call = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__)
. " check in items";
. " Check in items";
$call .= PHP_EOL . $this->_t(2) . "\$this->checkInNow();" . PHP_EOL;
return $call;
@ -21728,22 +21734,28 @@ class Interpretation extends Fields
) . " Get a db connection.";
$checkin .= PHP_EOL . $this->_t(3) . "\$db = JFactory::getDbo();";
$checkin .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
. " reset query";
. " Reset query.";
$checkin .= PHP_EOL . $this->_t(3) . "\$query = \$db->getQuery(true);";
$checkin .= PHP_EOL . $this->_t(3) . "\$query->select('*');";
$checkin .= PHP_EOL . $this->_t(3)
. "\$query->from(\$db->quoteName('#__" . $component . "_" . $view
. "'));";
$checkin .= PHP_EOL . $this->_t(3) . "\$db->setQuery(\$query);";
$checkin .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Only select items that are checked out.";
$checkin .= PHP_EOL . $this->_t(3)
. "\$query->where(\$db->quoteName('checked_out') . '!=0');";
$this->_t(3) . "//" . $this->setLine(__LINE__)
. " Query only to see if we have a rows";
$checkin .= PHP_EOL . $this->_t(3) . "\$db->setQuery(\$query, 0, 1);";
$checkin .= PHP_EOL . $this->_t(3) . "\$db->execute();";
$checkin .= PHP_EOL . $this->_t(3) . "if (\$db->getNumRows())";
$checkin .= PHP_EOL . $this->_t(3) . "{";
$checkin .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
. " Get Yesterdays date";
. " Get Yesterdays date.";
$checkin .= PHP_EOL . $this->_t(4)
. "\$date = JFactory::getDate()->modify(\$time)->toSql();";
$checkin .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__)
. " reset query";
. " Reset query.";
$checkin .= PHP_EOL . $this->_t(4) . "\$query = \$db->getQuery(true);";
$checkin .= PHP_EOL . PHP_EOL . $this->_t(4) . "//" . $this->setLine(
__LINE__
@ -21765,7 +21777,7 @@ class Interpretation extends Fields
$checkin .= PHP_EOL . $this->_t(4) . ");";
$checkin .= PHP_EOL . PHP_EOL . $this->_t(4) . "//" . $this->setLine(
__LINE__
) . " Check table";
) . " Check table.";
$checkin .= PHP_EOL . $this->_t(4)
. "\$query->update(\$db->quoteName('#__" . $component . "_" . $view
. "'))->set(\$fields)->where(\$conditions); ";

View File

@ -203,7 +203,7 @@ class ComponentbuilderModelAdmin_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -817,17 +817,19 @@ class ComponentbuilderModelAdmin_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_view'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -842,7 +844,7 @@ class ComponentbuilderModelAdmin_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_admin_view'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_custom_tabs'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_admin_custom_tabs'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_fields extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_fields extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_fields'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_fields extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_admin_fields'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_fields_conditions'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_admin_fields_conditions'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_fields_relations'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_admin_fields_relations'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelClass_extendings extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -323,17 +323,19 @@ class ComponentbuilderModelClass_extendings extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_class_extends'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -348,7 +350,7 @@ class ComponentbuilderModelClass_extendings extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_class_extends'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -118,7 +118,7 @@ class ComponentbuilderModelClass_methods extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -502,17 +502,19 @@ class ComponentbuilderModelClass_methods extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_class_method'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -527,7 +529,7 @@ class ComponentbuilderModelClass_methods extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_class_method'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -118,7 +118,7 @@ class ComponentbuilderModelClass_properties extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -498,17 +498,19 @@ class ComponentbuilderModelClass_properties extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_class_property'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -523,7 +525,7 @@ class ComponentbuilderModelClass_properties extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_class_property'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_admin_views'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_admin_views'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_config extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_config extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_config'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_config extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_config'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_custom_admin_menus'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_custom_admin_menus'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_custom_admin_views'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_custom_admin_views'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_dashboard'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_dashboard'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_files_folders'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_files_folders'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_modules extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_modules extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_modules'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_modules extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_modules'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_mysql_tweaks'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_mysql_tweaks'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_placeholders'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_placeholders'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_plugins extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_plugins extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_plugins'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_plugins extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_plugins'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_site_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_site_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_site_views'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_site_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_site_views'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelComponents_updates extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelComponents_updates extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_component_updates'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelComponents_updates extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_component_updates'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -187,7 +187,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -672,17 +672,19 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_custom_admin_view'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -697,7 +699,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_custom_admin_view'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -134,7 +134,7 @@ class ComponentbuilderModelCustom_codes extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -590,17 +590,19 @@ class ComponentbuilderModelCustom_codes extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_custom_code'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -615,7 +617,7 @@ class ComponentbuilderModelCustom_codes extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_custom_code'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -118,7 +118,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -503,17 +503,19 @@ class ComponentbuilderModelDynamic_gets extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_dynamic_get'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -528,7 +530,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_dynamic_get'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -214,7 +214,7 @@ class ComponentbuilderModelFields extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -858,17 +858,19 @@ class ComponentbuilderModelFields extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_field'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -883,7 +885,7 @@ class ComponentbuilderModelFields extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_field'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -126,7 +126,7 @@ class ComponentbuilderModelFieldtypes extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -467,17 +467,19 @@ class ComponentbuilderModelFieldtypes extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_fieldtype'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -492,7 +494,7 @@ class ComponentbuilderModelFieldtypes extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_fieldtype'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -133,7 +133,7 @@ class ComponentbuilderModelHelp_documents extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -506,17 +506,19 @@ class ComponentbuilderModelHelp_documents extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_help_document'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -531,7 +533,7 @@ class ComponentbuilderModelHelp_documents extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_help_document'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -2304,7 +2304,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -2756,17 +2756,19 @@ class ComponentbuilderModelJoomla_components extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_component'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -2781,7 +2783,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_component'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -118,7 +118,7 @@ class ComponentbuilderModelJoomla_modules extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -329,17 +329,19 @@ class ComponentbuilderModelJoomla_modules extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_module'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -354,7 +356,7 @@ class ComponentbuilderModelJoomla_modules extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_module'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelJoomla_modules_files_folders_urls extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelJoomla_modules_files_folders_urls extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_module_files_folders_urls'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelJoomla_modules_files_folders_urls extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_module_files_folders_urls'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelJoomla_modules_updates extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelJoomla_modules_updates extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_module_updates'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelJoomla_modules_updates extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_module_updates'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -269,17 +269,19 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_plugin_group'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -294,7 +296,7 @@ class ComponentbuilderModelJoomla_plugin_groups extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_plugin_group'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -288,7 +288,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -490,17 +490,19 @@ class ComponentbuilderModelJoomla_plugins extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_plugin'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -515,7 +517,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_plugin'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelJoomla_plugins_files_folders_urls extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelJoomla_plugins_files_folders_urls extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_plugin_files_folders_urls'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelJoomla_plugins_files_folders_urls extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_plugin_files_folders_urls'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelJoomla_plugins_updates extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelJoomla_plugins_updates extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_joomla_plugin_updates'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelJoomla_plugins_updates extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_joomla_plugin_updates'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -189,7 +189,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -676,17 +676,19 @@ class ComponentbuilderModelLanguage_translations extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_language_translation'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -701,7 +703,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_language_translation'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -233,7 +233,7 @@ class ComponentbuilderModelLanguages extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -514,17 +514,19 @@ class ComponentbuilderModelLanguages extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_language'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -539,7 +541,7 @@ class ComponentbuilderModelLanguages extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_language'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -126,7 +126,7 @@ class ComponentbuilderModelLayouts extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -485,17 +485,19 @@ class ComponentbuilderModelLayouts extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_layout'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -510,7 +512,7 @@ class ComponentbuilderModelLayouts extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_layout'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -134,7 +134,7 @@ class ComponentbuilderModelLibraries extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -418,17 +418,19 @@ class ComponentbuilderModelLibraries extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_library'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -443,7 +445,7 @@ class ComponentbuilderModelLibraries extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_library'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelLibraries_config extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelLibraries_config extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_library_config'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelLibraries_config extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_library_config'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -94,7 +94,7 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -240,17 +240,19 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_library_files_folders_urls'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -265,7 +267,7 @@ class ComponentbuilderModelLibraries_files_folders_urls extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_library_files_folders_urls'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelPlaceholders extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -395,17 +395,19 @@ class ComponentbuilderModelPlaceholders extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_placeholder'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -420,7 +422,7 @@ class ComponentbuilderModelPlaceholders extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_placeholder'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelServers extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -510,17 +510,19 @@ class ComponentbuilderModelServers extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_server'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -535,7 +537,7 @@ class ComponentbuilderModelServers extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_server'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -195,7 +195,7 @@ class ComponentbuilderModelSite_views extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -681,17 +681,19 @@ class ComponentbuilderModelSite_views extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_site_view'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -706,7 +708,7 @@ class ComponentbuilderModelSite_views extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_site_view'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelSnippet_types extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -269,17 +269,19 @@ class ComponentbuilderModelSnippet_types extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_snippet_type'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -294,7 +296,7 @@ class ComponentbuilderModelSnippet_types extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_snippet_type'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -248,7 +248,7 @@ class ComponentbuilderModelSnippets extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -576,17 +576,19 @@ class ComponentbuilderModelSnippets extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_snippet'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -601,7 +603,7 @@ class ComponentbuilderModelSnippets extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_snippet'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -126,7 +126,7 @@ class ComponentbuilderModelTemplates extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -485,17 +485,19 @@ class ComponentbuilderModelTemplates extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_template'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -510,7 +512,7 @@ class ComponentbuilderModelTemplates extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_template'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -110,7 +110,7 @@ class ComponentbuilderModelValidation_rules extends JModelList
*/
public function getItems()
{
// check in items
// Check in items
$this->checkInNow();
// load parent items
@ -393,17 +393,19 @@ class ComponentbuilderModelValidation_rules extends JModelList
// Get a db connection.
$db = JFactory::getDbo();
// reset query
// Reset query.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_validation_rule'));
$db->setQuery($query);
// Only select items that are checked out.
$query->where($db->quoteName('checked_out') . '!=0');
$db->setQuery($query, 0, 1);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
// Get Yesterdays date.
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
// Reset query.
$query = $db->getQuery(true);
// Fields to update.
@ -418,7 +420,7 @@ class ComponentbuilderModelValidation_rules extends JModelList
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
// Check table.
$query->update($db->quoteName('#__componentbuilder_validation_rule'))->set($fields)->where($conditions);
$db->setQuery($query);

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="4" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>21st January, 2022</creationDate>
<creationDate>2nd February, 2022</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>