"removing unnecessary instancations"

This commit is contained in:
Ralf Becker 2008-03-25 17:05:08 +00:00
parent bf31f4e94a
commit 8a9e4d3d9d

View File

@ -260,22 +260,19 @@
* It's actually a PHP-Bug, that we have to escape space. * It's actually a PHP-Bug, that we have to escape space.
* For all other Characters, refer to RFC2254. * For all other Characters, refer to RFC2254.
* *
* @deprecated use ldap::quote()
* @param $string either a string to be escaped, or an array of values to be escaped * @param $string either a string to be escaped, or an array of values to be escaped
* @return string * @return string
*/ */
function ldap_addslashes($string='') function ldap_addslashes($string='')
{ {
// use Lars new ldap class
if (!is_object($GLOBALS['egw']->ldap))
{
$GLOBALS['egw']->ldap =& CreateObject('phpgwapi.ldap');
}
return ldap::quote($string); return ldap::quote($string);
} }
/** /**
* connect to the ldap server and return a handle * connect to the ldap server and return a handle
* *
* @deprecated use ldap::ldapConnect()
* @param $host ldap host * @param $host ldap host
* @param $dn ldap_root_dn * @param $dn ldap_root_dn
* @param $passwd ldap_root_pw * @param $passwd ldap_root_pw
@ -284,10 +281,6 @@
function ldapConnect($host='', $dn='', $passwd='') function ldapConnect($host='', $dn='', $passwd='')
{ {
// use Lars new ldap class // use Lars new ldap class
if (!is_object($GLOBALS['egw']->ldap))
{
$GLOBALS['egw']->ldap =& CreateObject('phpgwapi.ldap');
}
return $GLOBALS['egw']->ldap->ldapConnect($host,$dn,$passwd); return $GLOBALS['egw']->ldap->ldapConnect($host,$dn,$passwd);
} }
@ -1146,15 +1139,12 @@
* *
* uses the encryption type set in setup and calls the appropriate encryption functions * uses the encryption type set in setup and calls the appropriate encryption functions
* *
* @deprecated use auth::encrypt_password()
* @param $password password to encrypt * @param $password password to encrypt
*/ */
function encrypt_password($password,$sql=False) function encrypt_password($password,$sql=False)
{ {
if(!@is_object($GLOBALS['egw']->auth)) return auth::encrypt_password($password,$sql);
{
$GLOBALS['egw']->auth =& CreateObject('phpgwapi.auth');
}
return $GLOBALS['egw']->auth->encrypt_password($password,$sql);
} }
/** /**
@ -1232,11 +1222,6 @@
*/ */
function show_date($t = 0, $format = '', $adjust_to_usertime=true) function show_date($t = 0, $format = '', $adjust_to_usertime=true)
{ {
if(!is_object($GLOBALS['egw']->datetime))
{
$GLOBALS['egw']->datetime =& CreateObject('phpgwapi.datetime');
}
if (!$t) if (!$t)
{ {
$t = $GLOBALS['egw']->datetime->gmtnow; $t = $GLOBALS['egw']->datetime->gmtnow;