fix git screwup

This commit is contained in:
Andrew Bauer 2020-09-18 08:56:17 -05:00
parent bc7cadcc73
commit 416de4a068
1 changed files with 31 additions and 39 deletions

View File

@ -1,43 +1,35 @@
<?php
// Returns the modal html representing the selected Option Help item
if ( empty($_REQUEST['ohndx']) ) {
ajaxError('Option Help Index Not Provided');
return;
}
global $OLANG;
$result = '';
$optionHelpIndex = $_REQUEST['ohndx'];
$ZMoptionHelpIndex = 'ZM_'.$optionHelpIndex;
if ( !empty($OLANG[$optionHelpIndex]) ) {
$optionHelpText = $OLANG[$optionHelpIndex]['Help'];
} else {
$optionHelpText = dbFetchOne('SELECT Help FROM Config WHERE Name=?', 'Help', array($optionHelpIndex));
}
$optionHelpText = validHtmlStr($optionHelpText);
$optionHelpText = preg_replace('/~~/', '<br/>', $optionHelpText );
$optionHelpText = preg_replace('/\[(.+)\]\((.+)\)/', '<a href="$2" target="_blank">$1</a>', $optionHelpText);
?>
<div id="optionhelp" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal fade" id="filterdebugModal" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php echo translate('OptionHelp') ?></h5>
<h5 class="modal-title"><?php echo translate('FilterDebug') ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<h3><?php echo validHtmlStr($optionHelpIndex) ?></h3>
<p class="textblock"><?php echo $optionHelpText ?></p>
</div>
<?php
//require_once('includes/Filter.php');
$fid = validInt($_REQUEST['fid']);
if ( !$fid ) {
echo '<div class="error">No filter id specified.</div>';
} else {
$filter = new ZM\Filter($_REQUEST['fid']);
if ( ! $filter->Id() ) {
echo '<div class="error">Filter not found for id '.$_REQUEST['fid'].'</div>';
}
}
?>
<form name="contentForm" id="filterdebugForm" method="post" action="?">
<?php
// We have to manually insert the csrf key into the form when using a modal generated via ajax call
echo getCSRFinputHTML();
?>
<p><label>SQL</label><?php echo $filter->sql() ?></p>
<div class="modal-footer">
<button type="button" id="ohCloseBtn" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo translate('Cancel')?> </button>
</div>
</form>
</div>
</div>
</div>
</div>