Skip to content

Commit

Permalink
Demo Mode mods (#186)
Browse files Browse the repository at this point in the history
* prevent demo mode alterations to security setup
  • Loading branch information
PhilDaintree committed Oct 5, 2019
1 parent 6937e78 commit 8a7cab0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion PageSecurity.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
exit;
}

if (isset($_POST['Update']) and $AllowDemoMode != true) {
if($AllowDemoMode) {
prnMsg(_('The the system is in demo mode and the security model administration is disabled'), 'warn');
exit;
}

if (isset($_POST['Update']) AND $AlloDemoMode!= true) {
foreach ($_POST as $ScriptName => $PageSecurityValue) {
if ($ScriptName != 'Update' and $ScriptName != 'FormID') {
$ScriptName = mb_substr($ScriptName, 0, mb_strlen($ScriptName) - 4) . '.php';
Expand Down
1 change: 1 addition & 0 deletions Z_DeleteSalesTransActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@

prnMsg(_('Making stock for all parts and locations nil'), 'info');
$ErrMsg = _('The SQL to make all stocks zero failed because');

$Result = DB_query("DELETE FROM pickserialdetails", $ErrMsg);
$Result = DB_query("DELETE FROM stockserialmoves", $ErrMsg);
$Result = DB_query("DELETE FROM stockserialitems", $ErrMsg);
Expand Down

0 comments on commit 8a7cab0

Please sign in to comment.