No error if no extensions dir

This commit is contained in:
Marcel Kapfer (mmk2410) 2015-12-24 12:13:33 +01:00
parent dc515eab7a
commit b2d723cb62

View file

@ -391,12 +391,14 @@ if ($nav_drawer == "yes") {
<script src="./res/js/app.js"></script> <!--include main javascript--> <script src="./res/js/app.js"></script> <!--include main javascript-->
<!-- JS extension support --> <!-- JS extension support -->
<?php <?php
if(file_exists("./extensions")) {
$extensions = scandir('./extensions'); $extensions = scandir('./extensions');
foreach ($extensions as $extension) { foreach ($extensions as $extension) {
if (substr($extension, -3) == ".js") { if (substr($extension, -3) == ".js") {
echo "<script src='./extensions/$extension'></script>"; echo "<script src='./extensions/$extension'></script>";
} }
} }
}
?> ?>
<?php <?php
require './res/php/GoogleAnalytics.php'; // include google analytics require './res/php/GoogleAnalytics.php'; // include google analytics