<?php query_patch("update variable set valeur='1533' where nom='version'"); $sanitize = query_patch("SELECT id FROM variable where nom='sanitize_admin'"); if (!mysql_num_rows($sanitize)) { query_patch("insert into variable(nom, valeur, protege, cache) values('sanitize_admin', 1, 1, 0)"); }
// Mise en place du Cnx.class.php définitif unlink($cnxfilepath); rename($cnxfileorigpath, $cnxfilepath); } else { throw new Exception('<span class="erreur">Le fichier ' . str_replace($basedir, '', $cnxfileorigpath) . ' n\'est pas accessible en écriture ou bien n\'existe pas.</span><br />', 1); } } @clearstatcache(); $facturepath = "{$basedir}/client/pdf/facture.php"; $factureorigpath = "{$basedir}/client.orig/pdf/facture.php"; $filesWritable = array($basedir . 'client/', $facturepath, $factureorigpath); $err = null; foreach ($filesWritable as $file) { if (!is_writable($file)) { $err .= '<span class="erreur">Le fichier ' . str_replace($basedir, '', $file) . ' n\'est pas accessible en écriture ou bien n\'existe pas.</span><br />'; } } if (true === is_null($err)) { throw new Exception($err, 1); } unlink($facturepath); copy($factureorigpath, $facturepath); //CHANGEMENT DU NUMÉRO DE VERSION $sanitize = query_patch("SELECT id FROM variable where nom='sanitize_admin'"); if (mysql_num_rows($sanitize)) { $sanitize_id = mysql_result($sanitize, 0, "id"); query_patch("update variable set cache=1 where id=" . $sanitize_id); } query_patch("update variable set valeur='1534' where nom='version'"); query_patch("INSERT INTO `variable` (`nom`, `valeur`, `protege`, `cache`) VALUES ('htmlpurifier_whiteList', 'www.youtube.com/embed/\nplayer.vimeo.com/video/\nmaps.google.*/', 1, 1);");
<?php query_patch("update variable set valeur='1542' where nom='version'"); query_patch("update pays set isoalpha2='MG' where isoalpha2='MD' and isoalpha3='MDG'");
<?php query_patch("update variable set valeur='1543' where nom='version'");
(239, 2, 8, 0, 0, '840', 'US', 'USA', 0), (240, 2, 8, 0, 0, '840', 'US', 'USA', 0), (241, 2, 8, 0, 0, '840', 'US', 'USA', 0), (242, 2, 8, 0, 0, '840', 'US', 'USA', 0), (243, 2, 8, 0, 0, '840', 'US', 'USA', 0), (244, 2, 8, 0, 0, '840', 'US', 'USA', 0), (245, 2, 8, 0, 0, '840', 'US', 'USA', 0), (248, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (249, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (250, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (251, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (252, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (253, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (254, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (255, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (256, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (257, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (258, 2, 8, 0, 0, '124', 'CA', 'CAN', 0), (259, 1, 10, 0, 0, '312', 'GP', 'GLP', 0), (260, 1, 10, 0, 0, '254', 'GF', 'GUF', 0), (261, 1, 10, 0, 0, '474', 'MQ', 'MTQ', 0), (262, 1, 10, 0, 0, '175', 'YT', 'MYT', 0), (263, 1, 10, 0, 0, '638', 'RE', 'REU', 0), (264, 1, 10, 0, 0, '666', 'PM', 'SPM', 0), (265, 1, 11, 0, 0, '540', 'NC', 'NCL', 0), (266, 1, 11, 0, 0, '258', 'PF', 'PYF', 0), (267, 1, 11, 0, 0, '876', 'WF', 'WLF', 0), (268, 2, 11, 0, 0, '840', 'US', 'USA', 0); SQL; query_patch($content_pays); }
<?php query_patch("update variable set valeur='1540' where nom='version'"); // Ordonner les plugins $r = mysql_query("SELECT id FROM modules order by id asc", $cnx->link); $idx = 1; while ($r && ($a = mysql_fetch_object($r))) { mysql_query("UPDATE modules set classement={$idx} where id={$a->id}", $cnx->link); $idx++; } // Ajouter les variables de qualité de vignettes query_patch("insert into variable(nom, valeur, protege, cache) values('qualite_vignettes_png', '7', 1, 0)"); query_patch("insert into variable(nom, valeur, protege, cache) values('qualite_vignettes_jpeg', '75', 1, 0)"); //rajout de la colonne boutique dans la table pays permettant d'identifier le pays de la boutique afin de gérer correctement l'intracom query_patch("ALTER TABLE `pays` ADD `boutique` TINYINT NOT NULL DEFAULT '0'"); //lors de la MAJ on assigne comme pays à la boutique, le pays par défaut. $hdl = query_patch("select id from pays where defaut=1"); $pays_id = mysql_result($hdl, 0, "id"); if ($pays_id === false) { $pays_id = 64; } query_patch("update pays set boutique=1 where id=" . $pays_id); $basedir = __DIR__ . "/../.."; if (file_exists($basedir . "/classes/Cnx.class.php.orig")) { unlink($basedir . "/classes/Cnx.class.php"); rename($basedir . "/classes/Cnx.class.php.orig", $basedir . "/classes/Cnx.class.php"); }