remove in php70 deprecated php4 constructors

This commit is contained in:
Ralf Becker 2016-02-19 08:54:53 +00:00
parent 32b4872084
commit 7c9f9a8eff
14 changed files with 16 additions and 58 deletions

View File

@ -6,7 +6,7 @@
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> * @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @author Joerg Lehrke <jlehrke@noc.de> * @author Joerg Lehrke <jlehrke@noc.de>
* @package infolog * @package infolog
* @copyright (c) 2003-12 by Ralf Becker <RalfBecker-AT-outdoor-training.de> * @copyright (c) 2003-16 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$ * @version $Id$
*/ */
@ -1558,9 +1558,9 @@ class infolog_bo
if (!($email = $GLOBALS['egw']->accounts->id2name($user,'account_email'))) continue; if (!($email = $GLOBALS['egw']->accounts->id2name($user,'account_email'))) continue;
// create the enviroment for $user // create the enviroment for $user
$this->user = $GLOBALS['egw_info']['user']['account_id'] = $user; $this->user = $GLOBALS['egw_info']['user']['account_id'] = $user;
$GLOBALS['egw']->preferences->preferences($user); $GLOBALS['egw']->preferences->__construct($user);
$GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->read_repository(); $GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->read_repository();
$GLOBALS['egw']->acl->acl($user); $GLOBALS['egw']->acl->__construct($user);
$GLOBALS['egw']->acl->read_repository(); $GLOBALS['egw']->acl->read_repository();
$this->grants = $GLOBALS['egw']->acl->get_grants('infolog',$this->group_owners ? $this->group_owners : true); $this->grants = $GLOBALS['egw']->acl->get_grants('infolog',$this->group_owners ? $this->group_owners : true);
$this->so = new infolog_so($this->grants); // so caches it's filters $this->so = new infolog_so($this->grants); // so caches it's filters

View File

@ -172,7 +172,7 @@ class HTTP_WebDAV_Server
* *
* @param void * @param void
*/ */
function HTTP_WebDAV_Server() function __construct()
{ {
// PHP messages destroy XML output -> switch them off // PHP messages destroy XML output -> switch them off
ini_set("display_errors", 0); ini_set("display_errors", 0);

View File

@ -55,7 +55,7 @@
* root: template directory. * root: template directory.
* unknowns: how to handle unknown variables. * unknowns: how to handle unknown variables.
*/ */
function Template($root = '.', $unknowns = 'remove') function __construct($root = '.', $unknowns = 'remove')
{ {
$this->set_root($root); $this->set_root($root);
$this->set_unknowns($unknowns); $this->set_unknowns($unknowns);

View File

@ -44,7 +44,7 @@ class about
* *
* @since 1.4 * @since 1.4
*/ */
function about() function __construct()
{ {
translation::add_app('admin'); translation::add_app('admin');

View File

@ -24,10 +24,6 @@
class arrayfunctions class arrayfunctions
{ {
function arrayfunctions($vars='')
{
}
/* /*
* arfsort() - (AR)ray (F)ield Sort. * arfsort() - (AR)ray (F)ield Sort.
* Sort a multi-dimensional array according * Sort a multi-dimensional array according
@ -74,4 +70,3 @@
} }
} // end class arrayfunctions } // end class arrayfunctions
?>

View File

@ -39,7 +39,7 @@ class asyncservice
/** /**
* constructor of the class * constructor of the class
*/ */
function asyncservice() function __construct()
{ {
if (is_object($GLOBALS['egw']->db)) if (is_object($GLOBALS['egw']->db))
{ {

View File

@ -146,16 +146,6 @@ class categories
} }
} }
/**
* php4 constructor
*
* @deprecated
*/
function categories($accountid='',$app_name='')
{
self::__construct($accountid,$app_name);
}
/** /**
* returns array with id's of all children from $cat_id and $cat_id itself! * returns array with id's of all children from $cat_id and $cat_id itself!
* *

View File

@ -256,7 +256,7 @@ class groupdav extends HTTP_WebDAV_Server
$this->dav_powered_by = str_replace('EGroupware','EGroupware '.$GLOBALS['egw_info']['server']['versions']['phpgwapi'], $this->dav_powered_by = str_replace('EGroupware','EGroupware '.$GLOBALS['egw_info']['server']['versions']['phpgwapi'],
$this->dav_powered_by); $this->dav_powered_by);
parent::HTTP_WebDAV_Server(); parent::__Construct();
// hack to allow to use query parameters in WebDAV, which HTTP_WebDAV_Server interprets as part of the path // hack to allow to use query parameters in WebDAV, which HTTP_WebDAV_Server interprets as part of the path
list($this->_SERVER['REQUEST_URI']) = explode('?',$this->_SERVER['REQUEST_URI']); list($this->_SERVER['REQUEST_URI']) = explode('?',$this->_SERVER['REQUEST_URI']);
/*if (substr($this->_SERVER['REQUEST_URI'],-13) == '/;add-member/') /*if (substr($this->_SERVER['REQUEST_URI'],-13) == '/;add-member/')

View File

@ -57,7 +57,7 @@ class historylog
* @param string $appname app name this instance operates on * @param string $appname app name this instance operates on
* @return historylog * @return historylog
*/ */
function historylog($appname='',$user=null) function __construct($appname='',$user=null)
{ {
$this->appname = $appname ? $appname : $GLOBALS['egw_info']['flags']['currentapp']; $this->appname = $appname ? $appname : $GLOBALS['egw_info']['flags']['currentapp'];
$this->user = !is_null($user) ? $user : $GLOBALS['egw_info']['user']['account_id']; $this->user = !is_null($user) ? $user : $GLOBALS['egw_info']['user']['account_id'];

View File

@ -65,17 +65,6 @@ class hooks
//_debug_array($this->locations); //_debug_array($this->locations);
} }
/**
* php4 constructor
*
* @param egw_db $db
* @deprecated use __construct()
*/
function hooks($db=null)
{
self::__construct($db);
}
/** /**
* Executes all the hooks (the user has rights to) for a given location * Executes all the hooks (the user has rights to) for a given location
* *

View File

@ -36,11 +36,11 @@
var $template; var $template;
var $extra_filters = array(); var $extra_filters = array();
function nextmatchs($website=False) function __construct($website=False)
{ {
if(!$website) if(!$website)
{ {
$this->template = createobject('phpgwapi.Template',EGW_TEMPLATE_DIR); $this->template = new Template(EGW_TEMPLATE_DIR);
$this->template->set_file(array( $this->template->set_file(array(
'_nextmatchs' => 'nextmatchs.tpl' '_nextmatchs' => 'nextmatchs.tpl'
)); ));

View File

@ -15,21 +15,6 @@
*/ */
class send extends egw_mailer class send extends egw_mailer
{ {
/**
* eGW specific initialisation of the PHPMailer: charset, language, smtp-host, ...
*
* To be able to call PHPMailer's Send function, we check if a subject, body or address is set and call it in that case,
* else we do our constructors work.
*/
function send()
{
if ($this->Subject || $this->Body || count($this->to))
{
return parent::send();
}
parent::__construct(); // calling parent constructor
}
/** /**
* Reset all Settings to send multiple Messages * Reset all Settings to send multiple Messages
*/ */

View File

@ -172,7 +172,7 @@ class solink
return is_array($id) ? $links : ($links[$id] ? $links[$id] : array()); return is_array($id) ? $links : ($links[$id] ? $links[$id] : array());
} }
private function _add2links($row,$left,$only_app,$not_only,array &$links) private static function _add2links($row,$left,$only_app,$not_only,array &$links)
{ {
$linked_app = $left ? $row['link_app2'] : $row['link_app1']; $linked_app = $left ? $row['link_app2'] : $row['link_app1'];
$linked_id = $left ? $row['link_id2'] : $row['link_id1']; $linked_id = $left ? $row['link_id2'] : $row['link_id1'];

View File

@ -121,7 +121,6 @@ class vfs_webdav_server extends HTTP_WebDAV_Server_Filesystem
{ {
$path = $this->_unslashify($this->base .$options["path"]); $path = $this->_unslashify($this->base .$options["path"]);
$parent = egw_vfs::dirname($path); $parent = egw_vfs::dirname($path);
$name = egw_vfs::basename($path);
if (!file_exists($parent)) { if (!file_exists($parent)) {
return "409 Conflict"; return "409 Conflict";
@ -631,7 +630,7 @@ class vfs_webdav_server extends HTTP_WebDAV_Server_Filesystem
{ {
$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],0,$this->force_download); $_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],0,$this->force_download);
} }
parent::HTTP_WebDAV_Server(); parent::__construct();
} }
/** /**