Skip to content

Commit 2be82b4

Browse files
committed
Fixing categories view and adding updateserver
1 parent d05b83f commit 2be82b4

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

classes/contactrouter.php

+6
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ public function getCategorySegment($id, $query)
5959
if ($category)
6060
{
6161
$path = array_reverse($category->getPath(), true);
62+
63+
if (!count($path))
64+
{
65+
$path[$category->id] = $category->slug;
66+
}
67+
6268
$path[0] = '1:root';
6369

6470
if ($this->noIDs)

classes/contentrouter.php

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ public function getCategorySegment($id, $query)
6161
if ($category)
6262
{
6363
$path = array_reverse($category->getPath(), true);
64+
65+
if (!count($path))
66+
{
67+
$path[$category->id] = $category->slug;
68+
}
69+
6470
$path[0] = '1:root';
6571

6672
if ($this->noIDs)

classes/newsfeedrouter.php

+6
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ public function getCategorySegment($id, $query)
5757
if ($category)
5858
{
5959
$path = array_reverse($category->getPath(), true);
60+
61+
if (!count($path))
62+
{
63+
$path[$category->id] = $category->slug;
64+
}
65+
6066
$path[0] = '1:root';
6167

6268
if ($this->noIDs)

jlrouter.xml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
88
<authorEmail>info@joomlager.de</authorEmail>
99
<authorUrl>www.joomlager.de</authorUrl>
10-
<version>1.0.0</version>
10+
<version>1.1.0</version>
1111
<description>PLG_SYSTEM_JLROUTER_XML_DESCRIPTION</description>
1212
<files>
1313
<filename plugin="jlrouter">jlrouter.php</filename>
1414
<folder>classes</folder>
1515
<folder>language</folder>
1616
</files>
17+
<updateservers>
18+
<server name="Joomlager Router" type="collection">https://www.joomlager.de/updates/updates.xml</server>
19+
</updateservers>
1720
<config>
1821
<fields name="params">
1922
<fieldset name="basic">

0 commit comments

Comments
 (0)