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-->
<!-- JS extension support -->
<?php
$extensions = scandir('./extensions');
foreach ($extensions as $extension) {
if (substr($extension, -3) == ".js") {
echo "<script src='./extensions/$extension'></script>";
if(file_exists("./extensions")) {
$extensions = scandir('./extensions');
foreach ($extensions as $extension) {
if (substr($extension, -3) == ".js") {
echo "<script src='./extensions/$extension'></script>";
}
}
}
}
?>
<?php
require './res/php/GoogleAnalytics.php'; // include google analytics