Code Duplication    Length = 1-1 lines in 5 locations

mail/inc/class.mail_zpush.inc.php 5 locations

@@ 403-403 (lines=1) @@
400
		//error_log("IMAP-Sendmail: Smartdata = ".array2string($smartdata));
401
402
		// initialize our Mail
403
		if (!isset($this->mail)) $this->mail = Mail::getInstance(false,self::$profileID,true,false,true);
404
		$activeMailProfiles = $this->mail->getAccountIdentities(self::$profileID);
405
		// use the standardIdentity
406
		$activeMailProfile = Mail::getStandardIdentityForProfile($activeMailProfiles,self::$profileID);
@@ 884-884 (lines=1) @@
881
		if (!$mimesupport && ($key = array_search('4', $bodypreference))) unset($bodypreference[$key]);
882
883
		//$this->debugLevel=4;
884
		if (!isset($this->mail)) $this->mail = Mail::getInstance(false,self::$profileID,true,false,true);
885
		ZLog::Write(LOGLEVEL_DEBUG,__METHOD__.__LINE__.' FolderID:'.$folderid.' ID:'.$id.' TruncSize:'.$truncsize.' Bodypreference: '.array2string($bodypreference));
886
		$account = $_folderName = $xid = null;
887
		$this->splitID($folderid,$account,$_folderName,$xid);
@@ 1284-1284 (lines=1) @@
1281
1282
		$this->splitID($folderid, $account, $folder);
1283
1284
		if (!isset($this->mail)) $this->mail = Mail::getInstance(false,self::$profileID,true,false,true);
1285
1286
		$this->mail->reopen($folder);
1287
		$attachment = $this->mail->getAttachment($id,$part,0,false,true,$folder);
@@ 1373-1373 (lines=1) @@
1370
		$this->splitID($folderid, $account, $srcFolder);
1371
		$this->splitID($newfolderid, $account, $destFolder);
1372
		ZLog::Write(LOGLEVEL_DEBUG, "IMAP-MoveMessage: (SourceFolder: '$srcFolder'  id: '$id'  DestFolder: '$destFolder' )");
1373
		if (!isset($this->mail)) $this->mail = Mail::getInstance(false,self::$profileID,true,false,true);
1374
		$this->mail->reopen($destFolder);
1375
		$status = $this->mail->getFolderStatus($destFolder);
1376
		$uidNext = $status['uidnext'];
@@ 1792-1792 (lines=1) @@
1789
1790
		if ($type != 'mail') return false;
1791
1792
		if (!isset($this->mail)) $this->mail = Mail::getInstance(false,self::$profileID,true,false,true);
1793
		if (!$this->mail->folderIsSelectable($folder))
1794
		{
1795
			ZLog::Write(LOGLEVEL_DEBUG,__METHOD__.": could not select folder $folder returning fake state");