Skip to content

Commit

Permalink
Negate test in api_token_is_used()
Browse files Browse the repository at this point in the history
Fix error in 1f678c2

Fixes #20472
  • Loading branch information
dregad committed Jun 11, 2016
1 parent 5f6696a commit aee8574
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api_tokens_page.php
Expand Up @@ -88,9 +88,9 @@
$u_date_created = date( $t_date_format, $u_date_created );

if( api_token_is_used( $t_token ) ) {
$u_date_used = lang_get( 'api_token_never_used' );
} else {
$u_date_used = date( $t_date_format, $u_date_used );
} else {
$u_date_used = lang_get( 'api_token_never_used' );
}
?>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion core/api_token_api.php
Expand Up @@ -159,7 +159,7 @@ function api_token_get_all( $p_user_id ) {
* @access public
*/
function api_token_is_used( array $p_token ) {
return (int)$p_token['date_used'] <= 1;
return (int)$p_token['date_used'] > 1;
}

/**
Expand Down

0 comments on commit aee8574

Please sign in to comment.