30
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-09-28 21:19:07 +00:00

Make it joomla 4 compatible

This commit is contained in:
Allon Moritz 2017-08-31 15:19:37 +02:00
parent 84a98f9718
commit f38c613dfc
3 changed files with 7 additions and 4 deletions

View File

@ -35,6 +35,7 @@
<field
name="catid"
type="categoryedit"
addfieldprefix="Joomla\Component\Categories\Administrator\Field"
extension="com_weblinks"
label="JCATEGORY"
description="COM_WEBLINKS_FIELD_CATEGORY_DESC"

View File

@ -38,8 +38,11 @@ class WeblinksTableWeblink extends JTable
// Set the published column alias
$this->setColumnAlias('published', 'state');
JTableObserverTags::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
if (version_compare(JVERSION, '4.0', '<' ) == 1)
{
JTableObserverTags::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_weblinks.weblink'));
}
}
/**

View File

@ -67,7 +67,7 @@ class WeblinksViewWeblinks extends JViewLegacy
$user = JFactory::getUser();
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
$bar = JToolbar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINKS'), 'link weblinks');
@ -103,7 +103,6 @@ class WeblinksViewWeblinks extends JViewLegacy
if ($user->authorise('core.create', 'com_weblinks') && $user->authorise('core.edit', 'com_weblinks')
&& $user->authorise('core.edit.state', 'com_weblinks'))
{
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('JTOOLBAR_BATCH');
// Instantiate a new JLayoutFile instance and render the batch button