fix in installer

This commit is contained in:
Diego Najar 2018-09-26 17:55:19 +02:00
parent 9d5fe7cd08
commit b921662fd8
3 changed files with 20 additions and 11 deletions

View File

@ -122,7 +122,7 @@ class Filesystem {
// Delete a file or directory recursive
// The directory is delete
public static function deleteRecursive($source)
public static function deleteRecursive($source, $deleteDirectory=true)
{
if (!self::directoryExists($source)) {
return false;
@ -138,8 +138,11 @@ class Filesystem {
}
}
if ($deleteDirectory) {
return rmdir($source);
}
return true;
}
// Compress a file or directory
// $source = /home/diego/example
@ -216,7 +219,7 @@ class Filesystem {
$number = 0;
$tmpName = $filename.'_'.$number.'.'.$fileExtension;
while (Sanitize::pathFile($path.$tmpName)) {
$number++;
$number = $number + 1;
$tmpName = $filename.'_'.$number.'.'.$fileExtension;
}
}

View File

@ -96,6 +96,8 @@ class pluginRemoteContent extends Plugin {
Filesystem::deleteRecursive(PATH_UPLOADS);
mkdir(PATH_PAGES, 0755, true);
mkdir(PATH_UPLOADS, 0755, true);
mkdir(PATH_UPLOADS_PROFILES, 0755, true);
mkdir(PATH_UPLOADS_THUMBNAILS, 0755, true);
return true;
}

View File

@ -591,12 +591,16 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
<?php
$system = checkSystem();
if (!empty($system)) {
foreach ($system as $values) {
echo '<div class="uk-panel">';
echo '<div class="uk-panel-badge uk-badge uk-badge-danger">FAIL</div>';
echo '<h3 class="uk-panel-title">'.$values['title'].'</h3>';
echo $values['errorText'];
echo '</div>';
foreach ($system as $error) {
echo '
<table class="table">
<tbody>
<tr>
<th>'.$error.'</th>
</tr>
</tbody>
</table>
';
}
}
elseif (isset($_GET['language']))