mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
removed unnecessary instancations and using static methods of html and egw_link class
This commit is contained in:
parent
5aa6c90625
commit
7dedec8bdc
@ -158,11 +158,6 @@ function cat_id($cats)
|
||||
return $id_str;
|
||||
}
|
||||
|
||||
if (!is_object($GLOBALS['egw']->html))
|
||||
{
|
||||
$GLOBALS['egw']->html =& CreateObject('phpgwapi.html');
|
||||
}
|
||||
|
||||
if ($_POST['next']) $_POST['action'] = 'next';
|
||||
switch ($_POST['action'])
|
||||
{
|
||||
@ -171,7 +166,7 @@ function cat_id($cats)
|
||||
$GLOBALS['egw']->template->set_var('lang_fieldsep',lang('Fieldseparator'));
|
||||
$GLOBALS['egw']->template->set_var('lang_charset',lang('Charset of file'));
|
||||
$GLOBALS['egw']->template->set_var('select_charset',
|
||||
$GLOBALS['egw']->html->select('charset','',
|
||||
html::select('charset','',
|
||||
$GLOBALS['egw']->translation->get_installed_charsets()+
|
||||
array('utf-8' => 'utf-8 (Unicode)'),True));
|
||||
$GLOBALS['egw']->template->set_var('fieldsep',$_POST['fieldsep'] ? $_POST['fieldsep'] : ';');
|
||||
@ -193,8 +188,8 @@ function cat_id($cats)
|
||||
$GLOBALS['egw']->template->set_var('lang_info_fieldname',lang('InfoLog-Fieldname'));
|
||||
$GLOBALS['egw']->template->set_var('lang_translation',lang("Translation").' <a href="#help">'.lang('help').'</a>');
|
||||
$GLOBALS['egw']->template->set_var('submit',
|
||||
$GLOBALS['egw']->html->submit_button('convert','Import') . ' '.
|
||||
$GLOBALS['egw']->html->submit_button('cancel','Cancel'));
|
||||
html::submit_button('convert','Import') . ' '.
|
||||
html::submit_button('cancel','Cancel'));
|
||||
$GLOBALS['egw']->template->set_var('lang_debug',lang('Test Import (show importable records <u>only</u> in browser)'));
|
||||
$GLOBALS['egw']->template->parse('rows','fheader');
|
||||
|
||||
@ -291,7 +286,7 @@ function cat_id($cats)
|
||||
$GLOBALS['egw']->template->parse('rows','ffooter',True);
|
||||
fclose($fp);
|
||||
|
||||
$hiddenvars = $GLOBALS['egw']->html->input_hidden(array(
|
||||
$hiddenvars = html::input_hidden(array(
|
||||
'action' => 'import',
|
||||
'fieldsep'=> $_POST['fieldsep'],
|
||||
'charset' => $_POST['charset']
|
||||
@ -336,7 +331,7 @@ function cat_id($cats)
|
||||
$_POST['trans'] = unserialize(stripslashes($_POST['trans']));
|
||||
// fall-through
|
||||
case 'import':
|
||||
$hiddenvars = $GLOBALS['egw']->html->input_hidden(array(
|
||||
$hiddenvars = html::input_hidden(array(
|
||||
'action' => 'continue',
|
||||
'fieldsep'=> $_POST['fieldsep'],
|
||||
'charset' => $_POST['charset'],
|
||||
@ -545,9 +540,9 @@ function cat_id($cats)
|
||||
lang('%1 records read (not yet imported, you may go %2back%3 and uncheck Test Import)',
|
||||
$anz,'','') :
|
||||
lang('%1 records imported',$anz)). ' '.
|
||||
(!$_POST['debug'] && $fields ? $GLOBALS['egw']->html->submit_button('next','Import next set') . ' ':'').
|
||||
$GLOBALS['egw']->html->submit_button('continue','Back') . ' '.
|
||||
$GLOBALS['egw']->html->submit_button('cancel','Cancel'));
|
||||
(!$_POST['debug'] && $fields ? html::submit_button('next','Import next set') . ' ':'').
|
||||
html::submit_button('continue','Back') . ' '.
|
||||
html::submit_button('cancel','Cancel'));
|
||||
$GLOBALS['egw']->template->set_var('log',$log);
|
||||
$GLOBALS['egw']->template->parse('rows','imported');
|
||||
break;
|
||||
|
@ -1049,10 +1049,6 @@ class boinfolog
|
||||
{
|
||||
return False;
|
||||
}
|
||||
if (!is_object($GLOBALS['egw']->html))
|
||||
{
|
||||
$GLOBALS['egw']->html =& CreateObject('phpgwapi.html');
|
||||
}
|
||||
$GLOBALS['egw']->translation->add_app('infolog');
|
||||
|
||||
$do_events = $args['location'] == 'calendar_include_events';
|
||||
@ -1094,10 +1090,10 @@ class boinfolog
|
||||
$this->status[$info['info_type']][$info['info_status']] => 'infolog',
|
||||
) as $name => $app)
|
||||
{
|
||||
$content[] = $GLOBALS['egw']->html->image($app,$name,lang($name),'border="0" width="15" height="15"').' ';
|
||||
$content[] = html::image($app,$name,lang($name),'border="0" width="15" height="15"').' ';
|
||||
}
|
||||
$content[] = $GLOBALS['egw']->html->a_href($title,$view);
|
||||
$content = $GLOBALS['egw']->html->table(array(1 => $content));
|
||||
$content[] = html::a_href($title,$view);
|
||||
$content = html::table(array(1 => $content));
|
||||
|
||||
$to_include[] = array(
|
||||
'starttime' => $info['info_startdate'],
|
||||
|
@ -213,11 +213,6 @@ class infolog_tracking extends bo_tracking
|
||||
$responsible[] = $GLOBALS['egw']->common->grab_owner_name($uid);
|
||||
}
|
||||
}
|
||||
if ($data['info_cat'] && !is_object($GLOBALS['egw']->categories))
|
||||
{
|
||||
require_once(EGW_API_INC.'/class.categories.inc.php');
|
||||
$GLOBALS['egw']->categories =& new categories($this->infolog->user,'infolog');
|
||||
}
|
||||
if ($GLOBALS['egw_info']['user']['preferences']['infolog']['show_id'])
|
||||
{
|
||||
$id = ' #'.$data['info_id'];
|
||||
|
@ -730,10 +730,6 @@ class soinfolog // DB-Layer
|
||||
if ((int)$query['cat_id'])
|
||||
{
|
||||
//$filtermethod .= ' AND info_cat='.intval($query['cat_id']).' ';
|
||||
if (!is_object($GLOBALS['egw']->categories))
|
||||
{
|
||||
$GLOBALS['egw']->categories =& CreateObject('phpgwapi.categories');
|
||||
}
|
||||
$cats = $GLOBALS['egw']->categories->return_all_children((int)$query['cat_id']);
|
||||
$filtermethod .= ' AND info_cat'.(count($cats)>1? ' IN ('.implode(',',$cats).') ' : '='.(int)$query['cat_id']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user