Navigation Menu

Skip to content

Commit

Permalink
Add new helper API function check_disabled()
Browse files Browse the repository at this point in the history
Prerequisite to fix issue #16024
  • Loading branch information
dregad committed Oct 9, 2013
1 parent 32e89f4 commit cf77314
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/helper_api.php
Expand Up @@ -271,6 +271,18 @@ function check_selected( $p_var, $p_val = true, $p_strict = true ) {
}
}

/**
* If $p_val is true then we PRINT DISABLED to prevent selection of the
* current option list item
*
* @param bool $p_val
*/
function check_disabled( $p_val = true ) {
if( $p_val ) {
echo ' disabled="disabled" ';
}
}

/**
* Set up PHP for a long process execution
* The script timeout is set based on the value of the long_process_timeout config option.
Expand Down

0 comments on commit cf77314

Please sign in to comment.