Browse Source

Fix phpcs

Laurent Destailleur 1 year ago
parent
commit
d177b8e133
2 changed files with 2 additions and 2 deletions
  1. 1 1
      htdocs/adherents/stats/index.php
  2. 1 1
      htdocs/adherents/subscription.php

+ 1 - 1
htdocs/adherents/stats/index.php

@@ -50,7 +50,7 @@ $result = restrictedArea($user, 'adherent', '', '', 'cotisation');
 $year = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
 $startyear = $year - (!getDolGlobalInt('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalInt('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
 $endyear = $year;
-if (!empty(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER')) ) {
+if (getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER')) {
 	$endyear = dol_print_date(dol_time_plus_duree(dol_now('gmt'), (int) substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), 0, -1), substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), -1)), "%Y", 'gmt');
 }
 

+ 1 - 1
htdocs/adherents/subscription.php

@@ -976,7 +976,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
 	}
 	if (!$datefrom) {
 		$datefrom = $object->datevalid;
-		if (!empty(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER')) ) {
+		if (getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER')) {
 			$datefrom = dol_time_plus_duree($now, (int) substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), 0, -1), substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), -1));
 		} elseif ($object->datefin > 0 && dol_time_plus_duree($object->datefin, $defaultdelay, $defaultdelayunit) > $now) {
 			$datefrom = dol_time_plus_duree($object->datefin, 1, 'd');