mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
fix deprecated constructor names
This commit is contained in:
parent
c81884e622
commit
baec50fe92
@ -58,7 +58,7 @@ class ajax_select_widget
|
||||
|
||||
private $debug = false;
|
||||
|
||||
function ajax_select_widget($ui='')
|
||||
function __construct($ui='')
|
||||
{
|
||||
|
||||
switch($ui)
|
||||
|
@ -66,7 +66,7 @@ class date_widget
|
||||
*
|
||||
* @param string $ui '' for html
|
||||
*/
|
||||
function date_widget($ui)
|
||||
function __construct($ui)
|
||||
{
|
||||
if ($ui == 'html')
|
||||
{
|
||||
|
@ -12,13 +12,14 @@
|
||||
*/
|
||||
|
||||
use EGroupware\Api\Etemplate\Widget;
|
||||
use EGroupware\Api\Etemplate;
|
||||
|
||||
/**
|
||||
* eTemplate widget baseclass
|
||||
*
|
||||
* @deprecated use Api\Etemplate\Widget
|
||||
*/
|
||||
class etemplate_widget extends Widget {}
|
||||
class etemplate_widget extends Etemplate\Widget {}
|
||||
|
||||
/**
|
||||
* eTemplate Extension: Entry widget
|
||||
|
@ -96,16 +96,6 @@ class link_widget
|
||||
*/
|
||||
const LIMIT_LINKS = 1000;
|
||||
|
||||
/**
|
||||
* Constructor of the extension
|
||||
*
|
||||
* @param string $ui '' for html
|
||||
*/
|
||||
function link_widget($ui='')
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* pre-processing of the extension
|
||||
*
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* With the value or the name of the widget, you can specify a certain manual page
|
||||
* (eg. ManualAddressbook). Additional params can be past to the manual app with
|
||||
* $GLOBALS['egw_info']['flags']['params']['manual'].
|
||||
* $GLOBALS['egw_info']['flags']['params']['manual'].
|
||||
* If no page is set after that two mechanisms the URL will contains the referer.
|
||||
*
|
||||
* @package etemplate
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
class manual_widget
|
||||
{
|
||||
/**
|
||||
/**
|
||||
* exported methods of this class
|
||||
* @var array $public_functions
|
||||
*/
|
||||
@ -48,7 +48,7 @@
|
||||
*
|
||||
* @param string $ui '' for html
|
||||
*/
|
||||
function manual_widget($ui)
|
||||
function __construct($ui)
|
||||
{
|
||||
$this->ui = $ui;
|
||||
}
|
||||
@ -60,7 +60,7 @@
|
||||
*
|
||||
* @param string $name form-name of the control
|
||||
* @param mixed &$value value / existing content, can be modified
|
||||
* @param array &$cell array with the widget, can be modified for ui-independent widgets
|
||||
* @param array &$cell array with the widget, can be modified for ui-independent widgets
|
||||
* @param array &$readonlys names of widgets as key, to be made readonly
|
||||
* @param mixed &$extension_data data the extension can store persisten between pre- and post-process
|
||||
* @param object &$tmpl reference to the template we belong too
|
||||
@ -89,7 +89,7 @@
|
||||
$cell['onclick'] = $GLOBALS['egw']->framework->open_manual_js($link).'; return false;';
|
||||
if (!$cell['label']) $cell['label'] = 'Manual';
|
||||
if (!$cell['help']) $cell['help'] = /*lang(*/'Open the online help.'/*)*/;
|
||||
|
||||
|
||||
if (!$cell['readonly'] && !isset($GLOBALS['egw_info']['user']['apps']['manual']))
|
||||
{
|
||||
$cell['readonly'] = true; // we disable / remove the button, if use has no run-rights for the manual
|
||||
|
@ -12,7 +12,7 @@
|
||||
/**
|
||||
* eTemplate Extension: widget to display a path with clickable components
|
||||
*
|
||||
* The value is an array with id => label pairs.
|
||||
* The value is an array with id => label pairs.
|
||||
* Returned will be the id of the clicked component or nothing at all.
|
||||
*
|
||||
* @package etemplate
|
||||
@ -22,7 +22,7 @@
|
||||
*/
|
||||
class path_widget
|
||||
{
|
||||
/**
|
||||
/**
|
||||
* exported methods of this class
|
||||
* @var array
|
||||
*/
|
||||
@ -41,7 +41,7 @@
|
||||
*
|
||||
* @param string $ui '' for html
|
||||
*/
|
||||
function select_widget($ui)
|
||||
function __construct($ui)
|
||||
{
|
||||
$this->ui = $ui;
|
||||
}
|
||||
@ -53,7 +53,7 @@
|
||||
*
|
||||
* @param string $name form-name of the control
|
||||
* @param mixed &$value value / existing content, can be modified
|
||||
* @param array &$cell array with the widget, can be modified for ui-independent widgets
|
||||
* @param array &$cell array with the widget, can be modified for ui-independent widgets
|
||||
* @param array &$readonlys names of widgets as key, to be made readonly
|
||||
* @param mixed &$extension_data data the extension can store persisten between pre- and post-process
|
||||
* @param object &$tmpl reference to the template we belong too
|
||||
@ -81,7 +81,7 @@
|
||||
$sep['label'] = $seperator;
|
||||
soetemplate::add_child($cell,$sep);
|
||||
unset($sep);
|
||||
|
||||
|
||||
$button = soetemplate::empty_cell('button',$cell_name.'['.$id.']');
|
||||
$button['label'] = $label;
|
||||
$button['onchange'] = 1; // display as link
|
||||
@ -89,7 +89,7 @@
|
||||
$button['help'] = $cell['help'] ? $cell['help'] : lang($label)."($i)";
|
||||
soetemplate::add_child($cell,$button);
|
||||
unset($button);
|
||||
}
|
||||
}
|
||||
return True; // extra Label Ok
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@
|
||||
function post_process($name,&$value,&$extension_data,&$loop,&$tmpl,$value_in)
|
||||
{
|
||||
$value = '';
|
||||
|
||||
|
||||
foreach((array)$value_in as $id => $pressed)
|
||||
{
|
||||
if ($pressed && isset($extension_data[$id]))
|
||||
|
@ -75,7 +75,7 @@ class select_widget
|
||||
*
|
||||
* @param string $ui '' for html
|
||||
*/
|
||||
function select_widget($ui='')
|
||||
function __construct($ui='')
|
||||
{
|
||||
foreach($this->monthnames as $k => $name)
|
||||
{
|
||||
|
@ -41,21 +41,12 @@
|
||||
*/
|
||||
var $human_name = 'Tabs'; // this is the name for the editor
|
||||
|
||||
/**
|
||||
* Constructor of the extension
|
||||
*
|
||||
* @param string $ui '' for html
|
||||
*/
|
||||
function tab_widget($ui)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* pre-processing of the extension
|
||||
*
|
||||
* This function is called before the extension gets rendered
|
||||
*
|
||||
* @param string $name form-name of the control
|
||||
* @param string $form_name form-name of the control
|
||||
* @param mixed &$value value / existing content, can be modified
|
||||
* @param array &$cell array with the widget, can be modified for ui-independent widgets
|
||||
* @param array &$readonlys names of widgets as key, to be made readonly
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
class tree_widget
|
||||
{
|
||||
/**
|
||||
/**
|
||||
* exported methods of this class
|
||||
* @var array
|
||||
*/
|
||||
@ -37,7 +37,7 @@ class tree_widget
|
||||
*
|
||||
* @param string $ui '' for html
|
||||
*/
|
||||
function tree_widget($ui)
|
||||
function __construct($ui)
|
||||
{
|
||||
$this->ui = $ui;
|
||||
}
|
||||
@ -49,7 +49,7 @@ class tree_widget
|
||||
*
|
||||
* @param string $name form-name of the control
|
||||
* @param mixed &$value value / existing content, can be modified
|
||||
* @param array &$cell array with the widget, can be modified for ui-independent widgets
|
||||
* @param array &$cell array with the widget, can be modified for ui-independent widgets
|
||||
* @param array &$readonlys names of widgets as key, to be made readonly
|
||||
* @param mixed &$extension_data data the extension can store persisten between pre- and post-process
|
||||
* @param etemplate &$tmpl reference to the template we belong too
|
||||
@ -134,10 +134,10 @@ class tree_widget
|
||||
$onCheck = 'onCheck_'.$tree_id;
|
||||
$script .= "
|
||||
function $onCheck(id) {
|
||||
document.getElementsByName('$name')[0].value=$tree_id.getAllChecked();
|
||||
document.getElementsByName('$name')[0].value=$tree_id.getAllChecked();
|
||||
$onclick;
|
||||
}
|
||||
function $onNodeSelect(id) {
|
||||
function $onNodeSelect(id) {
|
||||
$tree_id.setCheck(id,$tree_id.isItemChecked(id) ? 0 : 1);
|
||||
$onCheck(id);
|
||||
}
|
||||
@ -146,7 +146,7 @@ class tree_widget
|
||||
else // single selection
|
||||
{
|
||||
$script .= "
|
||||
function $onNodeSelect(id) {
|
||||
function $onNodeSelect(id) {
|
||||
document.getElementsByName('$name')[0].value=id;
|
||||
$onclick;
|
||||
}
|
||||
@ -161,7 +161,7 @@ class tree_widget
|
||||
|
||||
return True; // extra Label Ok
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* postprocessing method, called after the submission of the form
|
||||
*
|
||||
@ -182,7 +182,7 @@ class tree_widget
|
||||
function post_process($name,&$value,&$extension_data,&$loop,&$tmpl,$value_in)
|
||||
{
|
||||
//echo "value_in"; _debug_array($value_in);
|
||||
|
||||
|
||||
if (!preg_match('/^[0-9\\/'.($extension_data['multiple']?',':'').']*$/',$value_in)) return false; // guard against xss and other malious content
|
||||
|
||||
$value = $extension_data['multiple'] ? explode(',',$value_in) : $value_in;
|
||||
|
Loading…
Reference in New Issue
Block a user