Skip to content

Commit

Permalink
allow main.php files
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Zapiec committed Aug 12, 2024
1 parent 24a0fae commit 0ba8a13
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion html/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@
require("$old_plugin_dir/main.inc");
$cleanup = $remove_lock = false;
}

if (is_file("$old_plugin_dir/main.php")) {
$cleanup = $remove_lock = true;
require("$old_plugin_dir/main.php");
$cleanup = $remove_lock = false;
}
} else {
/* Reset was posted, remove all created locks for the current plugin */
if ((isset($_GET['reset']) && $_GET['reset'] == 1) || isset($_POST['delete_lock'])) {
Expand Down Expand Up @@ -407,6 +413,9 @@
if (is_file("$plugin_dir/main.inc")) {
$display = "";
require("$plugin_dir/main.inc");
} elseif(is_file("$plugin_dir/main.php")) {
$display = "";
require("$plugin_dir/main.php");
} else {
msg_dialog::display(
_("Plug-in"),
Expand All @@ -416,7 +425,6 @@
exit();
}


/* Print_out last ErrorMessage repeated string. */
$smarty->assign("msg_dialogs", msg_dialog::get_dialogs());
$smarty->assign("pathMenu", $plist->genPathMenu());
Expand Down

0 comments on commit 0ba8a13

Please sign in to comment.