dolibarr 24.0.0-beta
upgrade.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2015-2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
6 * Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
7 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 *
22 * Upgrade scripts can be ran from command line with syntax:
23 *
24 * cd htdocs/install
25 * php upgrade.php 3.4.0 3.5.0 [dirmodule|ignoredbversion]
26 * php upgrade2.php 3.4.0 3.5.0 [MODULE_NAME1_TO_ENABLE,MODULE_NAME2_TO_ENABLE]
27 *
28 * And for final step:
29 * php step5.php 3.4.0 3.5.0
30 *
31 * Option 'dirmodule' allows to provide a path for an external module, so we migrate from command line using a script from a module.
32 * Option 'ignoredbversion' allows to run migration even if database version does not match start version of migration
33 * Return code is 0 if OK, >0 if error
34 */
35
41define('ALLOWED_IF_UPGRADE_UNLOCK_FOUND', 1);
42include_once 'inc.php';
43
48if (!file_exists($conffile)) {
49 print 'Error: Dolibarr config file was not found. This may means that Dolibarr is not installed yet. Please call the page "/install/index.php" instead of "/install/upgrade.php").';
50}
51require_once $conffile;
68'
69@phan-var-force string $dolibarr_main_db_type
70';
71require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php';
72
73global $langs;
74
75$ok = 0;
76
77
78// Cette page peut etre longue. On augmente le delai autorise.
79// Ne fonctionne que si on est pas en safe_mode.
80$err = error_reporting();
81error_reporting(0);
82@set_time_limit(300);
83error_reporting($err);
84
85
86$setuplang = GETPOST("selectlang", 'aZ09', 3) ? GETPOST("selectlang", 'aZ09', 3) : 'auto';
87$langs->setDefaultLang($setuplang);
88$versionfrom = GETPOST("versionfrom", 'alpha', 3) ? GETPOST("versionfrom", 'alpha', 3) : (empty($argv[1]) ? '' : $argv[1]);
89$versionto = GETPOST("versionto", 'alpha', 3) ? GETPOST("versionto", 'alpha', 3) : (empty($argv[2]) ? '' : $argv[2]);
90$dirmodule = ((GETPOST("dirmodule", 'alpha', 3) && GETPOST("dirmodule", 'alpha', 3) != 'ignoredbversion')) ? GETPOST("dirmodule", 'alpha', 3) : ((empty($argv[3]) || $argv[3] == 'ignoredbversion') ? '' : $argv[3]);
91$ignoredbversion = (GETPOST('ignoredbversion', 'alpha', 3) == 'ignoredbversion') ? GETPOST('ignoredbversion', 'alpha', 3) : ((empty($argv[3]) || $argv[3] != 'ignoredbversion') ? '' : $argv[3]);
92
93$langs->loadLangs(array("admin", "install", "other", "errors"));
94
95
96dolibarr_install_syslog("--- upgrade: entering upgrade.php page ".$versionfrom." ".$versionto);
97if (!is_object($conf)) {
98 dolibarr_install_syslog("upgrade: conf file not initialized", LOG_ERR);
99}
100
101
102/*
103 * View
104 */
105
106if (!$versionfrom && !$versionto) {
107 print 'Error: Parameter versionfrom or versionto missing.'."\n";
108 print 'Upgrade must be ran from command line with parameters or called from page install/index.php (like a first install)'."\n";
109 // Test if batch mode
110 $sapi_type = php_sapi_name();
111 $script_file = basename(__FILE__);
112 $path = __DIR__.'/';
113 if (substr($sapi_type, 0, 3) == 'cli') {
114 print 'Syntax from command line: '.$script_file." x.y.z a.b.c\n";
115 }
116 exit;
117}
118
119
120pHeader('', "upgrade2", GETPOST('action', 'aZ09'), 'versionfrom='.$versionfrom.'&versionto='.$versionto, '', 'main-inside main-inside-borderbottom');
121
122$actiondone = 0;
123$db = null;
124
125// Action to launch the migrate script
126if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ09'))) {
127 $actiondone = 1;
128
129 print '<h3><img class="valignmiddle inline-block paddingright" src="../public/theme/common/database.svg" width="20" alt="Database"> ';
130 print '<span class="inline-block valignmiddle">'.$langs->trans("DatabaseMigration").'</span></h3>';
131
132 print '<table cellspacing="0" cellpadding="1" class="centpercent">';
133
134 // If password is encoded, we decode it
135 if ((!empty($dolibarr_main_db_pass) && preg_match('/(crypted|dolcrypt):/i', (string) $dolibarr_main_db_pass)) || !empty($dolibarr_main_db_encrypted_pass)) {
136 require_once $dolibarr_main_document_root.'/core/lib/security.lib.php';
137 if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', (string) $dolibarr_main_db_pass)) {
138 $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', (string) $dolibarr_main_db_pass);
139 $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially encrypted
140 $dolibarr_main_db_pass = dol_decode((string) $dolibarr_main_db_pass);
141 } elseif (preg_match('/dolcrypt:/i', (string) $dolibarr_main_db_pass)) {
142 $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially encrypted
143 $dolibarr_main_db_pass = dolDecrypt((string) $dolibarr_main_db_pass);
144 } else {
145 $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass);
146 }
147 }
148
149 // $conf is already instantiated inside inc.php
150 $conf->db->type = (string) $dolibarr_main_db_type;
151 $conf->db->host = (string) $dolibarr_main_db_host;
152 $conf->db->port = (string) $dolibarr_main_db_port;
153 $conf->db->name = (string) $dolibarr_main_db_name;
154 $conf->db->user = (string) $dolibarr_main_db_user;
155 $conf->db->pass = (string) $dolibarr_main_db_pass;
156
157 // Load type and crypt key
158 if (empty($dolibarr_main_db_encryption)) {
159 $dolibarr_main_db_encryption = 0;
160 }
161 $conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption;
162 if (empty($dolibarr_main_db_cryptkey)) {
163 $dolibarr_main_db_cryptkey = '';
164 }
165 $conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey;
166
167 $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, (int) $conf->db->port);
168
169
170 // Create the global $hookmanager object
171 include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
172 $hookmanager = new HookManager($db);
173
174 if ($db->connected) {
175 print '<tr><td class="nowrap">';
176 print $langs->trans("ServerConnection")." : ".$dolibarr_main_db_host.'</td><td class="right"><span class="neutral">'.$langs->trans("Success").'</span></td></tr>'."\n";
177 dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ServerConnection").": $dolibarr_main_db_host ".$langs->transnoentities("Success"));
178 $ok = 1;
179 } else {
180 print "<tr><td>".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name).'</td><td class="right"><span class="error">'.$langs->transnoentities("Error")."</span></td></tr>\n";
181 dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name));
182 $ok = 0;
183 }
184
185 if ($ok) {
186 if ($db->database_selected) {
187 print '<tr><td class="nowrap">';
188 print $langs->trans("DatabaseConnection")." : ".$dolibarr_main_db_name.'</td><td class="right"><span class="neutral">'.$langs->trans("Success")."</span></td></tr>\n";
189 dolibarr_install_syslog("upgrade: Database connection successful: ".$dolibarr_main_db_name);
190 $ok = 1;
191 } else {
192 print "<tr><td>".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name).'</td><td class="right"><span class="neutral">'.$langs->trans("Error")."</span></td></tr>\n";
193 dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name));
194 $ok = 0;
195 }
196 }
197
198 // Affiche version
199 $versionarray = array();
200 if ($ok) {
201 $version = $db->getVersion();
202 $versionarray = $db->getVersionArray();
203 print '<tr><td>'.$langs->trans("ServerVersion").'</td>';
204 print '<td class="right">'.$version.'</td></tr>';
205 dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ServerVersion").": ".$version);
206 if ($db->type == 'mysqli' && function_exists('mysqli_get_charset')) {
207 $tmparray = $db->db->get_charset();
208 print '<tr><td>'.$langs->trans("ClientCharset").'</td>';
209 print '<td class="right">'.$tmparray->charset.'</td></tr>';
210 dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ClientCharset").": ".$tmparray->charset);
211 print '<tr><td>'.$langs->trans("ClientSortingCharset").'</td>';
212 print '<td class="right">'.$tmparray->collation.'</td></tr>';
213 dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ClientCollation").": ".$tmparray->collation);
214 }
215
216 // Test database version requirement
217 $versionmindb = explode('.', $db::VERSIONMIN);
218 //print join('.',$versionarray).' - '.join('.',$versionmindb);
219 if (count($versionmindb) && count($versionarray)
220 && versioncompare($versionarray, $versionmindb) < 0) {
221 // Warning: database version too low.
222 print "<tr><td>".$langs->trans("ErrorDatabaseVersionTooLow", implode('.', $versionarray), implode('.', $versionmindb)).'</td><td class="right"><span class="error">'.$langs->trans("Error")."</span></td></tr>\n";
223 dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ErrorDatabaseVersionTooLow", implode('.', $versionarray), implode('.', $versionmindb)));
224 $ok = 0;
225 }
226
227 // Test database version is not forbidden for migration
228 if (empty($ignoredbversion)) {
229 $dbversion_disallowed = array(
230 array('type' => 'mysql', 'version' => array(5, 5, 40)),
231 array('type' => 'mysqli', 'version' => array(5, 5, 40)) //,
232 //array('type'=>'mysql','version'=>array(5,5,41)),
233 //array('type'=>'mysqli','version'=>array(5,5,41))
234 );
235 $listofforbiddenversion = '';
236 foreach ($dbversion_disallowed as $dbversion_totest) {
237 if ($dbversion_totest['type'] == $db->type) {
238 $listofforbiddenversion .= ($listofforbiddenversion ? ', ' : '').implode('.', $dbversion_totest['version']);
239 }
240 }
241 foreach ($dbversion_disallowed as $dbversion_totest) {
242 //print $db->type.' - '.join('.',$versionarray).' - '.versioncompare($dbversion_totest['version'],$versionarray)."<br>\n";
243 if ($dbversion_totest['type'] == $db->type
244 && (versioncompare($dbversion_totest['version'], $versionarray) == 0 || versioncompare($dbversion_totest['version'], $versionarray) <= -4 || versioncompare($dbversion_totest['version'], $versionarray) >= 4)
245 ) {
246 // Warning: database version too low.
247 print '<tr><td><div class="warning">'.$langs->trans("ErrorDatabaseVersionForbiddenForMigration", implode('.', $versionarray), $listofforbiddenversion)."</div></td><td class=\"right\">".$langs->trans("Error")."</td></tr>\n";
248 dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ErrorDatabaseVersionForbiddenForMigration", implode('.', $versionarray), $listofforbiddenversion));
249 $ok = 0;
250 break;
251 }
252 }
253 }
254 }
255
256 // Force l'affichage de la progression
257 if ($ok) {
258 print '<tr><td colspan="2"><span class="opacitymedium messagebepatient">'.$langs->trans("PleaseBePatient").'</span></td></tr>';
259 print '</table>';
260
261 flush();
262
263 print '<table cellspacing="0" cellpadding="1" border="0" width="100%">';
264 }
265
266
267 /*
268 * Remove deprecated indexes and constraints for Mysql without knowing its name
269 */
270 if ($ok && preg_match('/mysql/', $db->type)) {
271 $versioncommande = array(4, 0, 0);
272 if (count($versioncommande) && count($versionarray)
273 && versioncompare($versioncommande, $versionarray) <= 0) { // Si mysql >= 4.0
274 dolibarr_install_syslog("Clean database from bad named constraints");
275
276 // Delete old name constraints and duplicates
277 // The undesired constraint have a name starting with '0_' or defined by ibfk_999
278 $listtables = array(
279 MAIN_DB_PREFIX.'adherent_options',
280 MAIN_DB_PREFIX.'category_bankline',
281 MAIN_DB_PREFIX.'c_ecotaxe',
282 MAIN_DB_PREFIX.'c_methode_commande_fournisseur', // table renamed
283 MAIN_DB_PREFIX.'c_input_method'
284 );
285
286 $listtables = $db->DDLListTables($conf->db->name, '');
287
288 foreach ($listtables as $val) {
289 // Database prefix filter
290 if (preg_match('/^'.MAIN_DB_PREFIX.'/', $val)) {
291 //print "x".$val."<br>";
292 $sql = "SHOW CREATE TABLE ".$db->sanitize($val);
293 $resql = $db->query($sql);
294 if ($resql) {
295 $values = $db->fetch_array($resql);
296 if (is_array($values)) {
297 $i = 0;
298 $createsql = $values[1];
299 $reg = array();
300 while (preg_match('/CONSTRAINT `(0_[0-9a-zA-Z]+|[_0-9a-zA-Z]+_ibfk_[0-9]+)`/i', $createsql, $reg) && $i < 100) {
301 $sqldrop = "ALTER TABLE ".$val." DROP FOREIGN KEY ".$reg[1];
302 $resqldrop = $db->query($sqldrop);
303 if ($resqldrop) {
304 print '<tr><td colspan="2">'.$sqldrop.";</td></tr>\n";
305 }
306 $createsql = preg_replace('/CONSTRAINT `'.$reg[1].'`/i', 'XXX', $createsql);
307 $i++;
308 }
309 }
310 $db->free($resql);
311 } else {
312 if ($db->lasterrno() != 'DB_ERROR_NOSUCHTABLE') {
313 print '<tr><td colspan="2"><span class="error">'.dol_escape_htmltag($sql).' : '.dol_escape_htmltag($db->lasterror())."</span></td></tr>\n";
314 }
315 }
316 }
317 }
318 }
319 }
320
321 /*
322 * Load sql files
323 */
324 if ($ok) {
325 $dir = "mysql/migration/"; // We use mysql migration scripts whatever is database driver
326 if (!empty($dirmodule)) {
327 $dir = dol_buildpath('/'.$dirmodule.'/sql/', 0);
328 }
329 dolibarr_install_syslog("Scan sql files for migration files in ".$dir);
330
331 // Clean last part to exclude minor version x.y.z -> x.y
332 $newversionfrom = preg_replace('/(\.[0-9]+)$/i', '.0', $versionfrom);
333 $newversionto = preg_replace('/(\.[0-9]+)$/i', '.0', $versionto);
334
335 $filelist = array();
336 $i = 0;
337 $ok = 0;
338 $from = '^'.preg_quote($newversionfrom, '/');
339 $to = preg_quote($newversionto.'.sql', '/').'$';
340
341 // Get files list
342 $filesindir = array();
343 $handle = opendir($dir);
344 if (is_resource($handle)) {
345 while (($file = readdir($handle)) !== false) {
346 if (preg_match('/\.sql$/i', $file)) {
347 $filesindir[] = $file;
348 }
349 }
350 sort($filesindir);
351 } else {
352 print '<div class="error">'.$langs->trans("ErrorCanNotReadDir", $dir).'</div>';
353 }
354
355 // Define which file to run
356 foreach ($filesindir as $file) {
357 if (preg_match('/'.$from.'\-/i', $file)) {
358 $filelist[] = $file;
359 } elseif (preg_match('/\-'.$to.'/i', $file)) { // First test may be false if we migrate from x.y.* to x.y.*
360 $filelist[] = $file;
361 }
362 }
363
364 if (count($filelist) == 0) {
365 print '<div class="error">'.$langs->trans("ErrorNoMigrationFilesFoundForParameters").'</div>';
366 } else {
367 $listoffileprocessed = array(); // Protection to avoid to process twice the same file
368
369 // Loop on each migrate files
370 foreach ($filelist as $file) {
371 if (in_array($dir.$file, $listoffileprocessed)) {
372 continue;
373 }
374
375 print '<tr><td colspan="2"><hr style="border-color: #ccc; border-top-style: none;"></td></tr>';
376 print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").'</td><td class="right">'.$file.'</td></tr>'."\n";
377
378 // Run sql script
379 $ok = run_sql($dir.$file, 0, 0, 1, '', 'default', 32768, 0, 0, 2, 0, $db->database_name);
380 $listoffileprocessed[$dir.$file] = $dir.$file;
381
382
383 // Scan if there is migration scripts that depends of Dolibarr version
384 // for modules htdocs/module/sql or htdocs/custom/module/sql (files called "dolibarr_x.y.z-a.b.c.sql" or "dolibarr_always.sql")
385 $modulesfile = array();
386 foreach ($conf->file->dol_document_root as $type => $dirroot) {
387 $handlemodule = @opendir($dirroot); // $dirroot may be '..'
388 if (is_resource($handlemodule)) {
389 while (($filemodule = readdir($handlemodule)) !== false) {
390 if (!preg_match('/\./', $filemodule) && is_dir($dirroot.'/'.$filemodule.'/sql')) { // We exclude filemodule that contains . (are not directories) and are not directories.
391 //print "Scan for ".$dirroot . '/' . $filemodule . '/sql/'.$file;
392 if (is_file($dirroot.'/'.$filemodule.'/sql/dolibarr_'.$file)) {
393 $modulesfile[$dirroot.'/'.$filemodule.'/sql/dolibarr_'.$file] = '/'.$filemodule.'/sql/dolibarr_'.$file;
394 }
395 if (is_file($dirroot.'/'.$filemodule.'/sql/dolibarr_allversions.sql')) {
396 $modulesfile[$dirroot.'/'.$filemodule.'/sql/dolibarr_allversions.sql'] = '/'.$filemodule.'/sql/dolibarr_allversions.sql';
397 }
398 }
399 }
400 closedir($handlemodule);
401 }
402 }
403
404 if (count($modulesfile)) {
405 $conf->setValues($db); // Load conf so we knowmodules that are enabled
406
407 print '<tr><td colspan="2"><hr style="border-color: #ccc; border-top-style: none;"></td></tr>';
408
409 foreach ($modulesfile as $modulefilelong => $modulefileshort) {
410 if (in_array($modulefilelong, $listoffileprocessed)) {
411 continue;
412 }
413 $dirofmodule = preg_replace('/\//', '', preg_replace('/\/sql\/[a-z0-8_]+\.sql$/', '', $modulefileshort));
414
415 if (!is_null($dirofmodule) && isModEnabled($dirofmodule)) {
416 print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").' (external modules '.$dirofmodule.')</td><td class="right">'.$modulefileshort.'</td></tr>'."\n";
417
418 // Run sql script
419 $okmodule = run_sql($modulefilelong, 0, 0, 1); // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not.
420 $listoffileprocessed[$modulefilelong] = $modulefilelong;
421 } else {
422 print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").' (external modules '.$dirofmodule.')</td><td class="right">'.$modulefileshort.'</td></tr>'."\n";
423 print '<tr><td class="nowrap">'.$langs->trans("ProcessMigrateScript").'</td><td class="right"><span class="opacitymedium">Ignored (module not enabled)</span></td></tr>'."\n";
424 }
425 }
426 }
427 }
428 }
429 }
430
431 print '</table>';
432
433 if ($db->connected) {
434 $db->close();
435 }
436}
437
438
439if (empty($actiondone)) {
440 print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';
441}
442
443$ret = 0;
444if (!$ok && isset($argv[1])) {
445 $ret = 1;
446}
447dolibarr_install_syslog("Exit ".$ret);
448
449dolibarr_install_syslog("--- upgrade: end ".((int) (!$ok && !GETPOST("ignoreerrors")))." dirmodule=".$dirmodule);
450
451$nonext = (!$ok && !GETPOST("ignoreerrors")) ? 2 : 0;
452if ($dirmodule) {
453 $nonext = 1;
454}
455pFooter($nonext, $setuplang);
456
457if ($db !== null && $db->connected) {
458 $db->close();
459}
460
461// Return code if ran from command line
462if ($ret) {
463 exit($ret);
464}
run_sql($sqlfile, $silent=1, $entity=0, $usesavepoint=1, $handler='', $okerror='default', $linelengthlimit=32768, $nocommentremoval=0, $offsetforchartofaccount=0, $colspan=0, $onlysqltoimportwebsite=0, $database='')
Launch a sql file.
versioncompare($versionarray1, $versionarray2)
Compare 2 versions (stored into 2 arrays), to know if a version (a,b,c) is lower than (x,...
Definition admin.lib.php:72
Class to manage hooks.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
$conffile
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
isModEnabled($module)
Is Dolibarr module enabled.
getDoliDBInstance($type, $host, $user, $pass, $name, $port)
Return a DoliDB instance (database handler).
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
pHeader($subtitle, $next, $action='set', $param='', $forcejqueryurl='', $csstable='main-inside')
Show HTML header of install pages.
Definition inc.php:541
pFooter($nonext=0, $setuplang='', $jscheckfunction='', $withpleasewait=0, $morehtml='')
Print HTML footer of install pages.
Definition inc.php:635
dolibarr_install_syslog($message, $level=LOG_DEBUG)
Log function for install pages.
Definition inc.php:699
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
buildzip.php
dol_decode($chain, $key='1')
Decode a base 64 encoded + specific delta change.
dolDecrypt($chain, $key='', $patterntotest='')
Decode a string with a symmetric encryption.