@@ -1,7 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | // BEGIN PHP File wrapper.php - DO NOT MODIFY - It is just a copy of file website/samples/wrapper.php |
3 | 3 | $websitekey = basename(__DIR__); |
4 | -if (strpos($_SERVER["PHP_SELF"], 'website/samples/wrapper.php')) die("Sample file for website module. Can be called directly."); |
|
4 | +if (strpos($_SERVER["PHP_SELF"], 'website/samples/wrapper.php')) { |
|
5 | + die("Sample file for website module. Can be called directly."); |
|
6 | +} |
|
5 | 7 | if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once './master.inc.php'; } // Load master if not already loaded |
6 | 8 | include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; |
7 | 9 | |
@@ -17,7 +19,9 @@ discard block |
||
17 | 19 | |
18 | 20 | // Parameters for RSS |
19 | 21 | $rss = GETPOST('rss', 'aZ09'); |
20 | -if ($rss) $original_file = 'blog.rss'; |
|
22 | +if ($rss) { |
|
23 | + $original_file = 'blog.rss'; |
|
24 | +} |
|
21 | 25 | |
22 | 26 | // If we have a hash public (hashp), we guess the original_file. |
23 | 27 | if (!empty($hashp)) { |
@@ -52,14 +56,23 @@ discard block |
||
52 | 56 | |
53 | 57 | // Define attachment (attachment=true to force choice popup 'open'/'save as') |
54 | 58 | $attachment = true; |
55 | -if (preg_match('/\.(html|htm)$/i', $original_file)) $attachment = false; |
|
56 | -if (isset($_GET["attachment"])) $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); |
|
57 | -if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) $attachment = false; |
|
59 | +if (preg_match('/\.(html|htm)$/i', $original_file)) { |
|
60 | + $attachment = false; |
|
61 | +} |
|
62 | +if (isset($_GET["attachment"])) { |
|
63 | + $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); |
|
64 | +} |
|
65 | +if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) { |
|
66 | + $attachment = false; |
|
67 | +} |
|
58 | 68 | |
59 | 69 | // Define mime type |
60 | 70 | $type = 'application/octet-stream'; |
61 | -if (GETPOSTISSET('type')) $type = GETPOST('type', 'alpha'); |
|
62 | -else $type = dol_mimetype($original_file); |
|
71 | +if (GETPOSTISSET('type')) { |
|
72 | + $type = GETPOST('type', 'alpha'); |
|
73 | +} else { |
|
74 | + $type = dol_mimetype($original_file); |
|
75 | +} |
|
63 | 76 | |
64 | 77 | // Security: Delete string ../ into $original_file |
65 | 78 | $original_file = str_replace("../", "/", $original_file); |
@@ -90,7 +103,9 @@ discard block |
||
90 | 103 | $website->fetch('', $websitekey); |
91 | 104 | |
92 | 105 | $filters = array('type_container'=>'blogpost'); |
93 | - if ($l) $filters['lang'] = $l; |
|
106 | + if ($l) { |
|
107 | + $filters['lang'] = $l; |
|
108 | + } |
|
94 | 109 | |
95 | 110 | $MAXNEWS = ($limit ? $limit : 20); |
96 | 111 | $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters); |
@@ -143,8 +158,9 @@ discard block |
||
143 | 158 | $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp, '', $website->virtualhost.'/wrapper.php?rss=1'.($l ? '&l='.$l : ''), $l); |
144 | 159 | |
145 | 160 | if ($result >= 0) { |
146 | - if (dol_move($outputfiletmp, $outputfile, 0, 1, 0, 0)) $result = 1; |
|
147 | - else { |
|
161 | + if (dol_move($outputfiletmp, $outputfile, 0, 1, 0, 0)) { |
|
162 | + $result = 1; |
|
163 | + } else { |
|
148 | 164 | $error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; |
149 | 165 | dol_syslog("build_exportfile ".$error, LOG_ERR); |
150 | 166 | dol_delete_file($outputfiletmp, 0, 1); |
@@ -162,26 +178,39 @@ discard block |
||
162 | 178 | |
163 | 179 | if ($result >= 0) { |
164 | 180 | $attachment = false; |
165 | - if (isset($_GET["attachment"])) $attachment = $_GET["attachment"]; |
|
181 | + if (isset($_GET["attachment"])) { |
|
182 | + $attachment = $_GET["attachment"]; |
|
183 | + } |
|
166 | 184 | //$attachment = false; |
167 | 185 | $contenttype = 'application/rss+xml'; |
168 | - if (isset($_GET["contenttype"])) $contenttype = $_GET["contenttype"]; |
|
186 | + if (isset($_GET["contenttype"])) { |
|
187 | + $contenttype = $_GET["contenttype"]; |
|
188 | + } |
|
169 | 189 | //$contenttype='text/plain'; |
170 | 190 | $outputencoding = 'UTF-8'; |
171 | 191 | |
172 | - if ($contenttype) header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); |
|
173 | - if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); |
|
192 | + if ($contenttype) { |
|
193 | + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); |
|
194 | + } |
|
195 | + if ($attachment) { |
|
196 | + header('Content-Disposition: attachment; filename="'.$filename.'"'); |
|
197 | + } |
|
174 | 198 | |
175 | 199 | // Ajout directives pour resoudre bug IE |
176 | 200 | //header('Cache-Control: Public, must-revalidate'); |
177 | 201 | //header('Pragma: public'); |
178 | - if ($cachedelay) header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); |
|
179 | - else header('Cache-Control: private, must-revalidate'); |
|
202 | + if ($cachedelay) { |
|
203 | + header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); |
|
204 | + } else { |
|
205 | + header('Cache-Control: private, must-revalidate'); |
|
206 | + } |
|
180 | 207 | |
181 | 208 | // Clean parameters |
182 | 209 | $outputfile = $dir_temp.'/'.$filename; |
183 | 210 | $result = readfile($outputfile); |
184 | - if (!$result) print 'File '.$outputfile.' was empty.'; |
|
211 | + if (!$result) { |
|
212 | + print 'File '.$outputfile.' was empty.'; |
|
213 | + } |
|
185 | 214 | |
186 | 215 | // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); |
187 | 216 | exit; |
@@ -227,13 +256,20 @@ discard block |
||
227 | 256 | //top_httphead($type); |
228 | 257 | header('Content-Type: '.$type); |
229 | 258 | header('Content-Description: File Transfer'); |
230 | - if ($encoding) header('Content-Encoding: '.$encoding); |
|
259 | + if ($encoding) { |
|
260 | + header('Content-Encoding: '.$encoding); |
|
261 | + } |
|
231 | 262 | // Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open) |
232 | - if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); |
|
233 | - else header('Content-Disposition: inline; filename="'.$filename.'"'); |
|
263 | + if ($attachment) { |
|
264 | + header('Content-Disposition: attachment; filename="'.$filename.'"'); |
|
265 | + } else { |
|
266 | + header('Content-Disposition: inline; filename="'.$filename.'"'); |
|
267 | + } |
|
234 | 268 | header('Content-Length: '.dol_filesize($fullpath_original_file)); |
235 | 269 | |
236 | 270 | readfile($fullpath_original_file_osencoded); |
237 | 271 | } |
238 | -if (is_object($db)) $db->close(); |
|
272 | +if (is_object($db)) { |
|
273 | + $db->close(); |
|
274 | +} |
|
239 | 275 | // END PHP |
@@ -4237,7 +4237,7 @@ discard block |
||
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 |
||
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 |
||
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++; |
@@ -93,10 +93,10 @@ discard block |
||
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 |
||
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 |
||
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">'; |
@@ -56,16 +56,16 @@ |
||
56 | 56 | // Editing global variables not related to a specific theme |
57 | 57 | $constantes = array( |
58 | 58 | 'MEMBER_REMINDER_EMAIL'=>array('type'=>'yesno', 'label'=>$langs->trans('MEMBER_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"))), |
59 | - 'ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION' =>array('type'=>'emailtemplate:member','label'=>''), |
|
60 | - 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>array('type'=>'emailtemplate:member','label'=>''), |
|
61 | - 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>array('type'=>'emailtemplate:member','label'=>''), |
|
62 | - 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>array('type'=>'emailtemplate:member','label'=>''), |
|
63 | - 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>array('type'=>'emailtemplate:member','label'=>''), |
|
64 | - 'ADHERENT_EMAIL_TEMPLATE_EXCLUSION' =>array('type'=>'emailtemplate:member','label'=>''), |
|
65 | - 'ADHERENT_MAIL_FROM' =>array('type'=>'string','label'=>''), |
|
66 | - 'ADHERENT_CC_MAIL_FROM' =>array('type'=>'string','label'=>''), |
|
67 | - 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT' =>array('type'=>'string','label'=>''), |
|
68 | - 'ADHERENT_AUTOREGISTER_NOTIF_MAIL' =>array('type'=>'html', 'tooltip'=>$helptext,'label'=>'') |
|
59 | + 'ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
60 | + 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
61 | + 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
62 | + 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
63 | + 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
64 | + 'ADHERENT_EMAIL_TEMPLATE_EXCLUSION' =>array('type'=>'emailtemplate:member', 'label'=>''), |
|
65 | + 'ADHERENT_MAIL_FROM' =>array('type'=>'string', 'label'=>''), |
|
66 | + 'ADHERENT_CC_MAIL_FROM' =>array('type'=>'string', 'label'=>''), |
|
67 | + 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT' =>array('type'=>'string', 'label'=>''), |
|
68 | + 'ADHERENT_AUTOREGISTER_NOTIF_MAIL' =>array('type'=>'html', 'tooltip'=>$helptext, 'label'=>'') |
|
69 | 69 | ); |
70 | 70 | |
71 | 71 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | public $active; |
69 | 69 | |
70 | 70 | |
71 | - public $fields=array( |
|
71 | + public $fields = array( |
|
72 | 72 | 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), |
73 | 73 | 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>15, 'index'=>1), |
74 | 74 | 'code' =>array('type'=>'varchar(32)', 'label'=>'Code', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20), |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search |
43 | 43 | $backtopage = GETPOST('backtopage', 'alpha'); |
44 | 44 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
45 | -$lineid = GETPOST('lineid', 'int'); |
|
45 | +$lineid = GETPOST('lineid', 'int'); |
|
46 | 46 | $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); |
47 | 47 | |
48 | 48 | // Initialize technical objects |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. |
75 | 75 | |
76 | 76 | |
77 | -$permissiontoread = $user->hasRight('partnership', 'read'); |
|
78 | -$permissiontoadd = $user->hasRight('partnership', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
77 | +$permissiontoread = $user->hasRight('partnership', 'read'); |
|
78 | +$permissiontoadd = $user->hasRight('partnership', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
79 | 79 | $permissiontodelete = $user->hasRight('partnership', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); |
80 | -$permissionnote = $user->hasRight('partnership', 'write'); // Used by the include of actions_setnotes.inc.php |
|
80 | +$permissionnote = $user->hasRight('partnership', 'write'); // Used by the include of actions_setnotes.inc.php |
|
81 | 81 | $permissiondellink = $user->hasRight('partnership', 'write'); // Used by the include of actions_dellink.inc.php |
82 | 82 | $upload_dir = $conf->partnership->multidir_output[isset($object->entity) ? $object->entity : 1]; |
83 | 83 | $managedfor = getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty'); |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | } |
123 | 123 | } |
124 | 124 | |
125 | - $fk_partner = ($managedfor == 'member') ? GETPOST('fk_member', 'int') : GETPOST('fk_soc', 'int'); |
|
126 | - $obj_partner = ($managedfor == 'member') ? $object->fk_member : $object->fk_soc; |
|
125 | + $fk_partner = ($managedfor == 'member') ? GETPOST('fk_member', 'int') : GETPOST('fk_soc', 'int'); |
|
126 | + $obj_partner = ($managedfor == 'member') ? $object->fk_member : $object->fk_soc; |
|
127 | 127 | |
128 | 128 | $triggermodname = 'PARTNERSHIP_MODIFY'; // Name of trigger action code to execute when we modify record |
129 | 129 |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | } |
153 | 153 | |
154 | 154 | // Fetch optionals attributes and labels |
155 | -$extrafields->fetch_name_optionals_label('all'); // We load all extrafields definitions for all objects |
|
155 | +$extrafields->fetch_name_optionals_label('all'); // We load all extrafields definitions for all objects |
|
156 | 156 | //$extrafields->fetch_name_optionals_label($object->table_element_line); |
157 | 157 | |
158 | 158 | $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | foreach ($arrayofmesures as $key => $val) { |
480 | 480 | $simplearrayofmesures[$key] = $arrayofmesures[$key]['label']; |
481 | 481 | } |
482 | -print $form->multiselectarray('search_measures', $simplearrayofmesures, $search_measures, 0, 0, 'minwidth300', 1, 0, '', '', $langs->trans("Measures")); // Fill the array $arrayofmeasures with possible fields |
|
482 | +print $form->multiselectarray('search_measures', $simplearrayofmesures, $search_measures, 0, 0, 'minwidth300', 1, 0, '', '', $langs->trans("Measures")); // Fill the array $arrayofmeasures with possible fields |
|
483 | 483 | print '</div>'; |
484 | 484 | |
485 | 485 | // XAxis |
@@ -487,14 +487,14 @@ discard block |
||
487 | 487 | print '<div class="divadvancedsearchfield">'; |
488 | 488 | print '<div class="inline-block"><span class="fas fa-ruler-combined paddingright pictofixedwidth" title="'.dol_escape_htmltag($langs->trans("XAxis")).'"></span><span class="fas fa-caret-down caretdownaxis" title="'.dol_escape_htmltag($langs->trans("XAxis")).'"></span></div>'; |
489 | 489 | //var_dump($arrayofxaxis); |
490 | -print $formother->selectXAxisField($object, $search_xaxis, $arrayofxaxis, $langs->trans("XAxis"), 'minwidth300 maxwidth400'); // Fill the array $arrayofxaxis with possible fields |
|
490 | +print $formother->selectXAxisField($object, $search_xaxis, $arrayofxaxis, $langs->trans("XAxis"), 'minwidth300 maxwidth400'); // Fill the array $arrayofxaxis with possible fields |
|
491 | 491 | print '</div>'; |
492 | 492 | |
493 | 493 | // Group by |
494 | 494 | $count = 0; |
495 | 495 | print '<div class="divadvancedsearchfield">'; |
496 | 496 | print '<div class="inline-block opacitymedium"><span class="fas fa-ruler-horizontal paddingright pictofixedwidth" title="'.dol_escape_htmltag($langs->trans("GroupBy")).'"></span></div>'; |
497 | -print $formother->selectGroupByField($object, $search_groupby, $arrayofgroupby, 'minwidth250 maxwidth300', $langs->trans("GroupBy")); // Fill the array $arrayofgroupby with possible fields |
|
497 | +print $formother->selectGroupByField($object, $search_groupby, $arrayofgroupby, 'minwidth250 maxwidth300', $langs->trans("GroupBy")); // Fill the array $arrayofgroupby with possible fields |
|
498 | 498 | print '</div>'; |
499 | 499 | |
500 | 500 | |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | //var_dump($arrayofgroupby); |
651 | 651 | $tmpforloop = dolExplodeIntoArray($arrayofxaxis[$val]['tablefromt'], ','); |
652 | 652 | foreach ($tmpforloop as $tmptable => $tmptablealias) { |
653 | - if (! in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added |
|
653 | + if (!in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added |
|
654 | 654 | $tmpforexplode = explode('__', $tmptablealias); |
655 | 655 | $endpart = end($tmpforexplode); |
656 | 656 | $parenttableandfield = preg_replace('/__'.$endpart.'$/', '', $tmptablealias).'.'.$endpart; |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | //var_dump($arrayofgroupby[$val]); var_dump($tmpval); |
678 | 678 | $tmpforloop = dolExplodeIntoArray($arrayofgroupby[$val]['tablefromt'], ','); |
679 | 679 | foreach ($tmpforloop as $tmptable => $tmptablealias) { |
680 | - if (! in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added |
|
680 | + if (!in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added |
|
681 | 681 | $tmpforexplode = explode('__', $tmptablealias); |
682 | 682 | $endpart = end($tmpforexplode); |
683 | 683 | $parenttableandfield = preg_replace('/__'.$endpart.'$/', '', $tmptablealias).'.'.$endpart; |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | //var_dump($arrayofgroupby); |
705 | 705 | $tmpforloop = dolExplodeIntoArray($arrayofmesures[$val]['tablefromt'], ','); |
706 | 706 | foreach ($tmpforloop as $tmptable => $tmptablealias) { |
707 | - if (! in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added |
|
707 | + if (!in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added |
|
708 | 708 | $tmpforexplode = explode('__', $tmptablealias); |
709 | 709 | $endpart = end($tmpforexplode); |
710 | 710 | $parenttableandfield = preg_replace('/__'.$endpart.'$/', '', $tmptablealias).'.'.$endpart; |
@@ -1086,28 +1086,28 @@ discard block |
||
1086 | 1086 | $arrayofmesures[preg_replace('/^t/', 'te', $tablealias).'.'.$key.'-sum'] = array( |
1087 | 1087 | 'label' => img_picto('', $object->picto, 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($extrafields->attributes[$object->table_element]['label'][$key]).' <span class="opacitymedium">('.$langs->trans("Sum").')</span>', |
1088 | 1088 | 'labelnohtml' => $labelofobject.': '.$langs->trans($val), |
1089 | - 'position' => ($position+($count * 100000)).'.1', |
|
1089 | + 'position' => ($position + ($count * 100000)).'.1', |
|
1090 | 1090 | 'table' => $object->table_element, |
1091 | 1091 | 'tablefromt' => $tablepath |
1092 | 1092 | ); |
1093 | 1093 | $arrayofmesures[preg_replace('/^t/', 'te', $tablealias).'.'.$key.'-average'] = array( |
1094 | 1094 | 'label' => img_picto('', $object->picto, 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($extrafields->attributes[$object->table_element]['label'][$key]).' <span class="opacitymedium">('.$langs->trans("Average").')</span>', |
1095 | 1095 | 'labelnohtml' => $labelofobject.': '.$langs->trans($val), |
1096 | - 'position' => ($position+($count * 100000)).'.2', |
|
1096 | + 'position' => ($position + ($count * 100000)).'.2', |
|
1097 | 1097 | 'table' => $object->table_element, |
1098 | 1098 | 'tablefromt' => $tablepath |
1099 | 1099 | ); |
1100 | 1100 | $arrayofmesures[preg_replace('/^t/', 'te', $tablealias).'.'.$key.'-min'] = array( |
1101 | 1101 | 'label' => img_picto('', $object->picto, 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($extrafields->attributes[$object->table_element]['label'][$key]).' <span class="opacitymedium">('.$langs->trans("Minimum").')</span>', |
1102 | 1102 | 'labelnohtml' => $labelofobject.': '.$langs->trans($val), |
1103 | - 'position' => ($position+($count * 100000)).'.3', |
|
1103 | + 'position' => ($position + ($count * 100000)).'.3', |
|
1104 | 1104 | 'table' => $object->table_element, |
1105 | 1105 | 'tablefromt' => $tablepath |
1106 | 1106 | ); |
1107 | 1107 | $arrayofmesures[preg_replace('/^t/', 'te', $tablealias).'.'.$key.'-max'] = array( |
1108 | 1108 | 'label' => img_picto('', $object->picto, 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($extrafields->attributes[$object->table_element]['label'][$key]).' <span class="opacitymedium">('.$langs->trans("Maximum").')</span>', |
1109 | 1109 | 'labelnohtml' => $labelofobject.': '.$langs->trans($val), |
1110 | - 'position' => ($position+($count * 100000)).'.4', |
|
1110 | + 'position' => ($position + ($count * 100000)).'.4', |
|
1111 | 1111 | 'table' => $object->table_element, |
1112 | 1112 | 'tablefromt' => $tablepath |
1113 | 1113 | ); |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | if ($result > 0) { |
222 | 222 | $info = $object->_load_ldap_info(); |
223 | 223 | $dn = $object->_load_ldap_dn($info); |
224 | - $search = "(" . $object->_load_ldap_dn($info, 2) . ")"; |
|
224 | + $search = "(".$object->_load_ldap_dn($info, 2).")"; |
|
225 | 225 | $uAC = $ldap->getAttributeValues($search, "userAccountControl"); |
226 | 226 | if ($uAC["count"] == 1) { |
227 | 227 | $userAccountControl = intval($uAC[0]); |
@@ -235,11 +235,11 @@ discard block |
||
235 | 235 | $info['userAccountControl'] = $userAccountControl; |
236 | 236 | $resUpdate = $ldap->update($dn, $info, $user, $dn); |
237 | 237 | if ($resUpdate < 0) { |
238 | - $this->error = "ErrorLDAP " . $ldap->error; |
|
238 | + $this->error = "ErrorLDAP ".$ldap->error; |
|
239 | 239 | } |
240 | 240 | } |
241 | 241 | } else { |
242 | - $this->error = "ErrorLDAP " . $ldap->error; |
|
242 | + $this->error = "ErrorLDAP ".$ldap->error; |
|
243 | 243 | } |
244 | 244 | } |
245 | 245 | } elseif ($action == 'USER_DELETE') { |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | |
803 | 803 | if (!empty($object->refuse_note)) { |
804 | 804 | $object->actionmsg .= '<br>'; |
805 | - $object->actionmsg .= $langs->trans("Reason") . ': '.$object->refuse_note; |
|
805 | + $object->actionmsg .= $langs->trans("Reason").': '.$object->refuse_note; |
|
806 | 806 | } |
807 | 807 | |
808 | 808 | $object->sendtoid = 0; |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | |
824 | 824 | if (!empty($object->cancel_note)) { |
825 | 825 | $object->actionmsg .= '<br>'; |
826 | - $object->actionmsg .= $langs->trans("Reason") . ': '.$object->cancel_note; |
|
826 | + $object->actionmsg .= $langs->trans("Reason").': '.$object->cancel_note; |
|
827 | 827 | } |
828 | 828 | |
829 | 829 | $object->sendtoid = 0; |
@@ -844,7 +844,7 @@ discard block |
||
844 | 844 | |
845 | 845 | if (!empty($object->context['comments'])) { |
846 | 846 | $object->actionmsg .= '<br>'; |
847 | - $object->actionmsg .= $langs->trans("Comment") . ': '.$object->context['comments']; |
|
847 | + $object->actionmsg .= $langs->trans("Comment").': '.$object->context['comments']; |
|
848 | 848 | } |
849 | 849 | |
850 | 850 | $object->sendtoid = 0; |
@@ -1472,8 +1472,8 @@ discard block |
||
1472 | 1472 | $actioncomm = new ActionComm($this->db); |
1473 | 1473 | $actioncomm->type_code = $object->actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
1474 | 1474 | $actioncomm->code = 'AC_'.$action; |
1475 | - $actioncomm->label = $object->actionmsg2; // Label of event |
|
1476 | - $actioncomm->note_private = $object->actionmsg; // Description |
|
1475 | + $actioncomm->label = $object->actionmsg2; // Label of event |
|
1476 | + $actioncomm->note_private = $object->actionmsg; // Description |
|
1477 | 1477 | $actioncomm->fk_project = $projectid; |
1478 | 1478 | $actioncomm->datep = $now; |
1479 | 1479 | $actioncomm->datef = $now; |