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:
parent
c7254c5de3
commit
3f63511b23
1 changed files with 15 additions and 1 deletions
|
@ -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();
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue