Minor - updating license

1.10.x
Julio Montoya 12 years ago
parent 7d39d2f142
commit 4f70dfd186
  1. 23
      main/inc/lib/formvalidator/Element/calendar_popup.php
  2. 5
      main/inc/lib/formvalidator/Element/datepickerdate.php
  3. 19
      main/inc/lib/formvalidator/Element/html_editor.php
  4. 27
      main/inc/lib/formvalidator/Element/receivers.php
  5. 5
      main/inc/lib/formvalidator/Element/style_button.php
  6. 24
      main/inc/lib/formvalidator/Element/style_submit_button.php
  7. 1
      main/inc/lib/formvalidator/FormValidator.class.php
  8. 1
      main/inc/lib/formvalidator/Rule/CompareDateTimeText.php
  9. 1
      main/inc/lib/formvalidator/Rule/CompareFields.php
  10. 23
      main/inc/lib/formvalidator/Rule/Date.php
  11. 24
      main/inc/lib/formvalidator/Rule/DateCompare.php
  12. 23
      main/inc/lib/formvalidator/Rule/Filetype.php
  13. 14
      main/inc/lib/formvalidator/Rule/MultipleRequired.php
  14. 1
      main/inc/lib/formvalidator/Rule/Url.php
  15. 22
      main/inc/lib/formvalidator/Rule/Username.php
  16. 22
      main/inc/lib/formvalidator/Rule/UsernameAvailable.php

@ -1,26 +1,5 @@
<?php <?php
// $Id: calendar_popup.php 20456 2009-05-10 17:27:44Z ivantcholakov $ /* For licensing terms, see /license.txt */
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2005 Dokeos S.A.
Copyright (c) Bart Mollet, Hogeschool Gent
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
$language_file = 'agenda'; $language_file = 'agenda';
require_once dirname(__FILE__).'/../../../global.inc.php'; require_once dirname(__FILE__).'/../../../global.inc.php';

@ -1,6 +1,6 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
require_once ('HTML/QuickForm/date.php'); require_once 'HTML/QuickForm/date.php';
/** /**
* Form element to select a date and hour (with popup datepicker) * Form element to select a date and hour (with popup datepicker)
*/ */
@ -9,7 +9,8 @@ class HTML_QuickForm_datepickerdate extends HTML_QuickForm_date
/** /**
* Constructor * Constructor
*/ */
function HTML_QuickForm_datepickerdate($elementName = null, $elementLabel = null, $attributes = null) { function HTML_QuickForm_datepickerdate($elementName = null, $elementLabel = null, $attributes = null)
{
global $myMinYear, $myMaxYear; global $myMinYear, $myMaxYear;
$js_form_name = $attributes['form_name']; $js_form_name = $attributes['form_name'];
unset($attributes['form_name']); unset($attributes['form_name']);

@ -20,11 +20,17 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
*/ */
public $richEditorStatus = true; public $richEditorStatus = true;
/**
* @return bool
*/
public function getRichEditorStatus() public function getRichEditorStatus()
{ {
return $this->richEditorStatus; return $this->richEditorStatus;
} }
/**
* @param $status
*/
public function setRichEditorStatus($status) public function setRichEditorStatus($status)
{ {
$this->richEditorStatus = (bool)$status; $this->richEditorStatus = (bool)$status;
@ -37,7 +43,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
* @param string Attributes for the textarea * @param string Attributes for the textarea
* @param array $editor_config Optional configuration settings for the online editor. * @param array $editor_config Optional configuration settings for the online editor.
*/ */
function HTML_QuickForm_html_editor($elementName = null, $elementLabel = null, $attributes = null, $config = null) public function HTML_QuickForm_html_editor($elementName = null, $elementLabel = null, $attributes = null, $config = null)
{ {
if (empty($elementName)) { if (empty($elementName)) {
return false; return false;
@ -50,11 +56,9 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
$this->_type = 'html_editor'; $this->_type = 'html_editor';
$this->fullPage = false; $this->fullPage = false;
$name = $this->getAttribute('name'); $name = $this->getAttribute('name');
global $app; global $app;
//$this->fck_editor = new FCKeditor($name);
$this->fck_editor = new ChamiloLMS\Component\Editor\Editor($name, $app['translator']); $this->fck_editor = new ChamiloLMS\Component\Editor\Editor($name, $app['translator']);
$this->fck_editor->ToolbarSet = $fck_attribute['ToolbarSet']; $this->fck_editor->ToolbarSet = $fck_attribute['ToolbarSet'];
@ -89,7 +93,8 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
* @access public * @access public
* @return boolean * @return boolean
*/ */
function browserSupported() { function browserSupported()
{
return FCKeditor :: IsCompatible(); return FCKeditor :: IsCompatible();
} }
@ -97,7 +102,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
* Return the HTML editor in HTML * Return the HTML editor in HTML
* @return string * @return string
*/ */
function toHtml() public function toHtml()
{ {
if ($this->getRichEditorStatus() == false) { if ($this->getRichEditorStatus() == false) {
//Fix rows and cols //Fix rows and cols
@ -125,7 +130,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
* Returns the htmlarea content in HTML * Returns the htmlarea content in HTML
* @return string * @return string
*/ */
function getFrozenHtml() public function getFrozenHtml()
{ {
return $this->getValue(); return $this->getValue();
} }
@ -133,7 +138,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
/** /**
* Build this element using FCKeditor * Build this element using FCKeditor
*/ */
function build_FCKeditor() public function build_FCKeditor()
{ {
if (!FCKeditor :: IsCompatible()) { if (!FCKeditor :: IsCompatible()) {
return parent::toHTML(); return parent::toHTML();

@ -1,26 +1,6 @@
<?php <?php
// $Id: receivers.php 7727 2006-02-09 13:37:04Z turboke $ /* For licensing terms, see /license.txt */
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2005 Dokeos S.A.
Copyright (c) Bart Mollet, Hogeschool Gent
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
require_once 'HTML/QuickForm/group.php'; require_once 'HTML/QuickForm/group.php';
require_once 'HTML/QuickForm/radio.php'; require_once 'HTML/QuickForm/radio.php';
require_once 'HTML/QuickForm/advmultiselect.php'; require_once 'HTML/QuickForm/advmultiselect.php';
@ -59,6 +39,7 @@ class HTML_QuickForm_receivers extends HTML_QuickForm_group
$this->_appendName = true; $this->_appendName = true;
$this->_type = 'receivers'; $this->_type = 'receivers';
} }
/** /**
* Create the form elements to build this element group * Create the form elements to build this element group
*/ */
@ -70,6 +51,7 @@ class HTML_QuickForm_receivers extends HTML_QuickForm_group
$this->_elements[] = new HTML_QuickForm_advmultiselect('to', '', $this->receivers); $this->_elements[] = new HTML_QuickForm_advmultiselect('to', '', $this->receivers);
$this->_elements[2]->setSelected($this->receivers_selected); $this->_elements[2]->setSelected($this->receivers_selected);
} }
/** /**
* HTML representation * HTML representation
*/ */
@ -85,6 +67,7 @@ class HTML_QuickForm_receivers extends HTML_QuickForm_group
$js = $this->getElementJS(); $js = $this->getElementJS();
return $renderer->toHtml().$js; return $renderer->toHtml().$js;
} }
/** /**
* Get the necessary javascript * Get the necessary javascript
*/ */
@ -105,6 +88,7 @@ class HTML_QuickForm_receivers extends HTML_QuickForm_group
</script>\n"; </script>\n";
return $js; return $js;
} }
/** /**
* accept renderer * accept renderer
*/ */
@ -113,4 +97,3 @@ class HTML_QuickForm_receivers extends HTML_QuickForm_group
$renderer->renderElement($this, $required, $error); $renderer->renderElement($this, $required, $error);
} }
} }
?>

@ -1,4 +1,6 @@
<?php <?php
/* For licensing terms, see /license.txt */
/** /**
* Base class for <input /> form elements * Base class for <input /> form elements
* *
@ -59,10 +61,11 @@ class HTML_QuickForm_stylebutton extends HTML_QuickForm_element
$strAttr = ''; $strAttr = '';
if (is_array($attributes)) { if (is_array($attributes)) {
foreach ($attributes as $key => $value) { foreach ($attributes as $key => $value) {
if ($key != 'value') if ($key != 'value') {
$strAttr .= ' ' . $key . '="' . htmlspecialchars($value) . '"'; $strAttr .= ' ' . $key . '="' . htmlspecialchars($value) . '"';
} }
} }
}
return $strAttr; return $strAttr;
} }

@ -1,10 +1,7 @@
<?php <?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/** /**
* HTML class for a submit type element * HTML class for a submit type element
* *
* PHP versions 4 and 5
* *
* LICENSE: This source file is subject to version 3.01 of the PHP license * LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI: * that is available through the world-wide-web at the following URI:
@ -39,8 +36,6 @@ require_once 'style_button.php';
*/ */
class HTML_QuickForm_stylesubmitbutton extends HTML_QuickForm_stylebutton class HTML_QuickForm_stylesubmitbutton extends HTML_QuickForm_stylebutton
{ {
// {{{ constructor
/** /**
* Class constructor * Class constructor
* *
@ -51,7 +46,8 @@ class HTML_QuickForm_stylesubmitbutton extends HTML_QuickForm_stylebutton
* @access public * @access public
* @return void * @return void
*/ */
function HTML_QuickForm_stylesubmitbutton($elementName = null, $value = null, $attributes = null, $img = null) { public function HTML_QuickForm_stylesubmitbutton($elementName = null, $value = null, $attributes = null, $img = null)
{
if (empty($attributes)) { if (empty($attributes)) {
$attributes = array(); $attributes = array();
} }
@ -64,7 +60,7 @@ class HTML_QuickForm_stylesubmitbutton extends HTML_QuickForm_stylebutton
HTML_QuickForm_stylebutton::HTML_QuickForm_stylebutton($elementName, null, $attributes, $value, $img); HTML_QuickForm_stylebutton::HTML_QuickForm_stylebutton($elementName, null, $attributes, $value, $img);
$this->setValue($value); $this->setValue($value);
$this->setType('submit'); $this->setType('submit');
} //end constructor }
/** /**
* Freeze the element so that only its value is returned * Freeze the element so that only its value is returned
@ -72,19 +68,17 @@ class HTML_QuickForm_stylesubmitbutton extends HTML_QuickForm_stylebutton
* @access public * @access public
* @return void * @return void
*/ */
function freeze() { public function freeze()
{
return false; return false;
} //end func freeze }
// }}}
// {{{ exportValue()
/** /**
* Only return the value if it is found within $submitValues (i.e. if * Only return the value if it is found within $submitValues (i.e. if
* this particular submit button was clicked) * this particular submit button was clicked)
*/ */
function exportValue(&$submitValues, $assoc = false) { public function exportValue(&$submitValues, $assoc = false)
{
return $this->_prepareValue($this->_findValue($submitValues), $assoc); return $this->_prepareValue($this->_findValue($submitValues), $assoc);
} }
// }}} }
} //end class HTML_QuickForm_submit

@ -1,5 +1,4 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
/** /**

@ -1,4 +1,5 @@
<?php <?php
/* For licensing terms, see /license.txt */
require_once 'HTML/QuickForm/Rule/Compare.php'; require_once 'HTML/QuickForm/Rule/Compare.php';
/** /**

@ -1,4 +1,5 @@
<?php <?php
/* For licensing terms, see /license.txt */
require_once 'HTML/QuickForm/Rule.php'; require_once 'HTML/QuickForm/Rule.php';
/** /**
* QuickForm rule to check a date * QuickForm rule to check a date

@ -1,26 +1,5 @@
<?php <?php
// $Id: Date.php 6187 2005-09-07 10:23:57Z bmol $ /* For licensing terms, see /license.txt */
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2005 Dokeos S.A.
Copyright (c) Bart Mollet, Hogeschool Gent
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
require_once ('HTML/QuickForm/Rule.php'); require_once ('HTML/QuickForm/Rule.php');
/** /**
* QuickForm rule to check a date * QuickForm rule to check a date

@ -1,26 +1,5 @@
<?php <?php
// $Id: DateCompare.php 6187 2005-09-07 10:23:57Z bmol $ /* For licensing terms, see /license.txt */
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2005 Dokeos S.A.
Copyright (c) Bart Mollet, Hogeschool Gent
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
require_once 'HTML/QuickForm/Rule/Compare.php'; require_once 'HTML/QuickForm/Rule/Compare.php';
/** /**
* QuickForm rule to compare 2 dates * QuickForm rule to compare 2 dates
@ -43,4 +22,3 @@ class HTML_QuickForm_Rule_DateCompare extends HTML_QuickForm_Rule_Compare
return parent::validate(array($time1,$time2),$operator); return parent::validate(array($time1,$time2),$operator);
} }
} }
?>

@ -1,26 +1,6 @@
<?php <?php
// $Id: Filetype.php 20456 2009-05-10 17:27:44Z ivantcholakov $ /* For licensing terms, see /license.txt */
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2005 Dokeos S.A.
Copyright (c) Bart Mollet, Hogeschool Gent
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
require_once ('HTML/QuickForm/Rule.php'); require_once ('HTML/QuickForm/Rule.php');
/** /**
* QuickForm rule to check if a filetype * QuickForm rule to check if a filetype
@ -45,4 +25,3 @@ class HTML_QuickForm_Rule_Filetype extends HTML_QuickForm_Rule
return api_in_array_nocase($ext, $extensions); return api_in_array_nocase($ext, $extensions);
} }
} }
?>

@ -1,15 +1,6 @@
<?php <?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+ /* For licensing terms, see /license.txt */
// | PHP version 4.0 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | Copy of the existing rule "required" to check if at least one element|
// | has been filled. Then $value can be an array |
// +----------------------------------------------------------------------+
// | Authors: Eric Marguin <e.marguin@elixir-interactive.com> |
// +----------------------------------------------------------------------+
require_once('HTML/QuickForm/Rule.php'); require_once('HTML/QuickForm/Rule.php');
@ -46,4 +37,3 @@ class HTML_QuickForm_Rule_MultipleRequired extends HTML_QuickForm_Rule
} // end func getValidationScript } // end func getValidationScript
} // end class HTML_QuickForm_Rule_MultipleRequired } // end class HTML_QuickForm_Rule_MultipleRequired
?>

@ -1,4 +1,5 @@
<?php <?php
/* For licensing terms, see /license.txt */
/** /**
* Abstract base class for QuickForm validation rules * Abstract base class for QuickForm validation rules

@ -1,25 +1,5 @@
<?php <?php
/* /* For licensing terms, see /license.txt */
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2005 Dokeos S.A.
Copyright (c) Bart Mollet, Hogeschool Gent
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
require_once 'HTML/QuickForm/Rule.php'; require_once 'HTML/QuickForm/Rule.php';

@ -1,26 +1,6 @@
<?php <?php
// $Id: UsernameAvailable.php 10190 2006-11-24 00:23:20Z pcool $ /* For licensing terms, see /license.txt */
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004-2005 Dokeos S.A.
Copyright (c) Bart Mollet, Hogeschool Gent
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
require_once 'HTML/QuickForm/Rule.php'; require_once 'HTML/QuickForm/Rule.php';
/** /**
* QuickForm rule to check if a username is available * QuickForm rule to check if a username is available

Loading…
Cancel
Save