Skip to content

Commit 4f8c238

Browse files
authored
v0.3.1 (#1)
* v0.3.1 update for path_check * v0.3.1 update strings * v0.3.1 remove test code * v0.3.1 update release strings
1 parent db32583 commit 4f8c238

File tree

16 files changed

+12
-9
lines changed

16 files changed

+12
-9
lines changed

OBI.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ function change_perms($dir) {
7676
if (empty($input_errors)) {
7777
$config['onebuttoninstaller']['storage_path'] = !empty($_POST['storage_path']) ? $_POST['storage_path'] : $g['media_path'];
7878
$config['onebuttoninstaller']['storage_path'] = rtrim($config['onebuttoninstaller']['storage_path'],'/'); // ensure to have NO trailing slash
79-
if (strpos($config['onebuttoninstaller']['storage_path'], "/mnt/") === false) {
79+
if (!isset($_POST['path_check']) && (strpos($config['onebuttoninstaller']['storage_path'], "/mnt/") === false)) {
8080
$input_errors[] = gettext("The common directory for all extensions MUST be set to a directory below <b>'/mnt/'</b> to prevent to loose the extensions after a reboot on embedded systems!");
8181
}
8282
else {
8383
if (!is_dir($config['onebuttoninstaller']['storage_path'])) mkdir($config['onebuttoninstaller']['storage_path'], 0775, true);
8484
change_perms($config['onebuttoninstaller']['storage_path']);
85+
$config['onebuttoninstaller']['path_check'] = isset($_POST['path_check']) ? true : false;
8586
$install_dir = $config['onebuttoninstaller']['storage_path']."/"; // get directory where the installer script resides
8687
if (!is_dir("{$install_dir}onebuttoninstaller/log")) { mkdir("{$install_dir}onebuttoninstaller/log", 0775, true); }
8788
$return_val = mwexec("fetch {$verify_hostname} -vo {$install_dir}onebuttoninstaller/onebuttoninstaller-install.php 'https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/onebuttoninstaller-install.php'", true);
@@ -91,7 +92,7 @@ function change_perms($dir) {
9192
}
9293
else {
9394
$input_errors[] = sprintf(gettext("Installation file %s not found, installation aborted!"), "{$install_dir}onebuttoninstaller/onebuttoninstaller-install.php");
94-
exit;
95+
return;
9596
}
9697
mwexec("rm -Rf ext/OBI; rm -f OBI.php", true);
9798
header("Location:onebuttoninstaller-config.php");
@@ -107,6 +108,7 @@ function change_perms($dir) {
107108
}
108109

109110
$pconfig['storage_path'] = !empty($config['onebuttoninstaller']['storage_path']) ? $config['onebuttoninstaller']['storage_path'] : $g['media_path'];
111+
$pconfig['path_check'] = isset($config['onebuttoninstaller']['path_check']) ? true : false;
110112

111113
include("fbegin.inc"); ?>
112114
<form action="OBI.php" method="post" name="iform" id="iform">
@@ -117,7 +119,7 @@ function change_perms($dir) {
117119
<table width="100%" border="0" cellpadding="6" cellspacing="0">
118120
<?php html_titleline($application);?>
119121
<?php html_filechooser("storage_path", gettext("Common directory"), $pconfig['storage_path'], gettext("Common directory for all extensions (a persistant place where all extensions are/should be - a directory below <b>/mnt/</b>)."), $pconfig['storage_path'], true, 60);?>
120-
</table>
122+
<?php html_checkbox("path_check", gettext("Path check"), $pconfig['path_check'], gettext("If this option is selected no examination of the common directory path will be carried out (whether it was set to a directory below /mnt/)."), "<b><font color='red'>".gettext("Please use this option only if you know what you are doing!")."</font></b>", false);?> </table>
121123
<div id="submit">
122124
<input id="save" name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>"/>
123125
<input id="cancel" name="cancel" type="submit" class="formbtn" value="<?=gettext("Cancel");?>"/>

onebuttoninstaller/ext/onebuttoninstaller-config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function enable_change(enable_change) {
148148
<?php html_titleline_checkbox("enable", gettext("OneButtonInstaller"), $pconfig['enable'], gettext("Enable"), "enable_change(false)");?>
149149
<?php html_text("installation_directory", gettext("Installation directory"), sprintf(gettext("The extension is installed in %s"), $config['onebuttoninstaller']['rootfolder']));?>
150150
<?php html_filechooser("storage_path", gettext("Common directory"), $pconfig['storage_path'], gettext("Common directory for all extensions (a persistant place where all extensions are/should be - a directory below <b>/mnt/</b>)."), $pconfig['storage_path'], true, 60);?>
151-
<?php html_checkbox("path_check", gettext("Path check"), $pconfig['path_check'], gettext("If this option is selected no examination of the common directory path will be carried out (whether it was set to a directory below /mnt/)."), gettext("Please use this option only if you know what you are doing!"), false);?>
151+
<?php html_checkbox("path_check", gettext("Path check"), $pconfig['path_check'], gettext("If this option is selected no examination of the common directory path will be carried out (whether it was set to a directory below /mnt/)."), "<b><font color='red'>".gettext("Please use this option only if you know what you are doing!")."</font></b>", false);?>
152152
<?php html_checkbox("auto_update", gettext("Update"), $pconfig['auto_update'], gettext("Update extensions list automatically."), "", false);?>
153153
<?php html_checkbox("show_beta", gettext("Beta releases"), $pconfig['show_beta'], gettext("If enabled, extensions in beta state will be shown in the extensions list."), "", false);?>
154154
</table>
1.54 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)