mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +00:00
check for an existing file extension
This commit is contained in:
parent
ff07a141e8
commit
6ceb14cdfd
|
@ -45,12 +45,13 @@ class SeedDMS_View_Help extends SeedDMS_Bootstrap_Style {
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<legend>Table of contents</legend>
|
<legend>Table of contents</legend>
|
||||||
<?php
|
<?php
|
||||||
$d = dir("../languages/".$this->params['session']->getLanguage()."/help");
|
$dir = "../languages/".$this->params['session']->getLanguage()."/help";
|
||||||
|
$d = dir($dir);
|
||||||
echo "<ul>";
|
echo "<ul>";
|
||||||
while (false !== ($entry = $d->read())) {
|
while (false !== ($entry = $d->read())) {
|
||||||
if($entry != '..' && $entry != '.') {
|
if($entry != '..' && $entry != '.') {
|
||||||
$path_parts = pathinfo($dir."/".$entry);
|
$path_parts = pathinfo($dir."/".$entry);
|
||||||
if($path_parts['extension'] == 'html' || $path_parts['extension'] == 'md') {
|
if(isset($path_parts['extension']) && ($path_parts['extension'] == 'html' || $path_parts['extension'] == 'md')) {
|
||||||
echo "<li><a href=\"../out/out.Help.php?context=".$path_parts['filename']."\">".getMLText('help_'.$path_parts['filename'], array(), $path_parts['filename'])."</a></li>";
|
echo "<li><a href=\"../out/out.Help.php?context=".$path_parts['filename']."\">".getMLText('help_'.$path_parts['filename'], array(), $path_parts['filename'])."</a></li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user