Commit 06dc9b40 authored by skummer's avatar skummer

ZP-222 #comment all private members are protected now #time 10m

git-svn-id: https://z-push.org/svn/z-push/trunk@1441 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 98d57034
...@@ -49,16 +49,16 @@ require_once('include/z_RFC822.php'); ...@@ -49,16 +49,16 @@ require_once('include/z_RFC822.php');
class BackendIMAP extends BackendDiff { class BackendIMAP extends BackendDiff {
private $wasteID; protected $wasteID;
private $sentID; protected $sentID;
private $server; protected $server;
private $mbox; protected $mbox;
private $mboxFolder; protected $mboxFolder;
private $username; protected $username;
private $domain; protected $domain;
private $serverdelimiter; protected $serverdelimiter;
private $sinkfolders; protected $sinkfolders;
private $sinkstates; protected $sinkstates;
/**---------------------------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------------------------
* default backend methods * default backend methods
...@@ -1239,7 +1239,7 @@ class BackendIMAP extends BackendDiff { ...@@ -1239,7 +1239,7 @@ class BackendIMAP extends BackendDiff {
/**---------------------------------------------------------------------------------------------------------- /**----------------------------------------------------------------------------------------------------------
* private IMAP methods * protected IMAP methods
*/ */
/** /**
...@@ -1247,10 +1247,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1247,10 +1247,10 @@ class BackendIMAP extends BackendDiff {
* *
* @param string $folderid hex folderid generated by convertImapId() * @param string $folderid hex folderid generated by convertImapId()
* *
* @access private * @access protected
* @return string imap folder id * @return string imap folder id
*/ */
private function getImapIdFromFolderId($folderid) { protected function getImapIdFromFolderId($folderid) {
$this->InitializePermanentStorage(); $this->InitializePermanentStorage();
if (isset($this->permanentStorage->fmFidFimap)) { if (isset($this->permanentStorage->fmFidFimap)) {
...@@ -1273,10 +1273,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1273,10 +1273,10 @@ class BackendIMAP extends BackendDiff {
* *
* @param string $imapid Imap folder id * @param string $imapid Imap folder id
* *
* @access private * @access protected
* @return string hex folder id * @return string hex folder id
*/ */
private function getFolderIdFromImapId($imapid) { protected function getFolderIdFromImapId($imapid) {
$this->InitializePermanentStorage(); $this->InitializePermanentStorage();
if (isset($this->permanentStorage->fmFimapFid)) { if (isset($this->permanentStorage->fmFimapFid)) {
...@@ -1301,10 +1301,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1301,10 +1301,10 @@ class BackendIMAP extends BackendDiff {
* *
* @param string $imapid Imap folder id * @param string $imapid Imap folder id
* *
* @access private * @access protected
* @return string hex folder id * @return string hex folder id
*/ */
private function convertImapId($imapid) { protected function convertImapId($imapid) {
$this->InitializePermanentStorage(); $this->InitializePermanentStorage();
// check if this imap id was converted before // check if this imap id was converted before
...@@ -1343,10 +1343,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1343,10 +1343,10 @@ class BackendIMAP extends BackendDiff {
* *
* @param string $message html message * @param string $message html message
* *
* @access private * @access protected
* @return string plaintext message * @return string plaintext message
*/ */
private function getBody($message) { protected function getBody($message) {
$body = ""; $body = "";
$htmlbody = ""; $htmlbody = "";
...@@ -1371,10 +1371,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1371,10 +1371,10 @@ class BackendIMAP extends BackendDiff {
* @param string $message message subtype * @param string $message message subtype
* @param string &$body body reference * @param string &$body body reference
* *
* @access private * @access protected
* @return * @return
*/ */
private function getBodyRecursive($message, $subtype, &$body) { protected function getBodyRecursive($message, $subtype, &$body) {
if(!isset($message->ctype_primary)) return; if(!isset($message->ctype_primary)) return;
if(strcasecmp($message->ctype_primary,"text")==0 && strcasecmp($message->ctype_secondary,$subtype)==0 && isset($message->body)) if(strcasecmp($message->ctype_primary,"text")==0 && strcasecmp($message->ctype_secondary,$subtype)==0 && isset($message->body))
$body .= $message->body; $body .= $message->body;
...@@ -1391,10 +1391,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1391,10 +1391,10 @@ class BackendIMAP extends BackendDiff {
/** /**
* Returns the serverdelimiter for folder parsing * Returns the serverdelimiter for folder parsing
* *
* @access private * @access protected
* @return string delimiter * @return string delimiter
*/ */
private function getServerDelimiter() { protected function getServerDelimiter() {
$list = @imap_getmailboxes($this->mbox, $this->server, "*"); $list = @imap_getmailboxes($this->mbox, $this->server, "*");
if (is_array($list)) { if (is_array($list)) {
$val = $list[0]; $val = $list[0];
...@@ -1411,10 +1411,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1411,10 +1411,10 @@ class BackendIMAP extends BackendDiff {
* @param string $folderid id of the folder * @param string $folderid id of the folder
* @param boolean $force re-open the folder even if currently opened * @param boolean $force re-open the folder even if currently opened
* *
* @access private * @access protected
* @return * @return
*/ */
private function imap_reopenFolder($folderid, $force = false) { protected function imap_reopenFolder($folderid, $force = false) {
// to see changes, the folder has to be reopened! // to see changes, the folder has to be reopened!
if ($this->mboxFolder != $folderid || $force) { if ($this->mboxFolder != $folderid || $force) {
$s = @imap_reopen($this->mbox, $this->server . $folderid); $s = @imap_reopen($this->mbox, $this->server . $folderid);
...@@ -1439,10 +1439,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1439,10 +1439,10 @@ class BackendIMAP extends BackendDiff {
* @param string $body_cte content-transfer-encoding * @param string $body_cte content-transfer-encoding
* @param string $boundary optional existing boundary * @param string $boundary optional existing boundary
* *
* @access private * @access protected
* @return array with [0] => $mail_header and [1] => $mail_body * @return array with [0] => $mail_header and [1] => $mail_body
*/ */
private function mail_attach($filenm,$filesize,$file_cont,$body, $body_ct, $body_cte, $boundary = false) { protected function mail_attach($filenm,$filesize,$file_cont,$body, $body_ct, $body_cte, $boundary = false) {
if (!$boundary) $boundary = strtoupper(md5(uniqid(time()))); if (!$boundary) $boundary = strtoupper(md5(uniqid(time())));
//remove the ending boundary because we will add it at the end //remove the ending boundary because we will add it at the end
...@@ -1466,10 +1466,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1466,10 +1466,10 @@ class BackendIMAP extends BackendDiff {
* @param string $body_ct content-type * @param string $body_ct content-type
* @param string $body_cte content-transfer-encoding * @param string $body_cte content-transfer-encoding
* *
* @access private * @access protected
* @return string message body * @return string message body
*/ */
private function enc_multipart($boundary, $body, $body_ct, $body_cte) { protected function enc_multipart($boundary, $body, $body_ct, $body_cte) {
$mail_body = "This is a multi-part message in MIME format\n\n"; $mail_body = "This is a multi-part message in MIME format\n\n";
$mail_body .= "--$boundary\n"; $mail_body .= "--$boundary\n";
$mail_body .= "Content-Type: $body_ct\n"; $mail_body .= "Content-Type: $body_ct\n";
...@@ -1488,10 +1488,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1488,10 +1488,10 @@ class BackendIMAP extends BackendDiff {
* @param string $file_cont content of the file * @param string $file_cont content of the file
* @param string $content_type optional content-type * @param string $content_type optional content-type
* *
* @access private * @access protected
* @return string message body * @return string message body
*/ */
private function enc_attach_file($boundary, $filenm, $filesize, $file_cont, $content_type = "") { protected function enc_attach_file($boundary, $filenm, $filesize, $file_cont, $content_type = "") {
if (!$content_type) $content_type = "text/plain"; if (!$content_type) $content_type = "text/plain";
$mail_body = "--$boundary\n"; $mail_body = "--$boundary\n";
$mail_body .= "Content-Type: $content_type; name=\"$filenm\"\n"; $mail_body .= "Content-Type: $content_type; name=\"$filenm\"\n";
...@@ -1511,10 +1511,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1511,10 +1511,10 @@ class BackendIMAP extends BackendDiff {
* @param string $header header of the message * @param string $header header of the message
* @param long $body body of the message * @param long $body body of the message
* *
* @access private * @access protected
* @return boolean status * @return boolean status
*/ */
private function addSentMessage($folderid, $header, $body) { protected function addSentMessage($folderid, $header, $body) {
$header_body = str_replace("\n", "\r\n", str_replace("\r", "", $header . "\n\n" . $body)); $header_body = str_replace("\n", "\r\n", str_replace("\r", "", $header . "\n\n" . $body));
return @imap_append($this->mbox, $this->server . $folderid, $header_body, "\\Seen"); return @imap_append($this->mbox, $this->server . $folderid, $header_body, "\\Seen");
...@@ -1525,10 +1525,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1525,10 +1525,10 @@ class BackendIMAP extends BackendDiff {
* *
* @param array $ad addresses array * @param array $ad addresses array
* *
* @access private * @access protected
* @return string mail address(es) string * @return string mail address(es) string
*/ */
private function parseAddr($ad) { protected function parseAddr($ad) {
$addr_string = ""; $addr_string = "";
if (isset($ad) && is_array($ad)) { if (isset($ad) && is_array($ad)) {
foreach($ad as $addr) { foreach($ad as $addr) {
...@@ -1547,10 +1547,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1547,10 +1547,10 @@ class BackendIMAP extends BackendDiff {
* @param string &$displayname reference of the displayname * @param string &$displayname reference of the displayname
* @param long &$parent reference of the parent folder * @param long &$parent reference of the parent folder
* *
* @access private * @access protected
* @return * @return
*/ */
private function getModAndParentNames($fhir, &$displayname, &$parent) { protected function getModAndParentNames($fhir, &$displayname, &$parent) {
// if mod is already set add the previous part to it as it might be a folder which has // if mod is already set add the previous part to it as it might be a folder which has
// delimiter in its name // delimiter in its name
$displayname = (isset($displayname) && strlen($displayname) > 0) ? $displayname = array_pop($fhir).$this->serverdelimiter.$displayname : array_pop($fhir); $displayname = (isset($displayname) && strlen($displayname) > 0) ? $displayname = array_pop($fhir).$this->serverdelimiter.$displayname : array_pop($fhir);
...@@ -1568,10 +1568,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1568,10 +1568,10 @@ class BackendIMAP extends BackendDiff {
* *
* @param string $foldername a foldername * @param string $foldername a foldername
* *
* @access private * @access protected
* @return boolean * @return boolean
*/ */
private function checkIfIMAPFolder($folderName) { protected function checkIfIMAPFolder($folderName) {
$parent = imap_list($this->mbox, $this->server, $folderName); $parent = imap_list($this->mbox, $this->server, $folderName);
if ($parent === false) return false; if ($parent === false) return false;
return true; return true;
...@@ -1583,10 +1583,10 @@ class BackendIMAP extends BackendDiff { ...@@ -1583,10 +1583,10 @@ class BackendIMAP extends BackendDiff {
* *
* @param string $receiveddate a date as a string * @param string $receiveddate a date as a string
* *
* @access private * @access protected
* @return string * @return string
*/ */
private function cleanupDate($receiveddate) { protected function cleanupDate($receiveddate) {
$receiveddate = strtotime(preg_replace("/\(.*\)/", "", $receiveddate)); $receiveddate = strtotime(preg_replace("/\(.*\)/", "", $receiveddate));
if ($receiveddate == false || $receiveddate == -1) { if ($receiveddate == false || $receiveddate == -1) {
debugLog("Received date is false. Message might be broken."); debugLog("Received date is false. Message might be broken.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment