Skip to content

Commit

Permalink
making categories work again - via https://de.wikipedia.org/wiki/Spez…
Browse files Browse the repository at this point in the history
  • Loading branch information
FlominatorTM committed Sep 8, 2019
1 parent 2d304bc commit c882246
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions inventory.php
Expand Up @@ -175,19 +175,32 @@ function retrieve_current_list($catenc, $template, $other_cat_enc="", $template_
//echo count($rows) . "rows";
foreach($rows AS $row)
{
//echo "$row<br>";
$cols = explode("\t", $row);

if($cols[1]!="" && $cols[1] != 'title')
{

$lemma = str_replace('_', ' ', $cols[1]);

if(stristr($lemma, 'Kategorie:') || stristr($lemma, 'Datei:') || stristr($lemma, 'Vorlage:'))
switch($cols[3])
{
$lemma = ':'.$lemma;
case "Category":
$lemma = "Kategorie:$lemma";
break;
case "File";
$lemma = "Datei:$lemma";
break;
case "Template";
$lemma = "Vorlage:$lemma";
break;
}

/*if(stristr($lemma, 'Kategorie:') || stristr($lemma, 'Datei:') || stristr($lemma, 'Vorlage:'))*/
// if(stristr($lemma, 'Category:') || stristr($lemma, 'File:') || stristr($lemma, 'Template:'))
// {
// $lemma = ':'.$lemma;
// }

$bulleted_list.="* [[".$lemma."]]\n";
$number_of_current_entries = $number_of_current_entries + 1;
}
Expand Down

0 comments on commit c882246

Please sign in to comment.