From e8b7ad0fb50021eb2ebdb0eec3434304743032f2 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 21 Sep 2018 08:49:05 +0200 Subject: [PATCH 1/2] Standardize and update code --- htdocs/core/class/commondocgenerator.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 99c8bf82049..3792aaf9327 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -33,7 +33,11 @@ */ abstract class CommonDocGenerator { - var $error=''; + /** + * @var string Error code (or message) + */ + public $error=''; + protected $db; From b064b580b4cd826ab26d57ac98a7c67b1ac4996f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 21 Sep 2018 12:19:59 +0200 Subject: [PATCH 2/2] remove superfluous spaces --- htdocs/stripe/transaction.php | 36 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 595583a63f1..8bf04eda4b4 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -161,25 +161,27 @@ if (! $rowid) { print ''; // Ref - if (!empty($stripeacc)) $connect=$stripeacc.'/'; + if (!empty($stripeacc)) $connect=$stripeacc.'/'; // Ref - if (preg_match('/po_/i', $txn->source)){ - $origin="payouts"; - } elseif (preg_match('/fee_/i', $txn->source)) { - $origin="connect/application_fees"; - } else { - $origin="payments"; - } + if (preg_match('/po_/i', $txn->source)){ + $origin="payouts"; + } elseif (preg_match('/fee_/i', $txn->source)) { + $origin="connect/application_fees"; + } else { + $origin="payments"; + } $url='https://dashboard.stripe.com/'.$connect.'test/'.$origin.'/'.$txn->source; - if ($servicestatus) - { - $url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source; - } - if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') { - print "".$txn->type.""; - } else print "".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "\n"; + if ($servicestatus) + { + $url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source; + } + if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') { + print "".$txn->type.""; + } else { + print "".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "\n"; + } // Stripe customer //print "".$charge->customer."\n"; @@ -216,11 +218,11 @@ if (! $rowid) { // Status print ""; if ($txn->status=='available') - {print img_picto($langs->trans("".$txn->status.""),'statut4');} + {print img_picto($langs->trans("".$txn->status.""),'statut4');} elseif ($txn->status=='pending') {print img_picto($langs->trans("".$txn->status.""),'statut7');} elseif ($txn->status=='failed') - {print img_picto($langs->trans("".$txn->status.""),'statut8');} + {print img_picto($langs->trans("".$txn->status.""),'statut8');} print ''; print "\n"; }