Author: ralfbecker
New Revision: 55105
URL: http://svn.stylite.de/viewvc/egroupware?rev=55105&view=rev
Log:
remove possebility to call several methods static and non-static to fix PHP Deprecated: Non-static method xyz should not be called statically
Modified:
trunk/emailadmin/inc/class.emailadmin_account.inc.php
trunk/emailadmin/inc/class.emailadmin_imap.inc.php
trunk/emailadmin/inc/class.emailadmin_imapbase.inc.php
trunk/emailadmin/inc/class.emailadmin_wizard.inc.php
— trunk/emailadmin/inc/class.emailadmin_account.inc.php (original)
+++ trunk/emailadmin/inc/class.emailadmin_account.inc.php Mon Feb 22 17:57:18 2016
@@ -535,15 +535,14 @@
*
* Standard identity is always first (as it has account_id=0 and we order account_id ASC).
*
-
-
@param int|array|emailadmin_account $account=null default this account, empty array() to get all identities of current user
-
-
@param boolean $replace_placeholders=false should placeholders like {{n_fn}} be replaced
-
-
@param string $field=‘name’ what to return as value: “ident_(realname|org|email|signature)” or default “name”=result from identity_name
-
-
@param int $user=null account_id to use if not current user
-
-
@param int|array|emailadmin_account $account default this account, empty array() to get all identities of current user
-
-
@param boolean $replace_placeholders =false should placeholders like {{n_fn}} be replaced
-
-
@param string $field =‘name’ what to return as value: “ident_(realname|org|email|signature)” or default “name”=result from identity_name
-
-
@param int $user =null account_id to use if not current user
-
@return Iterator ident_id => identity_name of identity
*/
- public static function identities($account, $replace_placeholders=true, $field=‘name’, $user=null)
- {
if (!isset($user)) $user = $GLOBALS[‘egw_info’][‘user’][‘account_id’];
$acc_id = is_scalar($account) ? $account : $account[‘acc_id’];
@@ -645,7 +644,7 @@
foreach(self::search(true, false) as $acc_id => $account)
{
$added = false; // make sure each account get’s at least added once, even if it uses an identical email address
-
foreach(self::identities($account, true, 'params') as $identity)
{
if (($address = call_user_func($formatter, $identity)) && (!$added || !in_array($address, $addresses)))
{
@@ -663,11 +662,11 @@
/**
* Return list of identities/signatures for given account ordered by give email on top and then by identity name
*
-
-
@param int|array|emailadmin_account $account=null default this account, empty array() to get all identities of current user
-
-
@param int|array|emailadmin_account $account default this account, empty array() to get all identities of current user
-
@param string $order_email_top email address to order top
-
@return array ident_id => ident_name pairs
*/
- public /static/ function identities_ordered($account, $order_email_top)
- public static function identities_ordered($account, $order_email_top)
{
$identities = iterator_to_array(self::identities($account, true, ‘params’));
uasort($identities, function($a, $b) use ($order_email_top)
@@ -692,15 +691,14 @@
-
- For full list of placeholders see addressbook_merge.
-
-
-
@param array|emailadmin_account $identity=null
-
-
@param int $account_id=null account_id of user, or current user
-
-
@param array|emailadmin_account $identity
-
-
@param int $account_id =null account_id of user, or current user
-
@return array with modified fields
*/
- public /static/ function replace_placeholders($identity=null, $account_id=null)
- public static function replace_placeholders($identity, $account_id=null)
{
static $fields = array(‘ident_name’,‘ident_realname’,‘ident_org’,‘ident_email’,‘ident_signature’);
@@ -790,12 +788,11 @@
*
* Can be called static, if identity is given as parameter
*
-
-
@param array|emailadmin_account $identity=null default standard identity of current account
-
-
@param array|emailadmin_account $identity default standard identity of current account
-
@return int ident_id of new/updated identity
*/
- public static function save_identity($identity)
- {
if (!is_array($identity) && !is_a($identity, ‘emailadmin_account’))
{
throw new egw_exception_wrong_parameter(METHOD."() requires an identity or account as first parameter!");
— trunk/emailadmin/inc/class.emailadmin_imap.inc.php (original)
+++ trunk/emailadmin/inc/class.emailadmin_imap.inc.php Mon Feb 22 17:57:18 2016
@@ -1372,7 +1372,7 @@
/**
* Init static variables
*/
- public function init_static()
- public static function init_static()
{
self::$supports_keywords =& egw_cache::getSession (CLASS, ‘supports_keywords’);
}
— trunk/emailadmin/inc/class.emailadmin_imapbase.inc.php (original)
+++ trunk/emailadmin/inc/class.emailadmin_imapbase.inc.php Mon Feb 22 17:57:18 2016
@@ -635,7 +635,7 @@
function getUserEMailAddresses($_profileID=null) {
$acc = emailadmin_account::read((!empty($_profileID)?$_profileID:$this->profileID));
//error_log(METHOD.’ (’.LINE.’) ‘.’:’.array2string($acc));
@@ -660,9 +660,8 @@
{
$acc = emailadmin_account::read($acc_id,($_accountToSearch?$_accountToSearch:null));
if (!$resolve_placeholders) $userEMailAdresses[$acc[‘ident_id’]] = array(‘acc_id’=>$acc_id,‘ident_id’=>$acc[‘ident_id’],‘ident_email’=>$acc[‘ident_email’],‘ident_org’=>$acc[‘ident_org’],‘ident_realname’=>$acc[‘ident_realname’],‘ident_signature’=>$acc[‘ident_signature’],‘ident_name’=>$acc[‘ident_name’]);
@@ -685,8 +684,7 @@
$account = emailadmin_account::read($account);
}
$userEMailAdresses = array();
-
$identities = $account->identities(null, true, 'params');
-
foreach($identities as $ik => $ident) {
-
foreach(emailadmin_account::identities($account, true, 'params') as $ik => $ident) {
//error_log(__METHOD__.' ('.__LINE__.') '.':'.$ik.'->'.array2string($ident));
$identity = emailadmin_account::read_identity($ik,true,null,$account);
//error_log(__METHOD__.' ('.__LINE__.') '.':'.$ik.'->'.array2string($identity));
@@ -714,9 +712,8 @@
function getDefaultIdentity() {
// retrieve the signature accociated with the identity
$id = $this->getIdentitiesWithAccounts($_accountData=array());
-
$acc = emailadmin_account::read($this->profileID);
-
$accountDataIT = ($_accountData[$this->profileID]?$acc->identities($this->profileID,false,'ident_id'):$acc->identities($_accountData[$id],false,'ident_id'));
-
foreach($accountDataIT as $it => $accountData)
-
foreach(eamiadmin_account::identities($_accountData[$this->profileID] ?
-
$this->profileID : $_accountData[$id],false,'ident_id') as $accountData)
{
return $accountData;
}
@@ -5475,7 +5472,7 @@
return $attachment['attachment'];
}
- /**
- Retrieve tnef attachments
-
@@ -5494,7 +5491,7 @@
{
foreach($tnef_parts->getParts() as $mime_id => $part)
{
@@ -5504,16 +5501,16 @@
$attachment[‘filename’] = (isset($attachment[‘cid’])&&!empty($attachment[‘cid’])?
$attachment[‘cid’]:lang(“unknown”).’_Uid’.$_uid.’_Part’.$mime_id).’.’.mime_magic::mime2ext($attachment[‘mimeType’]);
}
@@ -5584,7 +5581,7 @@
//‘attachment’ => $part->getContents(array(‘stream’=>$_stream))
‘attachment’ => ($part?$part->getContents(array(‘stream’=>$_stream)):‘Error: Could not fetch attachment for:’." Uid:$_uid, PartId:$_partID, WinMailNr:$_winmail_nr in $_folder:".array2string(function_backtrace()))
);
-
// try guessing the mimetype, if we get the application/octet-stream
if (strtolower($attachmentData['type']) == 'application/octet-stream') $attachmentData['type'] = mime_magic::filename2mime($attachmentData['filename']);
# if the attachment holds a winmail number and is a winmail.dat then we have to handle that.
@@ -6749,7 +6746,7 @@
$previousFailed=false;
//error_log(METHOD.LINE."(’$addresses’, $default_domain) parsed $i: mailbox=$adr->mailbox, host=$adr->host, personal=$adr->personal");
$ret2->add($adr);
— trunk/emailadmin/inc/class.emailadmin_wizard.inc.php (original)
+++ trunk/emailadmin/inc/class.emailadmin_wizard.inc.php Mon Feb 22 17:57:18 2016
@@ -865,7 +865,7 @@
self::fix_account_id_0($content[‘account_id’]);
// read identities (of current user) and mark std identity
-
$content['identities'] = iterator_to_array($account->identities(null, true, 'name', $content['called_for']));
-
$content['identities'] = iterator_to_array(emailadmin_account::identities($account, true, 'name', $content['called_for']));
$content['std_ident_id'] = $content['ident_id'];
$content['identities'][$content['std_ident_id']] = lang('Standard identity');
// change self::SSL_NONE (=0) to "no" used in sel_options
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs