From 649ecb1cbe2fbf24b05605d600a7090e577d4613 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+github@gmail.com>
Date: Thu, 19 Mar 2015 09:17:33 +0100
Subject: [PATCH] replace PluginEngine::getLink() with trails' own url_for()
 consistently in all views + some other small touchups

---
 views/approving/overview.php                 | 56 ++++++++--------
 views/approving/review.php                   |  2 +-
 views/extern/xml.php                         |  2 +-
 views/myplugins/edit.php                     |  2 +-
 views/myplugins/edit_images.php              |  2 +-
 views/myplugins/edit_release.php             |  2 +-
 views/myplugins/overview.php                 | 48 ++++++++------
 views/presenting/details.php                 | 22 +++---
 views/presenting/follow_release.php          |  4 +-
 views/presenting/overview_list.php           |  2 +-
 views/presenting/register_for_pluginnews.php |  2 +-
 views/presenting/review.php                  |  2 +-
 views/presenting/users_plugins.php           | 70 ++++++++++----------
 13 files changed, 111 insertions(+), 105 deletions(-)

diff --git a/views/approving/overview.php b/views/approving/overview.php
index 28ffb3a..9552cfa 100644
--- a/views/approving/overview.php
+++ b/views/approving/overview.php
@@ -7,35 +7,37 @@
     </tr>
     </thead>
     <tbody>
-    <? if (count($plugins)) : ?>
-        <? foreach ($plugins as $marketplugin) : ?>
-            <tr>
-                <td>
-                    <a href="<?= PluginEngine::getLink($plugin, array(), "presenting/details/".$marketplugin->getId()) ?>">
-                        <?= htmlReady($marketplugin['name']) ?>
-                    </a>
-                </td>
-                <td>
-                    <?
-                    $chdate = $marketplugin['chdate'];
-                    foreach ($marketplugin->releases as $release) {
-                        $chdate = max($chdate, $release['chdate']);
-                    }
-                    ?>
-                    <?= date("j.n.Y, G:i", $chdate) ?> <?= _("Uhr") ?>
-                </td>
-                <td>
-                    <a href="<?= PluginEngine::getLink($plugin, array(), "approving/review/".$marketplugin->getId()) ?>" data-dialog>
-                        <?= Assets::img("icons/20/blue/assessment") ?>
-                    </a>
-                </td>
-            </tr>
-        <? endforeach ?>
-    <? else : ?>
+<? if (count($plugins)) : ?>
+    <? foreach ($plugins as $marketplugin): ?>
         <tr>
-            <td colspan="2" style="text-align: center;"><?= _("Keine Plugins warten auf eine Qualit�tssicherung") ?></td>
+            <td>
+                <a href="<?= $controller->url_for('presenting/details/' . $marketplugin->getId()) ?>">
+                    <?= htmlReady($marketplugin['name']) ?>
+                </a>
+            </td>
+            <td>
+            <?
+                $chdate = $marketplugin['chdate'];
+                foreach ($marketplugin->releases as $release) {
+                    $chdate = max($chdate, $release['chdate']);
+                }
+            ?>
+                <?= date("j.n.Y, G:i", $chdate) ?> <?= _("Uhr") ?>
+            </td>
+            <td class="actions">
+                <a href="<?= $controller->url_for('approving/review/' . $marketplugin->getId()) ?>" data-dialog>
+                    <?= Assets::img("icons/20/blue/assessment") ?>
+                </a>
+            </td>
         </tr>
-    <? endif ?>
+    <? endforeach; ?>
+<? else: ?>
+        <tr>
+            <td colspan="2" style="text-align: center;">
+                <?= _("Keine Plugins warten auf eine Qualit�tssicherung") ?>
+            </td>
+        </tr>
+<? endif; ?>
     </tbody>
 </table>
 
diff --git a/views/approving/review.php b/views/approving/review.php
index abe20ab..345898d 100644
--- a/views/approving/review.php
+++ b/views/approving/review.php
@@ -1,4 +1,4 @@
-<form action="<?= PluginEngine::getLink($plugin, array(), "approving/approve/".$marketplugin->getId()) ?>" method="post" class="studip_form">
+<form action="<?= $controller->url_for('approving/approve/' . $marketplugin->getId()) ?>" method="post" class="studip_form">
     <fieldset>
         <legend>
             <?= _("Review schreiben") ?>
diff --git a/views/extern/xml.php b/views/extern/xml.php
index 60a5418..f92c2e9 100644
--- a/views/extern/xml.php
+++ b/views/extern/xml.php
@@ -12,7 +12,7 @@
             version="<?= htmlReady(studip_utf8encode($release['version'])) ?>"
             studipMinVersion="<?= htmlReady(studip_utf8encode($release['studip_min_version'])) ?>"
             studipMaxVersion="<?= htmlReady(studip_utf8encode($release['studip_min_version'])) ?>"
-            url="<?= htmlReady(studip_utf8encode($plugin->getStudipDomain().PluginEngine::getURL($plugin, array(), "presenting/download/".$release->getId()))) ?>"
+            url="<?= htmlReady(studip_utf8encode($plugin->getStudipDomain().$controller->url_for('presenting/download/' . $release->getId()))) ?>"
             />
         <? endforeach ?>
     </plugin>
diff --git a/views/myplugins/edit.php b/views/myplugins/edit.php
index 41f1b8e..3dffcb6 100644
--- a/views/myplugins/edit.php
+++ b/views/myplugins/edit.php
@@ -1,4 +1,4 @@
-<form action="<?= PluginEngine::getLink($plugin, array(), "myplugins/save") ?>" method="post" class="studip_form" enctype="multipart/form-data">
+<form action="<?= $controller->url_for('myplugins/save') ?>" method="post" class="studip_form" enctype="multipart/form-data">
     <input type="hidden" name="id" value="<?= $marketplugin->getId() ?>">
     <fieldset>
         <legend>
diff --git a/views/myplugins/edit_images.php b/views/myplugins/edit_images.php
index bad18cd..67da92a 100644
--- a/views/myplugins/edit_images.php
+++ b/views/myplugins/edit_images.php
@@ -1,4 +1,4 @@
-<form action="<?= PluginEngine::getLink($plugin, array(), "myplugins/save") ?>" method="post" enctype="multipart/form-data" class="studip_form">
+<form action="<?= $controller->url_for('myplugins/save') ?>" method="post" enctype="multipart/form-data" class="studip_form">
     <input type="hidden" name="id" value="<?= $marketplugin->getId() ?>">
     <?= $this->render_partial("myplugins/_edit_images.php", compact("marketplugin")) ?>
 
diff --git a/views/myplugins/edit_release.php b/views/myplugins/edit_release.php
index 5122f3a..ca91682 100644
--- a/views/myplugins/edit_release.php
+++ b/views/myplugins/edit_release.php
@@ -1,4 +1,4 @@
-<form action="<?= PluginEngine::getLink($plugin, array(), "myplugins/save_release") ?>" method="post" class="studip_form" enctype="multipart/form-data">
+<form action="<?= $controller->url_for('myplugins/save_release') ?>" method="post" class="studip_form" enctype="multipart/form-data">
     <input type="hidden" name="id" value="<?= $release->getId() ?>">
     <input type="hidden" name="plugin_id" value="<?= $marketplugin->getId() ?>">
     <?= $this->render_partial("myplugins/_edit_release.php", array('release' => $release)) ?>
diff --git a/views/myplugins/overview.php b/views/myplugins/overview.php
index 3ffbf51..4beadd2 100644
--- a/views/myplugins/overview.php
+++ b/views/myplugins/overview.php
@@ -1,4 +1,3 @@
-
 <table class="default">
     <thead>
         <tr>
@@ -9,42 +8,48 @@
         </tr>
     </thead>
     <tbody>
-        <? if (count($plugins)) : ?>
-        <? foreach ($plugins as $marketplugin) : ?>
+<? if (count($plugins)):  ?>
+    <? foreach ($plugins as $marketplugin): ?>
         <tr>
             <td>
-                <? if ($marketplugin['publiclyvisible'] && !$marketplugin['approved']) : ?>
-                    <?= Assets::img("icons/20/red/exclaim-circle", array('title' => _("Plugin wurde noch nicht von einem Administrator freigeschaltet."), 'class' => "text-bottom")) ?>
-                <? endif ?>
-                <a href="<?= PluginEngine::getLink($plugin, array(), "presenting/details/".$marketplugin->getId()) ?>">
+            <? if ($marketplugin['publiclyvisible'] && !$marketplugin['approved']) : ?>
+                <?= Assets::img("icons/20/red/exclaim-circle", array('title' => _("Plugin wurde noch nicht von einem Administrator freigeschaltet."), 'class' => "text-bottom")) ?>
+            <? endif; ?>
+                <a href="<?= $controller->url_for('presenting/details/' . $marketplugin->getId()) ?>">
                     <?= htmlReady($marketplugin['name']) ?>
                 </a>
             </td>
             <td>
-                <?
+            <?
                 $chdate = $marketplugin['chdate'];
                 foreach ($marketplugin->releases as $release) {
                     $chdate = max($chdate, $release['chdate']);
                 }
-                ?>
+            ?>
                 <?= date("j.n.Y, G:i", $chdate) ?> <?= _("Uhr") ?>
             </td>
             <td>
-                <? if (!$marketplugin['publiclyvisible']) :  ?>
-                    <?= Assets::img("icons/20/grey/lock-locked.png.png", array('title' => _("Plugin ist nicht �ffentlich"))) ?>
-                <? endif ?>
+            <? if (!$marketplugin['publiclyvisible']) :  ?>
+                <?= Assets::img("icons/20/grey/lock-locked.png.png", array('title' => _("Plugin ist nicht �ffentlich"))) ?>
+            <? endif ?>
             </td>
-            <td>
-                <a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/edit/".$marketplugin->getId()) ?>" data-dialog title="<?= _("Plugin-Info bearbeiten") ?>"><?= Assets::img("icons/20/blue/edit") ?></a>
-                <a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/add_release/".$marketplugin->getId()) ?>" data-dialog title="<?= _("Neues Release hinzuf�gen") ?>"><?= Assets::img("icons/20/blue/add") ?></a>
+            <td class="actions">
+                <a href="<?= $controller->url_for('myplugins/edit/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Plugin-Info bearbeiten") ?>">
+                    <?= Assets::img('icons/20/blue/edit') ?>
+                </a>
+                <a href="<?= $controller->url_for('myplugins/add_release/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Neues Release hinzuf�gen") ?>">
+                    <?= Assets::img("icons/20/blue/add") ?>
+                </a>
             </td>
         </tr>
-        <? endforeach ?>
-        <? else : ?>
+    <? endforeach; ?>
+<? else: ?>
         <tr>
-            <td colspan="4" style="text-align: center;"><?= _("Sie haben noch kein Plugin eingestellt.") ?></td>
+            <td colspan="4" style="text-align: center;">
+                <?= _("Sie haben noch kein Plugin eingestellt.") ?>
+            </td>
         </tr>
-        <? endif ?>
+<? endif; ?>
     </tbody>
 </table>
 
@@ -53,8 +58,7 @@ $sidebar = Sidebar::Get();
 $sidebar->setImage(Assets::image_path("sidebar/plugin-sidebar.png"));
 $actions = new ActionsWidget();
 $actions->addLink(_("Neues Plugin eintragen"),
-                  PluginEngine::getURL($plugin, array(), "myplugins/add"),
-                  'icons/16/blue/add.png',
-                  array('data-dialog' => 1));
+                  $controller->url_for('myplugins/add'),
+                  'icons/16/blue/add.png')->asDialog();
 $sidebar->addWidget($actions);
 
diff --git a/views/presenting/details.php b/views/presenting/details.php
index ba2f078..1d0ff3b 100644
--- a/views/presenting/details.php
+++ b/views/presenting/details.php
@@ -29,7 +29,7 @@ if ($icon) {
     </div>
     <? endforeach ?>
     <? if ($marketplugin->isWritable()) : ?>
-    <div><a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/edit_images/".$marketplugin->getId()) ?>" data-dialog title="<?= _("Galerie bearbeiten / neue Bilder hinzuf�gen") ?>"><?= Assets::img("icons/20/blue/add") ?></a></div>
+    <div><a href="<?= $controller->url_for('myplugins/edit_images/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Galerie bearbeiten / neue Bilder hinzuf�gen") ?>"><?= Assets::img("icons/20/blue/add") ?></a></div>
     <? endif ?>
 </ol>
 <? endif ?>
@@ -101,7 +101,7 @@ if ($icon) {
     <? foreach ($marketplugin->releases as $release) : ?>
         <tr>
             <td>
-                <a href="<?= PluginEngine::getLink($plugin, array(), "presenting/download/".$release->getId()) ?>" title="<?= _("Dieses Release runterladen") ?>">
+                <a href="<?= $controller->url_for('presenting/download/' . $release->getId()) ?>" title="<?= _("Dieses Release runterladen") ?>">
                     <?= Assets::img("icons/20/blue/download", array('class' => "text-bottom")) ?>
                     <?= htmlReady($release['version']) ?>
                 </a>
@@ -110,14 +110,14 @@ if ($icon) {
             <td><?= $release['studip_max_version'] ? htmlReady($release['studip_max_version']) : " - " ?></td>
             <td><?= htmlReady($release->getChecksum()) ?></td>
             <td><?= htmlReady($release['downloads']) ?></td>
-            <td>
+            <td class="actions">
                 <? if ($marketplugin->isWritable()) : ?>
-                    <a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/edit_release/".$release->getId()) ?>" data-dialog>
+                    <a href="<?= $controller->url_for('myplugins/edit_release/' . $release->getId()) ?>" data-dialog>
                         <?= Assets::img("icons/20/blue/edit", array('class' => "text-bottom")) ?>
                     </a>
                 <? endif ?>
                 <? if ($GLOBALS['perm']->have_perm("autor")) : ?>
-                    <a href="<?= PluginEngine::getLink($plugin, array(), "presenting/follow_release/".$release->getId()) ?>" title="<?= _("F�r automatische Updates registrieren.") ?>" data-dialog>
+                    <a href="<?= $controller->url_for('presenting/follow_release/' . $release->getId()) ?>" title="<?= _("F�r automatische Updates registrieren.") ?>" data-dialog>
                         <?= Assets::img("icons/20/blue/rss", array('class' => "text-bottom")) ?>
                     </a>
                 <? endif ?>
@@ -129,7 +129,7 @@ if ($icon) {
         <tfoot>
         <tr>
             <td colspan="6">
-                <a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/add_release/".$marketplugin->getId()) ?>" data-dialog>
+                <a href="<?= $controller->url_for('myplugins/add_release/' . $marketplugin->getId()) ?>" data-dialog>
                     <?= Assets::img("icons/20/blue/add") ?>
                 </a>
             </td>
@@ -203,7 +203,7 @@ if ($icon) {
         <div style="text-align: center;">
             <? $score = $marketplugin->getRating() ?>
             <? if ($score === null) : ?>
-                <a style="opacity: 0.3;" title="<?= $GLOBALS['perm']->have_perm("autor") ? _("Geben Sie die erste Bewertung ab.") : _("Noch keine bewertung abgegeben.") ?>" <?= ($GLOBALS['perm']->have_perm("autor") && !$marketplugin->isWritable()) ? 'href="'.PluginEngine::getLink($plugin, array(), "presenting/review/".$marketplugin->getId()).'" data-dialog' : "" ?>>
+                <a style="opacity: 0.3;" title="<?= $GLOBALS['perm']->have_perm("autor") ? _("Geben Sie die erste Bewertung ab.") : _("Noch keine bewertung abgegeben.") ?>" <?= ($GLOBALS['perm']->have_perm("autor") && !$marketplugin->isWritable()) ? 'href="' . $controller->url_for('presenting/review/' . $marketplugin->getId()) . '" data-dialog' : "" ?>>
                     <?= Assets::img($plugin->getPluginURL()."/assets/star.svg", array('width' => "50px")) ?>
                     <?= Assets::img($plugin->getPluginURL()."/assets/star.svg", array('width' => "50px")) ?>
                     <?= Assets::img($plugin->getPluginURL()."/assets/star.svg", array('width' => "50px")) ?>
@@ -211,7 +211,7 @@ if ($icon) {
                     <?= Assets::img($plugin->getPluginURL()."/assets/star.svg", array('width' => "50px")) ?>
                 </a>
             <? else : ?>
-                <a <?= ($GLOBALS['perm']->have_perm("autor") && !$marketplugin->isWritable()) ? 'href="'.PluginEngine::getLink($plugin, array(), "presenting/review/".$marketplugin->getId()).'" data-dialog' : "" ?> title="<?= sprintf(_("%s von 5 Sternen"), round($score / 2, 1)) ?>">
+                <a <?= ($GLOBALS['perm']->have_perm("autor") && !$marketplugin->isWritable()) ? 'href="' . $controller->url_for('presenting/review/' . $marketplugin->getId()) . '" data-dialog' : "" ?> title="<?= sprintf(_("%s von 5 Sternen"), round($score / 2, 1)) ?>">
                     <? $score = round($score, 1) / 2 ?>
                     <? $v = $score >= 1 ? 3 : ($score >= 0.5 ? 2 : "") ?>
                     <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "50px")) ?>
@@ -260,11 +260,11 @@ if ($icon) {
 
 <div style="text-align: center">
 <? if ($marketplugin->isWritable()) : ?>
-    <?= \Studip\LinkButton::create(_("bearbeiten"), PluginEngine::getURL($plugin, array(), "myplugins/edit/".$marketplugin->getId()), array('data-dialog' => 1)) ?>
-    <?= \Studip\LinkButton::create(_("Release hinzuf�gen"), PluginEngine::getURL($plugin, array(), "myplugins/add_release/".$marketplugin->getId()), array('data-dialog' => 1)) ?>
+    <?= \Studip\LinkButton::create(_("bearbeiten"), $controller->url_for('myplugins/edit/' . $marketplugin->getId()), array('data-dialog' => 1)) ?>
+    <?= \Studip\LinkButton::create(_("Release hinzuf�gen"), $controller->url_for('myplugins/add_release/' . $marketplugin->getId()), array('data-dialog' => 1)) ?>
 <? endif ?>
 <? if ($marketplugin['user_id'] !== $GLOBALS['user']->id) : ?>
-    <?= \Studip\LinkButton::create(_("Plugin abonnieren"), PluginEngine::getURL($plugin, array(), "presenting/register_for_pluginnews/".$marketplugin->getId()), array('title' => _("Neuigkeiten des Plugins per Nachricht bekommen."), 'data-dialog' => "1")) ?>
+    <?= \Studip\LinkButton::create(_("Plugin abonnieren"), $controller->url_for('presenting/register_for_pluginnews/' . $marketplugin->getId()), array('title' => _("Neuigkeiten des Plugins per Nachricht bekommen."), 'data-dialog' => "1")) ?>
 <? endif ?>
 <? if ($marketplugin->isRootable()) : ?>
     <form action="?" method="post" style="display: inline-block; margin: 0px;">
diff --git a/views/presenting/follow_release.php b/views/presenting/follow_release.php
index 25fb1c5..1e8bee6 100644
--- a/views/presenting/follow_release.php
+++ b/views/presenting/follow_release.php
@@ -1,7 +1,7 @@
 <? foreach (PageLayout::getMessages() as $message) : ?>
     <?= $message ?>
 <? endforeach ?>
-<form action="<?= PluginEngine::getLink($plugin, array(), "presenting/follow_release/".$release->getId()) ?>" method="post" data-dialog class="studip_form">
+<form action="<?= $controller->url_for('presenting/follow_release/' . $release->getId()) ?>" method="post" data-dialog class="studip_form">
     <p class="info">
         <?= _("Immer aktuell bleiben mit automatischen Updates! Sie finden in Ihrem eigenen Stud.IP in der Pluginverwaltung rechts neben dem Plugin ein Icon, das Sie zu einem Popup f�hrt. Geben Sie dort die unten stehende Download-URL ein und geben Sie hier die URL ein, die Sie danach dort in Ihrer Pluginverwaltung sehen. Sind beide Systeme korrekt konfiguriert, wird der Marktplatz dann eine jede neue Version dieses Releases automatisch in ihrem Stud.IP installieren.") ?>
     </p>
@@ -9,7 +9,7 @@
         <legend><?= _("Konfigurieren Sie Ihr Stud.IP") ?></legend>
         <label>
             <?= _("Download-URL - geben Sie diese URL in Ihrem Stud.IP in der Pluginverwaltung ein") ?>
-            <input type="text" readonly value="<?= $plugin->getStudipDomain().PluginEngine::getLink($plugin, array(), "presenting/download/".$release->getId()) ?>">
+            <input type="text" readonly value="<?= $plugin->getStudipDomain() . $controller->url_for('presenting/download/' . $release->getId()) ?>">
         </label>
     </fieldset>
     <fieldset>
diff --git a/views/presenting/overview_list.php b/views/presenting/overview_list.php
index 733bda1..13f7c73 100644
--- a/views/presenting/overview_list.php
+++ b/views/presenting/overview_list.php
@@ -19,7 +19,7 @@
         <? foreach ($plugins as $marketplugin): ?>
             <tr>
                 <td data-sort="<?= htmlReady($marketplugin->name) ?>">
-                    <a href="<?= PluginEngine::getLink($plugin, array(), "presenting/details/" . $marketplugin->getId()) ?>">
+                    <a href="<?= $controller->url_for('presenting/details/' . $marketplugin->getId()) ?>">
                         <?= htmlReady($marketplugin->name) ?>
                     </a>
                 </td>
diff --git a/views/presenting/register_for_pluginnews.php b/views/presenting/register_for_pluginnews.php
index e305dfc..7b97a12 100644
--- a/views/presenting/register_for_pluginnews.php
+++ b/views/presenting/register_for_pluginnews.php
@@ -2,7 +2,7 @@
     <?= $message ?>
 <? endforeach ?>
 
-<form action="<?= PluginEngine::getLink($plugin, array(), "presenting/register_for_pluginnews/".$marketplugin->getId()) ?>" method="post" class="studipform" data-dialog>
+<form action="<?= $controller->url_for('presenting/register_for_pluginnews/' . $marketplugin->getId()) ?>" method="post" class="studipform" data-dialog>
     <?= MessageBox::info(sprintf(_("Durch das Abonnieren des Plugins %s erhalten Sie Stud.IP-Nachrichten, wenn neue Releases hochgeladen werden."), $marketplugin['name'])) ?>
     <div style="text-align: center">
         <? if (MarketPluginFollower::findByUserAndPlugin($GLOBALS['user']->id, $marketplugin->getId())) : ?>
diff --git a/views/presenting/review.php b/views/presenting/review.php
index 79954bb..0d01c93 100644
--- a/views/presenting/review.php
+++ b/views/presenting/review.php
@@ -1,4 +1,4 @@
-<form action="<?= PluginEngine::getLink($plugin, array(), "presenting/save_review/".$review['plugin_id']) ?>" method="post" class="studip_form">
+<form action="<?= $controller->url_for('presenting/save_review/' . $review['plugin_id']) ?>" method="post" class="studip_form">
     <fieldset>
         <legend>
             <?= _("Bewertung") ?>
diff --git a/views/presenting/users_plugins.php b/views/presenting/users_plugins.php
index d6e1b34..40cdf8a 100644
--- a/views/presenting/users_plugins.php
+++ b/views/presenting/users_plugins.php
@@ -1,38 +1,38 @@
 <table class="default">
-    <? foreach ($plugins as $marketplugin) : ?>
-        <tr>
-            <td>
-                <a href="<?= PluginEngine::getLink($plugin, array(), "presenting/details/".$marketplugin->getId()) ?>">
-                    <?= htmlReady($marketplugin['name']) ?>
+<? foreach ($plugins as $marketplugin): ?>
+    <tr>
+        <td>
+            <a href="<?= $controller->url_for('presenting/details/' . $marketplugin->getId()) ?>">
+                <?= htmlReady($marketplugin['name']) ?>
+            </a>
+        </td>
+        <td>
+            <? $score = $marketplugin->getRating() ?>
+            <? $score = round($score, 1) / 2 ?>
+            <span class="starscore">
+                <? $v = $score >= 1 ? 3 : ($score >= 0.5 ? 2 : "") ?>
+                <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?>
+                <? $v = $score >= 2 ? 3 : ($score >= 1.5 ? 2 : "") ?>
+                <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?>
+                <? $v = $score >= 3 ? 3 : ($score >= 2.5 ? 2 : "") ?>
+                <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?>
+                <? $v = $score >= 4 ? 3 : ($score >= 3.5 ? 2 : "") ?>
+                <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?>
+                <? $v = $score > 4.5 ? 3 : ($score >= 4.5 ? 2 : "") ?>
+                <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?>
+            </span>
+        </td>
+        <td>
+            <div style="max-height: 20px; overflow: hidden;">
+            <? foreach ($marketplugin->getTags() as $key => $tag): ?>
+                <?= $key > 0 ? "," : "" ?>
+                <a href="<?= $controller->url_for('presenting/all', compact('tag')) ?>">
+                    <?= Assets::img("icons/16/blue/tag", array('class' => "text-bottom")) ?>
+                    <?= htmlReady(ucwords($tag)) ?>
                 </a>
-            </td>
-            <td>
-                <? $score = $marketplugin->getRating() ?>
-                <? $score = round($score, 1) / 2 ?>
-                <span class="starscore">
-                    <? $v = $score >= 1 ? 3 : ($score >= 0.5 ? 2 : "") ?>
-                    <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?>
-                    <? $v = $score >= 2 ? 3 : ($score >= 1.5 ? 2 : "") ?>
-                    <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?>
-                    <? $v = $score >= 3 ? 3 : ($score >= 2.5 ? 2 : "") ?>
-                    <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?>
-                    <? $v = $score >= 4 ? 3 : ($score >= 3.5 ? 2 : "") ?>
-                    <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?>
-                    <? $v = $score > 4.5 ? 3 : ($score >= 4.5 ? 2 : "") ?>
-                    <?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?>
-                </span>
-            </td>
-            <td>
-                <div style="max-height: 20px; overflow: hidden;">
-                    <? foreach ($marketplugin->getTags() as $key => $tag) : ?>
-                        <?= $key > 0 ? "," : "" ?>
-                        <a href="<?= URLHelper::getLink("plugins.php/pluginmarket/presenting/all", array('tag' => $tag)) ?>">
-                            <?= Assets::img("icons/16/blue/tag", array('class' => "text-bottom")) ?>
-                            <?= htmlReady(ucwords($tag)) ?>
-                        </a>
-                    <? endforeach ?>
-                </div>
-            </td>
-        </tr>
-    <? endforeach ?>
+            <? endforeach; ?>
+            </div>
+        </td>
+    </tr>
+<? endforeach; ?>
 </table>
\ No newline at end of file
-- 
GitLab