Use constructs.

1.10.x
Julio Montoya 11 years ago
parent 67f42702ca
commit 1d104b624d
  1. 2
      main/inc/lib/formvalidator/Element/SelectAjax.php
  2. 2
      main/inc/lib/formvalidator/Element/SelectLanguage.php
  3. 10
      main/inc/lib/formvalidator/Element/SelectTheme.php
  4. 2
      main/inc/lib/formvalidator/FormValidator.class.php
  5. 2
      main/inc/lib/pear/HTML/QuickForm/advmultiselect.php
  6. 2
      main/inc/lib/pear/HTML/QuickForm/select.php

@ -11,7 +11,7 @@ class SelectAjax extends HTML_QuickForm_select
*/
function SelectAjax($elementName = null, $elementLabel = null, $options = null, $attributes = null)
{
parent::HTML_QuickForm_Select($elementName, $elementLabel, $options, $attributes);
parent::__construct($elementName, $elementLabel, $options, $attributes);
}
/**

@ -14,7 +14,7 @@ class SelectLanguage extends HTML_QuickForm_select
if (!isset($attributes['class'])) {
$attributes['class'] = 'chzn-select';
}
parent::HTML_QuickForm_Select($elementName, $elementLabel, $options, $attributes);
parent::__construct($elementName, $elementLabel, $options, $attributes);
// Get all languages
$languages = api_get_languages();
$this->_options = array();

@ -11,10 +11,10 @@ class SelectTheme extends HTML_QuickForm_select
*/
function SelectTheme($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
if (!isset($attributes['class'])) {
//todo this was comment due a bug in infocours.php with jquery-ui
//todo this was comment due a bug in infocours.php with jquery-ui
//$attributes['class'] = 'chzn-select';
}
parent::HTML_QuickForm_Select($elementName, $elementLabel, $options, $attributes);
}
parent::__construct($elementName, $elementLabel, $options, $attributes);
// Get all languages
$themes = api_get_themes();
$this->_options = array();
@ -22,6 +22,6 @@ class SelectTheme extends HTML_QuickForm_select
$this->addOption('--',''); // no theme select
for ($i=0; $i< count($themes[0]);$i++) {
$this->addOption($themes[1][$i],$themes[0][$i]);
}
}
}
}
}

@ -576,7 +576,7 @@ EOT;
/**
* @param string $name
* @param string $label
* @param array $options
* @param array $options
* @param array $attributes
*
* @return HTML_QuickForm_select

@ -282,7 +282,7 @@ class HTML_QuickForm_advmultiselect extends HTML_QuickForm_select
$opts = $options;
$options = null; // prevent to use the default select element load options
$this->HTML_QuickForm_select($elementName, $elementLabel, $options, $attributes);
parent::__construct($elementName, $elementLabel, $options, $attributes);
$this->selectAllCheckBox = isset($attributes['select_all_checkbox']) ? $attributes['select_all_checkbox'] : false;

@ -73,7 +73,7 @@ class HTML_QuickForm_select extends HTML_QuickForm_element
* @access public
* @return void
*/
public function HTML_QuickForm_select(
public function __construct(
$elementName = null,
$elementLabel = null,
$options = null,

Loading…
Cancel
Save