Skip to content

Commit

Permalink
formslib: MDL-26557 Use correct variable name and specify defaults in…
Browse files Browse the repository at this point in the history
… function declaration

Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
  • Loading branch information
Andrew Robert Nicols committed Mar 16, 2011
1 parent 56babbc commit d8e7d1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/formslib.php
Expand Up @@ -954,12 +954,14 @@ function repeat_elements($elementobjs, $repeats, $options, $repeathiddenname,
*
* @global object
* @param int $groupid The id of the group of advcheckboxes this element controls
* @param string $buttontext The text of the link. Defaults to "select all/none"
* @param string $text The text of the link. Defaults to selectallornone ("select all/none")
* @param array $attributes associative array of HTML attributes
* @param int $originalValue The original general state of the checkboxes before the user first clicks this element
*/
function add_checkbox_controller($groupid, $buttontext, $attributes, $originalValue = 0) {
function add_checkbox_controller($groupid, $text = null, $attributes = null, $originalValue = 0) {
global $CFG;

// Set the default text if none was specified
if (empty($text)) {
$text = get_string('selectallornone', 'form');
}
Expand Down

0 comments on commit d8e7d1a

Please sign in to comment.