Completed
Branch develop (b82c51)
by
unknown
19:34
created
doctemplates/websites/website_template-corporate/containers/service-s.php 1 patch
Braces   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 // File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
3 3
 global $dolibarr_main_data_root;
4
-if (empty($dolibarr_main_data_root)) require './page196.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page196.tpl.php';
4
+if (empty($dolibarr_main_data_root)) {
5
+	require './page196.tpl.php';
6
+} else {
7
+	require $dolibarr_main_data_root.'/website/'.$website->ref.'/page196.tpl.php';
8
+}
5 9
 ?>
Please login to merge, or discard this patch.
doctemplates/websites/website_template-corporate/containers/page189.tpl.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -536,11 +536,11 @@  discard block
 block discarded – undo
536 536
           <h1>Latest <span class="text-thin">News</span></h1>
537 537
           <div class="row justify-content-sm-center row-40">
538 538
             <?php 
539
-            $MAXNEWS = 3;
540
-            $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, array('type_container'=>'blogpost', 'status'=>1, 'lang'=>'null,'.$websitepage->lang));
541
-            foreach($arrayofblogs as $blog)
542
-            {
543
-                ?>
539
+			$MAXNEWS = 3;
540
+			$arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, array('type_container'=>'blogpost', 'status'=>1, 'lang'=>'null,'.$websitepage->lang));
541
+			foreach($arrayofblogs as $blog)
542
+			{
543
+				?>
544 544
                 <div class="col-sm-8 col-md-7 col-lg-4">
545 545
                   <div class="post-boxed d-xl-inline-block">
546 546
                     <a href="<?php echo $blog->pageurl ?>.php">
@@ -556,8 +556,8 @@  discard block
 block discarded – undo
556 556
                   </div>
557 557
                 </div>
558 558
                 <?php 
559
-            }
560
-            ?>
559
+			}
560
+			?>
561 561
  
562 562
           </div>
563 563
         </div>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php // BEGIN PHP
2
-$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
3
-if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
2
+$websitekey = basename(__DIR__); if (empty($websitepagefile)) $websitepagefile = __FILE__;
3
+if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) {
4 4
 	$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
5 5
 	require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
6 6
 } // Not already loaded
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
             <?php 
539 539
             $MAXNEWS = 3;
540 540
             $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, array('type_container'=>'blogpost', 'status'=>1, 'lang'=>'null,'.$websitepage->lang));
541
-            foreach($arrayofblogs as $blog)
541
+            foreach ($arrayofblogs as $blog)
542 542
             {
543 543
                 ?>
544 544
                 <div class="col-sm-8 col-md-7 col-lg-4">
Please login to merge, or discard this patch.
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php // BEGIN PHP
2
-$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
2
+$websitekey=basename(__DIR__); if (empty($websitepagefile)) {
3
+	$websitepagefile=__FILE__;
4
+}
3 5
 if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
4 6
 	$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
5 7
 	require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
@@ -26,7 +28,10 @@  discard block
 block discarded – undo
26 28
 <!-- Include link to JS file -->
27 29
 <script async src="/javascript.js.php"></script>
28 30
 <!-- Include HTML header from common file -->
29
-<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
31
+<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) {
32
+	include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html";
33
+}
34
+?>
30 35
 <!-- Include HTML header from page header block -->
31 36
 
32 37
 </head>
Please login to merge, or discard this patch.
websites/website_template-homesubmenu/containers/page202.tpl.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
 <body id="bodywebsite" class="bodywebsite bodywebpage-index">
39 39
 <!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content  -->
40 40
 <?php 
41
-    if (GETPOST('action') == 'sendmail')    {
42
-    include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
43
-    $from = GETPOST('email', 'alpha');
44
-    $to = $mysoc->email;
45
-    $message = GETPOST('message', 'alpha');
46
-    $cmail = new CMailFile('Contact from website', $to, $from, $message);
47
-    if ($cmail->sendfile()) {
48
-        ?>
41
+	if (GETPOST('action') == 'sendmail')    {
42
+	include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
43
+	$from = GETPOST('email', 'alpha');
44
+	$to = $mysoc->email;
45
+	$message = GETPOST('message', 'alpha');
46
+	$cmail = new CMailFile('Contact from website', $to, $from, $message);
47
+	if ($cmail->sendfile()) {
48
+		?>
49 49
         <script>
50 50
             alert("Message sent successfully !");
51 51
         </script>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php // BEGIN PHP
2
-$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
3
-if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
2
+$websitekey = basename(__DIR__); if (empty($websitepagefile)) $websitepagefile = __FILE__;
3
+if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) {
4 4
 	$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
5 5
 	require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
6 6
 } // Not already loaded
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 <body id="bodywebsite" class="bodywebsite bodywebpage-index">
39 39
 <!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content  -->
40 40
 <?php 
41
-    if (GETPOST('action') == 'sendmail')    {
41
+    if (GETPOST('action') == 'sendmail') {
42 42
     include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
43 43
     $from = GETPOST('email', 'alpha');
44 44
     $to = $mysoc->email;
Please login to merge, or discard this patch.
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php // BEGIN PHP
2
-$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
2
+$websitekey=basename(__DIR__); if (empty($websitepagefile)) {
3
+	$websitepagefile=__FILE__;
4
+}
3 5
 if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
4 6
 	$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
5 7
 	require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
@@ -26,7 +28,10 @@  discard block
 block discarded – undo
26 28
 <!-- Include link to JS file -->
27 29
 <script async src="/javascript.js.php"></script>
28 30
 <!-- Include HTML header from common file -->
29
-<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
31
+<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) {
32
+	include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html";
33
+}
34
+?>
30 35
 <!-- Include HTML header from page header block -->
31 36
 <script
32 37
     src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
Please login to merge, or discard this patch.
doctemplates/websites/website_template-homesubmenu/containers/index.php 1 patch
Braces   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 // File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
3 3
 global $dolibarr_main_data_root;
4
-if (empty($dolibarr_main_data_root)) require './page202.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page202.tpl.php';
4
+if (empty($dolibarr_main_data_root)) {
5
+	require './page202.tpl.php';
6
+} else {
7
+	require $dolibarr_main_data_root.'/website/'.$website->ref.'/page202.tpl.php';
8
+}
5 9
 ?>
Please login to merge, or discard this patch.
websites/website_template-onepageblackpurple/containers/page148.tpl.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php // BEGIN PHP
2
-$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
3
-if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
2
+$websitekey = basename(__DIR__); if (empty($websitepagefile)) $websitepagefile = __FILE__;
3
+if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) {
4 4
 	$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
5 5
 	require_once $pathdepth ? str_repeat('../', $pathdepth) : './'.'master.inc.php';
6 6
 } // Not already loaded
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 			  <!-- Section: Social media -->
273 273
 			  <section class="mb-4">
274 274
 				<?php foreach ($mysoc->socialnetworks as $key => $value) {
275
-					print '<a class="btn btn-perso2 btn-floating m-1" href="'. (preg_match('/^http/', $value) ? $value : 'https://www.'.$key.'.com/'.$value).'"><span class="fab fa-'.$key.'"></i></a>';
275
+					print '<a class="btn btn-perso2 btn-floating m-1" href="'.(preg_match('/^http/', $value) ? $value : 'https://www.'.$key.'.com/'.$value).'"><span class="fab fa-'.$key.'"></i></a>';
276 276
 				} ?>
277 277
 
278 278
 			  </section>
Please login to merge, or discard this patch.
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php // BEGIN PHP
2
-$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
2
+$websitekey=basename(__DIR__); if (empty($websitepagefile)) {
3
+	$websitepagefile=__FILE__;
4
+}
3 5
 if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
4 6
 	$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
5 7
 	require_once $pathdepth ? str_repeat('../', $pathdepth) : './'.'master.inc.php';
@@ -26,7 +28,10 @@  discard block
 block discarded – undo
26 28
 <!-- Include link to JS file -->
27 29
 <script async src="/javascript.js.php"></script>
28 30
 <!-- Include HTML header from common file -->
29
-<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
31
+<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) {
32
+	include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html";
33
+}
34
+?>
30 35
 <!-- Include HTML header from page header block -->
31 36
 <head>
32 37
 		<meta charset="UTF-8" />
Please login to merge, or discard this patch.
websites/website_template-onepageblackpurple/containers/index.php 1 patch
Braces   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 // File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
3 3
 global $dolibarr_main_data_root;
4
-if (empty($dolibarr_main_data_root)) require './page148.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page148.tpl.php';
4
+if (empty($dolibarr_main_data_root)) {
5
+	require './page148.tpl.php';
6
+} else {
7
+	require $dolibarr_main_data_root.'/website/'.$website->ref.'/page148.tpl.php';
8
+}
Please login to merge, or discard this patch.
htdocs/install/upgrade2.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4237,7 +4237,7 @@  discard block
 block discarded – undo
4237 4237
 
4238 4238
 	if (!is_object($user)) {
4239 4239
 		include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
4240
-		$user = new User($db);	// To avoid error during migration
4240
+		$user = new User($db); // To avoid error during migration
4241 4241
 	}
4242 4242
 
4243 4243
 	dolibarr_install_syslog("upgrade2::migrate_reload_modules force=".$force.", listofmodule=".join(',', array_keys($listofmodule)));
@@ -5043,17 +5043,17 @@  discard block
 block discarded – undo
5043 5043
 	print '<b>'.$langs->trans('MigrationContractLineRank')."</b><br>\n";
5044 5044
 
5045 5045
 	$sql = "SELECT c.rowid as cid ,cd.rowid as cdid,cd.rang FROM ".$db->prefix()."contratdet as cd INNER JOIN ".$db->prefix()."contrat as c ON c.rowid=cd.fk_contrat AND cd.rang=0";
5046
-	$sql .=" ORDER BY c.rowid,cd.rowid";
5046
+	$sql .= " ORDER BY c.rowid,cd.rowid";
5047 5047
 
5048 5048
 	$resql = $db->query($sql);
5049 5049
 	if ($resql) {
5050
-		$currentRank=0;
5051
-		$current_contract=0;
5050
+		$currentRank = 0;
5051
+		$current_contract = 0;
5052 5052
 		while ($obj = $db->fetch_object($resql)) {
5053
-			if (empty($current_contract) || $current_contract==$obj->cid) {
5053
+			if (empty($current_contract) || $current_contract == $obj->cid) {
5054 5054
 				$currentRank++;
5055 5055
 			} else {
5056
-				$currentRank=1;
5056
+				$currentRank = 1;
5057 5057
 			}
5058 5058
 
5059 5059
 			$sqlUpd = "UPDATE ".$db->prefix()."contratdet SET rang=".(int) $currentRank." WHERE rowid=".(int) $obj->cdid;
@@ -5065,7 +5065,7 @@  discard block
 block discarded – undo
5065 5065
 				$error++;
5066 5066
 			}
5067 5067
 
5068
-			$current_contract =  $obj->cid;
5068
+			$current_contract = $obj->cid;
5069 5069
 		}
5070 5070
 	} else {
5071 5071
 		$error++;
Please login to merge, or discard this patch.
htdocs/workstation/workstation_note.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,19 +43,19 @@  discard block
 block discarded – undo
43 43
 $object = new Workstation($db);
44 44
 $extrafields = new ExtraFields($db);
45 45
 $diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id;
46
-$hookmanager->initHooks(array('workstationnote', 'globalcard'));       // Note that conf->hooks_modules contains array
46
+$hookmanager->initHooks(array('workstationnote', 'globalcard')); // Note that conf->hooks_modules contains array
47 47
 
48 48
 // Fetch optionals attributes and labels
49 49
 $extrafields->fetch_name_optionals_label($object->table_element);
50 50
 
51 51
 // Load object
52
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php';     // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
52
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
53 53
 if ($id > 0 || !empty($ref)) {
54 54
 	$upload_dir = $conf->workstation->multidir_output[$object->entity]."/".$object->id;
55 55
 }
56 56
 
57
-$permissionnote = $user->rights->workstation->workstation->write;      // Used by the include of actions_setnotes.inc.php
58
-$permissiontoadd = $user->rights->workstation->workstation->write;     // Used by the include of actions_addupdatedelete.inc.php
57
+$permissionnote = $user->rights->workstation->workstation->write; // Used by the include of actions_setnotes.inc.php
58
+$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php
59 59
 
60 60
 // Security check
61 61
 $isdraft = 0;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
  * Actions
67 67
  */
68 68
 $parameters = array();
69
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);     // Note that $action and $object may have been modified by some hooks
69
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
70 70
 if ($reshook < 0) {
71 71
 	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
72 72
 }
Please login to merge, or discard this patch.
htdocs/adherents/index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 	$year = date('Y');
94 94
 	$numberyears = getDolGlobalInt("MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH");
95 95
 
96
-	$boxgraph .='<div class="div-table-responsive-no-min">';
97
-	$boxgraph .='<table class="noborder nohover centpercent">';
98
-	$boxgraph .='<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").($numberyears ? ' ('.($year-$numberyears).' - '.$year.')' : '').'</th></tr>';
99
-	$boxgraph .='<tr><td class="center" colspan="2">';
96
+	$boxgraph .= '<div class="div-table-responsive-no-min">';
97
+	$boxgraph .= '<table class="noborder nohover centpercent">';
98
+	$boxgraph .= '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").($numberyears ? ' ('.($year - $numberyears).' - '.$year.')' : '').'</th></tr>';
99
+	$boxgraph .= '<tr><td class="center" colspan="2">';
100 100
 
101 101
 	require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherentstats.class.php';
102 102
 	$stats = new AdherentStats($db, 0, $userid);
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	}
116 116
 
117 117
 	$dataseries = array();
118
-	$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), $sumMembers['total']['members_draft']);			// Draft, not yet validated
118
+	$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), $sumMembers['total']['members_draft']); // Draft, not yet validated
119 119
 	$dataseries[] = array($langs->transnoentitiesnoconv("WaitingSubscription"), $sumMembers['total']['members_pending']);
120 120
 	$dataseries[] = array($langs->transnoentitiesnoconv("UpToDate"), $sumMembers['total']['members_uptodate']);
121 121
 	$dataseries[] = array($langs->transnoentitiesnoconv("OutOfDate"), $sumMembers['total']['members_expired']);
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	$dolgraph->SetType(array('pie'));
134 134
 	$dolgraph->setHeight('200');
135 135
 	$dolgraph->draw('idgraphstatus');
136
-	$boxgraph .=$dolgraph->show($total ? 0 : 1);
136
+	$boxgraph .= $dolgraph->show($total ? 0 : 1);
137 137
 
138 138
 	$boxgraph .= '</td></tr>';
139 139
 	$boxgraph .= '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">';
Please login to merge, or discard this patch.