Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cproensa authored and atrol committed Mar 4, 2018
1 parent 5002e05 commit ced43a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions core/filter_api.php
Expand Up @@ -3866,9 +3866,8 @@ function filter_temporary_get( $p_filter_key, $p_default = null ) {
*/
function filter_temporary_set( array $p_filter, $p_filter_key = null ) {
if( null === $p_filter_key ) {
if( isset( $p_filter['_temporary_key'] ) ) {
$t_filter_key = $p_filter['_temporary_key'];
} else {
$t_filter_key = filter_get_temporary_key( $p_filter );
if( !$t_filter_key ) {
$t_filter_key = uniqid();
}
} else {
Expand All @@ -3886,7 +3885,7 @@ function filter_temporary_set( array $p_filter, $p_filter_key = null ) {
* Get the temporary key of the filter, if was loaded from temporary session store
* Return null otherwise
* @param array $p_filter Filter array
* @return string Key associated with this filter, null if none
* @return string|null Key associated with this filter, null if none
*/
function filter_get_temporary_key( array $p_filter ) {
if( isset( $p_filter['_temporary_key'] ) ) {
Expand All @@ -3913,7 +3912,7 @@ function filter_is_temporary( array $p_filter ) {
* If a filter is provided that does not contain the key proeprty, an empty
* string is returned.
* @param array|string $p_key_or_filter Either a string key, or a filter array
* @return string Formatted parameter string, or empty
* @return string|null Formatted parameter string, or null
*/
function filter_get_temporary_key_param( $p_key_or_filter ) {
if( is_array( $p_key_or_filter ) ) {
Expand All @@ -3924,7 +3923,7 @@ function filter_get_temporary_key_param( $p_key_or_filter ) {
if( $t_key ) {
return 'filter=' . $t_key;
} else {
return '';
return null;
}
}

Expand Down
2 changes: 1 addition & 1 deletion query_store.php
Expand Up @@ -104,7 +104,7 @@

# ensure that we're not making this filter public if we're not allowed
if( !access_has_project_level( config_get( 'stored_query_create_shared_threshold' ) ) ) {
$f_is_public = false;
access_denied();
}

$t_filter_string = filter_serialize( $t_filter );
Expand Down

0 comments on commit ced43a1

Please sign in to comment.