1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Add ImageMagick check and update PHP minimum version to 8.0.0

This commit is contained in:
Daniel Neto 2025-05-31 11:05:01 -03:00
parent 117c5e50de
commit 098b0d4640
4 changed files with 160 additions and 134 deletions

View file

@ -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">
@ -115,7 +118,7 @@
type: 'post',
success: function(response) {
if (response.status === "1") {
avideoAlertSuccess( __("Your configurations has been updated!"));
avideoAlertSuccess(__("Your configurations has been updated!"));
} else {
avideoAlertError(__("Your configurations has NOT been updated!"));
}

View file

@ -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 {

View 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">&times;</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
}
?>

View file

@ -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">