mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Add ImageMagick check and update PHP minimum version to 8.0.0
This commit is contained in:
parent
117c5e50de
commit
098b0d4640
4 changed files with 160 additions and 134 deletions
|
@ -3,6 +3,9 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?php echo __('Title and Logo'); ?> </div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/ImageMagick.check.php';
|
||||
?>
|
||||
<form id="updateConfigForm">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
|
|
@ -38,10 +38,11 @@ $linuxApps[] = ['unzip'];
|
|||
$linuxApps[] = ['youtube-dl'];
|
||||
$linuxApps[] = ['sshpass', 'https://github.com/WWBN/AVideo/wiki/Clone-Site-Plugin#the-process-with-rsync-support-hls'];
|
||||
$linuxApps[] = ['apache2'];
|
||||
$linuxApps[] = ['convert', 'sudo apt update && sudo apt install imagemagick'];
|
||||
|
||||
$messages = ['Server' => [], 'PHP' => [], 'Apache' => []];
|
||||
$version = phpversion();
|
||||
$phpMinVersion = '7.3.0';
|
||||
$phpMinVersion = '8.0.0';
|
||||
if (strnatcmp($version, $phpMinVersion) >= 0) {
|
||||
$messages['PHP'][] = "PHP v{$version}";
|
||||
} else {
|
||||
|
|
20
view/ImageMagick.check.php
Normal file
20
view/ImageMagick.check.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
$convertPath = trim(shell_exec('which convert'));
|
||||
|
||||
if (empty($convertPath)) {
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<strong><?php echo __("ImageMagick not installed."); ?></strong>
|
||||
<p><?php echo __("Please install it with:"); ?></p>
|
||||
<pre><code>sudo apt update && sudo apt install imagemagick</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
|
@ -292,7 +292,9 @@ if (User::isAdmin()) {
|
|||
<h2><?php echo __("Logo and Title"); ?></h2>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/ImageMagick.check.php';
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label"><?php echo __("Web site title"); ?></label>
|
||||
<div class="col-md-8 inputGroupContainer">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue