mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-12-26 18:10:11 +00:00
Allow DI of database object (see https://github.com/joomla/joomla-cms/pull/4992)
This commit is contained in:
parent
e2c472aca8
commit
cc7b6f5602
@ -248,7 +248,7 @@ class WeblinksModelWeblink extends JModelAdmin
|
|||||||
// Set ordering to the last item if not set
|
// Set ordering to the last item if not set
|
||||||
if (empty($table->ordering))
|
if (empty($table->ordering))
|
||||||
{
|
{
|
||||||
$db = JFactory::getDbo();
|
$db = $this->getDbo();
|
||||||
$query = $db->getQuery(true)
|
$query = $db->getQuery(true)
|
||||||
->select('MAX(ordering)')
|
->select('MAX(ordering)')
|
||||||
->from($db->quoteName('#__weblinks'));
|
->from($db->quoteName('#__weblinks'));
|
||||||
|
Loading…
Reference in New Issue
Block a user