This version corrects the Admin issue introduced by V4.4. V4.4.1 is available through the Joomla Updater or for download through your My Downloads area of our website.
Turns out a code change intended for our 5.0dev branch inadvertantly got pushed to the 4.x branch (by me, duh!). The javascript structure in 5.0 will change considerably and part of that change took effect with the inadvertant code change.
We have reverted the code change and released 4.4.1. V4.4 has been retracted.
Sorry for any inconvenience.
See the details here
$myDb = Factory::getContainer()->get('DatabaseDriver');
// Get a db connection.
$myDb = Factory::getContainer()->get('DatabaseDriver');
// Create a new query object.
$myQuery = $myDb->getQuery(true);
$myQuery
->select(array('fieldA', 'fieldB'));
->from('tablename')
->where('fieldC = ' . $myDb->quote('value'));
// Assign the query to the db
$myDb->setQuery($myQuery);
// Load the results as an array of objects.
$rows = $myDb->loadObjectList();
// Get a db connection.
$myDb = version_compare(\Joomla\CMS\Version::MAJOR_VERSION, "4", ">=") ? Factory::getContainer()->get('DatabaseDriver') : Factory::getDbo();
// Create a new query object.
$myQuery = $myDb->getQuery(true);
$myQuery
->select(array('fieldA', 'fieldB'))
->from('tablename')
->where('fieldC = ' . $myDb->quote('value'));
// Assign the query to the db
$myDb->setQuery($myQuery);
// Load the results as an array of objects.
$rows = $myDb->loadObjectList();
// Get a db connection.
$myDb = JFactory::getDbo();
// Create a new query object.
$myQuery = $myDb->getQuery(true);
$myQuery
->select(array('fieldA', 'fieldB'))
->from('tablename')
->where('fieldC = ' . $myDb->quote('value'));
// Assign the query to the db
$myDb->setQuery($myQuery);
// Load the results as an array of objects.
$rows = $myDb->loadObjectList();
$list = array();
foreach ($rows as $row)
{
$list[] = "<li>" . $row->fieldA . " " . $row->fieldB . "</li>";
}
return "<ol>" . implode($list) . "</ol>";
$myDb = version_compare(\Joomla\CMS\Version::MAJOR_VERSION, "4", ">=") ? Factory::getContainer()->get('DatabaseDriver') : Factory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select(array('fieldA', 'fieldB'))
->from('tablename')
->where('fieldC = ' . $myDb->quote('value'));
$myDb->setQuery($myQuery);
$row = $myDb->LoadObject();
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select(array('fieldA', 'fieldB'))
->from('tablename')
->where('fieldC = ' . $myDb->quote('value'));
$myDb->setQuery($myQuery);
$row = $myDb->LoadObject();
$row = $listModel->getRow($rowId);
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select('fieldA')
->from('tablename')
->where('fieldC = ' . $myDb->quote('value'));
$myDb->setQuery($myQuery);
$fieldA = $myDb->loadResult();
return $fieldA;
// Get a db connection.
$myDb = version_compare(\Joomla\CMS\Version::MAJOR_VERSION, "4", ">=") ? Factory::getContainer()->get('DatabaseDriver') : Factory::getDbo();
// Create a new query object.
$myQuery = $myDb->getQuery(true);
// Insert columns.
$columns = array('fieldA', 'FieldB');
// Insert values.
$values = array('1', '2');
// Prepare the insert query.
$myQuery
->insert($myDb->quoteName('tablename'))
->columns($myDb->quoteName($columns))
->values(implode(',', $myDb->quote($values)));
// Reset the query using our newly populated query object.
$myDb->setQuery($myQuery);
try {
// Execute the query
$result = $myDb->execute();
//use $myDb->query() in Joomla2.5
}
catch (Exception $e) {
// catch any database errors.
}
$newid = (int)$myDb->insertid(); //get new record id
$IDinput = '{rowid}';
// Get the db object
//$myDb = JFactory::getDbo();// for Joomla 3
$myDb = version_compare(\Joomla\CMS\Version::MAJOR_VERSION, "4", ">=") ? Factory::getContainer()->get('DatabaseDriver') : Factory::getDbo();// for Joomla 4+
// Build the query ? Tables names = CASE SENSITIVE
$myQuery = $myDb->getQuery(true);
$myQuery
-> update('contacts AS c')
-> join('INNER','contactsstatus AS s ON s.Status = \'New\'')
-> set('c.Status = s.id')
-> where('c.id = '. (int) $IDinput);
$myDb->setQuery($myQuery);
// Run the query
$found = (int) $myDb->execute();
//use $myDb->query() in Joomla2.5
$myDb = FabrikWorker::getDbo(false, 2);
// Fabrik 3.1
$listModel = JModelLegacy::getInstance('List', 'FabrikFEModel');
// Fabrik 3.0
$listModel = JModel::getInstance('List', 'FabrikFEModel');
$listModel->setId(1);
$data = $listModel->getData();
// Get params
$params = $listModel->getParams();
JModel::addIncludePath(JPATH_SITE . '/components/com_fabrik/models');
$row = $listModel->getRow($rowid);
$user = Joomla\CMS\Factory::getApplication()->getIdentity();
$user = JFactory::getUser();
$userid = $user->get('id');
$name = $user->get('name');
$username = $user->get('username');
$email = $user->get('email');
use Joomla\CMS\Factory;
$user = \Joomla\CMS\Factory::getApplication()->getSession()->get('user');
$customFields = FieldsHelper::getFields('com_users.user', $user, 0);
foreach ($customFields as $field) {
echo '$field=' . $field->name . '<br>';
echo '$value=' . $field->value . '<br>';
echo '<br>--<br>';
}
$user = Joomla\CMS\Factory::getApplication()->getIdentity();
$Groups = $user->getAuthorisedGroups();
$user = Joomla\CMS\Factory::getApplication()->getIdentity();
$myViewLevels = $user->getAuthorisedViewLevels();
//not tested for Joomla 4
$myApp = JFactory::getApplication();
$myparam= $myApp->input->get('urlparam');
$myApp = JFactory::getApplication();
$date= $myApp->input->getString('tablename___dateelement');
$date = strtotime($date);
$now = time();
$diff = $now - $date;
$years = floor($diff / 31556926);
return ($years >= 18 && $years <= 90);
$nowdate = strtotime("{table___element}");
$thendate = strtotime("today");
$datediff = ($thendate - $nowdate);
$diff = round($datediff / 86400);
return $diff;
$cond1 = ('{table___element}' == 'X');
$nowdate = strtotime("{table___element}");
$thendate = strtotime("today");
$datediff = ($thendate - $nowdate);
$diff = round($datediff / 86400);
$cond2 = ($diff == X);
return $cond1 <> $cond2;
$date1 = strtotime("{table___update_raw}");
$date2 = strtotime("{table___createdate_raw}");
$date2 = strtotime("+16 day", $date2);
return $date1 > $date2;
$query->setQuery('SELECT date_format(date, "%d %M %Y", "fr_FR") as frenchdate FROM table_name WHERE my_condition = X');
{thistable}.view_level IN (SELECT DISTINCT `#__viewlevels`.`id`
FROM #__user_usergroup_map
LEFT JOIN #__viewlevels ON REPLACE(REPLACE(rules,'[',','),']',',') LIKE CONCAT('%,',`group_id`,',%')
WHERE user_id ='{$my->id}')
/**
* Function to send an email
*
* @param string $from From email address
* @param string $fromName From name
* @param mixed $recipient Recipient email address(es)
* @param string $subject email subject
* @param string $body Message body
* @param boolean $mode false = plain text, true = HTML
* @param mixed $cc CC email address(es)
* @param mixed $bcc BCC email address(es)
* @param mixed $attachment Attachment file name(s)
* @param mixed $replyTo Reply to email address(es)
* @param mixed $replyToName Reply to name(s)
* @param array $headers Optional custom headers, assoc array keyed by header name
*
* @return boolean True on success
*
* @since 11.1
*/
public static function sendMail($from, $fromName, $recipient, $subject, $body, $mode = false,
$cc = null, $bcc = null, $attachment = null, $replyTo = null, $replyToName = null, $headers = array())