[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: www/sites/www/applications
From: Harald Sitter <null () kde ! org>
Date: 2018-03-12 12:28:09
Message-ID: E1evMYj-0003d6-HD () code ! kde ! org
[Download RAW message or body]
SVN commit 1512197 by sitter:
repair the back to overview logic
- get name from appstream id as standardized identifier
- drop now useless nametourl helper
- back to category is now a heredoc to aid in reading
M +7 -8 applicationpage.php
--- trunk/www/sites/www/applications/applicationpage.php #1512196:1512197
@@ -2,11 +2,6 @@
// error_reporting(E_ALL);
// ini_set('display_errors', 1);
-function nameToUrl($s)
-{
- return str_replace(' ', '', strtolower($s));
-}
-
include 'includes/class_appdata2.inc';
$app = new AppData2($_GET['application']);
$category = $_GET['category'];
@@ -28,10 +23,14 @@
$content .= '<div id="infobox-return">';
if ($backToOverview) {
-// print '<a \
href="/applications/'.strtolower($app->category()).'/'.strtolower($app->name()).'"><img \
src="/images/icons/'.strtolower($app->name()).'_22.png" alt="" />Back to \
'.$app->name().'</a>';
- $content .= '<a \
href="/applications/'.$category.'/'.nameToUrl($app->name()).'">Back to overview</a>'; \
+ $content .= '<a \
href="/applications/'.$category.'/'.$app->AppStreamId().'">Back to overview</a>'; } \
else {
- $content .= '<a href="/applications/'.$category.'"><img width="22" \
height="22" id="infobox-overviewicon" \
src="/images/icons/categories/'.$category.'.svg" alt="" />Back to '.$category.'</a>'; \
+ $content .= <<<BACK_LINK + <a href="/applications/$category">
+ <img width="22" height="22" id="infobox-overviewicon" \
src="/images/icons/categories/$category.svg" alt="" /> + Back to $category
+ </a>
+BACK_LINK;
}
$content .= '</div>';
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic