mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2025-02-12 06:08:28 +00:00
Make it joomla 4 compatible (#362)
This commit is contained in:
parent
20b335d918
commit
f7519475f1
@ -38,6 +38,7 @@
|
|||||||
label="JCATEGORY"
|
label="JCATEGORY"
|
||||||
description="COM_WEBLINKS_FIELD_CATEGORY_DESC"
|
description="COM_WEBLINKS_FIELD_CATEGORY_DESC"
|
||||||
extension="com_weblinks"
|
extension="com_weblinks"
|
||||||
|
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
|
||||||
required="true"
|
required="true"
|
||||||
default=""
|
default=""
|
||||||
/>
|
/>
|
||||||
|
@ -38,9 +38,12 @@ class WeblinksTableWeblink extends JTable
|
|||||||
// Set the published column alias
|
// Set the published column alias
|
||||||
$this->setColumnAlias('published', 'state');
|
$this->setColumnAlias('published', 'state');
|
||||||
|
|
||||||
|
if (version_compare(JVERSION, '4.0', '<' ) == 1)
|
||||||
|
{
|
||||||
JTableObserverTags::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
|
JTableObserverTags::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
|
||||||
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
|
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overload the store method for the Weblinks table.
|
* Overload the store method for the Weblinks table.
|
||||||
@ -194,6 +197,6 @@ class WeblinksTableWeblink extends JTable
|
|||||||
$this->metakey = implode(", ", $clean_keys);
|
$this->metakey = implode(", ", $clean_keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return parent::check();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ class WeblinksViewWeblinks extends JViewLegacy
|
|||||||
$user = JFactory::getUser();
|
$user = JFactory::getUser();
|
||||||
|
|
||||||
// Get the toolbar object instance
|
// Get the toolbar object instance
|
||||||
$bar = JToolBar::getInstance('toolbar');
|
$bar = JToolbar::getInstance('toolbar');
|
||||||
|
|
||||||
JToolbarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINKS'), 'link weblinks');
|
JToolbarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINKS'), 'link weblinks');
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ class WeblinksViewWeblinks extends JViewLegacy
|
|||||||
if ($user->authorise('core.create', 'com_weblinks') && $user->authorise('core.edit', 'com_weblinks')
|
if ($user->authorise('core.create', 'com_weblinks') && $user->authorise('core.edit', 'com_weblinks')
|
||||||
&& $user->authorise('core.edit.state', 'com_weblinks'))
|
&& $user->authorise('core.edit.state', 'com_weblinks'))
|
||||||
{
|
{
|
||||||
JHtml::_('bootstrap.modal', 'collapseModal');
|
JHtml::_('bootstrap.renderModal', 'collapseModal');
|
||||||
$title = JText::_('JTOOLBAR_BATCH');
|
$title = JText::_('JTOOLBAR_BATCH');
|
||||||
|
|
||||||
// Instantiate a new JLayoutFile instance and render the batch button
|
// Instantiate a new JLayoutFile instance and render the batch button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user