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');
class BackendIMAP extends BackendDiff {
private $wasteID;
private $sentID;
private $server;
private $mbox;
private $mboxFolder;
private $username;
private $domain;
private $serverdelimiter;
private $sinkfolders;
private $sinkstates;
protected $wasteID;
protected $sentID;
protected $server;
protected $mbox;
protected $mboxFolder;
protected $username;
protected $domain;
protected $serverdelimiter;
protected $sinkfolders;
protected $sinkstates;
/**----------------------------------------------------------------------------------------------------------
* default backend methods
......@@ -1239,7 +1239,7 @@ class BackendIMAP extends BackendDiff {
/**----------------------------------------------------------------------------------------------------------
* private IMAP methods
* protected IMAP methods
*/
/**
......@@ -1247,10 +1247,10 @@ class BackendIMAP extends BackendDiff {
*
* @param string $folderid hex folderid generated by convertImapId()
*
* @access private
* @access protected
* @return string imap folder id
*/
private function getImapIdFromFolderId($folderid) {
protected function getImapIdFromFolderId($folderid) {
$this->InitializePermanentStorage();
if (isset($this->permanentStorage->fmFidFimap)) {
......@@ -1273,10 +1273,10 @@ class BackendIMAP extends BackendDiff {
*
* @param string $imapid Imap folder id
*
* @access private
* @access protected
* @return string hex folder id
*/
private function getFolderIdFromImapId($imapid) {
protected function getFolderIdFromImapId($imapid) {
$this->InitializePermanentStorage();
if (isset($this->permanentStorage->fmFimapFid)) {
......@@ -1301,10 +1301,10 @@ class BackendIMAP extends BackendDiff {
*
* @param string $imapid Imap folder id
*
* @access private
* @access protected
* @return string hex folder id
*/
private function convertImapId($imapid) {
protected function convertImapId($imapid) {
$this->InitializePermanentStorage();
// check if this imap id was converted before
......@@ -1343,10 +1343,10 @@ class BackendIMAP extends BackendDiff {
*
* @param string $message html message
*
* @access private
* @access protected
* @return string plaintext message
*/
private function getBody($message) {
protected function getBody($message) {
$body = "";
$htmlbody = "";
......@@ -1371,10 +1371,10 @@ class BackendIMAP extends BackendDiff {
* @param string $message message subtype
* @param string &$body body reference
*
* @access private
* @access protected
* @return
*/
private function getBodyRecursive($message, $subtype, &$body) {
protected function getBodyRecursive($message, $subtype, &$body) {
if(!isset($message->ctype_primary)) return;
if(strcasecmp($message->ctype_primary,"text")==0 && strcasecmp($message->ctype_secondary,$subtype)==0 && isset($message->body))
$body .= $message->body;
......@@ -1391,10 +1391,10 @@ class BackendIMAP extends BackendDiff {
/**
* Returns the serverdelimiter for folder parsing
*
* @access private
* @access protected
* @return string delimiter
*/
private function getServerDelimiter() {
protected function getServerDelimiter() {
$list = @imap_getmailboxes($this->mbox, $this->server, "*");
if (is_array($list)) {
$val = $list[0];
......@@ -1411,10 +1411,10 @@ class BackendIMAP extends BackendDiff {
* @param string $folderid id of the folder
* @param boolean $force re-open the folder even if currently opened
*
* @access private
* @access protected
* @return
*/
private function imap_reopenFolder($folderid, $force = false) {
protected function imap_reopenFolder($folderid, $force = false) {
// to see changes, the folder has to be reopened!
if ($this->mboxFolder != $folderid || $force) {
$s = @imap_reopen($this->mbox, $this->server . $folderid);
......@@ -1439,10 +1439,10 @@ class BackendIMAP extends BackendDiff {
* @param string $body_cte content-transfer-encoding
* @param string $boundary optional existing boundary
*
* @access private
* @access protected
* @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())));
//remove the ending boundary because we will add it at the end
......@@ -1466,10 +1466,10 @@ class BackendIMAP extends BackendDiff {
* @param string $body_ct content-type
* @param string $body_cte content-transfer-encoding
*
* @access private
* @access protected
* @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 .= "--$boundary\n";
$mail_body .= "Content-Type: $body_ct\n";
......@@ -1488,10 +1488,10 @@ class BackendIMAP extends BackendDiff {
* @param string $file_cont content of the file
* @param string $content_type optional content-type
*
* @access private
* @access protected
* @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";
$mail_body = "--$boundary\n";
$mail_body .= "Content-Type: $content_type; name=\"$filenm\"\n";
......@@ -1511,10 +1511,10 @@ class BackendIMAP extends BackendDiff {
* @param string $header header of the message
* @param long $body body of the message
*
* @access private
* @access protected
* @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));
return @imap_append($this->mbox, $this->server . $folderid, $header_body, "\\Seen");
......@@ -1525,10 +1525,10 @@ class BackendIMAP extends BackendDiff {
*
* @param array $ad addresses array
*
* @access private
* @access protected
* @return string mail address(es) string
*/
private function parseAddr($ad) {
protected function parseAddr($ad) {
$addr_string = "";
if (isset($ad) && is_array($ad)) {
foreach($ad as $addr) {
......@@ -1547,10 +1547,10 @@ class BackendIMAP extends BackendDiff {
* @param string &$displayname reference of the displayname
* @param long &$parent reference of the parent folder
*
* @access private
* @access protected
* @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
// delimiter in its name
$displayname = (isset($displayname) && strlen($displayname) > 0) ? $displayname = array_pop($fhir).$this->serverdelimiter.$displayname : array_pop($fhir);
......@@ -1568,10 +1568,10 @@ class BackendIMAP extends BackendDiff {
*
* @param string $foldername a foldername
*
* @access private
* @access protected
* @return boolean
*/
private function checkIfIMAPFolder($folderName) {
protected function checkIfIMAPFolder($folderName) {
$parent = imap_list($this->mbox, $this->server, $folderName);
if ($parent === false) return false;
return true;
......@@ -1583,10 +1583,10 @@ class BackendIMAP extends BackendDiff {
*
* @param string $receiveddate a date as a string
*
* @access private
* @access protected
* @return string
*/
private function cleanupDate($receiveddate) {
protected function cleanupDate($receiveddate) {
$receiveddate = strtotime(preg_replace("/\(.*\)/", "", $receiveddate));
if ($receiveddate == false || $receiveddate == -1) {
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