Skip to content

Commit

Permalink
Fix phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 25, 2019
1 parent e332288 commit 1dd8d9f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions htdocs/adherents/subscription.php
Expand Up @@ -714,7 +714,7 @@
$subscriptionstatic->ref=$objp->crowid;
$subscriptionstatic->id=$objp->crowid;

if ($objp->cfk_type > 0)
if ($objp->cfk_type > 0)
{
$adht->fetch($objp->cfk_type);
}
Expand All @@ -723,7 +723,7 @@
print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';
print '<td class="center">'.dol_print_date($db->jdate($objp->datec), 'dayhour')."</td>\n";
print '<td class="center">';
if ($objp->cfk_type > 0)
if ($objp->cfk_type > 0)
{
print $adht->getNomUrl(1);
}
Expand Down
16 changes: 9 additions & 7 deletions htdocs/emailcollector/class/emailcollector.class.php
Expand Up @@ -1820,7 +1820,8 @@ public function doCollectOneCollector()
* @param string $mid prefix
* @return array Array with number and object
*/
function getmsg($mbox, $mid) {
private function getmsg($mbox, $mid)
{
// input $mbox = IMAP stream, $mid = message id
// output all the following:
global $charset,$htmlmsg,$plainmsg,$attachments;
Expand All @@ -1832,10 +1833,10 @@ function getmsg($mbox, $mid) {
// add code here to get date, from, to, cc, subject...

// BODY
$s = imap_fetchstructure($mbox,$mid);
$s = imap_fetchstructure($mbox, $mid);

if (!$s->parts) // simple
$this->getpart($mbox,$mid,$s,0); // pass 0 as part-number
$this->getpart($mbox, $mid, $s, 0); // pass 0 as part-number
else { // multipart: cycle through each part
foreach ($s->parts as $partno0=>$p)
{
Expand Down Expand Up @@ -1868,14 +1869,15 @@ function getmsg($mbox, $mid) {
* @param string $partno Partno
* @return void
*/
private function getpart($mbox, $mid, $p, $partno) {
private function getpart($mbox, $mid, $p, $partno)
{
// $partno = '1', '2', '2.1', '2.1.3', etc for multipart, 0 if simple
global $htmlmsg,$plainmsg,$charset,$attachments;

// DECODE DATA
$data = ($partno)?
imap_fetchbody($mbox,$mid,$partno): // multipart
imap_body($mbox,$mid); // simple
imap_fetchbody($mbox, $mid, $partno): // multipart
imap_body($mbox, $mid); // simple
// Any part may be encoded, even plain text messages, so check everything.
if ($p->encoding==4)
$data = quoted_printable_decode($data);
Expand Down Expand Up @@ -1934,7 +1936,7 @@ private function getpart($mbox, $mid, $p, $partno) {
if ($p->parts) {
foreach ($p->parts as $partno0=>$p2)
{
$this->getpart($mbox,$mid,$p2,$partno.'.'.($partno0+1)); // 1.2, 1.2.1, etc.
$this->getpart($mbox, $mid, $p2, $partno.'.'.($partno0+1)); // 1.2, 1.2.1, etc.
}
}
}
Expand Down

0 comments on commit 1dd8d9f

Please sign in to comment.