Merge branch 'fix_filter_actions' into storageareas

This commit is contained in:
Isaac Connor 2016-05-27 11:12:18 -04:00
commit c25b680799
3 changed files with 29 additions and 29 deletions

View File

@ -165,20 +165,20 @@ if ( !empty($action) )
$_REQUEST['filter']['sort_asc'] = validStr($_REQUEST['sort_asc']); $_REQUEST['filter']['sort_asc'] = validStr($_REQUEST['sort_asc']);
$_REQUEST['filter']['limit'] = validInt($_REQUEST['limit']); $_REQUEST['filter']['limit'] = validInt($_REQUEST['limit']);
$sql = "replace into Filters set Name = ".dbEscape($filterName).", Query = ".dbEscape(jsonEncode($_REQUEST['filter'])); $sql = "replace into Filters set Name = ".dbEscape($filterName).", Query = ".dbEscape(jsonEncode($_REQUEST['filter']));
if ( !empty($_REQUEST['autoArchive']) ) if ( !empty($_REQUEST['AutoArchive']) )
$sql .= ", AutoArchive = ".dbEscape($_REQUEST['autoArchive']); $sql .= ", AutoArchive = ".dbEscape($_REQUEST['AutoArchive']);
if ( !empty($_REQUEST['autoVideo']) ) if ( !empty($_REQUEST['AutoVideo']) )
$sql .= ", AutoVideo = ".dbEscape($_REQUEST['autoVideo']); $sql .= ", AutoVideo = ".dbEscape($_REQUEST['AutoVideo']);
if ( !empty($_REQUEST['autoUpload']) ) if ( !empty($_REQUEST['AutoUpload']) )
$sql .= ", AutoUpload = ".dbEscape($_REQUEST['autoUpload']); $sql .= ", AutoUpload = ".dbEscape($_REQUEST['AutoUpload']);
if ( !empty($_REQUEST['autoEmail']) ) if ( !empty($_REQUEST['AutoEmail']) )
$sql .= ", AutoEmail = ".dbEscape($_REQUEST['autoEmail']); $sql .= ", AutoEmail = ".dbEscape($_REQUEST['AutoEmail']);
if ( !empty($_REQUEST['autoMessage']) ) if ( !empty($_REQUEST['AutoMessage']) )
$sql .= ", AutoMessage = ".dbEscape($_REQUEST['autoMessage']); $sql .= ", AutoMessage = ".dbEscape($_REQUEST['AutoMessage']);
if ( !empty($_REQUEST['autoExecute']) && !empty($_REQUEST['autoExecuteCmd']) ) if ( !empty($_REQUEST['AutoExecute']) && !empty($_REQUEST['AutoExecuteCmd']) )
$sql .= ", AutoExecute = ".dbEscape($_REQUEST['autoExecute']).", AutoExecuteCmd = ".dbEscape($_REQUEST['autoExecuteCmd']); $sql .= ", AutoExecute = ".dbEscape($_REQUEST['AutoExecute']).", AutoExecuteCmd = ".dbEscape($_REQUEST['AutoExecuteCmd']);
if ( !empty($_REQUEST['autoDelete']) ) if ( !empty($_REQUEST['AutoDelete']) )
$sql .= ", AutoDelete = ".dbEscape($_REQUEST['autoDelete']); $sql .= ", AutoDelete = ".dbEscape($_REQUEST['AutoDelete']);
if ( !empty($_REQUEST['background']) ) if ( !empty($_REQUEST['background']) )
$sql .= ", Background = ".dbEscape($_REQUEST['background']); $sql .= ", Background = ".dbEscape($_REQUEST['background']);
if ( !empty($_REQUEST['concurrent']) ) if ( !empty($_REQUEST['concurrent']) )

View File

@ -261,14 +261,14 @@ for ( $i = 0; isset($_REQUEST['filter']) && $i < count($_REQUEST['filter']['term
<tbody> <tbody>
<tr> <tr>
<td><?php echo translate('FilterArchiveEvents') ?></td> <td><?php echo translate('FilterArchiveEvents') ?></td>
<td><input type="checkbox" name="autoArchive" value="1"<?php if ( !empty($dbFilter['AutoArchive']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> <td><input type="checkbox" name="AutoArchive" value="1"<?php if ( !empty($dbFilter['AutoArchive']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr> </tr>
<?php <?php
if ( ZM_OPT_FFMPEG ) { if ( ZM_OPT_FFMPEG ) {
?> ?>
<tr> <tr>
<td><?php echo translate('FilterVideoEvents') ?></td> <td><?php echo translate('FilterVideoEvents') ?></td>
<td><input type="checkbox" name="autoVideo" value="1"<?php if ( !empty($dbFilter['AutoVideo']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> <td><input type="checkbox" name="AutoVideo" value="1"<?php if ( !empty($dbFilter['AutoVideo']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr> </tr>
<?php <?php
} }
@ -276,7 +276,7 @@ if ( ZM_OPT_UPLOAD ) {
?> ?>
<tr> <tr>
<td><?php echo translate('FilterUploadEvents') ?></td> <td><?php echo translate('FilterUploadEvents') ?></td>
<td><input type="checkbox" name="autoUpload" value="1"<?php if ( !empty($dbFilter['AutoUpload']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> <td><input type="checkbox" name="AutoUpload" value="1"<?php if ( !empty($dbFilter['AutoUpload']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr> </tr>
<?php <?php
} }
@ -284,7 +284,7 @@ if ( ZM_OPT_EMAIL ) {
?> ?>
<tr> <tr>
<td><?php echo translate('FilterEmailEvents') ?></td> <td><?php echo translate('FilterEmailEvents') ?></td>
<td><input type="checkbox" name="autoEmail" value="1"<?php if ( !empty($dbFilter['AutoEmail']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> <td><input type="checkbox" name="AutoEmail" value="1"<?php if ( !empty($dbFilter['AutoEmail']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr> </tr>
<?php <?php
} }
@ -292,18 +292,18 @@ if ( ZM_OPT_MESSAGE ) {
?> ?>
<tr> <tr>
<td><?php echo translate('FilterMessageEvents') ?></td> <td><?php echo translate('FilterMessageEvents') ?></td>
<td><input type="checkbox" name="autoMessage" value="1"<?php if ( !empty($dbFilter['AutoMessage']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> <td><input type="checkbox" name="AutoMessage" value="1"<?php if ( !empty($dbFilter['AutoMessage']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr> </tr>
<?php <?php
} }
?> ?>
<tr> <tr>
<td><?php echo translate('FilterExecuteEvents') ?></td> <td><?php echo translate('FilterExecuteEvents') ?></td>
<td><input type="checkbox" name="autoExecute" value="1"<?php if ( !empty($dbFilter['AutoExecute']) ) { ?> checked="checked"<?php } ?>/><input type="text" name="autoExecuteCmd" value="<?php echo isset($dbFilter['AutoExecuteCmd'])?$dbFilter['AutoExecuteCmd']:"" ?>" size="32" maxlength="255" onchange="updateButtons( this )"/></td> <td><input type="checkbox" name="AutoExecute" value="1"<?php if ( !empty($dbFilter['AutoExecute']) ) { ?> checked="checked"<?php } ?>/><input type="text" name="AutoExecuteCmd" value="<?php echo isset($dbFilter['AutoExecuteCmd'])?$dbFilter['AutoExecuteCmd']:"" ?>" size="32" maxlength="255" onchange="updateButtons( this )"/></td>
</tr> </tr>
<tr> <tr>
<td><?php echo translate('FilterDeleteEvents') ?></td> <td><?php echo translate('FilterDeleteEvents') ?></td>
<td colspan="2"><input type="checkbox" name="autoDelete" value="1"<?php if ( !empty($dbFilter['AutoDelete']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td> <td colspan="2"><input type="checkbox" name="AutoDelete" value="1"<?php if ( !empty($dbFilter['AutoDelete']) ) { ?> checked="checked"<?php } ?> onclick="updateButtons( this )"/></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -56,14 +56,14 @@ xhtmlHeaders(__FILE__, translate('SaveFilter') );
<input type="hidden" name="sort_field" value="<?php echo requestVar( 'sort_field' ) ?>"/> <input type="hidden" name="sort_field" value="<?php echo requestVar( 'sort_field' ) ?>"/>
<input type="hidden" name="sort_asc" value="<?php echo requestVar( 'sort_asc' ) ?>"/> <input type="hidden" name="sort_asc" value="<?php echo requestVar( 'sort_asc' ) ?>"/>
<input type="hidden" name="limit" value="<?php echo requestVar( 'limit' ) ?>"/> <input type="hidden" name="limit" value="<?php echo requestVar( 'limit' ) ?>"/>
<input type="hidden" name="autoArchive" value="<?php echo requestVar( 'autoArchive' ) ?>"/> <input type="hidden" name="AutoArchive" value="<?php echo requestVar( 'AutoArchive' ) ?>"/>
<input type="hidden" name="autoVideo" value="<?php echo requestVar( 'autoVideo' ) ?>"/> <input type="hidden" name="AutoVideo" value="<?php echo requestVar( 'AutoVideo' ) ?>"/>
<input type="hidden" name="autoUpload" value="<?php echo requestVar( 'autoUpload' ) ?>"/> <input type="hidden" name="AutoUpload" value="<?php echo requestVar( 'AutoUpload' ) ?>"/>
<input type="hidden" name="autoEmail" value="<?php echo requestVar( 'autoEmail' ) ?>"/> <input type="hidden" name="AutoEmail" value="<?php echo requestVar( 'AutoEmail' ) ?>"/>
<input type="hidden" name="autoMessage" value="<?php echo requestVar( 'autoMessage' ) ?>"/> <input type="hidden" name="AutoMessage" value="<?php echo requestVar( 'AutoMessage' ) ?>"/>
<input type="hidden" name="autoExecute" value="<?php echo requestVar( 'autoExecute' ) ?>"/> <input type="hidden" name="AutoExecute" value="<?php echo requestVar( 'AutoExecute' ) ?>"/>
<input type="hidden" name="autoExecuteCmd" value="<?php echo requestVar( 'autoExecuteCmd' ) ?>"/> <input type="hidden" name="AutoExecuteCmd" value="<?php echo requestVar( 'AutoExecuteCmd' ) ?>"/>
<input type="hidden" name="autoDelete" value="<?php echo requestVar( 'autoDelete' ) ?>"/> <input type="hidden" name="AutoDelete" value="<?php echo requestVar( 'AutoDelete' ) ?>"/>
<?php if ( count($filterNames) ) { ?> <?php if ( count($filterNames) ) { ?>
<p> <p>
<label for="<?php echo $selectName ?>"><?php echo translate('SaveAs') ?></label><?php echo buildSelect( $selectName, $filterNames ); ?><label for="<?php echo $newSelectName ?>"><?php echo translate('OrEnterNewName') ?></label><input type="text" size="32" id="<?php echo $newSelectName ?>" name="<?php echo $newSelectName ?>" value="<?php echo requestVar('filterName') ?>"/> <label for="<?php echo $selectName ?>"><?php echo translate('SaveAs') ?></label><?php echo buildSelect( $selectName, $filterNames ); ?><label for="<?php echo $newSelectName ?>"><?php echo translate('OrEnterNewName') ?></label><input type="text" size="32" id="<?php echo $newSelectName ?>" name="<?php echo $newSelectName ?>" value="<?php echo requestVar('filterName') ?>"/>