Fix some PHP Deprecated or Warnings

This commit is contained in:
ralf 2024-03-06 10:58:10 +02:00
parent d8d7560d12
commit db0488d9d0
8 changed files with 57 additions and 5 deletions

View File

@ -231,6 +231,10 @@ class Storage
*/ */
var $soextra; var $soextra;
var $sodistrib_list; var $sodistrib_list;
/**
* @var Api\Db
*/
var $db;
/** /**
* Constructor * Constructor

View File

@ -71,6 +71,12 @@ class Backup
* Regular expression to identify a Guacamole table OR view * Regular expression to identify a Guacamole table OR view
*/ */
const GUACAMOLE_REGEXP = '/^guacamole_/'; const GUACAMOLE_REGEXP = '/^guacamole_/';
/**
* Files directory
*
* @var string
*/
public $files_dir;
/** /**
* Backup directory. * Backup directory.
* *
@ -89,6 +95,8 @@ class Backup
* @var boolean * @var boolean
*/ */
public $backup_files = false ; public $backup_files = false ;
public $charset = 'utf-8';
public $api_version;
/** /**
* Reference to schema_proc's Api\Db object * Reference to schema_proc's Api\Db object
* *
@ -935,7 +943,7 @@ class Backup
fwrite($f,"charset: $this->charset\n\n"); fwrite($f,"charset: $this->charset\n\n");
$this->schema_backup($f); // add the schema in a human readable form too $this->schema_backup($f); // add the schema in a human-readable form too
fwrite($f,"\nschema: ".json_encode($this->schemas)."\n"); fwrite($f,"\nschema: ".json_encode($this->schemas)."\n");

View File

@ -17,6 +17,7 @@ namespace EGroupware\Api;
// explicitly list old, non-namespaced classes // explicitly list old, non-namespaced classes
// they are only used, if phpgwapi is installed // they are only used, if phpgwapi is installed
use accounts as egw_accounts; use accounts as egw_accounts;
use EGroupware\Api\Egw\Applications;
use egw_session; use egw_session;
use common; use common;
@ -57,6 +58,26 @@ class Egw extends Egw\Base
*/ */
public $session; public $session;
/**
* @var Acl
*/
public $acl;
/**
* @var Preferences
*/
public $preferences;
/**
* @var Applications
*/
public $applications;
/**
* @var Asyncservice
*/
public $asyncservice;
/** /**
* Constructor: Instantiates the sub-classes * Constructor: Instantiates the sub-classes
* *

View File

@ -636,7 +636,7 @@ class Select extends Etemplate\Widget
if($widget_type && is_object($widget_type)) if($widget_type && is_object($widget_type))
{ {
$widget = $widget_type; $widget = $widget_type;
$widget_type = $widget->attrs['type'] ? $widget->attrs['type'] : $widget->type; $widget_type = $widget->attrs['type'] ?? $widget->type;
if(substr($widget_type, 0, 4) == 'et2-') if(substr($widget_type, 0, 4) == 'et2-')
{ {
$widget_type = str_replace('et2-', '', $widget_type); $widget_type = str_replace('et2-', '', $widget_type);

View File

@ -48,6 +48,21 @@ class Mail
*/ */
var $profileID = 0; var $profileID = 0;
/**
* @var int
*/
var $accountid;
/**
* @var array
*/
var $sessionData;
/**
* @var Horde_Idna
*/
var $idna2;
/** /**
* delimiter - used to separate acc_id from mailbox / folder-tree-structure * delimiter - used to separate acc_id from mailbox / folder-tree-structure
* *

View File

@ -118,6 +118,11 @@ class Imap extends Horde_Imap_Client_Socket implements Imap\PushIface
*/ */
protected $enableSieve = false; protected $enableSieve = false;
/**
* @var string|null
*/
protected $loginType;
/** /**
* Connection is an admin connection * Connection is an admin connection
* *
@ -339,7 +344,7 @@ class Imap extends Horde_Imap_Client_Socket implements Imap\PushIface
return $this->getParam($name); return $this->getParam($name);
} }
// calling Horde_Imap_Client's __get() method available since 2.24.1 // calling Horde_Imap_Client's __get() method available since 2.24.1
return is_callable('parent::__get') ? parent::__get($name) : null; return parent::__get($name);
} }
} }

View File

@ -2557,10 +2557,10 @@ class mail_compose
case 'html': case 'html':
$body = $_formData['body']; $body = $_formData['body'];
static $ruler = '<hr class="ruler"';
if (!empty($attachment_links)) if (!empty($attachment_links))
{ {
// if we have a ruler, replace it with the attachment block // if we have a ruler, replace it with the attachment block
static $ruler = '<hr class="ruler"';
if (strpos($body, $ruler) !== false) if (strpos($body, $ruler) !== false)
{ {
$body = preg_replace('#'.$ruler.'[^>]*>#', $attachment_links, $body); $body = preg_replace('#'.$ruler.'[^>]*>#', $attachment_links, $body);

View File

@ -629,7 +629,6 @@ class setup_process
{ {
$this->init_process(); $this->init_process();
} }
$this->oProc->m_odb->HaltOnError = 'yes';
foreach($setup_info as $appname => &$appdata) foreach($setup_info as $appname => &$appdata)
{ {