No error if no extensions dir
This commit is contained in:
parent
dc515eab7a
commit
b2d723cb62
1 changed files with 7 additions and 5 deletions
12
index.php
12
index.php
|
@ -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
|
||||
|
|
Reference in a new issue