1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Add warning for non-writable plugins directory in CreatePlugin page

This commit is contained in:
Daniel Neto 2025-04-25 20:12:47 -03:00
parent c7254c5de3
commit 3f63511b23

View file

@ -15,6 +15,20 @@ $page = new Page('Create plugin');
$pluginsDir = __DIR__ . '/plugins/';
?>
<div class="container">
<?php
// Check if the plugins directory is writable
if (!is_writable($pluginsDir)) {
?>
<div class="alert alert-danger">
<strong>Warning!</strong> The <code><?php echo $pluginsDir; ?></code> folder is not writable.<br>
This folder must be writable to make the plugin creation functionality work correctly.<br>
<strong>Command to fix:</strong><br>
<code>chmod -R 775 <?php echo $pluginsDir; ?></code><br>
If necessary, you may also need to change the folder ownership.
</div>
<?php
}
?>
<div class="panel panel-default">
<div class="panel-heading">
<h2><i class="fas fa-plug"></i> Create New Plugin</h2>
@ -164,4 +178,4 @@ $pluginsDir = __DIR__ . '/plugins/';
</script>
<?php
$page->print();
?>
?>