} //on précise si une source peut enrichir ou non des notices $rqt = "ALTER TABLE connectors_sources ADD enrichment INT NOT NULL default 0"; echo traite_rqt($rqt, "alter table connectors_sources add enrichment"); //stockage des enrichissements de notices $rqt = "create table if not exists sources_enrichment(\n\t\t\tsource_enrichment_num int not null default 0,\n\t\t\tsource_enrichment_typnotice varchar(2) not null default '',\n\t\t\tsource_enrichment_typdoc varchar(2) not null default '',\n\t\t\tsource_enrichment_params text not null,\n\t\t\tprimary key (source_enrichment_num, source_enrichment_typnotice, source_enrichment_typdoc),\n\t\t\tindex i_s_enrichment_typnoti(source_enrichment_typnotice),\n\t\t\tindex i_s_enrichment_typdoc(source_enrichment_typdoc))"; echo traite_rqt($rqt, "create table sources_enrichment"); // Enrichissement OPAC if (pmb_mysql_num_rows(pmb_mysql_query("select 1 from parametres where type_param= 'opac' and sstype_param='notice_enrichment' ")) == 0) { $rqt = "INSERT INTO parametres (id_param, type_param, sstype_param, valeur_param, comment_param, section_param) VALUES (0, 'opac', 'notice_enrichment', '0', 'Activer l\\'enrichissement des notices\n 0: Non \n 1: Oui','e_aff_notice')"; echo traite_rqt($rqt, "insert opac_notice_enrichment='0' into parametres"); } // Social Network if (pmb_mysql_num_rows(pmb_mysql_query("select 1 from parametres where type_param= 'opac' and sstype_param='show_social_network' ")) == 0) { $rqt = "INSERT INTO parametres (id_param, type_param, sstype_param, valeur_param, comment_param, section_param) VALUES (0, 'opac', 'show_social_network', '0', 'Activer les partages sur les réseaux sociaux \n 0: Non \n 1: Oui','e_aff_notice')"; echo traite_rqt($rqt, "insert show_social_network='0' into parametres"); } // valeur par défaut restrict infopages $rqt = "ALTER TABLE infopages CHANGE restrict_infopage restrict_infopage INT( 11 ) NOT NULL DEFAULT 0"; echo traite_rqt($rqt, "ALTER TABLE infopages CHANGE restrict_infopage DEFAULT 0"); // +-------------------------------------------------+ echo "</table>"; $rqt = "update parametres set valeur_param='" . $action . "' where type_param='pmb' and sstype_param='bdd_version' "; $res = pmb_mysql_query($rqt, $dbh); echo "<strong><font color='#FF0000'>" . $msg[1807] . $action . " !</font></strong><br />"; echo form_relance("v5.00"); break; default: include "{$include_path}/messages/help/{$lang}/alter.txt"; break; }
// AR - Retrait du paramètre perio_a2z_enrichissements, on ne l'a jamais utilisé car on a finalement ramené le paramétrage par un connecteur $rqt = "delete from parametres where type_param= 'opac' and sstype_param='perio_a2z_enrichissements'"; echo traite_rqt($rqt, "delete from parametres opac_perio_a2z_enrichissements"); //DG - Paramètre non utilisé $rqt = "delete from parametres where sstype_param='confirm_resa' and type_param='opac' "; $res = mysql_query($rqt, $dbh); //DG - Paramètre non utilisé $rqt = "delete from parametres where sstype_param='authors_aut_rec_per_page' and type_param='opac' "; $res = mysql_query($rqt, $dbh); $rqt = "update parametres set valeur_param='0' where type_param='pmb' and sstype_param='bdd_subversion' "; echo traite_rqt($rqt, "update pmb_bdd_subversion=0 into parametres"); $pmb_bdd_subversion = 0; if ($pmb_subversion_database_as_it_shouldbe != $pmb_bdd_subversion) { // Info de déconnexion pour passer le add-on $rqt = " select 1 "; echo traite_rqt($rqt, "<b><a href='" . $base_path . "/logout.php' target=_blank>VOUS DEVEZ VOUS DECONNECTER ET VOUS RECONNECTER POUR TERMINER LA MISE A JOUR / YOU MUST DISCONNECT AND RECONNECT YOU TO COMPLETE UPDATE</a></b> "); } // +-------------------------------------------------+ echo "</table>"; $rqt = "update parametres set valeur_param='" . $action . "' where type_param='pmb' and sstype_param='bdd_version' "; $res = mysql_query($rqt, $dbh); echo "<strong><font color='#FF0000'>" . $msg[1807] . $action . " !</font></strong><br />"; break; default: include "{$include_path}/messages/help/{$lang}/alter.txt"; break; } /* NE PLUS RIEN METTRE ICI, utilisez le addon
echo form_relance("v1.58"); break; case "v1.58": echo "<table ><tr><th>" . $msg['admin_misc_action'] . "</th><th>" . $msg['admin_misc_resultat'] . "</th></tr>"; // +--------------------------------------------------------------------------+ $rqt = "ALTER TABLE empr CHANGE empr_ville empr_ville VARCHAR( 255 ) NOT NULL "; echo traite_rqt($rqt, "ville varchar(255)"); $rqt = "ALTER TABLE empr CHANGE empr_adr1 empr_adr1 VARCHAR( 255 ) NOT NULL "; echo traite_rqt($rqt, "adr1 varchar(255)"); $rqt = "ALTER TABLE empr CHANGE empr_adr2 empr_adr2 VARCHAR( 255 ) NOT NULL "; echo traite_rqt($rqt, "adr2 varchar(255)"); $rqt = "ALTER TABLE empr CHANGE empr_tel1 empr_tel1 VARCHAR( 255 ) NOT NULL "; echo traite_rqt($rqt, "tel1 varchar(255)"); $rqt = "ALTER TABLE empr CHANGE empr_tel2 empr_tel2 VARCHAR( 255 ) NOT NULL "; echo traite_rqt($rqt, "tel2 varchar(255)"); $rqt = "ALTER TABLE empr CHANGE empr_nom empr_nom VARCHAR( 255 ) NOT NULL "; echo traite_rqt($rqt, "nom varchar(255)"); $rqt = "ALTER TABLE empr CHANGE empr_prenom empr_prenom VARCHAR( 255 ) NOT NULL "; echo traite_rqt($rqt, "prenom varchar(255)"); $rqt = "ALTER TABLE empr ADD empr_pays VARCHAR( 255 ) NOT NULL default '' AFTER empr_ville "; echo traite_rqt($rqt, "ADD pays varchar(255)"); echo "</table>"; $rqt = "update parametres set valeur_param='" . $action . "' where type_param='pmb' and sstype_param='bdd_version' "; $res = pmb_mysql_query($rqt, $dbh); echo "<strong><font color='#FF0000'>" . $msg[1807] . $action . " !</font></strong><br />"; echo form_relance("v2.00"); break; default: include "{$include_path}/messages/help/{$lang}/alter.txt"; break; }
echo traite_rqt($rqt, "insert pmb_recouvrement_auto='1' into parametres"); } if (pmb_mysql_num_rows(pmb_mysql_query("select 1 from parametres where type_param= 'opac' and sstype_param='show_dernieresnotices_nb' ")) == 0) { $rqt = "INSERT INTO parametres (id_param, type_param, sstype_param, valeur_param, comment_param, section_param, gestion) VALUES (0, 'opac', 'show_dernieresnotices_nb', '10', 'Nombre de dernières notices affichées en OPAC lors de l\\'activation du paramètre show_dernieresnotices', 'f_modules', 0)"; echo traite_rqt($rqt, "insert opac_show_dernieresnotices_nb='10' into parametres"); } // +-------------------------------------------------+ echo "</table>"; $rqt = "update parametres set valeur_param='" . $action . "' where type_param='pmb' and sstype_param='bdd_version' "; $res = pmb_mysql_query($rqt, $dbh); echo "<strong><font color='#FF0000'>" . $msg[1807] . $action . " !</font></strong><br />"; echo form_relance("v3.49"); break; case "v3.49": echo "<table ><tr><th>" . $msg['admin_misc_action'] . "</th><th>" . $msg['admin_misc_resultat'] . "</th></tr>"; // +-------------------------------------------------+ if (pmb_mysql_num_rows(pmb_mysql_query("select 1 from parametres where type_param= 'pmb' and sstype_param='keyword_sep' ")) == 0) { $rqt = "INSERT INTO parametres (id_param, type_param, sstype_param, valeur_param, comment_param) VALUES (0, 'pmb', 'keyword_sep', ' ', 'Séparateur des mots clés dans la partie indexation libre, espace ou ; ou , ou ...')"; echo traite_rqt($rqt, "insert pmb_keyword_sep=' ' into parametres"); } // +-------------------------------------------------+ echo "</table>"; $rqt = "update parametres set valeur_param='" . $action . "' where type_param='pmb' and sstype_param='bdd_version' "; $res = pmb_mysql_query($rqt, $dbh); echo "<strong><font color='#FF0000'>" . $msg[1807] . $action . " !</font></strong><br />"; echo form_relance("v4.00"); break; default: include "{$include_path}/messages/help/{$lang}/alter.txt"; break; }
$requete = utf8_encode($requete); } $res = pmb_mysql_query($requete, $dbh); $erreur_no = pmb_mysql_errno(); if (!$erreur_no) { $retour = "Successful"; } else { switch ($erreur_no) { case "1060": $retour = "Field already exists, no problem."; break; case "1061": $retour = "Key already exists, no problem."; break; case "1091": $retour = "Object already deleted, no problem."; break; default: $retour = "<font color=\"#FF0000\">Error may be fatal : <i>" . pmb_mysql_error() . "<i></font>"; break; } } return "<tr><td><font size='1'>" . ($charset == "utf-8" ? utf8_encode($message) : $message) . "</font></td><td><font size='1'>" . $retour . "</font></td></tr>"; } echo "<table>"; /******************** AJOUTER ICI LES MODIFICATIONS *******************************/ /******************** JUSQU'ICI **************************************************/ /* PENSER à faire +1 au paramètre $pmb_subversion_database_as_it_shouldbe dans includes/config.inc.php */ /* COMMITER les deux fichiers addon.inc.php ET config.inc.php en même temps */ echo traite_rqt("update parametres set valeur_param='" . $pmb_subversion_database_as_it_shouldbe . "' where type_param='pmb' and sstype_param='bdd_subversion'", "Update to {$pmb_subversion_database_as_it_shouldbe} database subversion."); echo "<table>";
echo "</table>"; $rqt = "update parametres set valeur_param='" . $action . "' where type_param='pmb' and sstype_param='bdd_version' "; $res = pmb_mysql_query($rqt, $dbh); echo "<strong><font color='#FF0000'>" . $msg[1807] . $action . " !</font></strong><br />"; echo form_relance("v5.21"); break; case "v5.21": echo "<table ><tr><th>" . $msg['admin_misc_action'] . "</th><th>" . $msg['admin_misc_resultat'] . "</th></tr>"; // +-------------------------------------------------+ //NG - DSI: Ajout de bannette_aff_notice_number pour afficher ou pas le nombre de notices envoyées dans le mail $rqt = "ALTER TABLE bannettes ADD bannette_aff_notice_number int unsigned NOT NULL default 1 "; echo traite_rqt($rqt, "ALTER TABLE bannettes ADD bannette_aff_notice_number "); //JP - Personnalisation des colonnes pour l'affichage des états des collections en gestion if (pmb_mysql_num_rows(pmb_mysql_query("select 1 from parametres where type_param= 'pmb' and sstype_param='collstate_data' ")) == 0) { $rqt = "INSERT INTO parametres (id_param, type_param, sstype_param, valeur_param, comment_param, section_param, gestion)\n\t\t\t\t\t\tVALUES (0, 'pmb', 'collstate_data', '', 'Colonne des états des collections, dans l\\'ordre donné, séparé par des virgules : location_libelle,emplacement_libelle,cote,type_libelle,statut_opac_libelle,origine,state_collections,archive,lacune,surloc_libelle,note,#n : id des champs personnalisés\nLes valeurs possibles sont les propriétés de la classe PHP \"pmb/classes/collstate.class.php\".','',0)"; echo traite_rqt($rqt, "insert pmb_collstate_data = '' into parametres"); } $action = "v5.20"; // +-------------------------------------------------+ echo "</table>"; $rqt = "update parametres set valeur_param='" . $action . "' where type_param='pmb' and sstype_param='bdd_version' "; $res = pmb_mysql_query($rqt, $dbh); echo "<strong><font color='#FF0000'>" . $msg[1807] . $action . " !</font></strong><br />"; break; default: include "{$include_path}/messages/help/{$lang}/alter.txt"; break; } /* A mettre en 5.21
case "v2.23": echo "<table ><tr><th>Action</th><th>Resultat</th></tr>"; // +-------------------------------------------------+ $rqt = "ALTER TABLE pret CHANGE pret_date pret_date DATETIME DEFAULT '0000-00-00' NOT NULL "; echo traite_rqt($rqt, "TABLE pret change pret_date DATETIME "); $rqt = "ALTER TABLE pret_archive CHANGE arc_debut arc_debut DATETIME DEFAULT '0000-00-00' "; echo traite_rqt($rqt, "TABLE pret_archive change arc_debut DATETIME "); // +-------------------------------------------------+ echo "</table>"; $rqt = "update parametres set valeur_param='" . $action . "' where type_param='pmb' and sstype_param='bdd_version' "; $res = pmb_mysql_query($rqt, $dbh); echo "<strong><font color='#FF0000'>" . $msg[1807] . $action . " !</font></strong><br />"; echo form_relance("v2.24"); break; case "v2.24": echo "<table ><tr><th>Action</th><th>Resultat</th></tr>"; // +-------------------------------------------------+ $rqt = "ALTER TABLE import_marc CHANGE origine origine varchar(50) DEFAULT '' "; echo traite_rqt($rqt, "TABLE import_marc change origine varchar(50) "); $rqt = "ALTER TABLE import_marc ADD no_notice integer(10) UNSIGNED DEFAULT 0 "; echo traite_rqt($rqt, "TABLE import_marc ADD no_notice "); // +-------------------------------------------------+ $rqt = "update parametres set valeur_param='" . $action . "' where type_param='pmb' and sstype_param='bdd_version' "; $res = pmb_mysql_query($rqt, $dbh); echo "<strong><font color='#FF0000'>" . $msg[1807] . $action . " !</font></strong><br />"; echo form_relance("v3.00"); break; default: include "{$include_path}/messages/help/{$lang}/alter.txt"; break; }