%k25u25%fgd5n!?%k25u25%fgd5n!%k25u25%fgd5n!?%k25u25%fgd5n!v010.php000066600000003126151453265520005761 0ustar00 v017.php000066600000021376151453265520005777 0ustar00= 1.720) { spip_query("UPDATE spip_articles SET url_site=url_ref"); spip_query("ALTER TABLE spip_articles DROP INDEX url_ref"); spip_query("ALTER TABLE spip_articles DROP url_ref"); } maj_version (1.722); } if (upgrade_vers(1.723, $version_installee, $version_cible)) { if ($version_installee == 1.722) { spip_query("ALTER TABLE spip_articles MODIFY url_site VARCHAR(255) NOT NULL"); spip_query("ALTER TABLE spip_articles DROP INDEX url_site;"); spip_query("ALTER TABLE spip_articles ADD INDEX url_site (url_site);"); } maj_version (1.723); } if (upgrade_vers(1.724, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_messages ADD date_fin datetime DEFAULT '0000-00-00 00:00:00' NOT NULL"); maj_version (1.724); } if (upgrade_vers(1.726, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_auteurs ADD low_sec tinytext NOT NULL"); maj_version (1.726); } if (upgrade_vers(1.727, $version_installee, $version_cible)) { // occitans : oci_xx -> oc_xx spip_query("UPDATE spip_auteurs SET lang=REPLACE(lang,'oci_', 'oc_') WHERE lang LIKE 'oci_%'"); spip_query("UPDATE spip_rubriques SET lang=REPLACE(lang,'oci_', 'oc_') WHERE lang LIKE 'oci_%'"); spip_query("UPDATE spip_articles SET lang=REPLACE(lang,'oci_', 'oc_') WHERE lang LIKE 'oci_%'"); spip_query("UPDATE spip_breves SET lang=REPLACE(lang,'oci_', 'oc_') WHERE lang LIKE 'oci_%'"); maj_version (1.727); } // Ici version 1.7 officielle if (upgrade_vers(1.728, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_articles ADD id_version int unsigned DEFAULT '0' NOT NULL"); maj_version (1.728); } if (upgrade_vers(1.730, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_articles ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL"); spip_query("ALTER TABLE spip_articles ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_auteurs ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL"); spip_query("ALTER TABLE spip_auteurs ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_breves ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL"); spip_query("ALTER TABLE spip_breves ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_mots ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL"); spip_query("ALTER TABLE spip_mots ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_rubriques ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL"); spip_query("ALTER TABLE spip_rubriques ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_syndic ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL"); spip_query("ALTER TABLE spip_syndic ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_forum ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL"); spip_query("ALTER TABLE spip_forum ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_signatures ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL"); spip_query("ALTER TABLE spip_signatures ADD INDEX idx (idx)"); maj_version (1.730); } if (upgrade_vers(1.731, $version_installee, $version_cible)) { spip_query("UPDATE spip_articles SET idx='1' where lang IN ('de','vi')"); spip_query("UPDATE spip_rubriques SET idx='1' where lang IN ('de','vi')"); spip_query("UPDATE spip_breves SET idx='1' where lang IN ('de','vi')"); spip_query("UPDATE spip_auteurs SET idx='1' where lang IN ('de','vi')"); maj_version (1.731); } if (upgrade_vers(1.732, $version_installee, $version_cible)) { // en correction d'un vieux truc qui avait fait sauter le champ inclus sur les bases version 1.415 spip_query("ALTER TABLE spip_documents ADD inclus VARCHAR(3) DEFAULT 'non'"); maj_version (1.732); } if (upgrade_vers(1.733, $version_installee, $version_cible)) { // spip_query("ALTER TABLE spip_articles ADD id_version int unsigned DEFAULT '0' NOT NULL"); spip_query("DROP TABLE spip_versions"); spip_query("DROP TABLE spip_versions_fragments"); creer_base(); maj_version(1.733); } #if ($version_installee < 1.734) { # // integrer nouvelles tables auxiliaires du compilateur ESJ # creer_base(); # maj_version(1.734); #} } ?> v019.php000066600000066121151453265520005776 0ustar00 l'index numerique entier est la * par 1000 (resultat < SVN c'est ok) // FLV est incrustable, la MAJ precedente l'avait oublie $GLOBALS['maj'][1931] = array( array('spip_query', "UPDATE spip_types_documents SET `inclus`='embed' WHERE `extension`='flv'") ); // Ajout de spip_forum.date_thread, et on essaie de le remplir // a coup de table temporaire (est-ce autorise partout... sinon // tant pis, ca ne marchera que pour les forums recemment modifies) $GLOBALS['maj'][1932] = array( array('sql_alter', "TABLE spip_forum ADD `date_thread` datetime DEFAULT '0000-00-00 00:00:00' NOT NULL"), array('sql_alter', "TABLE spip_forum ADD INDEX `date_thread` (`date_thread`)"), array('spip_query', "DROP TABLE IF EXISTS spip_tmp"), array('spip_query', "CREATE TABLE spip_tmp SELECT `id_thread`,MAX(`date_heure`) AS dt FROM spip_forum GROUP BY `id_thread`"), array('sql_alter', "TABLE spip_tmp ADD INDEX `p` (`id_thread`)"), array('spip_query', "UPDATE spip_forum AS F JOIN spip_tmp AS T ON F.id_thread=T.id_thread SET F.date_thread=T.dt"), array('spip_query', "DROP TABLE spip_tmp"), ); // Retrait de _DIR_IMG dans le champ fichier de la table des doc function maj_1_934 () { // attention, en cas de mutualisation _DIR_IMG contient quelque chose comme sites/urldusite/IMG/ // essayons en ne prenant que le dernier segment $dir_img = basename(_DIR_IMG).'/'; $res = spip_query("SELECT fichier FROM spip_documents WHERE fichier LIKE " . _q($dir_img . '%') . " LIMIT 0,1"); if (!$row = spip_fetch_array($res)){ //Ęsinon on essaye avec le chemin complet // il faut donc verifier qu'on a bien le bon nom de repertoire $dir_img = substr(_DIR_IMG,strlen(_DIR_RACINE)); } $n = strlen($dir_img) + 1; spip_query("UPDATE spip_documents SET `fichier`=substring(fichier,$n) WHERE `fichier` LIKE " . _q($dir_img . '%')); } $GLOBALS['maj'][1934] = array(array('maj_1_934')); function maj_1_935 () { include_spip('inc/texte'); foreach(array('article'=>'id_article','rubrique'=>'id_rubrique','breve'=>'id_breve') as $type => $id_table_objet){ $table_objet = "$type"."s"; $chapo = $type=='article' ? ",a.chapo":""; $res = spip_query("SELECT a.$id_table_objet,a.texte $chapo FROM spip_documents_$table_objet AS d JOIN spip_$table_objet AS a ON a.$id_table_objet=d.$id_table_objet GROUP BY $id_table_objet"); while ($row = sql_fetch($res)){ $GLOBALS['doublons_documents_inclus'] = array(); traiter_modeles(($chapo?$row['chapo']:"").$row['texte'],true); // detecter les doublons if (count($GLOBALS['doublons_documents_inclus'])){ $id = $row[$id_table_objet]; $liste = "(".implode(",$id,'oui'),(",$GLOBALS['doublons_documents_inclus']).",$id,'oui')"; spip_query("REPLACE INTO spip_documents_$table_objet (`id_document`,`$id_table_objet`,`vu`) VALUES $liste"); } } } } $GLOBALS['maj'][1935] = array( array('sql_alter', "TABLE spip_documents_articles ADD `vu` ENUM('non', 'oui') DEFAULT 'non' NOT NULL"), array('sql_alter', "TABLE spip_documents_rubriques ADD `vu` ENUM('non', 'oui') DEFAULT 'non' NOT NULL"), array('sql_alter', "TABLE spip_documents_breves ADD `vu` ENUM('non', 'oui') DEFAULT 'non' NOT NULL"), array('maj_1_935') ); // http://doc.spip.org/@convertir_un_champ_blob_en_text function convertir_un_champ_blob_en_text($table,$champ,$type){ // precaution : definir le charset par defaut de la table, car c'est lui qui prevaut // et il faut qu'il corresponde au charset de la connexion qui est celui // dans lequel on a ecrit le champ en blob if ($charset = sql_getfetsel('@@character_set_connection')){ sql_alter("TABLE $table DEFAULT CHARACTER SET ".$charset); } $res = spip_query("SHOW FULL COLUMNS FROM $table LIKE '$champ'"); if ($row = sql_fetch($res)){ if (strtolower($row['Type'])!=strtolower($type)) { $default = $row['Default']?(" DEFAULT ".sql_quote($row['Default'])):""; $notnull = ($row['Null']=='YES')?"":" NOT NULL"; sql_alter("TABLE $table CHANGE $champ $champ $type $default $notnull"); } } } $GLOBALS['maj'][1937] = array( // convertir les champs blob des tables spip en champs texte array('convertir_un_champ_blob_en_text',"spip_articles","texte","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_articles","extra","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_auteurs","extra","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_breves","texte","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_breves","extra","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_messages","texte","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_mots","texte","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_mots","extra","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_groupes_mots","texte","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_rubriques","texte","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_rubriques","extra","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_syndic","nom_site","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_syndic","descriptif","TEXT"), array('convertir_un_champ_blob_en_text',"spip_syndic","extra","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_syndic_articles","descriptif","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_petitions","texte","LONGTEXT"), array('convertir_un_champ_blob_en_text',"spip_ortho_cache","suggest","TEXT"), ); function maj_1_938 () { $res = sql_select('extension','spip_documents',"extension='' OR extension is NULL"); if ($n = sql_count($res)) { $repli = false; // verifier que la colonne id_type est toujours la (update post 1.938) $desc = sql_showtable('spip_documents'); if (!$desc OR !isset($desc['field']['id_type'])) $repli = true; $s = sql_select('extension'.($repli?'':',id_type'),'spip_types_documents'); while ($t = sql_fetch($s)) { if (isset($t['id_type'])) spip_query("UPDATE spip_documents SET `extension`="._q($t['extension']) ." WHERE `id_type`="._q($t['id_type'])); else spip_query("UPDATE spip_documents SET `extension`="._q($t['extension']) ." WHERE fichier LIKE "._q("%." . $t['extension'])); } $res = sql_select('extension','spip_documents',"extension='' OR extension is NULL"); if ($n = sql_count($res)) spip_log("Table spip_documents : Colonne extension incomplete : $n lignes vides"); } } $GLOBALS['maj'][1938] = array( // Des champs NULL a l'installation // Ajouter un champ extension aux spip_documents, et le // remplir avec les valeurs ad hoc array('sql_alter', "TABLE spip_documents ADD `extension` VARCHAR(10) DEFAULT '' NOT NULL "), array('sql_alter', "TABLE spip_documents ADD INDEX `extension` (`extension`)"), array('maj_1_938'), array('sql_alter', "TABLE spip_documents DROP INDEX `id_type`, DROP `id_type`"), ## supprimer l'autoincrement avant de supprimer la PRIMARY KEY array('sql_alter', "TABLE spip_types_documents CHANGE `id_type` `id_type` BIGINT( 21 ) NOT NULL ") , array('sql_alter', "TABLE spip_types_documents DROP PRIMARY KEY"), array('sql_alter', "TABLE spip_types_documents DROP `id_type`"), array('sql_alter', "TABLE spip_types_documents DROP INDEX `extension`"), ## recreer la PRIMARY KEY sur spip_types_documents.extension array('sql_alter', "TABLE spip_types_documents ADD PRIMARY KEY (`extension`)"), ); $GLOBALS['maj'][1939] = array( array('sql_alter', "TABLE spip_visites CHANGE `visites` `visites` INT UNSIGNED DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_visites_articles CHANGE `visites` `visites` INT UNSIGNED DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_referers CHANGE `visites` `visites` INT UNSIGNED DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_referers CHANGE `visites_jour` `visites_jour` INT UNSIGNED DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_referers CHANGE `visites_veille` `visites_veille` INT UNSIGNED DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_referers_articles CHANGE `visites` `visites` INT UNSIGNED DEFAULT '0' NOT NULL") ); $GLOBALS['maj'][1940] = array( array('spip_query', "DROP TABLE spip_caches"), ); $GLOBALS['maj'][1941] = array( array('spip_query', "UPDATE spip_meta SET `valeur` = '' WHERE `nom`='preview' AND `valeur`='non' "), array('spip_query', "UPDATE spip_meta SET `valeur` = ',0minirezo,1comite,' WHERE `nom`='preview' AND `valeur`='1comite' "), array('spip_query', "UPDATE spip_meta SET `valeur` = ',0minirezo,' WHERE `nom`='preview' AND `valeur`='oui' "), ); $GLOBALS['maj'][1942] = array( array('sql_alter', "TABLE spip_auteurs CHANGE `statut` `statut` varchar(255) DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_breves CHANGE `statut` `statut` varchar(6) DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_messages CHANGE `statut` `statut` varchar(6) DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_rubriques CHANGE `statut` `statut` varchar(10) DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_rubriques CHANGE `statut_tmp` `statut_tmp` varchar(10) DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_syndic CHANGE `statut` `statut` varchar(10) DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_syndic_articles CHANGE `statut` `statut` varchar(10) DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_forum CHANGE `statut` `statut` varchar(8) DEFAULT '0' NOT NULL"), array('sql_alter', "TABLE spip_signatures CHANGE `statut` `statut` varchar(10) DEFAULT '0' NOT NULL") ); // suppression de l'indexation dans la version standard $GLOBALS['maj'][1943] = array( array('sql_alter', "TABLE spip_articles DROP KEY `idx`"), array('sql_alter', "TABLE spip_articles DROP `idx`"), array('sql_alter', "TABLE spip_auteurs DROP KEY `idx`"), array('sql_alter', "TABLE spip_auteurs DROP `idx`"), array('sql_alter', "TABLE spip_breves DROP KEY `idx`"), array('sql_alter', "TABLE spip_breves DROP `idx`"), array('sql_alter', "TABLE spip_mots DROP KEY `idx`"), array('sql_alter', "TABLE spip_mots DROP `idx`"), array('sql_alter', "TABLE spip_rubriques DROP KEY `idx`"), array('sql_alter', "TABLE spip_rubriques DROP `idx`"), # array('sql_alter', "TABLE spip_documents DROP KEY `idx`"), array('sql_alter', "TABLE spip_documents DROP `idx`"), array('sql_alter', "TABLE spip_syndic DROP KEY `idx`"), array('sql_alter', "TABLE spip_syndic DROP `idx`"), array('sql_alter', "TABLE spip_forum DROP KEY `idx`"), array('sql_alter', "TABLE spip_forum DROP `idx`"), array('sql_alter', "TABLE spip_signatures DROP KEY `idx`"), array('sql_alter', "TABLE spip_signatures DROP `idx`"), array('spip_query', "DROP TABLE spip_index"), array('spip_query', "DROP TABLE spip_index_dico"), ); $GLOBALS['maj'][1944] = array( array('sql_alter', "TABLE spip_documents CHANGE `taille` `taille` integer"), array('sql_alter', "TABLE spip_documents CHANGE `largeur` `largeur` integer"), array('sql_alter', "TABLE spip_documents CHANGE `hauteur` `hauteur` integer") ); $GLOBALS['maj'][1945] = array( array('sql_alter', "TABLE spip_petitions CHANGE `email_unique` `email_unique` CHAR (3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_petitions CHANGE `site_obli` `site_obli` CHAR (3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_petitions CHANGE `site_unique` `site_unique` CHAR (3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_petitions CHANGE `message` `message` CHAR (3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_petitions CHANGE `texte` `texte` LONGTEXT DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `surtitre` `surtitre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `titre` `titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `soustitre` `soustitre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `descriptif` `descriptif` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `chapo` `chapo` mediumtext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `texte` `texte` longtext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `ps` `ps` mediumtext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `accepter_forum` `accepter_forum` CHAR(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `nom_site` `nom_site` tinytext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `url_site` `url_site` VARCHAR(255) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_articles CHANGE `url_propre` `url_propre` VARCHAR(255) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_auteurs CHANGE `nom` `nom` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_auteurs CHANGE `bio` `bio` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_auteurs CHANGE `email` `email` tinytext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_auteurs CHANGE `nom_site` `nom_site` tinytext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_auteurs CHANGE `url_site` `url_site` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_auteurs CHANGE `pass` `pass` tinytext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_auteurs CHANGE `low_sec` `low_sec` tinytext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_auteurs CHANGE `pgp` `pgp` TEXT DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_auteurs CHANGE `htpass` `htpass` tinytext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_breves CHANGE `titre` `titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_breves CHANGE `texte` `texte` longtext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_breves CHANGE `lien_titre` `lien_titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_breves CHANGE `lien_url` `lien_url` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_messages CHANGE `titre` `titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_messages CHANGE `texte` `texte` longtext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_messages CHANGE `type` `type` varchar(6) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_messages CHANGE `rv` `rv` varchar(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_mots CHANGE `titre` `titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_mots CHANGE `descriptif` `descriptif` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_mots CHANGE `texte` `texte` longtext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_mots CHANGE `type` `type` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_mots CHANGE `url_propre` `url_propre` VARCHAR(255) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `titre` `titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `descriptif` `descriptif` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `texte` `texte` longtext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `unseul` `unseul` varchar(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `obligatoire` `obligatoire` varchar(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `articles` `articles` varchar(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `breves` `breves` varchar(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `rubriques` `rubriques` varchar(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `syndic` `syndic` varchar(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `minirezo` `minirezo` varchar(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `comite` `comite` varchar(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_groupes_mots CHANGE `forum` `forum` varchar(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_rubriques CHANGE `titre` `titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_rubriques CHANGE `descriptif` `descriptif` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_rubriques CHANGE `texte` `texte` longtext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_rubriques CHANGE `url_propre` `url_propre` VARCHAR(255) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_documents CHANGE `extension` `extension` VARCHAR(10) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_documents CHANGE `titre` `titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_documents CHANGE `date` `date` datetime DEFAULT '0000-00-00 00:00:00' NOT NULL"), array('sql_alter', "TABLE spip_documents CHANGE `descriptif` `descriptif` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_documents CHANGE `fichier` `fichier` varchar(255) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_types_documents CHANGE `extension` `extension` varchar(10) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_types_documents CHANGE `titre` `titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_types_documents CHANGE `descriptif` `descriptif` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_types_documents CHANGE `mime_type` `mime_type` varchar(100) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_syndic CHANGE `nom_site` `nom_site` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_syndic CHANGE `url_site` `url_site` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_syndic CHANGE `url_syndic` `url_syndic` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_syndic CHANGE `descriptif` `descriptif` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_syndic CHANGE `url_propre` `url_propre` VARCHAR(255) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_syndic CHANGE `syndication` `syndication` VARCHAR(3) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_syndic_articles CHANGE `titre` `titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_syndic_articles CHANGE `url` `url` VARCHAR(255) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_syndic_articles CHANGE `lesauteurs` `lesauteurs` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_syndic_articles CHANGE `descriptif` `descriptif` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_forum CHANGE `titre` `titre` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_forum CHANGE `texte` `texte` mediumtext DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_forum CHANGE `auteur` `auteur` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_forum CHANGE `email_auteur` `email_auteur` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_forum CHANGE `nom_site` `nom_site` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_forum CHANGE `url_site` `url_site` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_forum CHANGE `ip` `ip` varchar(16) DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_signatures CHANGE `nom_email` `nom_email` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_signatures CHANGE `ad_email` `ad_email` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_signatures CHANGE `nom_site` `nom_site` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_signatures CHANGE `url_site` `url_site` text DEFAULT '' NOT NULL"), array('sql_alter', "TABLE spip_signatures CHANGE `message` `message` mediumtext DEFAULT '' NOT NULL") ); $GLOBALS['maj'][1946] = array( array('sql_alter', "TABLE spip_forum DROP INDEX `id_parent`"), array('sql_alter', "TABLE spip_forum DROP INDEX `id_article`"), array('sql_alter', "TABLE spip_forum DROP INDEX `id_breve`"), array('sql_alter', "TABLE spip_forum DROP INDEX `id_syndic`"), array('sql_alter', "TABLE spip_forum DROP INDEX `id_rubrique`"), array('sql_alter', "TABLE spip_forum DROP INDEX `date_thread`"), array('sql_alter', "TABLE spip_forum DROP INDEX `statut`"), array('sql_alter', "TABLE spip_forum ADD INDEX `optimal` (`statut`,`id_parent`,`id_article`,`date_heure`,`id_breve`,`id_syndic`,`id_rubrique`)") ); $GLOBALS['maj'][1947] = array( array('sql_alter', "TABLE spip_articles DROP INDEX `url_site`"), array('sql_alter', "TABLE spip_articles DROP INDEX `date_modif`"), array('sql_alter', "TABLE spip_auteurs DROP INDEX `lang`") ); // mauvaise manip $GLOBALS['maj'][1949] = array( array('sql_alter', "TABLE spip_versions DROP INDEX `date`"), array('sql_alter', "TABLE spip_versions DROP INDEX `id_auteur`") ); function maj_1_950($installee) { // oubli de gerer le prefixe lors l'introduction de l'abstraction // => Relancer les MAJ concernees si la version dont on part les avait fait if ($installee >= 1.946) serie_alter('950a', $GLOBALS['maj'][1946]); if ($installee >= 1.947) serie_alter('950b', $GLOBALS['maj'][1947]); if ($installee >= 1.949) @serie_alter('950c', $GLOBALS['maj'][1949]); global $tables_auxiliaires; include_spip('base/auxiliaires'); $v = $tables_auxiliaires[$k='spip_urls']; sql_create($k, $v['field'], $v['key'], false, false); foreach(array('article'=>'id_article', 'rubrique'=>'id_rubrique', 'breve'=>'id_breve', 'auteur' => 'id_auteur', 'mot' => 'id_mot', 'syndic' => 'id_syndic') as $type => $id_objet){ $table = ($type == 'syndic') ? $type : ($type ."s"); $date = ($type == 'breve') ? 'date_heure' : (($type == 'auteur') ? 'maj' : (($type == 'mot') ? 'maj' : 'date')); $q = @sql_select("url_propre AS url, $id_objet AS id_objet, '$type' AS type, $date as date", "spip_$table", "url_propre<>''"); if (!$q) return; // anormal, mais ne pas boucler en erreur while ($r = sql_fetch($q)) sql_replace('spip_urls', $r); spip_log("table $table : " . sql_count($q) . " urls propres copiees"); sql_alter("TABLE spip_$table DROP INDEX `url_propre`"); sql_alter("TABLE spip_$table DROP `url_propre`"); } } // Donner a la fonction ci-dessus le numero de version installee // AVANT que la mise a jour ait commencee $GLOBALS['maj'][1950] = array(array('maj_1_950', $GLOBALS['meta']['version_installee'] )); // Erreur dans maj_1_948(): // // http://trac.rezo.net/trac/spip/changeset/10194 // // Gestion du verrou SQL par PHP $GLOBALS['maj'][1951] = array( array('sql_alter', "TABLE spip_versions CHANGE `id_version` `id_version` bigint(21) DEFAULT 0 NOT NULL") ); // Transformation des documents : // - image => mode=image // - vignette => mode=vignette function maj_1_952() { $ok = sql_alter("TABLE spip_documents CHANGE `mode` `mode` enum('vignette','image','document') DEFAULT NULL"); if($ok) { $s = sql_select("v.id_document as id_document", "spip_documents as d join spip_documents as v ON d.id_vignette=v.id_document"); $vignettes = array(); while ($t = sql_fetch($s)) $vignettes[] = intval($t['id_document']); $ok &= spip_query("UPDATE spip_documents SET `mode`='image' WHERE `mode`='vignette'"); $ok &= spip_query("UPDATE spip_documents SET `mode`='vignette' WHERE `mode`='image' AND ".sql_in('id_document', $vignettes)); } if (!$ok) die('echec sur maj_1_952()'); } $GLOBALS['maj'][1952] = array(array('maj_1_952')); $GLOBALS['maj'][1953] = array(array('upgrade_types_documents')); $GLOBALS['maj'][1954] = array( //pas de psd en array('spip_query', "UPDATE spip_types_documents SET `inclus`='non' WHERE `extension`='psd'"), //ajout csv array('spip_query', "INSERT IGNORE INTO spip_types_documents (`extension`, `titre`) VALUES ('csv', 'CSV')"), array('spip_query', "UPDATE spip_types_documents SET `mime_type`='text/csv' WHERE `extension`='csv'"), //ajout mkv array('spip_query', "INSERT IGNORE INTO spip_types_documents (`extension`, `titre`, `inclus`) VALUES ('mkv', 'Matroska Video', 'embed')"), array('spip_query', "UPDATE spip_types_documents SET `mime_type`='video/x-mkv' WHERE `extension`='mkv'"), //ajout mka array('spip_query', "INSERT IGNORE INTO spip_types_documents (`extension`, `titre`, `inclus`) VALUES ('mka', 'Matroska Audio', 'embed')"), array('spip_query', "UPDATE spip_types_documents SET `mime_type`='audio/x-mka' WHERE `extension`='mka'"), //ajout kml array('spip_query', "INSERT IGNORE INTO spip_types_documents (`extension`, `titre`) VALUES ('kml', 'Keyhole Markup Language')"), array('spip_query', "UPDATE spip_types_documents SET `mime_type`='application/vnd.google-earth.kml+xml' WHERE `extension`='kml'"), //ajout kmz array('spip_query', "INSERT IGNORE INTO spip_types_documents (`extension`, `titre`) VALUES ('kmz', 'Google Earth Placemark File')"), array('spip_query', "UPDATE spip_types_documents SET `mime_type`='application/vnd.google-earth.kmz' WHERE `extension`='kmz'") ); if ($GLOBALS['meta']['version_installee'] > 1.950) // 1.950 lisait un bug dans auxiliaires.php corrige a present $GLOBALS['maj'][1955] = array( array('sql_alter', "TABLE spip_urls CHANGE `maj` date DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL") ); // la mise a jour vers 1.938 contient une erreur // il faut supprimer l'autoincrement avant de supprimer la PRIMARY KEY $GLOBALS['maj'][1938] = array( # creer un champ plus informatif, et son index array('sql_alter', "TABLE spip_documents ADD `extension` VARCHAR(10) DEFAULT '' NOT NULL "), # recopier l'ancien champ dans le nouveau array('maj_1_938'), # supprimer l'ancien champ et son index array('sql_alter', "TABLE spip_documents DROP INDEX `id_type`, DROP `id_type`"), ## supprimer l'autoincrement avant de supprimer la PRIMARY KEY array('sql_alter', "TABLE spip_types_documents CHANGE `id_type` `id_type` BIGINT( 21 ) NOT NULL ") , # le champ id_type devient superflu array('sql_alter', "TABLE spip_types_documents DROP `id_type`"), array('sql_alter', "TABLE spip_types_documents ADD PRIMARY KEY (`extension`)") ); // PG veut une valeur par defaut a l'insertion // http://trac.rezo.net/trac/spip/changeset/10482 $GLOBALS['maj'][1957] = array( array('sql_alter', "TABLE spip_mots CHANGE `id_groupe` `id_groupe` bigint(21) DEFAULT 0 NOT NULL"), array('sql_alter', "TABLE spip_documents CHANGE `mode` `mode` ENUM('vignette', 'image', 'document') DEFAULT 'document' NOT NULL") ); // Ce champ est inutile et provoque une erreur a l'insertion qui l'oublie $GLOBALS['maj'][1958] = array( array('sql_alter', "TABLE spip_referers_articles DROP date") ); ?> v019_pre193.php000066600000034236151453265520007103 0ustar00id_table $liste_tables = array(); $liste_tables[1]='spip_articles'; $liste_tables[2]='spip_auteurs'; $liste_tables[3]='spip_breves'; $liste_tables[4]='spip_documents'; $liste_tables[5]='spip_forum'; $liste_tables[6]='spip_mots'; $liste_tables[7]='spip_rubriques'; $liste_tables[8]='spip_signatures'; $liste_tables[9]='spip_syndic'; ecrire_meta('index_table', serialize($liste_tables)); ## devenu inutile car suppression totale de l'indexation /* spip_query("INSERT INTO spip_index (`hash`,`points`,`id_objet`,`id_table`) SELECT `hash`,`points`,`id_article` as id_objet,'1' as id_table FROM spip_index_articles"); spip_query("DROP TABLE IF EXISTS spip_index_articles"); spip_query("INSERT INTO spip_index (`hash`,`points`,`id_objet`,`id_table`) SELECT `hash`,`points`,`id_auteur` as id_objet,'2' as id_table FROM spip_index_auteurs"); spip_query("DROP TABLE IF EXISTS spip_index_auteurs"); spip_query("INSERT INTO spip_index (`hash`,`points`,`id_objet`,`id_table`) SELECT `hash`,`points`,`id_breve` as id_objet,'3' as id_table FROM spip_index_breves"); spip_query("DROP TABLE IF EXISTS spip_index_breves"); spip_query("INSERT INTO spip_index (`hash`,`points`,`id_objet`,`id_table`) SELECT `hash`,`points`,`id_document` as id_objet,'4' as id_table FROM spip_index_documents"); spip_query("DROP TABLE IF EXISTS spip_index_documents"); spip_query("INSERT INTO spip_index (`hash`,`points`,`id_objet`,`id_table`) SELECT `hash`,`points`,`id_forum` as id_objet,'5' as id_table FROM spip_index_forum"); spip_query("DROP TABLE IF EXISTS spip_index_forum"); spip_query("INSERT INTO spip_index (`hash`,`points`,`id_objet`,`id_table`) SELECT `hash`,`points`,`id_mot` as id_objet,'6' as id_table FROM spip_index_mots"); spip_query("DROP TABLE IF EXISTS spip_index_mots"); spip_query("INSERT INTO spip_index (`hash`,`points`,`id_objet`,`id_table`) SELECT `hash`,`points`,`id_rubrique` as id_objet,'7' as id_table FROM spip_index_rubriques"); spip_query("DROP TABLE IF EXISTS spip_index_rubriques"); spip_query("INSERT INTO spip_index (`hash`,`points`,`id_objet`,`id_table`) SELECT `hash`,`points`,`id_signature` as id_objet,'8' as id_table FROM spip_index_signatures"); spip_query("DROP TABLE IF EXISTS spip_index_signatures"); spip_query("INSERT INTO spip_index (`hash`,`points`,`id_objet`,`id_table`) SELECT `hash`,`points`,`id_syndic` as id_objet,'9' as `id_table FROM spip_index_syndic"); spip_query("DROP TABLE IF EXISTS spip_index_syndic"); */ maj_version(1.905); } // cette table est desormais geree par le plugin "podcast_client", on la // supprime si le plugin n'est pas active ; risque inherent a l'utilisation // de versions alpha :-) if (upgrade_vers(1.906, $version_installee, $version_cible)) { if (!@in_array('podcast_client', $GLOBALS['plugins'])) { spip_query("DROP TABLE spip_documents_syndic"); } maj_version(1.906); } if (upgrade_vers(1.907, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_forum ADD INDEX `idx` (`idx`)"); maj_version(1.907); } // Oups ! on stockait les tags de syndication sous la forme rel="category" // au lieu de rel="directory" - http://microformats.org/wiki/rel-directory if (upgrade_vers(1.908, $version_installee, $version_cible)) { spip_query("UPDATE spip_syndic_articles SET `tags` = REPLACE(`tags`, 'rel=\"category\">', 'rel=\"directory\">') WHERE `tags` like '%category%'"); maj_version(1.908); } if (upgrade_vers(1.909, $version_installee, $version_cible)) { spip_query("ALTER IGNORE TABLE spip_mots_articles ADD PRIMARY KEY (`id_article`, `id_mot`)"); spip_query("ALTER IGNORE TABLE spip_mots_breves ADD PRIMARY KEY (`id_breve`, `id_mot`)"); spip_query("ALTER IGNORE TABLE spip_mots_rubriques ADD PRIMARY KEY (`id_rubrique`, `id_mot`)"); spip_query("ALTER IGNORE TABLE spip_mots_syndic ADD PRIMARY KEY (`id_syndic`, `id_mot`)"); spip_query("ALTER IGNORE TABLE spip_mots_documents ADD PRIMARY KEY (`id_document`, `id_mot`)"); spip_query("ALTER IGNORE TABLE spip_mots_forum ADD PRIMARY KEY (`id_forum`, `id_mot`)"); maj_version(1.909); } if (upgrade_vers(1.910, $version_installee, $version_cible)) { spip_query("ALTER IGNORE TABLE spip_auteurs_articles ADD PRIMARY KEY (`id_auteur`, `id_article`)"); spip_query("ALTER IGNORE TABLE spip_auteurs_rubriques ADD PRIMARY KEY (`id_auteur`, `id_rubrique`)"); spip_query("ALTER IGNORE TABLE spip_auteurs_messages ADD PRIMARY KEY (`id_auteur`, `id_message`)"); maj_version(1.910); } if (upgrade_vers(1.911, $version_installee, $version_cible)) { spip_query("ALTER IGNORE TABLE spip_auteurs_articles DROP INDEX `id_auteur`"); spip_query("ALTER IGNORE TABLE spip_auteurs_rubriques DROP INDEX `id_auteur`"); spip_query("ALTER IGNORE TABLE spip_auteurs_messages DROP INDEX `id_auteur`"); spip_query("ALTER IGNORE TABLE spip_mots_articles DROP INDEX `id_article`"); spip_query("ALTER IGNORE TABLE spip_mots_breves DROP INDEX `id_breve`"); spip_query("ALTER IGNORE TABLE spip_mots_rubriques DROP INDEX `id_rubrique`"); spip_query("ALTER IGNORE TABLE spip_mots_syndic DROP INDEX `id_syndic`"); spip_query("ALTER IGNORE TABLE spip_mots_forum DROP INDEX `id_forum`"); spip_query("ALTER IGNORE TABLE spip_mots_documents DROP INDEX `id_document`"); # 18 juillet 2007: table depreciee # spip_query("ALTER IGNORE TABLE spip_caches DROP INDEX fichier"); maj_version(1.911); } // Le logo du site n'est plus le logo par defaut des rubriques // mais pour assurer la compatibilite ascendante, on le duplique if (upgrade_vers(1.912, $version_installee, $version_cible)) { @copy(_DIR_LOGOS.'rubon0.gif', _DIR_LOGOS.'siteon0.gif'); @copy(_DIR_LOGOS.'ruboff0.gif', _DIR_LOGOS.'siteoff0.gif'); @copy(_DIR_LOGOS.'rubon0.jpg', _DIR_LOGOS.'siteon0.jpg'); @copy(_DIR_LOGOS.'ruboff0.jpg', _DIR_LOGOS.'siteoff0.jpg'); @copy(_DIR_LOGOS.'rubon0.png', _DIR_LOGOS.'siteon0.png'); @copy(_DIR_LOGOS.'ruboff0.png', _DIR_LOGOS.'siteoff0.png'); maj_version(1.912); } // suppression de auteur_modif qui n'est plus utilise nulle part if (upgrade_vers(1.913, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_articles DROP `auteur_modif`"); maj_version(1.913); } // Ajout de SVG if (upgrade_vers(1.914, $version_installee, $version_cible)) { spip_query("INSERT IGNORE INTO spip_types_documents (`extension`, `titre`, `inclus`) VALUES ('svg', 'Scalable Vector Graphics', 'embed')"); spip_query("UPDATE spip_types_documents SET `mime_type`='image/svg+xml' WHERE `extension`='svg'"); maj_version(1.914); } // Ajout de plein de type mime if (upgrade_vers(1.915, $version_installee, $version_cible)) { maj_version(1.915); } // refaire l'upgrade 1.905 qui a pu foirer en partie a cause de la requete ALTER sur spip_meta if (upgrade_vers(1.916, $version_installee, $version_cible)) { // agrandir le champ "valeur" de spip_meta pour pouvoir y stocker // des choses plus sympa spip_query("ALTER TABLE spip_meta DROP INDEX `valeur`"); spip_query("ALTER TABLE spip_meta CHANGE `valeur` `valeur` TEXT"); #8/08/07 plus d'indexation dans le core //include_spip('inc/indexation'); //update_index_tables(); maj_version(1.916); } if (upgrade_vers(1.917, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_documents DROP `inclus`"); maj_version(1.917); } // Permettre d'enregistrer un numero IP dans les revisions d'articles // a la place de l'id_auteur if (upgrade_vers(1.918, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_versions CHANGE `id_auteur` `id_auteur` VARCHAR(23)"); maj_version(1.918); } if (upgrade_vers(1.919, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_ajax_fonc DROP `id_auteur`"); maj_version('1.919'); } if (upgrade_vers(1.920, $version_installee, $version_cible)) { spip_query("ALTER IGNORE TABLE spip_documents_articles ADD PRIMARY KEY (`id_article`, `id_document`)"); spip_query("ALTER IGNORE TABLE spip_documents_breves ADD PRIMARY KEY (`id_breve`, `id_document`)"); spip_query("ALTER IGNORE TABLE spip_documents_rubriques ADD PRIMARY KEY (`id_rubrique`, `id_document`)"); spip_query("ALTER IGNORE TABLE spip_documents_articles DROP INDEX `id_article`"); spip_query("ALTER IGNORE TABLE spip_documents_breves DROP INDEX `id_breve`"); spip_query("ALTER IGNORE TABLE spip_documents_rubriques DROP INDEX `id_rubrique`"); maj_version('1.920'); } if (upgrade_vers(1.922, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_meta ADD `impt` ENUM('non', 'oui') DEFAULT 'oui' NOT NULL AFTER `valeur`"); $meta_serveur = array('version_installee','adresse_site','alea_ephemere_ancien','alea_ephemere','alea_ephemere_date','langue_site','langues_proposees','date_calcul_rubriques','derniere_modif','optimiser_table','drapeau_edition','creer_preview','taille_preview','creer_htpasswd','creer_htaccess','gd_formats_read','gd_formats', 'netpbm_formats','formats_graphiques','image_process','plugin_header','plugin'); foreach($meta_serveur as $nom) spip_query("UPDATE spip_meta SET `impt`='non' WHERE `nom`="._q($nom)); maj_version('1.922'); } if (upgrade_vers(1.923, $version_installee, $version_cible)) { if (isset($GLOBALS['meta']['IMPORT_tables_noimport'])){ $IMPORT_tables_noimport = unserialize($GLOBALS['meta']['IMPORT_tables_noimport']); foreach ($IMPORT_tables_noimport as $key=>$table) if ($table=='spip_meta') unset($IMPORT_tables_noimport[$key]); ecrire_meta('IMPORT_tables_noimport',serialize($IMPORT_tables_noimport),'non'); } maj_version('1.923'); } if (upgrade_vers(1.924, $version_installee, $version_cible)) { spip_query('DROP TABLE spip_ajax_fonc'); maj_version('1.924'); } if (upgrade_vers(1.925, $version_installee, $version_cible)) { include_spip('inc/flock'); /* deplacement des sessions */ $f_session = preg_files('data', 'session_'); $repertoire = _DIR_SESSIONS; if(!@file_exists($repertoire)) { $repertoire = preg_replace(','._DIR_TMP.',', '', $repertoire); $repertoire = sous_repertoire(_DIR_TMP, $repertoire); } foreach($f_session as $f) { $d = basename($f); @copy($f, $repertoire.$d); } /* deplacement des visites */ $f_visites = preg_files('data/visites'); $repertoire = sous_repertoire(_DIR_TMP, 'visites'); foreach($f_visites as $f) { $d = basename($f); @copy($f, $repertoire.$d); } /* deplacement des upload */ $auteurs = array(); $req = spip_query("SELECT `login` FROM spip_auteurs WHERE `statut` = '0minirezo'"); while($row = sql_fetch($req)) $auteurs[] = $row['login']; $f_upload = preg_files('upload', -1, 10000, $auteurs); $repertoire = _DIR_TRANSFERT; if(!@file_exists($repertoire)) { $repertoire = preg_replace(','._DIR_TMP.',', '', $repertoire); $repertoire = sous_repertoire(_DIR_TMP, $repertoire); } foreach($auteurs as $login) { if(is_dir('upload/'.$login)) $sous_repertoire = sous_repertoire(_DIR_TRANSFERT, $login); } foreach($f_upload as $f) { @copy($f, _DIR_TMP.$f); } /* deplacement des dumps */ $f_session = preg_files('data', 'dump'); $repertoire = _DIR_DUMP; if(!@file_exists($repertoire)) { $repertoire = preg_replace(','._DIR_TMP.',', '', $repertoire); $repertoire = sous_repertoire(_DIR_TMP, $repertoire); } foreach($f_session as $f) { $d = basename($f); @copy($f, $repertoire.$d); } maj_version('1.925'); } // Ajout de MP4 if (upgrade_vers(1.926, $version_installee, $version_cible)) { spip_query("INSERT IGNORE INTO spip_types_documents (`extension`, `titre`, `inclus`) VALUES ('mp4', 'MPEG4', 'embed')"); spip_query("UPDATE spip_types_documents SET `mime_type`='application/mp4' WHERE `extension`='mp4'"); maj_version('1.926'); } } ?> svn10000.php000066600000024613151453265520006466 0ustar00$r['type']), 'id_mot='.sql_quote($r['id_mot'])); } } } $GLOBALS['maj'][11431] = array(array('maj_11431')); // reparer spip_types_documents.id_type // qui est parfois encore present function maj_11778 () { // si presence id_type $s = sql_showtable('spip_types_documents'); if (isset($s['field']['id_type'])) { sql_alter('TABLE spip_types_documents CHANGE id_type id_type BIGINT(21) NOT NULL'); sql_alter('TABLE spip_types_documents DROP id_type'); sql_alter('TABLE spip_types_documents ADD PRIMARY KEY (extension)'); } } $GLOBALS['maj'][11778] = array(array('maj_11778')); // Optimisation des forums function maj_11790 () { # sql_alter('TABLE spip_forum DROP INDEX id_message id_message'); sql_alter('TABLE spip_forum ADD INDEX id_parent (id_parent)'); sql_alter('TABLE spip_forum ADD INDEX id_auteur (id_auteur)'); sql_alter('TABLE spip_forum ADD INDEX id_thread (id_thread)'); } $GLOBALS['maj'][11790] = array(array('maj_11790')); $GLOBALS['maj'][11794] = array(); // ajout de spip_documents_forum $GLOBALS['maj'][11961] = array( array('sql_alter',"TABLE spip_groupes_mots CHANGE `tables` tables_liees text DEFAULT '' NOT NULL AFTER obligatoire"), // si tables a ete cree on le renomme array('sql_alter',"TABLE spip_groupes_mots ADD tables_liees text DEFAULT '' NOT NULL AFTER obligatoire"), // sinon on l'ajoute array('sql_update','spip_groupes_mots',array('tables_liees'=>"''"),"articles REGEXP '.*'"), // si le champ articles est encore la, on reinit la conversion array('sql_update','spip_groupes_mots',array('tables_liees'=>"concat(tables_liees,'articles,')"),"articles='oui'"), // sinon ces 4 requetes ne feront rien array('sql_update','spip_groupes_mots',array('tables_liees'=>"concat(tables_liees,'breves,')"),"breves='oui'"), array('sql_update','spip_groupes_mots',array('tables_liees'=>"concat(tables_liees,'rubriques,')"),"rubriques='oui'"), array('sql_update','spip_groupes_mots',array('tables_liees'=>"concat(tables_liees,'syndic,')"),"syndic='oui'"), ); // Reunir en une seule table les liens de documents // spip_documents_articles et spip_documents_forum function maj_12008 () { // Creer spip_documents_liens global $tables_auxiliaires; include_spip('base/auxiliaires'); $v = $tables_auxiliaires[$k='spip_documents_liens']; sql_create($k, $v['field'], $v['key'], false, false); // Recopier les donnees foreach (array('article', 'breve', 'rubrique', 'auteur', 'forum') as $l) { if ($s = sql_select('*', 'spip_documents_'.$l.'s') OR $s = sql_select('*', 'spip_documents_'.$l)) { $tampon = array(); while ($t = sql_fetch($s)) { // transformer id_xx=N en (id_objet=N, objet=xx) $t['id_objet'] = $t["id_$l"]; $t['objet'] = $l; unset($t["id_$l"]); unset($t['maj']); $tampon[] = $t; if (count($tampon)>10000) { sql_insertq_multi('spip_documents_liens',$tampon); $tampon = array(); } } if (count($tampon)) { sql_insertq_multi('spip_documents_liens', $tampon); } } } } $GLOBALS['maj'][12008] = array( //array('sql_drop_table',"spip_documents_liens"), // tant pis pour ceux qui ont joue a 11974 array('sql_alter',"TABLE spip_documents_liens DROP PRIMARY KEY"), array('sql_alter',"TABLE spip_documents_liens ADD id_objet bigint(21) DEFAULT '0' NOT NULL AFTER id_document"), array('sql_alter',"TABLE spip_documents_liens ADD objet VARCHAR (25) DEFAULT '' NOT NULL AFTER id_objet"), array('sql_update','spip_documents_liens',array('id_objet'=>"id_article",'objet'=>"'article'"),"id_article IS NOT NULL AND id_article>0"), array('sql_update','spip_documents_liens',array('id_objet'=>"id_rubrique",'objet'=>"'rubrique'"),"id_rubrique IS NOT NULL AND id_rubrique>0"), array('sql_update','spip_documents_liens',array('id_objet'=>"id_breve",'objet'=>"'breve'"),"id_breve IS NOT NULL AND id_breve>0"), array('sql_update','spip_documents_liens',array('id_objet'=>"id_auteur",'objet'=>"'auteur'"),"id_auteur IS NOT NULL AND id_auteur>0"), array('sql_update','spip_documents_liens',array('id_objet'=>"id_forum",'objet'=>"'forum'"),"id_forum IS NOT NULL AND id_forum>0"), array('sql_alter',"TABLE spip_documents_liens ADD PRIMARY KEY (id_document,id_objet,objet)"), array('sql_alter',"TABLE spip_documents_liens DROP id_article"), array('sql_alter',"TABLE spip_documents_liens DROP id_rubrique"), array('sql_alter',"TABLE spip_documents_liens DROP id_breve"), array('sql_alter',"TABLE spip_documents_liens DROP id_auteur"), array('sql_alter',"TABLE spip_documents_liens DROP id_forum"), array('maj_12008'), ); // destruction des tables spip_documents_articles etc, cf. 12008 $GLOBALS['maj'][12009] = array( array('sql_drop_table',"spip_documents_articles"), array('sql_drop_table',"spip_documents_breves"), array('sql_drop_table',"spip_documents_rubriques"), array('sql_drop_table',"spip_documents_auteurs"), # plugin #FORMULAIRE_UPLOAD array('sql_drop_table',"spip_documents_syndic") # plugin podcast_client ); // destruction des champs articles breves rubriques et syndic, cf. 11961 $GLOBALS['maj'][12010] = array( array('sql_alter',"TABLE spip_groupes_mots DROP articles"), array('sql_alter',"TABLE spip_groupes_mots DROP breves"), array('sql_alter',"TABLE spip_groupes_mots DROP rubriques"), array('sql_alter',"TABLE spip_groupes_mots DROP syndic"), ); function maj_13135 () { include_spip('inc/rubriques'); calculer_prochain_postdate(); // supprimer les eventuels vieux cache plugin qui n'utilisaient pas _chemin @spip_unlink(_CACHE_PLUGINS_OPT); @spip_unlink(_CACHE_PLUGINS_FCT); @spip_unlink(_CACHE_PLUGINS_VERIF); } $GLOBALS['maj'][13135] = array(array('maj_13135')); // Type flac: http://flac.sourceforge.net $GLOBALS['maj'][13333] = array(array('upgrade_types_documents')); // http://archives.rezo.net/spip-zone.mbox/200903.mbox/%3Cbfc33ad70903141606q2e4c53f2k4fef6b45e611a04f@mail.gmail.com%3E $GLOBALS['maj'][13833] = array( array('sql_alter',"TABLE spip_documents_liens ADD INDEX objet(id_objet,objet)")) ; // Fin upgrade commun branche 2.0 include_spip('inc/autoriser'); $GLOBALS['maj'][13904] = array( array('sql_alter',"TABLE spip_auteurs ADD webmestre varchar(3) DEFAULT 'non' NOT NULL"), array('sql_update','spip_auteurs',array('webmestre'=>"'oui'"),sql_in("id_auteur",defined('_ID_WEBMESTRES')?explode(':',_ID_WEBMESTRES):(autoriser('configurer')?array($GLOBALS['visiteur_session']['id_auteur']):array(0)))) // le webmestre est celui qui fait l'upgrade si rien de defini ) ; // sites plantes en mode "'su" au lieu de "sus" $GLOBALS['maj'][13929] = array( array('sql_update',"spip_syndic",array('syndication'=>"'sus'"),"syndication LIKE '\\'%'") ); // Types de fichiers m4a/m4b/m4p/m4u/m4v/dv // Types de fichiers Open XML (cro$oft) $GLOBALS['maj'][14558] = array(array('upgrade_types_documents')); // refaire les upgrade dont les numeros sont inferieurs a ceux de la branche 2.0 // etre sur qu'ils sont bien unipotents(?)... $GLOBALS['maj'][14559] = $GLOBALS['maj'][13904]+$GLOBALS['maj'][13929]+$GLOBALS['maj'][14558]; // Restauration correcte des types mime des fichiers Ogg // http://trac.rezo.net/trac/spip/ticket/1941 // + Types de fichiers : f4a/f4b/f4p/f4v/mpc http://en.wikipedia.org/wiki/Flv#File_formats $GLOBALS['maj'][15676] = array(array('upgrade_types_documents')); // Type de fichiers : webm http://en.wikipedia.org/wiki/Flv#File_formats $GLOBALS['maj'][15827] = array(array('upgrade_types_documents')); // IP en 40 caracteres pour IP v6 $GLOBALS['maj'][15828] = array(array('sql_alter',"TABLE spip_forum CHANGE `ip` `ip` VARCHAR(40) DEFAULT '' NOT NULL")); ?> v009.php000066600000012642151453265520005774 0ustar00 v018.php000066600000017273151453265520006001 0ustar00 sites et articles syndiques (podcasting) if (upgrade_vers(1.815, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_documents ADD distant VARCHAR(3) DEFAULT 'non'"); maj_version(1.815); } // Indexation des documents (rien a faire sauf reinstaller inc_auxbase) if (upgrade_vers(1.816, $version_installee, $version_cible)) { maj_version(1.816); } // Texte et descriptif des groupes de mots-cles if (upgrade_vers(1.817, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_groupes_mots ADD descriptif text NOT NULL AFTER titre"); spip_query("ALTER TABLE spip_groupes_mots ADD COLUMN texte longblob NOT NULL AFTER descriptif"); maj_version(1.817); } // Conformite des noms de certains champs (0minirezo => minirezo) if (upgrade_vers(1.818, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_groupes_mots CHANGE COLUMN 0minirezo minirezo char(3) NOT NULL"); spip_query("ALTER TABLE spip_groupes_mots CHANGE COLUMN 1comite comite char(3) NOT NULL"); spip_query("ALTER TABLE spip_groupes_mots CHANGE COLUMN 6forum forum char(3) NOT NULL"); maj_version(1.818); } // Options de syndication : miroir + oubli if (upgrade_vers(1.819, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_syndic ADD miroir VARCHAR(3) DEFAULT 'non'"); spip_query("ALTER TABLE spip_syndic ADD oubli VARCHAR(3) DEFAULT 'non'"); maj_version(1.819); } // Un bug dans les 1.730 (il manquait le "ADD") if (upgrade_vers(1.820, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_articles ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_auteurs ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_breves ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_mots ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_rubriques ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_syndic ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_forum ADD INDEX idx (idx)"); spip_query("ALTER TABLE spip_signatures ADD INDEX idx (idx)"); maj_version(1.820); } // reindexer les articles (on avait oublie les auteurs) if (upgrade_vers(1.821, $version_installee, $version_cible)) { spip_query("UPDATE spip_articles SET idx='1' WHERE idx='oui'"); maj_version(1.821); } // le 'type' des mots doit etre du texte, sinon on depasse en champ multi if (upgrade_vers(1.822, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_mots DROP INDEX type"); spip_query("ALTER TABLE spip_mots CHANGE type type TEXT NOT NULL"); maj_version(1.822); } // ajouter une table de fonctions pour ajax if (upgrade_vers(1.825, $version_installee, $version_cible)) { maj_version(1.825); } if (upgrade_vers(1.826, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_ajax_fonc DROP fonction"); maj_version(1.826); } } ?> v016.php000066600000003752151453265520005774 0ustar00 v011.php000066600000001750151453265520005763 0ustar00 v012.php000066600000007610151453265520005765 0ustar00 v015.php000066600000001460151453265520005765 0ustar00 vieille_base/charger.php000066600000003634151453265520011335 0ustar00'1813', '1.821'=>'1821', '1.915'=>'1915', '1.917'=>'1917', '1.927'=>'1927', '10000'=>'10000', '12000'=>'13000', ); $version = false; foreach($vieilles_bases as $v=>$n){ if (!$version OR spip_version_compare($v,$version_cible,'<')) $version = $n; } /* include_spip('base/serial'); include_spip('base/auxiliaires'); $GLOBALS['nouvelle_base']['tables_principales'] = $GLOBALS['tables_principales']; $GLOBALS['nouvelle_base']['tables_auxiliaires'] = $GLOBALS['tables_auxiliaires'];*/ unset($GLOBALS['tables_principales']); unset($GLOBALS['tables_auxiliaires']); unset($GLOBALS['tables_images']); unset($GLOBALS['tables_sequences']); unset($GLOBALS['tables_documents']); unset($GLOBALS['tables_mime']); // chargera les descriptions de table $create = charger_fonction('create',"maj/vieille_base/$version"); if (!isset($GLOBALS['tables_auxiliaires']['spip_meta']['field']['impt'])) $GLOBALS['tables_auxiliaires']['spip_meta']['field']['impt'] = "ENUM('non', 'oui') DEFAULT 'oui' NOT NULL"; return $version; } ?> vieille_base/1917/auxiliaires.php000066600000030367151453265520012645 0ustar00 "BIGINT (21) DEFAULT '0' NOT NULL", "email_unique" => "CHAR (3) NOT NULL", "site_obli" => "CHAR (3) NOT NULL", "site_unique" => "CHAR (3) NOT NULL", "message" => "CHAR (3) NOT NULL", "texte" => "LONGBLOB NOT NULL", "maj" => "TIMESTAMP"); $spip_petitions_key = array( "PRIMARY KEY" => "id_article"); $spip_visites = array( "date" => "DATE NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_key = array( "PRIMARY KEY" => "date"); $spip_visites_articles = array( "date" => "DATE NOT NULL", "id_article" => "INT UNSIGNED NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_articles_key = array( "PRIMARY KEY" => "date, id_article"); $spip_referers = array( "referer_md5" => "BIGINT UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "visites_jour" => "INT UNSIGNED NOT NULL", "visites_veille"=> "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_key = array( "PRIMARY KEY" => "referer_md5"); $spip_referers_articles = array( "id_article" => "INT UNSIGNED NOT NULL", "referer_md5" => "BIGINT UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_articles_key = array( "PRIMARY KEY" => "id_article, referer_md5", "KEY referer_md5" => "referer_md5"); $spip_auteurs_articles = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_auteurs_articles_key = array( "PRIMARY KEY" => "id_auteur, id_article", "KEY id_article" => "id_article"); $spip_auteurs_rubriques = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_auteurs_rubriques_key = array( "PRIMARY KEY" => "id_auteur, id_rubrique", "KEY id_rubrique" => "id_rubrique"); $spip_auteurs_messages = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_message" => "BIGINT (21) DEFAULT '0' NOT NULL", "vu" => "CHAR (3) NOT NULL"); $spip_auteurs_messages_key = array( "PRIMARY KEY" => "id_auteur, id_message", "KEY id_message" => "id_message"); $spip_documents_articles = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_articles_key = array( "KEY id_document" => "id_document", "KEY id_article" => "id_article"); $spip_documents_rubriques = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_rubriques_key = array( "KEY id_document" => "id_document", "KEY id_rubrique" => "id_rubrique"); $spip_documents_breves = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_breve" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_breves_key = array( "KEY id_document" => "id_document", "KEY id_breve" => "id_breve"); $spip_mots_articles = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_articles_key = array( "PRIMARY KEY" => "id_article, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_breves = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_breve" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_breves_key = array( "PRIMARY KEY" => "id_breve, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_rubriques = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_rubriques_key = array( "PRIMARY KEY" => "id_rubrique, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_syndic = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_syndic" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_syndic_key = array( "PRIMARY KEY" => "id_syndic, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_forum = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_forum" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_forum_key = array( "PRIMARY KEY" => "id_forum, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_documents = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_documents_key = array( "PRIMARY KEY" => "id_document, id_mot", "KEY id_mot" => "id_mot"); $spip_meta = array( "nom" => "VARCHAR (255) NOT NULL", "valeur" => "text DEFAULT ''", "maj" => "TIMESTAMP"); $spip_meta_key = array( "PRIMARY KEY" => "nom"); $spip_index = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_objet" => "INT UNSIGNED NOT NULL", "id_table" => "TINYINT UNSIGNED NOT NULL" ); $spip_index_key = array( "KEY `hash`" => "`hash`", "KEY id_objet" => "id_objet", "KEY id_table" => "id_table"); $spip_index_dico = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "dico" => "VARCHAR (30) NOT NULL"); $spip_index_dico_key = array( "PRIMARY KEY" => "dico"); $spip_versions = array ( "id_article" => "bigint(21) NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "titre_version" => "text DEFAULT '' NOT NULL", "permanent" => "char(3) NOT NULL", "champs" => "text NOT NULL"); $spip_versions_key = array ( "PRIMARY KEY" => "id_article, id_version", "KEY date" => "id_article, date", "KEY id_auteur" => "id_auteur"); $spip_versions_fragments = array( "id_fragment" => "int unsigned DEFAULT '0' NOT NULL", "version_min" => "int unsigned DEFAULT '0' NOT NULL", "version_max" => "int unsigned DEFAULT '0' NOT NULL", "id_article" => "bigint(21) NOT NULL", "compress" => "tinyint NOT NULL", "fragment" => "longblob NOT NULL"); $spip_versions_fragments_key = array( "PRIMARY KEY" => "id_article, id_fragment, version_min"); $spip_caches = array( "fichier" => "char (64) NOT NULL", "id" => "char (64) NOT NULL", // i=par id, t=timer, x=suppression "type" => "CHAR (1) DEFAULT 'i' NOT NULL", "taille" => "integer DEFAULT '0' NOT NULL"); $spip_caches_key = array( "PRIMARY KEY" => "fichier, id", "KEY fichier" => "fichier", "KEY id" => "id"); $spip_ortho_cache = array( "lang" => "VARCHAR(10) NOT NULL", "mot" => "VARCHAR(255) BINARY NOT NULL", "ok" => "TINYINT NOT NULL", "suggest" => "BLOB NOT NULL", "maj" => "TIMESTAMP"); $spip_ortho_cache_key = array( "PRIMARY KEY" => "lang, mot", "KEY maj" => "maj"); $spip_ortho_dico = array( "lang" => "VARCHAR(10) NOT NULL", "mot" => "VARCHAR(255) BINARY NOT NULL", "id_auteur" => "BIGINT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_ortho_dico_key = array( "PRIMARY KEY" => "lang, mot"); global $tables_auxiliaires; $tables_auxiliaires['spip_petitions'] = array( 'field' => &$spip_petitions, 'key' => &$spip_petitions_key ); $tables_auxiliaires['spip_visites'] = array( 'field' => &$spip_visites, 'key' => &$spip_visites_key); $tables_auxiliaires['spip_visites_articles'] = array( 'field' => &$spip_visites_articles, 'key' => &$spip_visites_articles_key); $tables_auxiliaires['spip_referers'] = array( 'field' => &$spip_referers, 'key' => &$spip_referers_key); $tables_auxiliaires['spip_referers_articles'] = array( 'field' => &$spip_referers_articles, 'key' => &$spip_referers_articles_key); $tables_auxiliaires['spip_auteurs_articles'] = array( 'field' => &$spip_auteurs_articles, 'key' => &$spip_auteurs_articles_key); $tables_auxiliaires['spip_auteurs_rubriques'] = array( 'field' => &$spip_auteurs_rubriques, 'key' => &$spip_auteurs_rubriques_key); $tables_auxiliaires['spip_auteurs_messages'] = array( 'field' => &$spip_auteurs_messages, 'key' => &$spip_auteurs_messages_key); $tables_auxiliaires['spip_documents_articles'] = array( 'field' => &$spip_documents_articles, 'key' => &$spip_documents_articles_key); $tables_auxiliaires['spip_documents_rubriques'] = array( 'field' => &$spip_documents_rubriques, 'key' => &$spip_documents_rubriques_key); $tables_auxiliaires['spip_documents_breves'] = array( 'field' => &$spip_documents_breves, 'key' => &$spip_documents_breves_key); $tables_auxiliaires['spip_mots_articles'] = array( 'field' => &$spip_mots_articles, 'key' => &$spip_mots_articles_key); $tables_auxiliaires['spip_mots_breves'] = array( 'field' => &$spip_mots_breves, 'key' => &$spip_mots_breves_key); $tables_auxiliaires['spip_mots_rubriques'] = array( 'field' => &$spip_mots_rubriques, 'key' => &$spip_mots_rubriques_key); $tables_auxiliaires['spip_mots_syndic'] = array( 'field' => &$spip_mots_syndic, 'key' => &$spip_mots_syndic_key); $tables_auxiliaires['spip_mots_forum'] = array( 'field' => &$spip_mots_forum, 'key' => &$spip_mots_forum_key); $tables_auxiliaires['spip_mots_documents'] = array( 'field' => &$spip_mots_documents, 'key' => &$spip_mots_documents_key); $tables_auxiliaires['spip_meta'] = array( 'field' => &$spip_meta, 'key' => &$spip_meta_key); $tables_auxiliaires['spip_index'] = array( 'field' => &$spip_index, 'key' => &$spip_index_key); $tables_auxiliaires['spip_index_dico'] = array( 'field' => &$spip_index_dico, 'key' => &$spip_index_dico_key); $tables_auxiliaires['spip_versions'] = array( 'field' => &$spip_versions, 'key' => &$spip_versions_key); $tables_auxiliaires['spip_versions_fragments'] = array( 'field' => &$spip_versions_fragments, 'key' => &$spip_versions_fragments_key); $tables_auxiliaires['spip_caches'] = array( 'field' => &$spip_caches, 'key' => &$spip_caches_key); $tables_auxiliaires['spip_ortho_cache'] = array( 'field' => &$spip_ortho_cache, 'key' => &$spip_ortho_cache_key); $tables_auxiliaires['spip_ortho_dico'] = array( 'field' => &$spip_ortho_dico, 'key' => &$spip_ortho_dico_key); // // tableau des tables de jointures // Ex: gestion du critere {id_mot} dans la boucle(ARTICLES) global $tables_jointures; $tables_jointures['spip_articles'][]= 'mots_articles'; $tables_jointures['spip_articles'][]= 'auteurs_articles'; $tables_jointures['spip_articles'][]= 'documents_articles'; $tables_jointures['spip_articles'][]= 'mots'; $tables_jointures['spip_articles'][]= 'signatures'; $tables_jointures['spip_auteurs'][]= 'auteurs_articles'; $tables_jointures['spip_auteurs'][]= 'mots'; $tables_jointures['spip_breves'][]= 'mots_breves'; $tables_jointures['spip_breves'][]= 'documents_breves'; $tables_jointures['spip_breves'][]= 'mots'; $tables_jointures['spip_documents'][]= 'documents_articles'; $tables_jointures['spip_documents'][]= 'documents_rubriques'; $tables_jointures['spip_documents'][]= 'documents_breves'; $tables_jointures['spip_documents'][]= 'mots_documents'; $tables_jointures['spip_documents'][]= 'types_documents'; $tables_jointures['spip_documents'][]= 'mots'; $tables_jointures['spip_forum'][]= 'mots_forum'; $tables_jointures['spip_forum'][]= 'mots'; $tables_jointures['spip_rubriques'][]= 'mots_rubriques'; $tables_jointures['spip_rubriques'][]= 'documents_rubriques'; $tables_jointures['spip_rubriques'][]= 'mots'; $tables_jointures['spip_syndic'][]= 'mots_syndic'; $tables_jointures['spip_syndic'][]= 'mots'; $tables_jointures['spip_syndic_articles'][]= 'syndic'; $tables_jointures['spip_syndic_articles'][]= 'mots'; $tables_jointures['spip_mots'][]= 'mots_articles'; $tables_jointures['spip_mots'][]= 'mots_breves'; $tables_jointures['spip_mots'][]= 'mots_forum'; $tables_jointures['spip_mots'][]= 'mots_rubriques'; $tables_jointures['spip_mots'][]= 'mots_syndic'; $tables_jointures['spip_mots'][]= 'mots_documents'; $tables_jointures['spip_groupes_mots'][]= 'mots'; ?> vieille_base/1917/typedoc.php000066600000014222151453265520011765 0ustar00 1, 'png' => 2, 'gif' => 3, // Autres images (peuvent utiliser le tag ) 'bmp' => 'BMP', 'psd' => 'Photoshop', 'tif' => 'TIFF' ); // Multimedia (peuvent utiliser le tag ) $tables_sequences = array( 'aiff' => 'AIFF', 'asf' => 'Windows Media', 'avi' => 'Windows Media', 'flv' => 'Flash Video', 'mid' => 'Midi', 'mng' => 'MNG', 'mov' => 'QuickTime', 'mp3' => 'MP3', 'mpg' => 'MPEG', 'ogg' => 'Ogg', 'qt' => 'QuickTime', 'ra' => 'RealAudio', 'ram' => 'RealAudio', 'rm' => 'RealAudio', 'swf' => 'Flash', 'wav' => 'WAV', 'wmv' => 'Windows Media', 'svg' => 'Scalable Vector Graphics' ); // Documents varies $tables_documents = array( 'abw' => 'Abiword', 'ai' => 'Adobe Illustrator', 'bz2' => 'BZip', 'bin' => 'Binary Data', 'blend' => 'Blender', 'c' => 'C source', 'css' => 'Cascading Style Sheet', 'deb' => 'Debian', 'doc' => 'Word', 'djvu' => 'DjVu', 'dvi' => 'LaTeX DVI', 'eps' => 'PostScript', 'gz' => 'GZ', 'h' => 'C header', 'html' => 'HTML', 'pas' => 'Pascal', 'pdf' => 'PDF', 'pgn' => 'Portable Game Notation', 'ppt' => 'PowerPoint', 'ps' => 'PostScript', 'rpm' => 'RedHat/Mandrake/SuSE', 'rtf' => 'RTF', 'sdd' => 'StarOffice', 'sdw' => 'StarOffice', 'sit' => 'Stuffit', 'sxc' => 'OpenOffice Calc', 'sxi' => 'OpenOffice Impress', 'sxw' => 'OpenOffice', 'tex' => 'LaTeX', 'tgz' => 'TGZ', 'torrent' => 'BitTorrent', 'ttf' => 'TTF Font', 'txt' => 'texte', 'xcf' => 'GIMP multi-layer', 'xls' => 'Excel', 'xml' => 'XML', 'zip' => 'Zip', // open document format 'odt' => 'opendocument text', 'ods' => 'opendocument spreadsheet', 'odp' => 'opendocument presentation', 'odg' => 'opendocument graphics', 'odc' => 'opendocument chart', 'odf' => 'opendocument formula', 'odb' => 'opendocument database', 'odi' => 'opendocument image', 'odm' => 'opendocument text-master', 'ott' => 'opendocument text-template', 'ots' => 'opendocument spreadsheet-template', 'otp' => 'opendocument presentation-template', 'otg' => 'opendocument graphics-template' ); $tables_mime = array( // Images reconnues par PHP 'jpg'=>'image/jpeg', 'png'=>'image/png', 'gif'=>'image/gif', // Autres images (peuvent utiliser le tag ) 'bmp'=>'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp 'psd'=>'image/x-photoshop', // pas IANA 'tif'=>'image/tiff', // Multimedia (peuvent utiliser le tag ) 'aiff'=>'audio/x-aiff', 'asf'=>'video/x-ms-asf', 'avi'=>'video/x-msvideo', 'flv' => 'video/x-flv', 'mid'=>'audio/midi', 'mng'=>'video/x-mng', 'mov'=>'video/quicktime', 'mp3'=>'audio/mpeg', 'mpg'=>'video/mpeg', 'ogg'=>'application/ogg', 'qt' =>'video/quicktime', 'ra' =>'audio/x-pn-realaudio', 'ram'=>'audio/x-pn-realaudio', 'rm' =>'audio/x-pn-realaudio', 'swf'=>'application/x-shockwave-flash', 'wav'=>'audio/x-wav', 'wmv'=>'video/x-ms-wmv', 'svg'=>'image/svg+xml', // Documents varies 'ai' =>'application/illustrator', 'abw' =>'application/abiword', 'bin' => 'application/octet-stream', # le tout-venant 'blend' => 'application/x-blender', 'bz2'=>'application/x-bzip2', 'c' =>'text/x-csrc', 'css'=>'text/css', 'deb'=>'application/x-debian-package', 'doc'=>'application/msword', 'djvu'=>'image/vnd.djvu', 'dvi'=>'application/x-dvi', 'eps'=>'application/postscript', 'gz' =>'application/x-gzip', 'h' =>'text/x-chdr', 'html'=>'text/html', 'pas'=>'text/x-pascal', 'pdf'=>'application/pdf', 'pgn' =>'application/x-chess-pgn', 'ppt'=>'application/vnd.ms-powerpoint', 'ps' =>'application/postscript', 'rpm'=>'application/x-redhat-package-manager', 'rtf'=>'application/rtf', 'sdd'=>'application/vnd.stardivision.impress', 'sdw'=>'application/vnd.stardivision.writer', 'sit'=>'application/x-stuffit', 'sxc'=>'application/vnd.sun.xml.calc', 'sxi'=>'application/vnd.sun.xml.impress', 'sxw'=>'application/vnd.sun.xml.writer', 'tex'=>'text/x-tex', 'tgz'=>'application/x-gtar', 'torrent' => 'application/x-bittorrent', 'ttf'=>'application/x-font-ttf', 'txt'=>'text/plain', 'xcf'=>'application/x-xcf', 'xls'=>'application/vnd.ms-excel', 'xml'=>'application/xml', 'zip'=>'application/zip', // open document format 'odt' => 'application/vnd.oasis.opendocument.text', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'odp' => 'application/vnd.oasis.opendocument.presentation', 'odg' => 'application/vnd.oasis.opendocument.graphics', 'odc' => 'application/vnd.oasis.opendocument.chart', 'odf' => 'application/vnd.oasis.opendocument.formula', 'odb' => 'application/vnd.oasis.opendocument.database', 'odi' => 'application/vnd.oasis.opendocument.image', 'odm' => 'application/vnd.oasis.opendocument.text-master', 'ott' => 'application/vnd.oasis.opendocument.text-template', 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 'otg' => 'application/vnd.oasis.opendocument.graphics-template' ); ?> vieille_base/1917/serial.php000066600000033574151453265520011610 0ustar00 "bigint(21) NOT NULL", "surtitre" => "text NOT NULL", "titre" => "text NOT NULL", "soustitre" => "text NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "descriptif" => "text NOT NULL", "chapo" => "mediumtext NOT NULL", "texte" => "longblob NOT NULL", "ps" => "mediumtext NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "date_redac" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "visites" => "INTEGER DEFAULT '0' NOT NULL", "referers" => "INTEGER DEFAULT '0' NOT NULL", "popularite" => "DOUBLE DEFAULT '0' NOT NULL", "accepter_forum" => "CHAR(3) NOT NULL", "date_modif" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "id_trad" => "bigint(21) DEFAULT '0' NOT NULL", "extra" => "longblob NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "nom_site" => "tinytext NOT NULL", "url_site" => "VARCHAR(255) NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL"); $spip_articles_key = array( "PRIMARY KEY" => "id_article", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY id_trad" => "id_trad", "KEY lang" => "lang", "KEY statut" => "statut, date", "KEY url_site" => "url_site", "KEY date_modif" => "date_modif", "KEY idx" => "idx", "KEY url_propre" => "url_propre"); $spip_auteurs = array( "id_auteur" => "bigint(21) NOT NULL", "nom" => "text NOT NULL", "bio" => "text NOT NULL", "email" => "tinytext NOT NULL", "nom_site" => "tinytext NOT NULL", "url_site" => "text NOT NULL", "login" => "VARCHAR(255) BINARY NOT NULL", "pass" => "tinytext NOT NULL", "low_sec" => "tinytext NOT NULL", "statut" => "VARCHAR(255) NOT NULL", "maj" => "TIMESTAMP", "pgp" => "BLOB NOT NULL", "htpass" => "tinyblob NOT NULL", "en_ligne" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "imessage" => "VARCHAR(3) NOT NULL", "messagerie" => "VARCHAR(3) NOT NULL", "alea_actuel" => "tinytext NOT NULL", "alea_futur" => "tinytext NOT NULL", "prefs" => "tinytext NOT NULL", "cookie_oubli" => "tinytext NOT NULL", "source" => "VARCHAR(10) DEFAULT 'spip' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "extra" => "longblob NULL"); $spip_auteurs_key = array( "PRIMARY KEY" => "id_auteur", "KEY login" => "login", "KEY statut" => "statut", "KEY lang" => "lang", "KEY idx" => "idx", "KEY en_ligne" => "en_ligne", "KEY url_propre" => "url_propre"); $spip_breves = array( "id_breve" => "bigint(21) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "texte" => "longblob NOT NULL", "lien_titre" => "text NOT NULL", "lien_url" => "text NOT NULL", "statut" => "varchar(6) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "maj" => "TIMESTAMP", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL", "url_propre" => "VARCHAR(255) NOT NULL"); $spip_breves_key = array( "PRIMARY KEY" => "id_breve", "KEY idx" => "idx", "KEY id_rubrique" => "id_rubrique", "KEY url_propre" => "url_propre"); $spip_messages = array( "id_message" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "texte" => "longblob NOT NULL", "type" => "varchar(6) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "rv" => "varchar(3) NOT NULL", "statut" => "varchar(6) NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "maj" => "TIMESTAMP"); $spip_messages_key = array( "PRIMARY KEY" => "id_message", "KEY id_auteur" => "id_auteur"); $spip_mots = array( "id_mot" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "id_groupe" => "bigint(21) NOT NULL", "type" => "text NOT NULL", "extra" => "longblob NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "maj" => "TIMESTAMP"); $spip_mots_key = array( "PRIMARY KEY" => "id_mot", "KEY idx" => "idx", "KEY url_propre" => "url_propre"); $spip_groupes_mots = array( "id_groupe" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "unseul" => "varchar(3) NOT NULL", "obligatoire" => "varchar(3) NOT NULL", "articles" => "varchar(3) NOT NULL", "breves" => "varchar(3) NOT NULL", "rubriques" => "varchar(3) NOT NULL", "syndic" => "varchar(3) NOT NULL", "minirezo" => "varchar(3) NOT NULL", "comite" => "varchar(3) NOT NULL", "forum" => "varchar(3) NOT NULL", "maj" => "TIMESTAMP"); $spip_groupes_mots_key = array( "PRIMARY KEY" => "id_groupe"); $spip_rubriques = array( "id_rubrique" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "id_import" => "BIGINT DEFAULT '0'", "statut" => "VARCHAR(10) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL", "url_propre" => "VARCHAR(255) NOT NULL", "statut_tmp" => "VARCHAR(10) NOT NULL", "date_tmp" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL" ); $spip_rubriques_key = array( "PRIMARY KEY" => "id_rubrique", "KEY lang" => "lang", "KEY idx" => "idx", "KEY id_parent" => "id_parent", "KEY url_propre" => "url_propre"); $spip_documents = array( "id_document" => "bigint(21) NOT NULL", "id_vignette" => "bigint(21) DEFAULT '0' NOT NULL", "id_type" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "descriptif" => "text NOT NULL", "fichier" => "varchar(255) NOT NULL", "taille" => "integer NOT NULL", "largeur" => "integer NOT NULL", "hauteur" => "integer NOT NULL", "mode" => "ENUM('vignette', 'document') NOT NULL", "distant" => "VARCHAR(3) DEFAULT 'non'", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_documents_key = array( "PRIMARY KEY" => "id_document", "KEY id_vignette" => "id_vignette", "KEY mode" => "mode", "KEY id_type" => "id_type"); $spip_types_documents = array( "id_type" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "extension" => "varchar(10) NOT NULL", "mime_type" => "varchar(100) NOT NULL", "inclus" => "ENUM('non', 'image', 'embed') NOT NULL DEFAULT 'non'", "upload" => "ENUM('oui', 'non') NOT NULL DEFAULT 'oui'", "maj" => "TIMESTAMP"); $spip_types_documents_key = array( "PRIMARY KEY" => "id_type", "UNIQUE extension" => "extension", "KEY inclus" => "inclus"); $spip_syndic = array( "id_syndic" => "bigint(21) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "nom_site" => "blob NOT NULL", "url_site" => "blob NOT NULL", "url_syndic" => "blob NOT NULL", "descriptif" => "blob NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "syndication" => "VARCHAR(3) NOT NULL", "statut" => "VARCHAR(10) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_syndic" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_index" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "extra" => "longblob NULL", "moderation" => "VARCHAR(3) DEFAULT 'non'", "miroir" => "VARCHAR(3) DEFAULT 'non'", "oubli" => "VARCHAR(3) DEFAULT 'non'", "resume" => "VARCHAR(3) DEFAULT 'oui'" ); $spip_syndic_key = array( "PRIMARY KEY" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY idx" => "idx", "KEY statut" => "statut, date_syndic", "KEY url_propre" => "url_propre"); $spip_syndic_articles = array( "id_syndic_article" => "bigint(21) NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "url" => "VARCHAR(255) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lesauteurs" => "text NOT NULL", "maj" => "TIMESTAMP", "statut" => "VARCHAR(10) NOT NULL", "descriptif" => "blob NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "url_source" => "TINYTEXT DEFAULT '' NOT NULL", "source" => "TINYTEXT DEFAULT '' NOT NULL", "tags" => "TEXT DEFAULT '' NOT NULL"); $spip_syndic_articles_key = array( "PRIMARY KEY" => "id_syndic_article", "KEY id_syndic" => "id_syndic", "KEY statut" => "statut", "KEY url" => "url"); $spip_forum = array( "id_forum" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "id_thread" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "texte" => "mediumtext NOT NULL", "auteur" => "text NOT NULL", "email_auteur" => "text NOT NULL", "nom_site" => "text NOT NULL", "url_site" => "text NOT NULL", "statut" => "varchar(8) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "ip" => "varchar(16)", "maj" => "TIMESTAMP", "id_auteur" => "BIGINT DEFAULT '0' NOT NULL", "id_message" => "bigint(21) DEFAULT '0' NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_forum_key = array( "PRIMARY KEY" => "id_forum", "KEY id_parent" => "id_parent", "KEY id_article" => "id_article", "KEY id_breve" => "id_breve", "KEY id_message" => "id_message", "KEY id_syndic" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY idx" => "idx", "KEY statut" => "statut, date_heure"); $spip_signatures = array( "id_signature" => "bigint(21) NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "date_time" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "nom_email" => "text NOT NULL", "ad_email" => "text NOT NULL", "nom_site" => "text NOT NULL", "url_site" => "text NOT NULL", "message" => "mediumtext NOT NULL", "statut" => "varchar(10) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_signatures_key = array( "PRIMARY KEY" => "id_signature", "KEY id_article" => "id_article", "KEY idx" => "idx", "KEY statut" => "statut"); $spip_ajax_fonc = array( "id_ajax_fonc" => "bigint(21) NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "variables" => "text NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "`hash`" => "BIGINT UNSIGNED NOT NULL" ); $spip_ajax_fonc_key = array( "PRIMARY KEY" => "id_ajax_fonc", "KEY `hash`" => "`hash`"); global $tables_principales; /// Attention: mes_fonctions peut avoir deja defini cette variable /// il faut donc rajouter, mais pas reinitialiser $tables_principales['spip_articles'] = array('field' => &$spip_articles, 'key' => &$spip_articles_key); $tables_principales['spip_auteurs'] = array('field' => &$spip_auteurs, 'key' => &$spip_auteurs_key); $tables_principales['spip_breves'] = array('field' => &$spip_breves, 'key' => &$spip_breves_key); $tables_principales['spip_messages'] = array('field' => &$spip_messages, 'key' => &$spip_messages_key); $tables_principales['spip_mots'] = array('field' => &$spip_mots, 'key' => &$spip_mots_key); $tables_principales['spip_groupes_mots'] = array('field' => &$spip_groupes_mots, 'key' => &$spip_groupes_mots_key); $tables_principales['spip_rubriques'] = array('field' => &$spip_rubriques, 'key' => &$spip_rubriques_key); $tables_principales['spip_documents'] = array('field' => &$spip_documents, 'key' => &$spip_documents_key); $tables_principales['spip_types_documents'] = array('field' => &$spip_types_documents, 'key' => &$spip_types_documents_key); $tables_principales['spip_syndic'] = array('field' => &$spip_syndic, 'key' => &$spip_syndic_key); $tables_principales['spip_syndic_articles'] = array('field' => &$spip_syndic_articles, 'key' => &$spip_syndic_articles_key); $tables_principales['spip_forum'] = array('field' => &$spip_forum, 'key' => &$spip_forum_key); $tables_principales['spip_signatures'] = array('field' => &$spip_signatures, 'key' => &$spip_signatures_key); $tables_principales['spip_ajax_fonc'] = array('field' => &$spip_ajax_fonc, 'key' => &$spip_ajax_fonc_key); ?> vieille_base/1917/create.php000066600000004717151453265520011571 0ustar00 $v) spip_create_vieille_table($k, $v['field'], $v['key'], true); foreach($tables_auxiliaires as $k => $v) spip_create_vieille_table($k, $v['field'], $v['key'], false); foreach($tables_images as $k => $v) spip_query("INSERT IGNORE INTO spip_types_documents (extension, inclus, titre, id_type) VALUES ('$k', 'image', '" . (is_numeric($v) ? (strtoupper($k) . "', $v") : "$v', 0") . ")"); foreach($tables_sequences as $k => $v) spip_query("INSERT IGNORE INTO spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'embed')"); foreach($tables_documents as $k => $v) spip_query("INSERT IGNORE INTO spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'non')"); foreach ($tables_mime as $extension => $type_mime) spip_query("UPDATE spip_types_documents SET mime_type='$type_mime' WHERE extension='$extension'"); } /* // http://doc.spip.org/@stripslashes_base function stripslashes_base($table, $champs) { $modifs = ''; reset($champs); while (list(, $champ) = each($champs)) { $modifs[] = $champ . '=REPLACE(REPLACE(' .$champ. ',"\\\\\'", "\'"), \'\\\\"\', \'"\')'; } spip_query("UPDATE $table SET ".join(',', $modifs)); }*/ ?> vieille_base/1813/inc_typebase.php000066600000010651151453265520012760 0ustar00 1, 'png' => 2, 'gif' => 3, // Autres images (peuvent utiliser le tag ) 'bmp' => 'BMP', 'psd' => 'Photoshop', 'tif' => 'TIFF' ); // Multimedia (peuvent utiliser le tag ) $tables_sequences = array( 'aiff' => 'AIFF', 'asf' => 'Windows Media', 'avi' => 'Windows Media', 'mid' => 'Midi', 'mng' => 'MNG', 'mov' => 'QuickTime', 'mp3' => 'MP3', 'mpg' => 'MPEG', 'ogg' => 'Ogg', 'qt' => 'QuickTime', 'ra' => 'RealAudio', 'ram' => 'RealAudio', 'rm' => 'RealAudio', 'swf' => 'Flash', 'wav' => 'WAV', 'wmv' => 'Windows Media' ); // Documents varies $tables_documents = array( 'ai' => 'Adobe Illustrator', 'bz2' => 'BZip', 'c' => 'C source', 'css' => 'Cascading Style Sheet', 'deb' => 'Debian', 'doc' => 'Word', 'djvu' => 'DjVu', 'dvi' => 'LaTeX DVI', 'eps' => 'PostScript', 'gz' => 'GZ', 'h' => 'C header', 'html' => 'HTML', 'pas' => 'Pascal', 'pdf' => 'PDF', 'pgn' => 'Portable Game Notation', 'ppt' => 'PowerPoint', 'ps' => 'PostScript', 'rpm' => 'RedHat/Mandrake/SuSE', 'rtf' => 'RTF', 'sdd' => 'StarOffice', 'sdw' => 'StarOffice', 'sit' => 'Stuffit', 'sxc' => 'OpenOffice Calc', 'sxi' => 'OpenOffice Impress', 'sxw' => 'OpenOffice', 'tex' => 'LaTeX', 'tgz' => 'TGZ', 'txt' => 'texte', 'xcf' => 'GIMP multi-layer', 'xls' => 'Excel', 'xml' => 'XML', 'zip' => 'Zip' ); $tables_mime = array( // Images reconnues par PHP 'jpg'=>'image/jpeg', 'png'=>'image/png', 'gif'=>'image/gif', // Autres images (peuvent utiliser le tag ) 'bmp'=>'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp 'psd'=>'image/x-photoshop', // pas IANA 'tif'=>'image/tiff', // Multimedia (peuvent utiliser le tag ) 'aiff'=>'audio/x-aiff', 'asf'=>'video/x-ms-asf', 'avi'=>'video/x-msvideo', 'mid'=>'audio/midi', 'mng'=>'video/x-mng', 'mov'=>'video/quicktime', 'mp3'=>'audio/mpeg', 'mpg'=>'video/mpeg', 'ogg'=>'application/ogg', 'qt' =>'video/quicktime', 'ra' =>'audio/x-pn-realaudio', 'ram'=>'audio/x-pn-realaudio', 'rm' =>'audio/x-pn-realaudio', 'swf'=>'application/x-shockwave-flash', 'wav'=>'audio/x-wav', 'wmv'=>'video/x-ms-wmv', // Documents varies 'ai' =>'application/illustrator', 'bz2'=>'application/x-bzip2', 'c' =>'text/x-csrc', 'css'=>'text/css', 'deb'=>'application/x-debian-package', 'doc'=>'application/msword', 'djvu'=>'image/vnd.djvu', 'dvi'=>'application/x-dvi', 'eps'=>'application/postscript', 'gz' =>'application/x-gzip', 'h' =>'text/x-chdr', 'html'=>'text/html', 'pas'=>'text/x-pascal', 'pdf'=>'application/pdf', 'pgn' =>'application/x-chess-pgn', 'ppt'=>'application/vnd.ms-powerpoint', 'ps' =>'application/postscript', 'rpm'=>'application/x-redhat-package-manager', 'rtf'=>'application/rtf', 'sdd'=>'application/vnd.stardivision.impress', 'sdw'=>'application/vnd.stardivision.writer', 'sit'=>'application/x-stuffit', 'sxc'=>'application/vnd.sun.xml.calc', 'sxi'=>'application/vnd.sun.xml.impress', 'sxw'=>'application/vnd.sun.xml.writer', 'tex'=>'text/x-tex', 'tgz'=>'application/x-gtar', 'txt'=>'text/plain', 'xcf'=>'application/x-xcf', 'xls'=>'application/vnd.ms-excel', 'xml'=>'application/xml', 'zip'=>'application/zip' ); ?> vieille_base/1813/create.php000066600000004221151453265520011552 0ustar00 $v) spip_create_vieille_table($k, $v['field'], $v['key'], true); foreach($tables_auxiliaires as $k => $v) spip_create_vieille_table($k, $v['field'], $v['key'], false); foreach($tables_images as $k => $v) spip_query("INSERT IGNORE spip_types_documents (extension, inclus, titre, id_type) VALUES ('$k', 'image', '" . (is_numeric($v) ? (strtoupper($k) . "', $v") : "$v', 0") . ")"); foreach($tables_sequences as $k => $v) spip_query("INSERT IGNORE spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'embed')"); foreach($tables_documents as $k => $v) spip_query("INSERT IGNORE spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'non')"); foreach ($tables_mime as $extension => $type_mime) spip_query("UPDATE spip_types_documents SET mime_type='$type_mime' WHERE extension='$extension'"); } ?> vieille_base/1813/inc_auxbase.php000066600000035137151453265520012602 0ustar00 "BIGINT (21) DEFAULT '0' NOT NULL", "email_unique" => "CHAR (3) NOT NULL", "site_obli" => "CHAR (3) NOT NULL", "site_unique" => "CHAR (3) NOT NULL", "message" => "CHAR (3) NOT NULL", "texte" => "LONGBLOB NOT NULL", "maj" => "TIMESTAMP"); $spip_petitions_key = array( "PRIMARY KEY" => "id_article"); $spip_visites_temp = array( "ip" => "INT UNSIGNED NOT NULL", "type" => "ENUM ('article', 'rubrique', 'breve', 'autre') NOT NULL", "id_objet" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_temp_key = array( "PRIMARY KEY" => "type, id_objet, ip"); $spip_visites = array( "date" => "DATE NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_key = array( "PRIMARY KEY" => "date"); $spip_visites_articles = array( "date" => "DATE NOT NULL", "id_article" => "INT UNSIGNED NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_articles_key = array( "PRIMARY KEY" => "date, id_article"); $spip_referers_temp = array( "ip" => "INT UNSIGNED NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "referer_md5" => "BIGINT UNSIGNED NOT NULL", "type" => "ENUM ('article', 'rubrique', 'breve', 'autre') NOT NULL", "id_objet" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_temp_key = array( "PRIMARY KEY" => "type, id_objet, referer_md5, ip"); $spip_referers = array( "referer_md5" => "BIGINT UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "visites_jour" => "INT UNSIGNED NOT NULL", "visites_veille"=> "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_key = array( "PRIMARY KEY" => "referer_md5"); $spip_referers_articles = array( "id_article" => "INT UNSIGNED NOT NULL", "referer_md5" => "BIGINT UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_articles_key = array( "PRIMARY KEY" => "id_article, referer_md5", "KEY referer_md5" => "referer_md5"); $spip_auteurs_articles = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_auteurs_articles_key = array( "KEY id_auteur" => "id_auteur", "KEY id_article" => "id_article"); $spip_auteurs_rubriques = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_auteurs_rubriques_key = array( "KEY id_auteur" => "id_auteur", "KEY id_rubrique" => "id_rubrique"); $spip_auteurs_messages = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_message" => "BIGINT (21) DEFAULT '0' NOT NULL", "vu" => "CHAR (3) NOT NULL"); $spip_auteurs_messages_key = array( "KEY id_auteur" => "id_auteur", "KEY id_message" => "id_message"); $spip_documents_articles = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_articles_key = array( "KEY id_document" => "id_document", "KEY id_article" => "id_article"); $spip_documents_rubriques = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_rubriques_key = array( "KEY id_document" => "id_document", "KEY id_rubrique" => "id_rubrique"); $spip_documents_breves = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_breve" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_breves_key = array( "KEY id_document" => "id_document", "KEY id_breve" => "id_breve"); $spip_mots_articles = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_articles_key = array( "KEY id_mot" => "id_mot", "KEY id_article" => "id_article"); $spip_mots_breves = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_breve" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_breves_key = array( "KEY id_mot" => "id_mot", "KEY id_breve" => "id_breve"); $spip_mots_rubriques = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_rubriques_key = array( "KEY id_mot" => "id_mot", "KEY id_rubrique" => "id_rubrique"); $spip_mots_syndic = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_syndic" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_syndic_key = array( "KEY id_mot" => "id_mot", "KEY id_syndic" => "id_syndic"); $spip_mots_forum = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_forum" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_forum_key = array( "KEY id_mot" => "id_mot", "KEY id_forum" => "id_forum"); $spip_meta = array( "nom" => "VARCHAR (255) NOT NULL", "valeur" => "VARCHAR (255) DEFAULT ''", "maj" => "TIMESTAMP"); $spip_meta_key = array( "PRIMARY KEY" => "nom"); $spip_index_articles = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_article" => "INT UNSIGNED NOT NULL"); $spip_index_articles_key = array( "KEY `hash`" => "`hash`", "KEY id_article" => "id_article"); $spip_index_auteurs = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_auteur" => "INT UNSIGNED NOT NULL"); $spip_index_auteurs_key = array( "KEY `hash`" => "`hash`", "KEY id_auteur" => "id_auteur"); $spip_index_breves = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_breve" => "INT UNSIGNED NOT NULL"); $spip_index_breves_key = array( "KEY `hash`" => "`hash`", "KEY id_breve" => "id_breve"); $spip_index_mots = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_mot" => "INT UNSIGNED NOT NULL"); $spip_index_mots_key = array( "KEY `hash`" => "`hash`", "KEY id_mot" => "id_mot"); $spip_index_rubriques = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_rubrique" => "INT UNSIGNED NOT NULL"); $spip_index_rubriques_key = array( "KEY `hash`" => "`hash`", "KEY id_rubrique" => "id_rubrique"); $spip_index_syndic = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_syndic" => "INT UNSIGNED NOT NULL"); $spip_index_syndic_key = array( "KEY `hash`" => "`hash`", "KEY id_syndic" => "id_syndic"); $spip_index_signatures = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_signature" => "INT UNSIGNED NOT NULL"); $spip_index_signatures_key = array( "KEY `hash`" => "`hash`", "KEY id_signature" => "id_signature"); $spip_index_forum = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_forum" => "INT UNSIGNED NOT NULL"); $spip_index_forum_key = array( "KEY `hash`" => "`hash`", "KEY id_forum" => "id_forum"); $spip_index_dico = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "dico" => "VARCHAR (30) NOT NULL"); $spip_index_dico_key = array( "PRIMARY KEY" => "dico"); $spip_versions = array ( "id_article" => "bigint(21) NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "titre_version" => "text DEFAULT '' NOT NULL", "permanent" => "char(3) NOT NULL", "champs" => "text NOT NULL"); $spip_versions_key = array ( "PRIMARY KEY" => "id_article, id_version", "KEY date" => "id_article, date", "KEY id_auteur" => "id_auteur"); $spip_versions_fragments = array( "id_fragment" => "int unsigned DEFAULT '0' NOT NULL", "version_min" => "int unsigned DEFAULT '0' NOT NULL", "version_max" => "int unsigned DEFAULT '0' NOT NULL", "id_article" => "bigint(21) NOT NULL", "compress" => "tinyint NOT NULL", "fragment" => "longblob NOT NULL"); $spip_versions_fragments_key = array( "PRIMARY KEY" => "id_article, id_fragment, version_min"); $spip_caches = array( "fichier" => "char (64) NOT NULL", "id" => "char (64) NOT NULL", // i=par id, t=timer, x=suppression "type" => "CHAR (1) DEFAULT 'i' NOT NULL", "taille" => "integer DEFAULT '0' NOT NULL"); $spip_caches_key = array( "PRIMARY KEY" => "fichier, id", "KEY fichier" => "fichier", "KEY id" => "id"); $spip_ortho_cache = array( "lang" => "VARCHAR(10) NOT NULL", "mot" => "VARCHAR(255) BINARY NOT NULL", "ok" => "TINYINT NOT NULL", "suggest" => "BLOB NOT NULL", "maj" => "TIMESTAMP"); $spip_ortho_cache_key = array( "PRIMARY KEY" => "lang, mot", "KEY maj" => "maj"); $spip_ortho_dico = array( "lang" => "VARCHAR(10) NOT NULL", "mot" => "VARCHAR(255) BINARY NOT NULL", "id_auteur" => "BIGINT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_ortho_dico_key = array( "PRIMARY KEY" => "lang, mot",); global $tables_auxiliaires; $tables_auxiliaires = array( 'spip_petitions' => array('field' => &$spip_petitions, 'key' => &$spip_petitions_key), 'spip_visites_temp' => array('field' => &$spip_visites_temp, 'key' => &$spip_visites_temp_key), 'spip_visites' => array('field' => &$spip_visites, 'key' => &$spip_visites_key), 'spip_visites_articles' => array('field' => &$spip_visites_articles, 'key' => &$spip_visites_articles_key), 'spip_referers_temp' => array('field' => &$spip_referers_temp, 'key' => &$spip_referers_temp_key), 'spip_referers' => array('field' => &$spip_referers, 'key' => &$spip_referers_key), 'spip_referers_articles' => array('field' => &$spip_referers_articles, 'key' => &$spip_referers_articles_key), 'spip_auteurs_articles' => array('field' => &$spip_auteurs_articles, 'key' => &$spip_auteurs_articles_key), 'spip_auteurs_rubriques' => array('field' => &$spip_auteurs_rubriques, 'key' => &$spip_auteurs_rubriques_key), 'spip_auteurs_messages' => array('field' => &$spip_auteurs_messages, 'key' => &$spip_auteurs_messages_key), 'spip_documents_articles' => array('field' => &$spip_documents_articles, 'key' => &$spip_documents_articles_key), 'spip_documents_rubriques' => array('field' => &$spip_documents_rubriques, 'key' => &$spip_documents_rubriques_key), 'spip_documents_breves' => array('field' => &$spip_documents_breves, 'key' => &$spip_documents_breves_key), 'spip_mots_articles' => array('field' => &$spip_mots_articles, 'key' => &$spip_mots_articles_key), 'spip_mots_breves' => array('field' => &$spip_mots_breves, 'key' => &$spip_mots_breves_key), 'spip_mots_rubriques' => array('field' => &$spip_mots_rubriques, 'key' => &$spip_mots_rubriques_key), 'spip_mots_syndic' => array('field' => &$spip_mots_syndic, 'key' => &$spip_mots_syndic_key), 'spip_mots_forum' => array('field' => &$spip_mots_forum, 'key' => &$spip_mots_forum_key), 'spip_meta' => array('field' => &$spip_meta, 'key' => &$spip_meta_key), 'spip_index_articles' => array('field' => &$spip_index_articles, 'key' => &$spip_index_articles_key), 'spip_index_auteurs' => array('field' => &$spip_index_auteurs, 'key' => &$spip_index_auteurs_key), 'spip_index_breves' => array('field' => &$spip_index_breves, 'key' => &$spip_index_breves_key), 'spip_index_mots' => array('field' => &$spip_index_mots, 'key' => &$spip_index_mots_key), 'spip_index_rubriques' => array('field' => &$spip_index_rubriques, 'key' => &$spip_index_rubriques_key), 'spip_index_syndic' => array('field' => &$spip_index_syndic, 'key' => &$spip_index_syndic_key), 'spip_index_signatures' => array('field' => &$spip_index_signatures, 'key' => &$spip_index_signatures_key), 'spip_index_forum' => array('field' => &$spip_index_forum, 'key' => &$spip_index_forum_key), 'spip_index_dico' => array('field' => &$spip_index_dico, 'key' => &$spip_index_dico_key), 'spip_versions' => array('field' => &$spip_versions, 'key' => &$spip_versions_key), 'spip_versions_fragments' => array('field' => &$spip_versions_fragments, 'key' => &$spip_versions_fragments_key), 'spip_caches' => array('field' => &$spip_caches, 'key' => &$spip_caches_key), 'spip_ortho_cache' => array('field' => &$spip_ortho_cache, 'key' => &$spip_ortho_cache_key), 'spip_ortho_dico' => array('field' => &$spip_ortho_dico, 'key' => &$spip_ortho_dico_key) ); // // tableau des tables de relations, // Ex: gestion du critere {id_mot} dans la boucle(ARTICLES) // transposee en tables_jointures pour le code moderne // global $tables_jointures; $tables_jointures['spip_articles']['id_mot']='mots_articles'; $tables_jointures['spip_articles']['id_auteur']='auteurs_articles'; $tables_jointures['spip_articles']['id_document']='documents_articles'; $tables_jointures['spip_auteurs']['id_article']='auteurs_articles'; $tables_jointures['spip_breves']['id_mot']='mots_breves'; $tables_jointures['spip_breves']['id_document']='documents_breves'; $tables_jointures['spip_documents']['id_article']='documents_articles'; $tables_jointures['spip_documents']['id_rubrique']='documents_rubriques'; $tables_jointures['spip_documents']['id_breve']='documents_breves'; $tables_jointures['spip_forums']['id_mot']='mots_forum'; $tables_jointures['spip_mots']['id_article']='mots_articles'; $tables_jointures['spip_mots']['id_breve']='mots_breves'; $tables_jointures['spip_mots']['id_forum']='mots_forum'; $tables_jointures['spip_mots']['id_rubrique']='mots_rubriques'; $tables_jointures['spip_mots']['id_syndic']='mots_syndic'; $tables_jointures['spip_groupes_mots']['id_groupe']='mots'; $tables_jointures['spip_rubriques']['id_mot']='mots_rubriques'; $tables_jointures['spip_rubriques']['id_document']='documents_rubriques'; $tables_jointures['spip_syndication']['id_mot']='mots_syndic'; ?> vieille_base/1813/inc_serialbase.php000066600000032162151453265520013257 0ustar00 "bigint(21) NOT NULL", "surtitre" => "text NOT NULL", "titre" => "text NOT NULL", "soustitre" => "text NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "descriptif" => "text NOT NULL", "chapo" => "mediumtext NOT NULL", "texte" => "longblob NOT NULL", "ps" => "mediumtext NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "date_redac" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "visites" => "INTEGER DEFAULT '0' NOT NULL", "referers" => "INTEGER DEFAULT '0' NOT NULL", "popularite" => "DOUBLE DEFAULT '0' NOT NULL", "accepter_forum" => "CHAR(3) NOT NULL", "auteur_modif" => "bigint(21) DEFAULT '0' NOT NULL", "date_modif" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "id_trad" => "bigint(21) DEFAULT '0' NOT NULL", "extra" => "longblob NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "nom_site" => "tinytext NOT NULL", "url_site" => "VARCHAR(255) NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL"); $spip_articles_key = array( "PRIMARY KEY" => "id_article", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY id_trad" => "id_trad", "KEY lang" => "lang", "KEY statut" => "statut, date", "KEY url_site" => "url_site", "KEY date_modif" => "date_modif", "KEY idx" => "idx", "KEY url_propre" => "url_propre"); $spip_auteurs = array( "id_auteur" => "bigint(21) NOT NULL", "nom" => "text NOT NULL", "bio" => "text NOT NULL", "email" => "tinytext NOT NULL", "nom_site" => "tinytext NOT NULL", "url_site" => "text NOT NULL", "login" => "VARCHAR(255) BINARY NOT NULL", "pass" => "tinytext NOT NULL", "low_sec" => "tinytext NOT NULL", "statut" => "VARCHAR(255) NOT NULL", "maj" => "TIMESTAMP", "pgp" => "BLOB NOT NULL", "htpass" => "tinyblob NOT NULL", "en_ligne" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "imessage" => "VARCHAR(3) NOT NULL", "messagerie" => "VARCHAR(3) NOT NULL", "alea_actuel" => "tinytext NOT NULL", "alea_futur" => "tinytext NOT NULL", "prefs" => "tinytext NOT NULL", "cookie_oubli" => "tinytext NOT NULL", "source" => "VARCHAR(10) DEFAULT 'spip' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL"); $spip_auteurs_key = array( "PRIMARY KEY" => "id_auteur", "KEY login" => "login", "KEY statut" => "statut", "KEY lang" => "lang", "KEY idx" => "idx", "KEY en_ligne" => "en_ligne"); $spip_breves = array( "id_breve" => "bigint(21) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "texte" => "longblob NOT NULL", "lien_titre" => "text NOT NULL", "lien_url" => "text NOT NULL", "statut" => "varchar(6) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "maj" => "TIMESTAMP", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL", "url_propre" => "VARCHAR(255) NOT NULL"); $spip_breves_key = array( "PRIMARY KEY" => "id_breve", "KEY idx" => "idx", "KEY id_rubrique" => "id_rubrique", "KEY url_propre" => "url_propre"); $spip_messages = array( "id_message" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "texte" => "longblob NOT NULL", "type" => "varchar(6) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "rv" => "varchar(3) NOT NULL", "statut" => "varchar(6) NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "maj" => "TIMESTAMP"); $spip_messages_key = array( "PRIMARY KEY" => "id_message", "KEY id_auteur" => "id_auteur"); $spip_mots = array( "id_mot" => "bigint(21) NOT NULL", "type" => "VARCHAR(100) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "id_groupe" => "bigint(21) NOT NULL", "extra" => "longblob NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "maj" => "TIMESTAMP"); $spip_mots_key = array( "PRIMARY KEY" => "id_mot", "KEY idx" => "idx", "KEY type" => "type", "KEY url_propre" => "url_propre"); $spip_groupes_mots = array( "id_groupe" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "unseul" => "varchar(3) NOT NULL", "obligatoire" => "varchar(3) NOT NULL", "articles" => "varchar(3) NOT NULL", "breves" => "varchar(3) NOT NULL", "rubriques" => "varchar(3) NOT NULL", "syndic" => "varchar(3) NOT NULL", "0minirezo" => "varchar(3) NOT NULL", "1comite" => "varchar(3) NOT NULL", "6forum" => "varchar(3) NOT NULL", "maj" => "TIMESTAMP"); $spip_groupes_mots_key = array( "PRIMARY KEY" => "id_groupe"); $spip_rubriques = array( "id_rubrique" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "id_import" => "BIGINT DEFAULT '0'", "statut" => "VARCHAR(10) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL", "url_propre" => "VARCHAR(255) NOT NULL", "statut_tmp" => "VARCHAR(10) NOT NULL", "date_tmp" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL" ); $spip_rubriques_key = array( "PRIMARY KEY" => "id_rubrique", "KEY lang" => "lang", "KEY idx" => "idx", "KEY id_parent" => "id_parent", "KEY url_propre" => "url_propre"); $spip_documents = array( "id_document" => "bigint(21) NOT NULL", "id_vignette" => "bigint(21) DEFAULT '0' NOT NULL", "id_type" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "descriptif" => "text NOT NULL", "fichier" => "varchar(255) NOT NULL", "taille" => "integer NOT NULL", "largeur" => "integer NOT NULL", "hauteur" => "integer NOT NULL", "mode" => "ENUM('vignette', 'document') NOT NULL", "inclus" => "VARCHAR(3) DEFAULT 'non'", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_documents_key = array( "PRIMARY KEY" => "id_document", "KEY id_vignette" => "id_vignette", "KEY mode" => "mode", "KEY id_type" => "id_type"); $spip_types_documents = array( "id_type" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "extension" => "varchar(10) NOT NULL", "mime_type" => "varchar(100) NOT NULL", "inclus" => "ENUM('non', 'image', 'embed') NOT NULL DEFAULT 'non'", "upload" => "ENUM('oui', 'non') NOT NULL DEFAULT 'oui'", "maj" => "TIMESTAMP"); $spip_types_documents_key = array( "PRIMARY KEY" => "id_type", "UNIQUE extension" => "extension", "KEY inclus" => "inclus"); $spip_syndic = array( "id_syndic" => "bigint(21) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "nom_site" => "blob NOT NULL", "url_site" => "blob NOT NULL", "url_syndic" => "blob NOT NULL", "descriptif" => "blob NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "syndication" => "VARCHAR(3) NOT NULL", "statut" => "VARCHAR(10) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_syndic" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_index" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "extra" => "longblob NULL", "moderation" => "VARCHAR(3) NOT NULL"); $spip_syndic_key = array( "PRIMARY KEY" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY idx" => "idx", "KEY statut" => "statut, date_syndic"); $spip_syndic_articles = array( "id_syndic_article" => "bigint(21) NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "url" => "VARCHAR(255) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lesauteurs" => "text NOT NULL", "maj" => "TIMESTAMP", "statut" => "VARCHAR(10) NOT NULL", "descriptif" => "blob NOT NULL"); $spip_syndic_articles_key = array( "PRIMARY KEY" => "id_syndic_article", "KEY id_syndic" => "id_syndic", "KEY statut" => "statut", "KEY url" => "url"); $spip_forum = array( "id_forum" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "id_thread" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "texte" => "mediumtext NOT NULL", "auteur" => "text NOT NULL", "email_auteur" => "text NOT NULL", "nom_site" => "text NOT NULL", "url_site" => "text NOT NULL", "statut" => "varchar(8) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "ip" => "varchar(16)", "maj" => "TIMESTAMP", "id_auteur" => "BIGINT DEFAULT '0' NOT NULL", "id_message" => "bigint(21) DEFAULT '0' NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_forum_key = array( "PRIMARY KEY" => "id_forum", "KEY id_parent" => "id_parent", "KEY id_rubrique" => "id_rubrique", "KEY id_article" => "id_article", "KEY id_breve" => "id_breve", "KEY id_message" => "id_message", "KEY id_syndic" => "id_syndic", "KEY idx" => "idx", "KEY statut" => "statut, date_heure"); $spip_signatures = array( "id_signature" => "bigint(21) NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "date_time" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "nom_email" => "text NOT NULL", "ad_email" => "text NOT NULL", "nom_site" => "text NOT NULL", "url_site" => "text NOT NULL", "message" => "mediumtext NOT NULL", "statut" => "varchar(10) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_signatures_key = array( "PRIMARY KEY" => "id_signature", "KEY id_article" => "id_article", "KEY idx" => "idx", "KEY statut" => "statut"); global $tables_principales; /// Attention: mes_fonctions peut avoir deja defini cette variable /// il faut donc rajouter, mais pas reinitialiser $tables_principales['spip_articles'] = array('field' => &$spip_articles, 'key' => &$spip_articles_key); $tables_principales['spip_auteurs'] = array('field' => &$spip_auteurs, 'key' => &$spip_auteurs_key); $tables_principales['spip_breves'] = array('field' => &$spip_breves, 'key' => &$spip_breves_key); $tables_principales['spip_messages'] = array('field' => &$spip_messages, 'key' => &$spip_messages_key); $tables_principales['spip_mots'] = array('field' => &$spip_mots, 'key' => &$spip_mots_key); $tables_principales['spip_groupes_mots'] = array('field' => &$spip_groupes_mots, 'key' => &$spip_groupes_mots_key); $tables_principales['spip_rubriques'] = array('field' => &$spip_rubriques, 'key' => &$spip_rubriques_key); $tables_principales['spip_documents'] = array('field' => &$spip_documents, 'key' => &$spip_documents_key); $tables_principales['spip_types_documents'] = array('field' => &$spip_types_documents, 'key' => &$spip_types_documents_key); $tables_principales['spip_syndic'] = array('field' => &$spip_syndic, 'key' => &$spip_syndic_key); $tables_principales['spip_syndic_articles'] = array('field' => &$spip_syndic_articles, 'key' => &$spip_syndic_articles_key); $tables_principales['spip_forum'] = array('field' => &$spip_forum, 'key' => &$spip_forum_key); $tables_principales['spip_signatures'] = array('field' => &$spip_signatures, 'key' => &$spip_signatures_key); ?> vieille_base/create.php000066600000005301151453265520011156 0ustar00$v) ecrire_meta($k,$v); ecrire_meta('restauration_table_prefix_source',$prefixe_source,'non'); // noter le numero de version installee // // Exception lorsque la version est entre 10000 et 12000 // car ce qui est utilise est la base au moment du SVN 10000 // qui avait url_propre dans les champs de tous les objets // mais un spip_version type 1.945 (et non 10000). // si on laisse 10000, les mise a jour de url_propre ne se font pas. if ($version == 10000) $version = 1.945; ecrire_meta('version_installee',$version,'non'); } if ($version_cible!=$GLOBALS['meta']['version_installee']) { // upgrader jusqu'a la cible include_spip('base/upgrade'); maj_base($version_cible); } } ?> vieille_base/1821/inc_serialbase.php000066600000032543151453265520013261 0ustar00 "bigint(21) NOT NULL", "surtitre" => "text NOT NULL", "titre" => "text NOT NULL", "soustitre" => "text NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "descriptif" => "text NOT NULL", "chapo" => "mediumtext NOT NULL", "texte" => "longblob NOT NULL", "ps" => "mediumtext NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "date_redac" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "visites" => "INTEGER DEFAULT '0' NOT NULL", "referers" => "INTEGER DEFAULT '0' NOT NULL", "popularite" => "DOUBLE DEFAULT '0' NOT NULL", "accepter_forum" => "CHAR(3) NOT NULL", "auteur_modif" => "bigint(21) DEFAULT '0' NOT NULL", "date_modif" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "id_trad" => "bigint(21) DEFAULT '0' NOT NULL", "extra" => "longblob NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "nom_site" => "tinytext NOT NULL", "url_site" => "VARCHAR(255) NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL"); $spip_articles_key = array( "PRIMARY KEY" => "id_article", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY id_trad" => "id_trad", "KEY lang" => "lang", "KEY statut" => "statut, date", "KEY url_site" => "url_site", "KEY date_modif" => "date_modif", "KEY idx" => "idx", "KEY url_propre" => "url_propre"); $spip_auteurs = array( "id_auteur" => "bigint(21) NOT NULL", "nom" => "text NOT NULL", "bio" => "text NOT NULL", "email" => "tinytext NOT NULL", "nom_site" => "tinytext NOT NULL", "url_site" => "text NOT NULL", "login" => "VARCHAR(255) BINARY NOT NULL", "pass" => "tinytext NOT NULL", "low_sec" => "tinytext NOT NULL", "statut" => "VARCHAR(255) NOT NULL", "maj" => "TIMESTAMP", "pgp" => "BLOB NOT NULL", "htpass" => "tinyblob NOT NULL", "en_ligne" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "imessage" => "VARCHAR(3) NOT NULL", "messagerie" => "VARCHAR(3) NOT NULL", "alea_actuel" => "tinytext NOT NULL", "alea_futur" => "tinytext NOT NULL", "prefs" => "tinytext NOT NULL", "cookie_oubli" => "tinytext NOT NULL", "source" => "VARCHAR(10) DEFAULT 'spip' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "extra" => "longblob NULL"); $spip_auteurs_key = array( "PRIMARY KEY" => "id_auteur", "KEY login" => "login", "KEY statut" => "statut", "KEY lang" => "lang", "KEY idx" => "idx", "KEY en_ligne" => "en_ligne"); $spip_breves = array( "id_breve" => "bigint(21) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "texte" => "longblob NOT NULL", "lien_titre" => "text NOT NULL", "lien_url" => "text NOT NULL", "statut" => "varchar(6) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "maj" => "TIMESTAMP", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL", "url_propre" => "VARCHAR(255) NOT NULL"); $spip_breves_key = array( "PRIMARY KEY" => "id_breve", "KEY idx" => "idx", "KEY id_rubrique" => "id_rubrique", "KEY url_propre" => "url_propre"); $spip_messages = array( "id_message" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "texte" => "longblob NOT NULL", "type" => "varchar(6) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "rv" => "varchar(3) NOT NULL", "statut" => "varchar(6) NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "maj" => "TIMESTAMP"); $spip_messages_key = array( "PRIMARY KEY" => "id_message", "KEY id_auteur" => "id_auteur"); $spip_mots = array( "id_mot" => "bigint(21) NOT NULL", "type" => "VARCHAR(100) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "id_groupe" => "bigint(21) NOT NULL", "extra" => "longblob NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "maj" => "TIMESTAMP"); $spip_mots_key = array( "PRIMARY KEY" => "id_mot", "KEY idx" => "idx", "KEY type" => "type", "KEY url_propre" => "url_propre"); $spip_groupes_mots = array( "id_groupe" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "unseul" => "varchar(3) NOT NULL", "obligatoire" => "varchar(3) NOT NULL", "articles" => "varchar(3) NOT NULL", "breves" => "varchar(3) NOT NULL", "rubriques" => "varchar(3) NOT NULL", "syndic" => "varchar(3) NOT NULL", "minirezo" => "varchar(3) NOT NULL", "comite" => "varchar(3) NOT NULL", "forum" => "varchar(3) NOT NULL", "maj" => "TIMESTAMP"); $spip_groupes_mots_key = array( "PRIMARY KEY" => "id_groupe"); $spip_rubriques = array( "id_rubrique" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "id_import" => "BIGINT DEFAULT '0'", "statut" => "VARCHAR(10) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL", "url_propre" => "VARCHAR(255) NOT NULL", "statut_tmp" => "VARCHAR(10) NOT NULL", "date_tmp" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL" ); $spip_rubriques_key = array( "PRIMARY KEY" => "id_rubrique", "KEY lang" => "lang", "KEY idx" => "idx", "KEY id_parent" => "id_parent", "KEY url_propre" => "url_propre"); $spip_documents = array( "id_document" => "bigint(21) NOT NULL", "id_vignette" => "bigint(21) DEFAULT '0' NOT NULL", "id_type" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "descriptif" => "text NOT NULL", "fichier" => "varchar(255) NOT NULL", "taille" => "integer NOT NULL", "largeur" => "integer NOT NULL", "hauteur" => "integer NOT NULL", "mode" => "ENUM('vignette', 'document') NOT NULL", "inclus" => "VARCHAR(3) DEFAULT 'non'", "distant" => "VARCHAR(3) DEFAULT 'non'", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_documents_key = array( "PRIMARY KEY" => "id_document", "KEY id_vignette" => "id_vignette", "KEY mode" => "mode", "KEY id_type" => "id_type"); $spip_types_documents = array( "id_type" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "extension" => "varchar(10) NOT NULL", "mime_type" => "varchar(100) NOT NULL", "inclus" => "ENUM('non', 'image', 'embed') NOT NULL DEFAULT 'non'", "upload" => "ENUM('oui', 'non') NOT NULL DEFAULT 'oui'", "maj" => "TIMESTAMP"); $spip_types_documents_key = array( "PRIMARY KEY" => "id_type", "UNIQUE extension" => "extension", "KEY inclus" => "inclus"); $spip_syndic = array( "id_syndic" => "bigint(21) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "nom_site" => "blob NOT NULL", "url_site" => "blob NOT NULL", "url_syndic" => "blob NOT NULL", "descriptif" => "blob NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "syndication" => "VARCHAR(3) NOT NULL", "statut" => "VARCHAR(10) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_syndic" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_index" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "extra" => "longblob NULL", "moderation" => "VARCHAR(3) DEFAULT 'non'", "miroir" => "VARCHAR(3) DEFAULT 'non'", "oubli" => "VARCHAR(3) DEFAULT 'non'" ); $spip_syndic_key = array( "PRIMARY KEY" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY idx" => "idx", "KEY statut" => "statut, date_syndic"); $spip_syndic_articles = array( "id_syndic_article" => "bigint(21) NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "url" => "VARCHAR(255) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lesauteurs" => "text NOT NULL", "maj" => "TIMESTAMP", "statut" => "VARCHAR(10) NOT NULL", "descriptif" => "blob NOT NULL"); $spip_syndic_articles_key = array( "PRIMARY KEY" => "id_syndic_article", "KEY id_syndic" => "id_syndic", "KEY statut" => "statut", "KEY url" => "url"); $spip_forum = array( "id_forum" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "id_thread" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "texte" => "mediumtext NOT NULL", "auteur" => "text NOT NULL", "email_auteur" => "text NOT NULL", "nom_site" => "text NOT NULL", "url_site" => "text NOT NULL", "statut" => "varchar(8) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "ip" => "varchar(16)", "maj" => "TIMESTAMP", "id_auteur" => "BIGINT DEFAULT '0' NOT NULL", "id_message" => "bigint(21) DEFAULT '0' NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_forum_key = array( "PRIMARY KEY" => "id_forum", "KEY id_parent" => "id_parent", "KEY id_rubrique" => "id_rubrique", "KEY id_article" => "id_article", "KEY id_breve" => "id_breve", "KEY id_message" => "id_message", "KEY id_syndic" => "id_syndic", "KEY idx" => "idx", "KEY statut" => "statut, date_heure"); $spip_signatures = array( "id_signature" => "bigint(21) NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "date_time" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "nom_email" => "text NOT NULL", "ad_email" => "text NOT NULL", "nom_site" => "text NOT NULL", "url_site" => "text NOT NULL", "message" => "mediumtext NOT NULL", "statut" => "varchar(10) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_signatures_key = array( "PRIMARY KEY" => "id_signature", "KEY id_article" => "id_article", "KEY idx" => "idx", "KEY statut" => "statut"); global $tables_principales; /// Attention: mes_fonctions peut avoir deja defini cette variable /// il faut donc rajouter, mais pas reinitialiser $tables_principales['spip_articles'] = array('field' => &$spip_articles, 'key' => &$spip_articles_key); $tables_principales['spip_auteurs'] = array('field' => &$spip_auteurs, 'key' => &$spip_auteurs_key); $tables_principales['spip_breves'] = array('field' => &$spip_breves, 'key' => &$spip_breves_key); $tables_principales['spip_messages'] = array('field' => &$spip_messages, 'key' => &$spip_messages_key); $tables_principales['spip_mots'] = array('field' => &$spip_mots, 'key' => &$spip_mots_key); $tables_principales['spip_groupes_mots'] = array('field' => &$spip_groupes_mots, 'key' => &$spip_groupes_mots_key); $tables_principales['spip_rubriques'] = array('field' => &$spip_rubriques, 'key' => &$spip_rubriques_key); $tables_principales['spip_documents'] = array('field' => &$spip_documents, 'key' => &$spip_documents_key); $tables_principales['spip_types_documents'] = array('field' => &$spip_types_documents, 'key' => &$spip_types_documents_key); $tables_principales['spip_syndic'] = array('field' => &$spip_syndic, 'key' => &$spip_syndic_key); $tables_principales['spip_syndic_articles'] = array('field' => &$spip_syndic_articles, 'key' => &$spip_syndic_articles_key); $tables_principales['spip_forum'] = array('field' => &$spip_forum, 'key' => &$spip_forum_key); $tables_principales['spip_signatures'] = array('field' => &$spip_signatures, 'key' => &$spip_signatures_key); ?> vieille_base/1821/inc_auxbase.php000066600000040316151453265520012574 0ustar00 "BIGINT (21) DEFAULT '0' NOT NULL", "email_unique" => "CHAR (3) NOT NULL", "site_obli" => "CHAR (3) NOT NULL", "site_unique" => "CHAR (3) NOT NULL", "message" => "CHAR (3) NOT NULL", "texte" => "LONGBLOB NOT NULL", "maj" => "TIMESTAMP"); $spip_petitions_key = array( "PRIMARY KEY" => "id_article"); $spip_visites_temp = array( "ip" => "INT UNSIGNED NOT NULL", "type" => "ENUM ('article', 'rubrique', 'breve', 'autre') NOT NULL", "id_objet" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_temp_key = array( "PRIMARY KEY" => "type, id_objet, ip"); $spip_visites = array( "date" => "DATE NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_key = array( "PRIMARY KEY" => "date"); $spip_visites_articles = array( "date" => "DATE NOT NULL", "id_article" => "INT UNSIGNED NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_articles_key = array( "PRIMARY KEY" => "date, id_article"); $spip_referers_temp = array( "ip" => "INT UNSIGNED NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "referer_md5" => "BIGINT UNSIGNED NOT NULL", "type" => "ENUM ('article', 'rubrique', 'breve', 'autre') NOT NULL", "id_objet" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_temp_key = array( "PRIMARY KEY" => "type, id_objet, referer_md5, ip"); $spip_referers = array( "referer_md5" => "BIGINT UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "visites_jour" => "INT UNSIGNED NOT NULL", "visites_veille"=> "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_key = array( "PRIMARY KEY" => "referer_md5"); $spip_referers_articles = array( "id_article" => "INT UNSIGNED NOT NULL", "referer_md5" => "BIGINT UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_articles_key = array( "PRIMARY KEY" => "id_article, referer_md5", "KEY referer_md5" => "referer_md5"); $spip_auteurs_articles = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_auteurs_articles_key = array( "KEY id_auteur" => "id_auteur", "KEY id_article" => "id_article"); $spip_auteurs_rubriques = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_auteurs_rubriques_key = array( "KEY id_auteur" => "id_auteur", "KEY id_rubrique" => "id_rubrique"); $spip_auteurs_messages = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_message" => "BIGINT (21) DEFAULT '0' NOT NULL", "vu" => "CHAR (3) NOT NULL"); $spip_auteurs_messages_key = array( "KEY id_auteur" => "id_auteur", "KEY id_message" => "id_message"); $spip_documents_articles = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_articles_key = array( "KEY id_document" => "id_document", "KEY id_article" => "id_article"); $spip_documents_rubriques = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_rubriques_key = array( "KEY id_document" => "id_document", "KEY id_rubrique" => "id_rubrique"); $spip_documents_breves = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_breve" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_breves_key = array( "KEY id_document" => "id_document", "KEY id_breve" => "id_breve"); $spip_documents_syndic = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_syndic" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_syndic_article" => "BIGINT (21) DEFAULT '0' NOT NULL" ); $spip_documents_syndic_key = array( "KEY id_document" => "id_document", "KEY id_syndic" => "id_syndic", "KEY id_syndic_article" => "id_syndic_article"); $spip_mots_articles = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_articles_key = array( "KEY id_mot" => "id_mot", "KEY id_article" => "id_article"); $spip_mots_breves = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_breve" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_breves_key = array( "KEY id_mot" => "id_mot", "KEY id_breve" => "id_breve"); $spip_mots_rubriques = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_rubriques_key = array( "KEY id_mot" => "id_mot", "KEY id_rubrique" => "id_rubrique"); $spip_mots_syndic = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_syndic" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_syndic_key = array( "KEY id_mot" => "id_mot", "KEY id_syndic" => "id_syndic"); $spip_mots_forum = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_forum" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_forum_key = array( "KEY id_mot" => "id_mot", "KEY id_forum" => "id_forum"); $spip_mots_documents = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_documents_key = array( "KEY id_mot" => "id_mot", "KEY id_document" => "id_document"); $spip_meta = array( "nom" => "VARCHAR (255) NOT NULL", "valeur" => "VARCHAR (255) DEFAULT ''", "maj" => "TIMESTAMP"); $spip_meta_key = array( "PRIMARY KEY" => "nom"); $spip_index_articles = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_article" => "INT UNSIGNED NOT NULL"); $spip_index_articles_key = array( "KEY `hash`" => "`hash`", "KEY id_article" => "id_article"); $spip_index_auteurs = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_auteur" => "INT UNSIGNED NOT NULL"); $spip_index_auteurs_key = array( "KEY `hash`" => "`hash`", "KEY id_auteur" => "id_auteur"); $spip_index_breves = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_breve" => "INT UNSIGNED NOT NULL"); $spip_index_breves_key = array( "KEY `hash`" => "`hash`", "KEY id_breve" => "id_breve"); $spip_index_mots = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_mot" => "INT UNSIGNED NOT NULL"); $spip_index_mots_key = array( "KEY `hash`" => "`hash`", "KEY id_mot" => "id_mot"); $spip_index_rubriques = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_rubrique" => "INT UNSIGNED NOT NULL"); $spip_index_rubriques_key = array( "KEY `hash`" => "`hash`", "KEY id_rubrique" => "id_rubrique"); $spip_index_syndic = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_syndic" => "INT UNSIGNED NOT NULL"); $spip_index_syndic_key = array( "KEY `hash`" => "`hash`", "KEY id_syndic" => "id_syndic"); $spip_index_signatures = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_signature" => "INT UNSIGNED NOT NULL"); $spip_index_signatures_key = array( "KEY `hash`" => "`hash`", "KEY id_signature" => "id_signature"); $spip_index_forum = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_forum" => "INT UNSIGNED NOT NULL"); $spip_index_forum_key = array( "KEY `hash`" => "`hash`", "KEY id_forum" => "id_forum"); $spip_index_documents = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_document" => "INT UNSIGNED NOT NULL"); $spip_index_documents_key = array( "KEY `hash`" => "`hash`", "KEY id_document" => "id_document"); $spip_index_dico = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "dico" => "VARCHAR (30) NOT NULL"); $spip_index_dico_key = array( "PRIMARY KEY" => "dico"); $spip_versions = array ( "id_article" => "bigint(21) NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "titre_version" => "text DEFAULT '' NOT NULL", "permanent" => "char(3) NOT NULL", "champs" => "text NOT NULL"); $spip_versions_key = array ( "PRIMARY KEY" => "id_article, id_version", "KEY date" => "id_article, date", "KEY id_auteur" => "id_auteur"); $spip_versions_fragments = array( "id_fragment" => "int unsigned DEFAULT '0' NOT NULL", "version_min" => "int unsigned DEFAULT '0' NOT NULL", "version_max" => "int unsigned DEFAULT '0' NOT NULL", "id_article" => "bigint(21) NOT NULL", "compress" => "tinyint NOT NULL", "fragment" => "longblob NOT NULL"); $spip_versions_fragments_key = array( "PRIMARY KEY" => "id_article, id_fragment, version_min"); $spip_caches = array( "fichier" => "char (64) NOT NULL", "id" => "char (64) NOT NULL", // i=par id, t=timer, x=suppression "type" => "CHAR (1) DEFAULT 'i' NOT NULL", "taille" => "integer DEFAULT '0' NOT NULL"); $spip_caches_key = array( "PRIMARY KEY" => "fichier, id", "KEY fichier" => "fichier", "KEY id" => "id"); $spip_ortho_cache = array( "lang" => "VARCHAR(10) NOT NULL", "mot" => "VARCHAR(255) BINARY NOT NULL", "ok" => "TINYINT NOT NULL", "suggest" => "BLOB NOT NULL", "maj" => "TIMESTAMP"); $spip_ortho_cache_key = array( "PRIMARY KEY" => "lang, mot", "KEY maj" => "maj"); $spip_ortho_dico = array( "lang" => "VARCHAR(10) NOT NULL", "mot" => "VARCHAR(255) BINARY NOT NULL", "id_auteur" => "BIGINT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_ortho_dico_key = array( "PRIMARY KEY" => "lang, mot",); global $tables_auxiliaires; $tables_auxiliaires = array( 'spip_petitions' => array('field' => &$spip_petitions, 'key' => &$spip_petitions_key), 'spip_visites_temp' => array('field' => &$spip_visites_temp, 'key' => &$spip_visites_temp_key), 'spip_visites' => array('field' => &$spip_visites, 'key' => &$spip_visites_key), 'spip_visites_articles' => array('field' => &$spip_visites_articles, 'key' => &$spip_visites_articles_key), 'spip_referers_temp' => array('field' => &$spip_referers_temp, 'key' => &$spip_referers_temp_key), 'spip_referers' => array('field' => &$spip_referers, 'key' => &$spip_referers_key), 'spip_referers_articles' => array('field' => &$spip_referers_articles, 'key' => &$spip_referers_articles_key), 'spip_auteurs_articles' => array('field' => &$spip_auteurs_articles, 'key' => &$spip_auteurs_articles_key), 'spip_auteurs_rubriques' => array('field' => &$spip_auteurs_rubriques, 'key' => &$spip_auteurs_rubriques_key), 'spip_auteurs_messages' => array('field' => &$spip_auteurs_messages, 'key' => &$spip_auteurs_messages_key), 'spip_documents_articles' => array('field' => &$spip_documents_articles, 'key' => &$spip_documents_articles_key), 'spip_documents_rubriques' => array('field' => &$spip_documents_rubriques, 'key' => &$spip_documents_rubriques_key), 'spip_documents_breves' => array('field' => &$spip_documents_breves, 'key' => &$spip_documents_breves_key), 'spip_documents_syndic' => array('field' => &$spip_documents_syndic, 'key' => &$spip_documents_syndic_key), 'spip_mots_articles' => array('field' => &$spip_mots_articles, 'key' => &$spip_mots_articles_key), 'spip_mots_breves' => array('field' => &$spip_mots_breves, 'key' => &$spip_mots_breves_key), 'spip_mots_rubriques' => array('field' => &$spip_mots_rubriques, 'key' => &$spip_mots_rubriques_key), 'spip_mots_syndic' => array('field' => &$spip_mots_syndic, 'key' => &$spip_mots_syndic_key), 'spip_mots_forum' => array('field' => &$spip_mots_forum, 'key' => &$spip_mots_forum_key), 'spip_mots_documents' => array('field' => &$spip_mots_documents, 'key' => &$spip_mots_documents_key), 'spip_meta' => array('field' => &$spip_meta, 'key' => &$spip_meta_key), 'spip_index_articles' => array('field' => &$spip_index_articles, 'key' => &$spip_index_articles_key), 'spip_index_auteurs' => array('field' => &$spip_index_auteurs, 'key' => &$spip_index_auteurs_key), 'spip_index_breves' => array('field' => &$spip_index_breves, 'key' => &$spip_index_breves_key), 'spip_index_mots' => array('field' => &$spip_index_mots, 'key' => &$spip_index_mots_key), 'spip_index_rubriques' => array('field' => &$spip_index_rubriques, 'key' => &$spip_index_rubriques_key), 'spip_index_syndic' => array('field' => &$spip_index_syndic, 'key' => &$spip_index_syndic_key), 'spip_index_signatures' => array('field' => &$spip_index_signatures, 'key' => &$spip_index_signatures_key), 'spip_index_forum' => array('field' => &$spip_index_forum, 'key' => &$spip_index_forum_key), 'spip_index_documents' => array('field' => &$spip_index_documents, 'key' => &$spip_index_documents_key), 'spip_index_dico' => array('field' => &$spip_index_dico, 'key' => &$spip_index_dico_key), 'spip_versions' => array('field' => &$spip_versions, 'key' => &$spip_versions_key), 'spip_versions_fragments' => array('field' => &$spip_versions_fragments, 'key' => &$spip_versions_fragments_key), 'spip_caches' => array('field' => &$spip_caches, 'key' => &$spip_caches_key), 'spip_ortho_cache' => array('field' => &$spip_ortho_cache, 'key' => &$spip_ortho_cache_key), 'spip_ortho_dico' => array('field' => &$spip_ortho_dico, 'key' => &$spip_ortho_dico_key) ); // // tableau des tables de relations, // Ex: gestion du critere {id_mot} dans la boucle(ARTICLES) // transposee en tables_jointures pour le code moderne // global $tables_jointures; $tables_jointures['spip_articles']['id_mot']='mots_articles'; $tables_jointures['spip_articles']['id_auteur']='auteurs_articles'; $tables_jointures['spip_articles']['id_document']='documents_articles'; $tables_jointures['spip_auteurs']['id_article']='auteurs_articles'; $tables_jointures['spip_breves']['id_mot']='mots_breves'; $tables_jointures['spip_breves']['id_document']='documents_breves'; $tables_jointures['spip_documents']['id_article']='documents_articles'; $tables_jointures['spip_documents']['id_rubrique']='documents_rubriques'; $tables_jointures['spip_documents']['id_breve']='documents_breves'; $tables_jointures['spip_documents']['id_syndic']='documents_syndic'; $tables_jointures['spip_documents']['id_syndic_article']='documents_syndic'; $tables_jointures['spip_documents']['id_mot']='mots_documents'; $tables_jointures['spip_forums']['id_mot']='mots_forum'; $tables_jointures['spip_mots']['id_article']='mots_articles'; $tables_jointures['spip_mots']['id_breve']='mots_breves'; $tables_jointures['spip_mots']['id_forum']='mots_forum'; $tables_jointures['spip_mots']['id_rubrique']='mots_rubriques'; $tables_jointures['spip_mots']['id_syndic']='mots_syndic'; $tables_jointures['spip_mots']['id_document']='mots_documents'; $tables_jointures['spip_groupes_mots']['id_groupe']='mots'; $tables_jointures['spip_rubriques']['id_mot']='mots_rubriques'; $tables_jointures['spip_rubriques']['id_document']='documents_rubriques'; $tables_jointures['spip_syndication']['id_mot']='mots_syndic'; $tables_jointures['spip_syndication']['id_document']='documents_syndic'; $tables_jointures['spip_syndic_articles']['id_document']='documents_syndic'; ?> vieille_base/1821/create.php000066600000004220151453265520011550 0ustar00 $v) spip_create_vieille_table($k, $v['field'], $v['key'], true); foreach($tables_auxiliaires as $k => $v) spip_create_vieille_table($k, $v['field'], $v['key'], false); foreach($tables_images as $k => $v) spip_query("INSERT IGNORE spip_types_documents (extension, inclus, titre, id_type) VALUES ('$k', 'image', '" . (is_numeric($v) ? (strtoupper($k) . "', $v") : "$v', 0") . ")"); foreach($tables_sequences as $k => $v) spip_query("INSERT IGNORE spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'embed')"); foreach($tables_documents as $k => $v) spip_query("INSERT IGNORE spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'non')"); foreach ($tables_mime as $extension => $type_mime) spip_query("UPDATE spip_types_documents SET mime_type='$type_mime' WHERE extension='$extension'"); } ?> vieille_base/1821/inc_typebase.php000066600000011111151453265520012747 0ustar00 1, 'png' => 2, 'gif' => 3, // Autres images (peuvent utiliser le tag ) 'bmp' => 'BMP', 'psd' => 'Photoshop', 'tif' => 'TIFF' ); // Multimedia (peuvent utiliser le tag ) $tables_sequences = array( 'aiff' => 'AIFF', 'asf' => 'Windows Media', 'avi' => 'Windows Media', 'mid' => 'Midi', 'mng' => 'MNG', 'mov' => 'QuickTime', 'mp3' => 'MP3', 'mpg' => 'MPEG', 'ogg' => 'Ogg', 'qt' => 'QuickTime', 'ra' => 'RealAudio', 'ram' => 'RealAudio', 'rm' => 'RealAudio', 'swf' => 'Flash', 'wav' => 'WAV', 'wmv' => 'Windows Media' ); // Documents varies $tables_documents = array( 'ai' => 'Adobe Illustrator', 'bz2' => 'BZip', 'bin' => 'Binary Data', 'c' => 'C source', 'css' => 'Cascading Style Sheet', 'deb' => 'Debian', 'doc' => 'Word', 'djvu' => 'DjVu', 'dvi' => 'LaTeX DVI', 'eps' => 'PostScript', 'gz' => 'GZ', 'h' => 'C header', 'html' => 'HTML', 'pas' => 'Pascal', 'pdf' => 'PDF', 'pgn' => 'Portable Game Notation', 'ppt' => 'PowerPoint', 'ps' => 'PostScript', 'rpm' => 'RedHat/Mandrake/SuSE', 'rtf' => 'RTF', 'sdd' => 'StarOffice', 'sdw' => 'StarOffice', 'sit' => 'Stuffit', 'sxc' => 'OpenOffice Calc', 'sxi' => 'OpenOffice Impress', 'sxw' => 'OpenOffice', 'tex' => 'LaTeX', 'torrent' => 'BitTorrent', 'tgz' => 'TGZ', 'txt' => 'texte', 'xcf' => 'GIMP multi-layer', 'xls' => 'Excel', 'xml' => 'XML', 'zip' => 'Zip' ); $tables_mime = array( // Images reconnues par PHP 'jpg'=>'image/jpeg', 'png'=>'image/png', 'gif'=>'image/gif', // Autres images (peuvent utiliser le tag ) 'bmp'=>'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp 'psd'=>'image/x-photoshop', // pas IANA 'tif'=>'image/tiff', // Multimedia (peuvent utiliser le tag ) 'aiff'=>'audio/x-aiff', 'asf'=>'video/x-ms-asf', 'avi'=>'video/x-msvideo', 'mid'=>'audio/midi', 'mng'=>'video/x-mng', 'mov'=>'video/quicktime', 'mp3'=>'audio/mpeg', 'mpg'=>'video/mpeg', 'ogg'=>'application/ogg', 'qt' =>'video/quicktime', 'ra' =>'audio/x-pn-realaudio', 'ram'=>'audio/x-pn-realaudio', 'rm' =>'audio/x-pn-realaudio', 'swf'=>'application/x-shockwave-flash', 'wav'=>'audio/x-wav', 'wmv'=>'video/x-ms-wmv', // Documents varies 'ai' =>'application/illustrator', 'bin' => 'application/octet-stream', # le tout-venant 'bz2'=>'application/x-bzip2', 'c' =>'text/x-csrc', 'css'=>'text/css', 'deb'=>'application/x-debian-package', 'doc'=>'application/msword', 'djvu'=>'image/vnd.djvu', 'dvi'=>'application/x-dvi', 'eps'=>'application/postscript', 'gz' =>'application/x-gzip', 'h' =>'text/x-chdr', 'html'=>'text/html', 'pas'=>'text/x-pascal', 'pdf'=>'application/pdf', 'pgn' =>'application/x-chess-pgn', 'ppt'=>'application/vnd.ms-powerpoint', 'ps' =>'application/postscript', 'rpm'=>'application/x-redhat-package-manager', 'rtf'=>'application/rtf', 'sdd'=>'application/vnd.stardivision.impress', 'sdw'=>'application/vnd.stardivision.writer', 'sit'=>'application/x-stuffit', 'sxc'=>'application/vnd.sun.xml.calc', 'sxi'=>'application/vnd.sun.xml.impress', 'sxw'=>'application/vnd.sun.xml.writer', 'tex'=>'text/x-tex', 'torrent' => 'application/x-bittorrent', 'tgz'=>'application/x-gtar', 'txt'=>'text/plain', 'xcf'=>'application/x-xcf', 'xls'=>'application/vnd.ms-excel', 'xml'=>'application/xml', 'zip'=>'application/zip' ); ?> vieille_base/13000/auxiliaires.php000066600000026105151453265520012702 0ustar00 "bigint(21) DEFAULT '0' NOT NULL", "email_unique" => "CHAR (3) DEFAULT '' NOT NULL", "site_obli" => "CHAR (3) DEFAULT '' NOT NULL", "site_unique" => "CHAR (3) DEFAULT '' NOT NULL", "message" => "CHAR (3) DEFAULT '' NOT NULL", "texte" => "LONGTEXT DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_petitions_key = array( "PRIMARY KEY" => "id_article"); $spip_visites = array( "date" => "DATE NOT NULL", "visites" => "int UNSIGNED DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_key = array( "PRIMARY KEY" => "date"); $spip_visites_articles = array( "date" => "DATE NOT NULL", "id_article" => "int UNSIGNED NOT NULL", "visites" => "int UNSIGNED DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_articles_key = array( "PRIMARY KEY" => "date, id_article"); $spip_resultats = array( "recherche" => "char(16) not null default ''", "id" => "INT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP" ); $spip_resultats_key = array( // pas de cle ni index, ca fait des insertions plus rapides et les requetes jointes utilisees en recheche ne sont pas plus lentes ... ); $spip_referers = array( "referer_md5" => "bigint UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255)", "visites" => "int UNSIGNED NOT NULL", "visites_jour" => "int UNSIGNED NOT NULL", "visites_veille"=> "int UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_key = array( "PRIMARY KEY" => "referer_md5"); $spip_referers_articles = array( "id_article" => "int UNSIGNED NOT NULL", "referer_md5" => "bigint UNSIGNED NOT NULL", "referer" => "VARCHAR (255) DEFAULT '' NOT NULL", "visites" => "int UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_articles_key = array( "PRIMARY KEY" => "id_article, referer_md5", "KEY referer_md5" => "referer_md5"); $spip_auteurs_articles = array( "id_auteur" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_auteurs_articles_key = array( "PRIMARY KEY" => "id_auteur, id_article", "KEY id_article" => "id_article"); $spip_auteurs_rubriques = array( "id_auteur" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_auteurs_rubriques_key = array( "PRIMARY KEY" => "id_auteur, id_rubrique", "KEY id_rubrique" => "id_rubrique"); $spip_auteurs_messages = array( "id_auteur" => "bigint(21) DEFAULT '0' NOT NULL", "id_message" => "bigint(21) DEFAULT '0' NOT NULL", "vu" => "CHAR (3)"); $spip_auteurs_messages_key = array( "PRIMARY KEY" => "id_auteur, id_message", "KEY id_message" => "id_message"); $spip_documents_liens = array( "id_document" => "bigint(21) DEFAULT '0' NOT NULL", "id_objet" => "bigint(21) DEFAULT '0' NOT NULL", "objet" => "VARCHAR (25) DEFAULT '' NOT NULL", "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL"); $spip_documents_liens_key = array( "PRIMARY KEY" => "id_document,id_objet,objet", "KEY id_document" => "id_document"); /* $spip_documents_articles = array( "id_document" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL"); $spip_documents_articles_key = array( "PRIMARY KEY" => "id_article, id_document", "KEY id_document" => "id_document"); $spip_documents_rubriques = array( "id_document" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL"); $spip_documents_rubriques_key = array( "PRIMARY KEY" => "id_rubrique, id_document", "KEY id_document" => "id_document"); $spip_documents_breves = array( "id_document" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL", "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL"); $spip_documents_breves_key = array( "PRIMARY KEY" => "id_breve, id_document", "KEY id_document" => "id_document"); $spip_documents_forum = array( "id_document" => "bigint(21) DEFAULT '0' NOT NULL", "id_forum" => "bigint(21) DEFAULT '0' NOT NULL", "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL"); $spip_documents_forum_key = array( "PRIMARY KEY" => "id_forum, id_document", "KEY id_document" => "id_document"); */ $spip_mots_articles = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_articles_key = array( "PRIMARY KEY" => "id_article, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_breves = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_breves_key = array( "PRIMARY KEY" => "id_breve, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_rubriques = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_rubriques_key = array( "PRIMARY KEY" => "id_rubrique, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_syndic = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_syndic_key = array( "PRIMARY KEY" => "id_syndic, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_forum = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_forum" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_forum_key = array( "PRIMARY KEY" => "id_forum, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_documents = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_document" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_documents_key = array( "PRIMARY KEY" => "id_document, id_mot", "KEY id_mot" => "id_mot"); $spip_meta = array( "nom" => "VARCHAR (255) NOT NULL", "valeur" => "text DEFAULT ''", "impt" => "ENUM('non', 'oui') DEFAULT 'oui' NOT NULL", "maj" => "TIMESTAMP"); $spip_meta_key = array( "PRIMARY KEY" => "nom"); $spip_versions = array ( "id_article" => "bigint(21) NOT NULL", "id_version" => "bigint(21) DEFAULT 0 NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "id_auteur" => "VARCHAR(23) DEFAULT '' NOT NULL", # stocke aussi IP(v6) "titre_version" => "text DEFAULT '' NOT NULL", "permanent" => "char(3)", "champs" => "text"); $spip_versions_key = array ( "PRIMARY KEY" => "id_article, id_version"); $spip_versions_fragments = array( "id_fragment" => "int unsigned DEFAULT '0' NOT NULL", "version_min" => "int unsigned DEFAULT '0' NOT NULL", "version_max" => "int unsigned DEFAULT '0' NOT NULL", "id_article" => "bigint(21) NOT NULL", "compress" => "tinyint NOT NULL", "fragment" => "longblob" # ici c'est VRAIMENT un blob (on y stocke du gzip) ); $spip_versions_fragments_key = array( "PRIMARY KEY" => "id_article, id_fragment, version_min"); $spip_urls = array( "url" => "VARCHAR(255) NOT NULL", // la table cible "type" => "varchar(15) DEFAULT 'article' NOT NULL", // l'id dans la table "id_objet" => "bigint(21) NOT NULL", // pour connaitre la plus recente. // ATTENTION, pas on update CURRENT_TIMESTAMP implicite // et pas le nom maj, surinterprete par inc/import_1_3 "date" => "DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL"); $spip_urls_key = array( "PRIMARY KEY" => "url", "KEY type" => "type, id_objet"); $tables_auxiliaires['spip_petitions'] = array( 'field' => &$spip_petitions, 'key' => &$spip_petitions_key ); $tables_auxiliaires['spip_visites'] = array( 'field' => &$spip_visites, 'key' => &$spip_visites_key); $tables_auxiliaires['spip_visites_articles'] = array( 'field' => &$spip_visites_articles, 'key' => &$spip_visites_articles_key); $tables_auxiliaires['spip_referers'] = array( 'field' => &$spip_referers, 'key' => &$spip_referers_key); $tables_auxiliaires['spip_referers_articles'] = array( 'field' => &$spip_referers_articles, 'key' => &$spip_referers_articles_key); $tables_auxiliaires['spip_auteurs_articles'] = array( 'field' => &$spip_auteurs_articles, 'key' => &$spip_auteurs_articles_key); $tables_auxiliaires['spip_auteurs_rubriques'] = array( 'field' => &$spip_auteurs_rubriques, 'key' => &$spip_auteurs_rubriques_key); $tables_auxiliaires['spip_auteurs_messages'] = array( 'field' => &$spip_auteurs_messages, 'key' => &$spip_auteurs_messages_key); $tables_auxiliaires['spip_documents_liens'] = array( 'field' => &$spip_documents_liens, 'key' => &$spip_documents_liens_key); /* $tables_auxiliaires['spip_documents_articles'] = array( 'field' => &$spip_documents_articles, 'key' => &$spip_documents_articles_key); $tables_auxiliaires['spip_documents_rubriques'] = array( 'field' => &$spip_documents_rubriques, 'key' => &$spip_documents_rubriques_key); $tables_auxiliaires['spip_documents_breves'] = array( 'field' => &$spip_documents_breves, 'key' => &$spip_documents_breves_key); $tables_auxiliaires['spip_documents_forum'] = array( 'field' => &$spip_documents_forum, 'key' => &$spip_documents_forum_key); */ $tables_auxiliaires['spip_mots_articles'] = array( 'field' => &$spip_mots_articles, 'key' => &$spip_mots_articles_key); $tables_auxiliaires['spip_mots_breves'] = array( 'field' => &$spip_mots_breves, 'key' => &$spip_mots_breves_key); $tables_auxiliaires['spip_mots_rubriques'] = array( 'field' => &$spip_mots_rubriques, 'key' => &$spip_mots_rubriques_key); $tables_auxiliaires['spip_mots_syndic'] = array( 'field' => &$spip_mots_syndic, 'key' => &$spip_mots_syndic_key); $tables_auxiliaires['spip_mots_forum'] = array( 'field' => &$spip_mots_forum, 'key' => &$spip_mots_forum_key); $tables_auxiliaires['spip_mots_documents'] = array( 'field' => &$spip_mots_documents, 'key' => &$spip_mots_documents_key); $tables_auxiliaires['spip_meta'] = array( 'field' => &$spip_meta, 'key' => &$spip_meta_key); $tables_auxiliaires['spip_resultats'] = array( 'field' => &$spip_resultats, 'key' => &$spip_resultats_key); $tables_auxiliaires['spip_versions'] = array( 'field' => &$spip_versions, 'key' => &$spip_versions_key); $tables_auxiliaires['spip_versions_fragments'] = array( 'field' => &$spip_versions_fragments, 'key' => &$spip_versions_fragments_key); $tables_auxiliaires['spip_urls'] = array( 'field' => &$spip_urls, 'key' => &$spip_urls_key); $tables_auxiliaires = pipeline('declarer_tables_auxiliaires',$tables_auxiliaires); } global $tables_auxiliaires; base_auxiliaires_13000($tables_auxiliaires); ?> vieille_base/13000/create.php000066600000002625151453265520011627 0ustar00 $v) creer_ou_upgrader_table($k,$v,true,false,$serveur); foreach($tables_auxiliaires as $k => $v) creer_ou_upgrader_table($k,$v,false,false,$serveur); } ?> vieille_base/13000/typedoc.php000066600000015641151453265520012035 0ustar00 'JPEG', 'png' => 'PNG', 'gif' =>'GIF', // Autres images (peuvent utiliser le tag ) 'bmp' => 'BMP', 'tif' => 'TIFF' ); // Multimedia (peuvent utiliser le tag ) $tables_sequences = array( 'aiff' => 'AIFF', 'asf' => 'Windows Media', 'avi' => 'AVI', 'flv' => 'Flash Video', 'mid' => 'Midi', 'mng' => 'MNG', 'mka' => 'Matroska Audio', 'mkv' => 'Matroska Video', 'mov' => 'QuickTime', 'mp3' => 'MP3', 'mp4' => 'MPEG4', 'mpg' => 'MPEG', 'ogg' => 'Ogg', 'qt' => 'QuickTime', 'ra' => 'RealAudio', 'ram' => 'RealAudio', 'rm' => 'RealAudio', 'svg' => 'Scalable Vector Graphics', 'swf' => 'Flash', 'wav' => 'WAV', 'wmv' => 'Windows Media', '3gp' => '3rd Generation Partnership Project' ); // Documents varies $tables_documents = array( 'abw' => 'Abiword', 'ai' => 'Adobe Illustrator', 'bz2' => 'BZip', 'bin' => 'Binary Data', 'blend' => 'Blender', 'c' => 'C source', 'cls' => 'LaTeX Class', 'css' => 'Cascading Style Sheet', 'csv' => 'Comma Separated Values', 'deb' => 'Debian', 'doc' => 'Word', 'djvu' => 'DjVu', 'dvi' => 'LaTeX DVI', 'eps' => 'PostScript', 'gz' => 'GZ', 'h' => 'C header', 'html' => 'HTML', 'kml' => 'Keyhole Markup Language', 'kmz' => 'Google Earth Placemark File', 'pas' => 'Pascal', 'pdf' => 'PDF', 'pgn' => 'Portable Game Notation', 'ppt' => 'PowerPoint', 'ps' => 'PostScript', 'psd' => 'Photoshop', 'rpm' => 'RedHat/Mandrake/SuSE', 'rtf' => 'RTF', 'sdd' => 'StarOffice', 'sdw' => 'StarOffice', 'sit' => 'Stuffit', 'sty' => 'LaTeX Style Sheet', 'sxc' => 'OpenOffice.org Calc', 'sxi' => 'OpenOffice.org Impress', 'sxw' => 'OpenOffice.org', 'tex' => 'LaTeX', 'tgz' => 'TGZ', 'torrent' => 'BitTorrent', 'ttf' => 'TTF Font', 'txt' => 'texte', 'xcf' => 'GIMP multi-layer', 'xls' => 'Excel', 'xml' => 'XML', 'zip' => 'Zip', // open document format 'odt' => 'opendocument text', 'ods' => 'opendocument spreadsheet', 'odp' => 'opendocument presentation', 'odg' => 'opendocument graphics', 'odc' => 'opendocument chart', 'odf' => 'opendocument formula', 'odb' => 'opendocument database', 'odi' => 'opendocument image', 'odm' => 'opendocument text-master', 'ott' => 'opendocument text-template', 'ots' => 'opendocument spreadsheet-template', 'otp' => 'opendocument presentation-template', 'otg' => 'opendocument graphics-template', ); $tables_mime = array( // Images reconnues par PHP 'jpg'=>'image/jpeg', 'png'=>'image/png', 'gif'=>'image/gif', // Autres images (peuvent utiliser le tag ) 'bmp'=>'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp 'tif'=>'image/tiff', // Multimedia (peuvent utiliser le tag ) 'aiff'=>'audio/x-aiff', 'asf'=>'video/x-ms-asf', 'avi'=>'video/x-msvideo', 'flv' => 'video/x-flv', 'mid'=>'audio/midi', 'mka' => 'audio/mka', 'mkv' => 'video/mkv', 'mng'=>'video/x-mng', 'mov'=>'video/quicktime', 'mp3'=>'audio/mpeg', 'mp4' => 'application/mp4', 'mpg'=>'video/mpeg', 'ogg'=>'application/ogg', 'qt' =>'video/quicktime', 'ra' =>'audio/x-pn-realaudio', 'ram'=>'audio/x-pn-realaudio', 'rm' =>'audio/x-pn-realaudio', 'svg'=>'image/svg+xml', 'swf'=>'application/x-shockwave-flash', 'wav'=>'audio/x-wav', 'wmv'=>'video/x-ms-wmv', '3gp'=>'video/3gpp', // Documents varies 'ai' =>'application/illustrator', 'abw' =>'application/abiword', 'bin' => 'application/octet-stream', # le tout-venant 'blend' => 'application/x-blender', 'bz2'=>'application/x-bzip2', 'c' =>'text/x-csrc', 'css'=>'text/css', 'csv'=>'text/csv', 'deb'=>'application/x-debian-package', 'doc'=>'application/msword', 'djvu'=>'image/vnd.djvu', 'dvi'=>'application/x-dvi', 'eps'=>'application/postscript', 'gz' =>'application/x-gzip', 'h' =>'text/x-chdr', 'html'=>'text/html', 'kml'=>'application/vnd.google-earth.kml+xml', 'kmz'=>'application/vnd.google-earth.kmz', 'pas'=>'text/x-pascal', 'pdf'=>'application/pdf', 'pgn' =>'application/x-chess-pgn', 'ppt'=>'application/vnd.ms-powerpoint', 'ps' =>'application/postscript', 'psd'=>'image/x-photoshop', // pas enregistre par IANA 'rpm'=>'application/x-redhat-package-manager', 'rtf'=>'application/rtf', 'sdd'=>'application/vnd.stardivision.impress', 'sdw'=>'application/vnd.stardivision.writer', 'sit'=>'application/x-stuffit', 'sxc'=>'application/vnd.sun.xml.calc', 'sxi'=>'application/vnd.sun.xml.impress', 'sxw'=>'application/vnd.sun.xml.writer', 'tex'=>'text/x-tex', 'tgz'=>'application/x-gtar', 'torrent' => 'application/x-bittorrent', 'ttf'=>'application/x-font-ttf', 'txt'=>'text/plain', 'xcf'=>'application/x-xcf', 'xls'=>'application/vnd.ms-excel', 'xml'=>'application/xml', 'zip'=>'application/zip', // open document format 'odt' => 'application/vnd.oasis.opendocument.text', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'odp' => 'application/vnd.oasis.opendocument.presentation', 'odg' => 'application/vnd.oasis.opendocument.graphics', 'odc' => 'application/vnd.oasis.opendocument.chart', 'odf' => 'application/vnd.oasis.opendocument.formula', 'odb' => 'application/vnd.oasis.opendocument.database', 'odi' => 'application/vnd.oasis.opendocument.image', 'odm' => 'application/vnd.oasis.opendocument.text-master', 'ott' => 'application/vnd.oasis.opendocument.text-template', 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 'otg' => 'application/vnd.oasis.opendocument.graphics-template', 'cls'=>'text/x-tex', 'sty'=>'text/x-tex', ); $mime_alias = array ( 'audio/x-mpeg' => 'audio/mpeg', 'application/x-ogg' => 'application/ogg', 'video/mp4' => 'application/mp4', 'video/flv' => 'video/x-flv', 'audio/3gpp' => 'video/3gpp' ); ?> vieille_base/13000/serial.php000066600000035512151453265520011644 0ustar00 "bigint(21) NOT NULL", "surtitre" => "text DEFAULT '' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "soustitre" => "text DEFAULT '' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "chapo" => "mediumtext DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "ps" => "mediumtext DEFAULT '' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "date_redac" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "visites" => "integer DEFAULT '0' NOT NULL", "referers" => "integer DEFAULT '0' NOT NULL", "popularite" => "DOUBLE DEFAULT '0' NOT NULL", "accepter_forum" => "CHAR(3) DEFAULT '' NOT NULL", "date_modif" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "id_trad" => "bigint(21) DEFAULT '0' NOT NULL", "extra" => "longtext NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "nom_site" => "tinytext DEFAULT '' NOT NULL", "url_site" => "VARCHAR(255) DEFAULT '' NOT NULL", # "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL" ); $spip_articles_key = array( "PRIMARY KEY" => "id_article", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY id_trad" => "id_trad", "KEY lang" => "lang", "KEY statut" => "statut, date", # "KEY url_propre" => "url_propre" ); $spip_articles_join = array( "id_article"=>"id_article", "id_rubrique"=>"id_rubrique"); $spip_auteurs = array( "id_auteur" => "bigint(21) NOT NULL", "nom" => "text DEFAULT '' NOT NULL", "bio" => "text DEFAULT '' NOT NULL", "email" => "tinytext DEFAULT '' NOT NULL", "nom_site" => "tinytext DEFAULT '' NOT NULL", "url_site" => "text DEFAULT '' NOT NULL", "login" => "VARCHAR(255) BINARY", "pass" => "tinytext DEFAULT '' NOT NULL", "low_sec" => "tinytext DEFAULT '' NOT NULL", "statut" => "varchar(255) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "pgp" => "TEXT DEFAULT '' NOT NULL", "htpass" => "tinytext DEFAULT '' NOT NULL", "en_ligne" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "imessage" => "VARCHAR(3)", "messagerie" => "VARCHAR(3)", "alea_actuel" => "tinytext", "alea_futur" => "tinytext", "prefs" => "tinytext", "cookie_oubli" => "tinytext", "source" => "VARCHAR(10) DEFAULT 'spip' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", # "url_propre" => "VARCHAR(255)", "extra" => "longtext NULL"); $spip_auteurs_key = array( "PRIMARY KEY" => "id_auteur", "KEY login" => "login", "KEY statut" => "statut", "KEY en_ligne" => "en_ligne", # "KEY url_propre" => "url_propre" ); $spip_auteurs_join = array( "id_auteur"=>"id_auteur", "login"=>"login"); $spip_breves = array( "id_breve" => "bigint(21) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "lien_titre" => "text DEFAULT '' NOT NULL", "lien_url" => "text DEFAULT '' NOT NULL", "statut" => "varchar(6) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "maj" => "TIMESTAMP", "extra" => "longtext NULL", # "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL" ); $spip_breves_key = array( "PRIMARY KEY" => "id_breve", "KEY id_rubrique" => "id_rubrique", # "KEY url_propre" => "url_propre" ); $spip_breves_join = array( "id_breve"=>"id_breve", "id_rubrique"=>"id_rubrique"); $spip_messages = array( "id_message" => "bigint(21) NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "type" => "varchar(6) DEFAULT '' NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "rv" => "varchar(3) DEFAULT '' NOT NULL", "statut" => "varchar(6) DEFAULT '0' NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "maj" => "TIMESTAMP"); $spip_messages_key = array( "PRIMARY KEY" => "id_message", "KEY id_auteur" => "id_auteur"); $spip_mots = array( "id_mot" => "bigint(21) NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "id_groupe" => "bigint(21) DEFAULT 0 NOT NULL", "type" => "text DEFAULT '' NOT NULL", "extra" => "longtext NULL", # "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_mots_key = array( "PRIMARY KEY" => "id_mot", # "KEY url_propre" => "url_propre" ); $spip_groupes_mots = array( "id_groupe" => "bigint(21) NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "unseul" => "varchar(3) DEFAULT '' NOT NULL", "obligatoire" => "varchar(3) DEFAULT '' NOT NULL", "tables_liees" => "text DEFAULT '' NOT NULL", # suppression des champs a faire dans la maj #"articles" => "varchar(3) DEFAULT '' NOT NULL", #"breves" => "varchar(3) DEFAULT '' NOT NULL", #"rubriques" => "varchar(3) DEFAULT '' NOT NULL", #"syndic" => "varchar(3) DEFAULT '' NOT NULL", "minirezo" => "varchar(3) DEFAULT '' NOT NULL", "comite" => "varchar(3) DEFAULT '' NOT NULL", "forum" => "varchar(3) DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_groupes_mots_key = array( "PRIMARY KEY" => "id_groupe"); $spip_rubriques = array( "id_rubrique" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "id_import" => "bigint DEFAULT '0'", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "extra" => "longtext NULL", # "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL", "statut_tmp" => "varchar(10) DEFAULT '0' NOT NULL", "date_tmp" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL" ); $spip_rubriques_key = array( "PRIMARY KEY" => "id_rubrique", "KEY lang" => "lang", "KEY id_parent" => "id_parent", # "KEY url_propre" => "url_propre" ); $spip_documents = array( "id_document" => "bigint(21) NOT NULL", "id_vignette" => "bigint(21) DEFAULT '0' NOT NULL", "extension" => "VARCHAR(10) DEFAULT '' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "fichier" => "varchar(255) DEFAULT '' NOT NULL", "taille" => "integer", "largeur" => "integer", "hauteur" => "integer", "mode" => "ENUM('vignette', 'image', 'document') DEFAULT 'document' NOT NULL", "distant" => "VARCHAR(3) DEFAULT 'non'", "maj" => "TIMESTAMP"); $spip_documents_key = array( "PRIMARY KEY" => "id_document", "KEY id_vignette" => "id_vignette", "KEY mode" => "mode", "KEY extension" => "extension"); $spip_documents_join = array( "id_document"=>"id_document", "extension"=>"extension"); $spip_types_documents = array( "extension" => "varchar(10) DEFAULT '' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "mime_type" => "varchar(100) DEFAULT '' NOT NULL", "inclus" => "ENUM('non', 'image', 'embed') NOT NULL DEFAULT 'non'", "upload" => "ENUM('oui', 'non') NOT NULL DEFAULT 'oui'", "maj" => "TIMESTAMP"); $spip_types_documents_key = array( "PRIMARY KEY" => "extension", "KEY inclus" => "inclus"); $spip_syndic = array( "id_syndic" => "bigint(21) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "nom_site" => "text DEFAULT '' NOT NULL", "url_site" => "text DEFAULT '' NOT NULL", "url_syndic" => "text DEFAULT '' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", # "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "syndication" => "VARCHAR(3) DEFAULT '' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_syndic" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_index" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "extra" => "longtext NULL", "moderation" => "VARCHAR(3) DEFAULT 'non'", "miroir" => "VARCHAR(3) DEFAULT 'non'", "oubli" => "VARCHAR(3) DEFAULT 'non'", "resume" => "VARCHAR(3) DEFAULT 'oui'" ); $spip_syndic_key = array( "PRIMARY KEY" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY statut" => "statut, date_syndic", # "KEY url_propre" => "url_propre" ); $spip_syndic_join = array( "id_syndic"=>"id_syndic", "id_rubrique"=>"id_rubrique"); $spip_syndic_articles = array( "id_syndic_article" => "bigint(21) NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "url" => "VARCHAR(255) DEFAULT '' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lesauteurs" => "text DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "url_source" => "TINYTEXT DEFAULT '' NOT NULL", "source" => "TINYTEXT DEFAULT '' NOT NULL", "tags" => "TEXT DEFAULT '' NOT NULL"); $spip_syndic_articles_key = array( "PRIMARY KEY" => "id_syndic_article", "KEY id_syndic" => "id_syndic", "KEY statut" => "statut", "KEY url" => "url"); $spip_syndic_articles_join = array( "id_syndic_article"=>"id_syndic_article", "id_syndic"=>"id_syndic"); $spip_forum = array( "id_forum" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "id_thread" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_thread" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "texte" => "mediumtext DEFAULT '' NOT NULL", "auteur" => "text DEFAULT '' NOT NULL", "email_auteur" => "text DEFAULT '' NOT NULL", "nom_site" => "text DEFAULT '' NOT NULL", "url_site" => "text DEFAULT '' NOT NULL", "statut" => "varchar(8) DEFAULT '0' NOT NULL", "ip" => "varchar(16) DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "id_auteur" => "bigint DEFAULT '0' NOT NULL", "id_message" => "bigint(21) DEFAULT '0' NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_forum_key = array( "PRIMARY KEY" => "id_forum", "KEY id_auteur" => "id_auteur", "KEY id_parent" => "id_parent", "KEY id_thread" => "id_thread", "KEY optimal" => "statut,id_parent,id_article,date_heure,id_breve,id_syndic,id_rubrique"); $spip_forum_join = array( "id_forum"=>"id_forum", "id_parent"=>"id_parent", "id_article"=>"id_article", "id_breve"=>"id_breve", "id_message"=>"id_message", "id_syndic"=>"id_syndic", "id_rubrique"=>"id_rubrique"); $spip_signatures = array( "id_signature" => "bigint(21) NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "date_time" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "nom_email" => "text DEFAULT '' NOT NULL", "ad_email" => "text DEFAULT '' NOT NULL", "nom_site" => "text DEFAULT '' NOT NULL", "url_site" => "text DEFAULT '' NOT NULL", "message" => "mediumtext DEFAULT '' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP"); $spip_signatures_key = array( "PRIMARY KEY" => "id_signature", "KEY id_article" => "id_article", "KEY statut" => "statut"); $spip_signatures_join = array( "id_signature"=>"id_signature", "id_article"=>"id_article"); /// Attention: mes_fonctions peut avoir deja defini cette variable /// il faut donc rajouter, mais pas reinitialiser $tables_principales['spip_articles'] = array('field' => &$spip_articles, 'key' => &$spip_articles_key, 'join' => &$spip_articles_join); $tables_principales['spip_auteurs'] = array('field' => &$spip_auteurs, 'key' => &$spip_auteurs_key,'join' => &$spip_auteurs_join); $tables_principales['spip_breves'] = array('field' => &$spip_breves, 'key' => &$spip_breves_key,'join' => &$spip_breves_join); $tables_principales['spip_messages'] = array('field' => &$spip_messages, 'key' => &$spip_messages_key); $tables_principales['spip_mots'] = array('field' => &$spip_mots, 'key' => &$spip_mots_key); $tables_principales['spip_groupes_mots'] = array('field' => &$spip_groupes_mots, 'key' => &$spip_groupes_mots_key); $tables_principales['spip_rubriques'] = array('field' => &$spip_rubriques, 'key' => &$spip_rubriques_key); $tables_principales['spip_documents'] = array('field' => &$spip_documents, 'key' => &$spip_documents_key, 'join' => &$spip_documents_join); $tables_principales['spip_types_documents'] = array('field' => &$spip_types_documents, 'key' => &$spip_types_documents_key); $tables_principales['spip_syndic'] = array('field' => &$spip_syndic, 'key' => &$spip_syndic_key, 'join' => &$spip_syndic_join); $tables_principales['spip_syndic_articles'] = array('field' => &$spip_syndic_articles, 'key' => &$spip_syndic_articles_key, 'join' => &$spip_syndic_articles_join); $tables_principales['spip_forum'] = array('field' => &$spip_forum, 'key' => &$spip_forum_key, 'join' => &$spip_forum_join); $tables_principales['spip_signatures'] = array('field' => &$spip_signatures, 'key' => &$spip_signatures_key, 'join' => &$spip_signatures_join); $tables_principales = pipeline('declarer_tables_principales',$tables_principales); } global $tables_principales; base_serial_13000($tables_principales); ?> vieille_base/10000/typedoc.php000066600000014533151453265520012031 0ustar00 'JPEG', 'png' => 'PNG', 'gif' =>'GIF', // Autres images (peuvent utiliser le tag ) 'bmp' => 'BMP', 'psd' => 'Photoshop', 'tif' => 'TIFF' ); // Multimedia (peuvent utiliser le tag ) $tables_sequences = array( 'aiff' => 'AIFF', 'asf' => 'Windows Media', 'avi' => 'Windows Media', 'flv' => 'Flash Video', 'mid' => 'Midi', 'mng' => 'MNG', 'mov' => 'QuickTime', 'mp3' => 'MP3', 'mpg' => 'MPEG', 'ogg' => 'Ogg', 'qt' => 'QuickTime', 'ra' => 'RealAudio', 'ram' => 'RealAudio', 'rm' => 'RealAudio', 'swf' => 'Flash', 'wav' => 'WAV', 'wmv' => 'Windows Media', 'svg' => 'Scalable Vector Graphics', 'mp4' => 'MPEG4' ); // Documents varies $tables_documents = array( 'abw' => 'Abiword', 'ai' => 'Adobe Illustrator', 'bz2' => 'BZip', 'bin' => 'Binary Data', 'blend' => 'Blender', 'c' => 'C source', 'css' => 'Cascading Style Sheet', 'deb' => 'Debian', 'doc' => 'Word', 'djvu' => 'DjVu', 'dvi' => 'LaTeX DVI', 'eps' => 'PostScript', 'gz' => 'GZ', 'h' => 'C header', 'html' => 'HTML', 'pas' => 'Pascal', 'pdf' => 'PDF', 'pgn' => 'Portable Game Notation', 'ppt' => 'PowerPoint', 'ps' => 'PostScript', 'rpm' => 'RedHat/Mandrake/SuSE', 'rtf' => 'RTF', 'sdd' => 'StarOffice', 'sdw' => 'StarOffice', 'sit' => 'Stuffit', 'sxc' => 'OpenOffice Calc', 'sxi' => 'OpenOffice Impress', 'sxw' => 'OpenOffice', 'tex' => 'LaTeX', 'tgz' => 'TGZ', 'torrent' => 'BitTorrent', 'ttf' => 'TTF Font', 'txt' => 'texte', 'xcf' => 'GIMP multi-layer', 'xls' => 'Excel', 'xml' => 'XML', 'zip' => 'Zip', // open document format 'odt' => 'opendocument text', 'ods' => 'opendocument spreadsheet', 'odp' => 'opendocument presentation', 'odg' => 'opendocument graphics', 'odc' => 'opendocument chart', 'odf' => 'opendocument formula', 'odb' => 'opendocument database', 'odi' => 'opendocument image', 'odm' => 'opendocument text-master', 'ott' => 'opendocument text-template', 'ots' => 'opendocument spreadsheet-template', 'otp' => 'opendocument presentation-template', 'otg' => 'opendocument graphics-template', ); $tables_mime = array( // Images reconnues par PHP 'jpg'=>'image/jpeg', 'png'=>'image/png', 'gif'=>'image/gif', // Autres images (peuvent utiliser le tag ) 'bmp'=>'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp 'psd'=>'image/x-photoshop', // pas IANA 'tif'=>'image/tiff', // Multimedia (peuvent utiliser le tag ) 'aiff'=>'audio/x-aiff', 'asf'=>'video/x-ms-asf', 'avi'=>'video/x-msvideo', 'flv' => 'video/x-flv', 'mid'=>'audio/midi', 'mng'=>'video/x-mng', 'mov'=>'video/quicktime', 'mp3'=>'audio/mpeg', 'mpg'=>'video/mpeg', 'ogg'=>'application/ogg', 'qt' =>'video/quicktime', 'ra' =>'audio/x-pn-realaudio', 'ram'=>'audio/x-pn-realaudio', 'rm' =>'audio/x-pn-realaudio', 'swf'=>'application/x-shockwave-flash', 'wav'=>'audio/x-wav', 'wmv'=>'video/x-ms-wmv', 'svg'=>'image/svg+xml', 'mp4' => 'application/mp4', // Documents varies 'ai' =>'application/illustrator', 'abw' =>'application/abiword', 'bin' => 'application/octet-stream', # le tout-venant 'blend' => 'application/x-blender', 'bz2'=>'application/x-bzip2', 'c' =>'text/x-csrc', 'css'=>'text/css', 'deb'=>'application/x-debian-package', 'doc'=>'application/msword', 'djvu'=>'image/vnd.djvu', 'dvi'=>'application/x-dvi', 'eps'=>'application/postscript', 'gz' =>'application/x-gzip', 'h' =>'text/x-chdr', 'html'=>'text/html', 'pas'=>'text/x-pascal', 'pdf'=>'application/pdf', 'pgn' =>'application/x-chess-pgn', 'ppt'=>'application/vnd.ms-powerpoint', 'ps' =>'application/postscript', 'rpm'=>'application/x-redhat-package-manager', 'rtf'=>'application/rtf', 'sdd'=>'application/vnd.stardivision.impress', 'sdw'=>'application/vnd.stardivision.writer', 'sit'=>'application/x-stuffit', 'sxc'=>'application/vnd.sun.xml.calc', 'sxi'=>'application/vnd.sun.xml.impress', 'sxw'=>'application/vnd.sun.xml.writer', 'tex'=>'text/x-tex', 'tgz'=>'application/x-gtar', 'torrent' => 'application/x-bittorrent', 'ttf'=>'application/x-font-ttf', 'txt'=>'text/plain', 'xcf'=>'application/x-xcf', 'xls'=>'application/vnd.ms-excel', 'xml'=>'application/xml', 'zip'=>'application/zip', // open document format 'odt' => 'application/vnd.oasis.opendocument.text', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'odp' => 'application/vnd.oasis.opendocument.presentation', 'odg' => 'application/vnd.oasis.opendocument.graphics', 'odc' => 'application/vnd.oasis.opendocument.chart', 'odf' => 'application/vnd.oasis.opendocument.formula', 'odb' => 'application/vnd.oasis.opendocument.database', 'odi' => 'application/vnd.oasis.opendocument.image', 'odm' => 'application/vnd.oasis.opendocument.text-master', 'ott' => 'application/vnd.oasis.opendocument.text-template', 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 'otg' => 'application/vnd.oasis.opendocument.graphics-template' ); $mime_alias = array ( 'audio/x-mpeg' => 'audio/mpeg', 'application/x-ogg' => 'application/ogg', 'video/mp4' => 'application/mp4', 'video/flv' => 'video/x-flv' ); ?> vieille_base/10000/serial.php000066600000035510151453265520011637 0ustar00 "bigint(21) NOT NULL", "surtitre" => "text DEFAULT '' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "soustitre" => "text DEFAULT '' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "chapo" => "mediumtext DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "ps" => "mediumtext DEFAULT '' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "date_redac" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "visites" => "integer DEFAULT '0' NOT NULL", "referers" => "integer DEFAULT '0' NOT NULL", "popularite" => "DOUBLE DEFAULT '0' NOT NULL", "accepter_forum" => "CHAR(3) DEFAULT '' NOT NULL", "date_modif" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "id_trad" => "bigint(21) DEFAULT '0' NOT NULL", "extra" => "longtext NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "nom_site" => "tinytext DEFAULT '' NOT NULL", "url_site" => "VARCHAR(255) DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL"); $spip_articles_key = array( "PRIMARY KEY" => "id_article", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY id_trad" => "id_trad", "KEY lang" => "lang", "KEY statut" => "statut, date", "KEY url_site" => "url_site", "KEY date_modif" => "date_modif", "KEY url_propre" => "url_propre"); $spip_articles_join = array( "id_article"=>"id_article", "id_rubrique"=>"id_rubrique"); $spip_auteurs = array( "id_auteur" => "bigint(21) NOT NULL", "nom" => "text DEFAULT '' NOT NULL", "bio" => "text DEFAULT '' NOT NULL", "email" => "tinytext DEFAULT '' NOT NULL", "nom_site" => "tinytext DEFAULT '' NOT NULL", "url_site" => "text DEFAULT '' NOT NULL", "login" => "VARCHAR(255) BINARY", "pass" => "tinytext DEFAULT '' NOT NULL", "low_sec" => "tinytext DEFAULT '' NOT NULL", "statut" => "varchar(255) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "pgp" => "TEXT DEFAULT '' NOT NULL", "htpass" => "tinytext DEFAULT '' NOT NULL", "en_ligne" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "imessage" => "VARCHAR(3)", "messagerie" => "VARCHAR(3)", "alea_actuel" => "tinytext", "alea_futur" => "tinytext", "prefs" => "tinytext", "cookie_oubli" => "tinytext", "source" => "VARCHAR(10) DEFAULT 'spip' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255)", "extra" => "longtext NULL"); $spip_auteurs_key = array( "PRIMARY KEY" => "id_auteur", "KEY login" => "login", "KEY statut" => "statut", "KEY lang" => "lang", "KEY en_ligne" => "en_ligne", "KEY url_propre" => "url_propre"); $spip_auteurs_join = array( "id_auteur"=>"id_auteur", "login"=>"login"); $spip_breves = array( "id_breve" => "bigint(21) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "lien_titre" => "text DEFAULT '' NOT NULL", "lien_url" => "text DEFAULT '' NOT NULL", "statut" => "varchar(6) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "maj" => "TIMESTAMP", "extra" => "longtext NULL", "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL"); $spip_breves_key = array( "PRIMARY KEY" => "id_breve", "KEY id_rubrique" => "id_rubrique", "KEY url_propre" => "url_propre"); $spip_breves_join = array( "id_breve"=>"id_breve", "id_rubrique"=>"id_rubrique"); $spip_messages = array( "id_message" => "bigint(21) NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "type" => "varchar(6) DEFAULT '' NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "rv" => "varchar(3) DEFAULT '' NOT NULL", "statut" => "varchar(6) DEFAULT '0' NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "maj" => "TIMESTAMP"); $spip_messages_key = array( "PRIMARY KEY" => "id_message", "KEY id_auteur" => "id_auteur"); $spip_mots = array( "id_mot" => "bigint(21) NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "id_groupe" => "bigint(21) NOT NULL", "type" => "text DEFAULT '' NOT NULL", "extra" => "longtext NULL", "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_mots_key = array( "PRIMARY KEY" => "id_mot", "KEY url_propre" => "url_propre"); $spip_groupes_mots = array( "id_groupe" => "bigint(21) NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "unseul" => "varchar(3) DEFAULT '' NOT NULL", "obligatoire" => "varchar(3) DEFAULT '' NOT NULL", "articles" => "varchar(3) DEFAULT '' NOT NULL", "breves" => "varchar(3) DEFAULT '' NOT NULL", "rubriques" => "varchar(3) DEFAULT '' NOT NULL", "syndic" => "varchar(3) DEFAULT '' NOT NULL", "minirezo" => "varchar(3) DEFAULT '' NOT NULL", "comite" => "varchar(3) DEFAULT '' NOT NULL", "forum" => "varchar(3) DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_groupes_mots_key = array( "PRIMARY KEY" => "id_groupe"); $spip_rubriques = array( "id_rubrique" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "texte" => "longtext DEFAULT '' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "id_import" => "bigint DEFAULT '0'", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "extra" => "longtext NULL", "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL", "statut_tmp" => "varchar(10) DEFAULT '0' NOT NULL", "date_tmp" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL" ); $spip_rubriques_key = array( "PRIMARY KEY" => "id_rubrique", "KEY lang" => "lang", "KEY id_parent" => "id_parent", "KEY url_propre" => "url_propre"); $spip_documents = array( "id_document" => "bigint(21) NOT NULL", "id_vignette" => "bigint(21) DEFAULT '0' NOT NULL", /* "id_type" => "bigint(21) DEFAULT '0' NOT NULL", */ "extension" => "VARCHAR(10) DEFAULT '' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "fichier" => "varchar(255) DEFAULT '' NOT NULL", "taille" => "integer", "largeur" => "integer", "hauteur" => "integer", "mode" => "ENUM('vignette', 'document') NOT NULL",//+distant "distant" => "VARCHAR(3) DEFAULT 'non'", "maj" => "TIMESTAMP"); $spip_documents_key = array( "PRIMARY KEY" => "id_document", "KEY id_vignette" => "id_vignette", "KEY mode" => "mode", "KEY extension" => "extension"); $spip_documents_join = array( "id_document"=>"id_document", "extension"=>"extension"); $spip_types_documents = array( /* "id_type" => "bigint(21) NOT NULL", */ "extension" => "varchar(10) DEFAULT '' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "mime_type" => "varchar(100) DEFAULT '' NOT NULL", "inclus" => "ENUM('non', 'image', 'embed') NOT NULL DEFAULT 'non'", "upload" => "ENUM('oui', 'non') NOT NULL DEFAULT 'oui'", "maj" => "TIMESTAMP"); $spip_types_documents_key = array( /* "PRIMARY KEY" => "id_type", "UNIQUE extension" => "extension", */ "PRIMARY KEY" => "extension", "KEY inclus" => "inclus"); $spip_syndic = array( "id_syndic" => "bigint(21) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "nom_site" => "text DEFAULT '' NOT NULL", "url_site" => "text DEFAULT '' NOT NULL", "url_syndic" => "text DEFAULT '' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "syndication" => "VARCHAR(3) DEFAULT '' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_syndic" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_index" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "extra" => "longtext NULL", "moderation" => "VARCHAR(3) DEFAULT 'non'", "miroir" => "VARCHAR(3) DEFAULT 'non'", "oubli" => "VARCHAR(3) DEFAULT 'non'", "resume" => "VARCHAR(3) DEFAULT 'oui'" ); $spip_syndic_key = array( "PRIMARY KEY" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY statut" => "statut, date_syndic", "KEY url_propre" => "url_propre"); $spip_syndic_join = array( "id_syndic"=>"id_syndic", "id_rubrique"=>"id_rubrique"); $spip_syndic_articles = array( "id_syndic_article" => "bigint(21) NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "url" => "VARCHAR(255) DEFAULT '' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lesauteurs" => "text DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "descriptif" => "text DEFAULT '' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "url_source" => "TINYTEXT DEFAULT '' NOT NULL", "source" => "TINYTEXT DEFAULT '' NOT NULL", "tags" => "TEXT DEFAULT '' NOT NULL"); $spip_syndic_articles_key = array( "PRIMARY KEY" => "id_syndic_article", "KEY id_syndic" => "id_syndic", "KEY statut" => "statut", "KEY url" => "url"); $spip_syndic_articles_join = array( "id_syndic_article"=>"id_syndic_article", "id_syndic"=>"id_syndic"); $spip_forum = array( "id_forum" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "id_thread" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_thread" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text DEFAULT '' NOT NULL", "texte" => "mediumtext DEFAULT '' NOT NULL", "auteur" => "text DEFAULT '' NOT NULL", "email_auteur" => "text DEFAULT '' NOT NULL", "nom_site" => "text DEFAULT '' NOT NULL", "url_site" => "text DEFAULT '' NOT NULL", "statut" => "varchar(8) DEFAULT '0' NOT NULL", "ip" => "varchar(16) DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "id_auteur" => "bigint DEFAULT '0' NOT NULL", "id_message" => "bigint(21) DEFAULT '0' NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_forum_key = array( "PRIMARY KEY" => "id_forum", "KEY id_parent" => "id_parent", "KEY id_article" => "id_article", "KEY id_breve" => "id_breve", "KEY id_message" => "id_message", "KEY id_syndic" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY statut" => "statut, date_heure", "KEY date_thread" => "date_thread"); $spip_forum_join = array( "id_forum"=>"id_forum", "id_parent"=>"id_parent", "id_article"=>"id_article", "id_breve"=>"id_breve", "id_message"=>"id_message", "id_syndic"=>"id_syndic", "id_rubrique"=>"id_rubrique"); $spip_signatures = array( "id_signature" => "bigint(21) NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "date_time" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "nom_email" => "text DEFAULT '' NOT NULL", "ad_email" => "text DEFAULT '' NOT NULL", "nom_site" => "text DEFAULT '' NOT NULL", "url_site" => "text DEFAULT '' NOT NULL", "message" => "mediumtext DEFAULT '' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP"); $spip_signatures_key = array( "PRIMARY KEY" => "id_signature", "KEY id_article" => "id_article", "KEY statut" => "statut"); $spip_signatures_join = array( "id_signature"=>"id_signature", "id_article"=>"id_article"); global $tables_principales; /// Attention: mes_fonctions peut avoir deja defini cette variable /// il faut donc rajouter, mais pas reinitialiser $tables_principales['spip_articles'] = array('field' => &$spip_articles, 'key' => &$spip_articles_key, 'join' => &$spip_articles_join); $tables_principales['spip_auteurs'] = array('field' => &$spip_auteurs, 'key' => &$spip_auteurs_key,'join' => &$spip_auteurs_join); $tables_principales['spip_breves'] = array('field' => &$spip_breves, 'key' => &$spip_breves_key,'join' => &$spip_breves_join); $tables_principales['spip_messages'] = array('field' => &$spip_messages, 'key' => &$spip_messages_key); $tables_principales['spip_mots'] = array('field' => &$spip_mots, 'key' => &$spip_mots_key); $tables_principales['spip_groupes_mots'] = array('field' => &$spip_groupes_mots, 'key' => &$spip_groupes_mots_key); $tables_principales['spip_rubriques'] = array('field' => &$spip_rubriques, 'key' => &$spip_rubriques_key); $tables_principales['spip_documents'] = array('field' => &$spip_documents, 'key' => &$spip_documents_key, 'join' => &$spip_documents_join); $tables_principales['spip_types_documents'] = array('field' => &$spip_types_documents, 'key' => &$spip_types_documents_key); $tables_principales['spip_syndic'] = array('field' => &$spip_syndic, 'key' => &$spip_syndic_key, 'join' => &$spip_syndic_join); $tables_principales['spip_syndic_articles'] = array('field' => &$spip_syndic_articles, 'key' => &$spip_syndic_articles_key, 'join' => &$spip_syndic_articles_join); $tables_principales['spip_forum'] = array('field' => &$spip_forum, 'key' => &$spip_forum_key, 'join' => &$spip_forum_join); $tables_principales['spip_signatures'] = array('field' => &$spip_signatures, 'key' => &$spip_signatures_key, 'join' => &$spip_signatures_join); ?> vieille_base/10000/auxiliaires.php000066600000021767151453265520012710 0ustar00 "bigint(21) DEFAULT '0' NOT NULL", "email_unique" => "CHAR (3) DEFAULT '' NOT NULL", "site_obli" => "CHAR (3) DEFAULT '' NOT NULL", "site_unique" => "CHAR (3) DEFAULT '' NOT NULL", "message" => "CHAR (3) DEFAULT '' NOT NULL", "texte" => "LONGTEXT DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_petitions_key = array( "PRIMARY KEY" => "id_article"); $spip_visites = array( "date" => "DATE NOT NULL", "visites" => "int UNSIGNED DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_key = array( "PRIMARY KEY" => "date"); $spip_visites_articles = array( "date" => "DATE NOT NULL", "id_article" => "int UNSIGNED NOT NULL", "visites" => "int UNSIGNED DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_articles_key = array( "PRIMARY KEY" => "date, id_article"); $spip_referers = array( "referer_md5" => "bigint UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255)", "visites" => "int UNSIGNED NOT NULL", "visites_jour" => "int UNSIGNED NOT NULL", "visites_veille"=> "int UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_key = array( "PRIMARY KEY" => "referer_md5"); $spip_referers_articles = array( "id_article" => "int UNSIGNED NOT NULL", "referer_md5" => "bigint UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) DEFAULT '' NOT NULL", "visites" => "int UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_articles_key = array( "PRIMARY KEY" => "id_article, referer_md5", "KEY referer_md5" => "referer_md5"); $spip_auteurs_articles = array( "id_auteur" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_auteurs_articles_key = array( "PRIMARY KEY" => "id_auteur, id_article", "KEY id_article" => "id_article"); $spip_auteurs_rubriques = array( "id_auteur" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_auteurs_rubriques_key = array( "PRIMARY KEY" => "id_auteur, id_rubrique", "KEY id_rubrique" => "id_rubrique"); $spip_auteurs_messages = array( "id_auteur" => "bigint(21) DEFAULT '0' NOT NULL", "id_message" => "bigint(21) DEFAULT '0' NOT NULL", "vu" => "CHAR (3)"); $spip_auteurs_messages_key = array( "PRIMARY KEY" => "id_auteur, id_message", "KEY id_message" => "id_message"); $spip_documents_articles = array( "id_document" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL"); $spip_documents_articles_key = array( "PRIMARY KEY" => "id_article, id_document", "KEY id_document" => "id_document"); $spip_documents_rubriques = array( "id_document" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL"); $spip_documents_rubriques_key = array( "PRIMARY KEY" => "id_rubrique, id_document", "KEY id_document" => "id_document"); $spip_documents_breves = array( "id_document" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL", "vu" => "ENUM('non', 'oui') DEFAULT 'non' NOT NULL"); $spip_documents_breves_key = array( "PRIMARY KEY" => "id_breve, id_document", "KEY id_document" => "id_document"); $spip_mots_articles = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_articles_key = array( "PRIMARY KEY" => "id_article, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_breves = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_breves_key = array( "PRIMARY KEY" => "id_breve, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_rubriques = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_rubriques_key = array( "PRIMARY KEY" => "id_rubrique, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_syndic = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_syndic_key = array( "PRIMARY KEY" => "id_syndic, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_forum = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_forum" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_forum_key = array( "PRIMARY KEY" => "id_forum, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_documents = array( "id_mot" => "bigint(21) DEFAULT '0' NOT NULL", "id_document" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_mots_documents_key = array( "PRIMARY KEY" => "id_document, id_mot", "KEY id_mot" => "id_mot"); $spip_meta = array( "nom" => "VARCHAR (255) NOT NULL", "valeur" => "text DEFAULT ''", "impt" => "ENUM('non', 'oui') DEFAULT 'oui' NOT NULL", "maj" => "TIMESTAMP"); $spip_meta_key = array( "PRIMARY KEY" => "nom"); $spip_versions = array ( "id_article" => "bigint(21) NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "id_auteur" => "VARCHAR(23) DEFAULT '' NOT NULL", # stocke aussi IP(v6) "titre_version" => "text DEFAULT '' NOT NULL", "permanent" => "char(3)", "champs" => "text"); $spip_versions_key = array ( "PRIMARY KEY" => "id_article, id_version", "KEY date" => "id_article, date", "KEY id_auteur" => "id_auteur"); $spip_versions_fragments = array( "id_fragment" => "int unsigned DEFAULT '0' NOT NULL", "version_min" => "int unsigned DEFAULT '0' NOT NULL", "version_max" => "int unsigned DEFAULT '0' NOT NULL", "id_article" => "bigint(21) NOT NULL", "compress" => "tinyint NOT NULL", "fragment" => "longblob" # ici c'est VRAIMENT un blob (on y stocke du gzip) ); $spip_versions_fragments_key = array( "PRIMARY KEY" => "id_article, id_fragment, version_min"); global $tables_auxiliaires; $tables_auxiliaires['spip_petitions'] = array( 'field' => &$spip_petitions, 'key' => &$spip_petitions_key ); $tables_auxiliaires['spip_visites'] = array( 'field' => &$spip_visites, 'key' => &$spip_visites_key); $tables_auxiliaires['spip_visites_articles'] = array( 'field' => &$spip_visites_articles, 'key' => &$spip_visites_articles_key); $tables_auxiliaires['spip_referers'] = array( 'field' => &$spip_referers, 'key' => &$spip_referers_key); $tables_auxiliaires['spip_referers_articles'] = array( 'field' => &$spip_referers_articles, 'key' => &$spip_referers_articles_key); $tables_auxiliaires['spip_auteurs_articles'] = array( 'field' => &$spip_auteurs_articles, 'key' => &$spip_auteurs_articles_key); $tables_auxiliaires['spip_auteurs_rubriques'] = array( 'field' => &$spip_auteurs_rubriques, 'key' => &$spip_auteurs_rubriques_key); $tables_auxiliaires['spip_auteurs_messages'] = array( 'field' => &$spip_auteurs_messages, 'key' => &$spip_auteurs_messages_key); $tables_auxiliaires['spip_documents_articles'] = array( 'field' => &$spip_documents_articles, 'key' => &$spip_documents_articles_key); $tables_auxiliaires['spip_documents_rubriques'] = array( 'field' => &$spip_documents_rubriques, 'key' => &$spip_documents_rubriques_key); $tables_auxiliaires['spip_documents_breves'] = array( 'field' => &$spip_documents_breves, 'key' => &$spip_documents_breves_key); $tables_auxiliaires['spip_mots_articles'] = array( 'field' => &$spip_mots_articles, 'key' => &$spip_mots_articles_key); $tables_auxiliaires['spip_mots_breves'] = array( 'field' => &$spip_mots_breves, 'key' => &$spip_mots_breves_key); $tables_auxiliaires['spip_mots_rubriques'] = array( 'field' => &$spip_mots_rubriques, 'key' => &$spip_mots_rubriques_key); $tables_auxiliaires['spip_mots_syndic'] = array( 'field' => &$spip_mots_syndic, 'key' => &$spip_mots_syndic_key); $tables_auxiliaires['spip_mots_forum'] = array( 'field' => &$spip_mots_forum, 'key' => &$spip_mots_forum_key); $tables_auxiliaires['spip_mots_documents'] = array( 'field' => &$spip_mots_documents, 'key' => &$spip_mots_documents_key); $tables_auxiliaires['spip_meta'] = array( 'field' => &$spip_meta, 'key' => &$spip_meta_key); $tables_auxiliaires['spip_versions'] = array( 'field' => &$spip_versions, 'key' => &$spip_versions_key); $tables_auxiliaires['spip_versions_fragments'] = array( 'field' => &$spip_versions_fragments, 'key' => &$spip_versions_fragments_key); ?> vieille_base/10000/create.php000066600000005216151453265520011623 0ustar00 $v) $fcreate($k, $v['field'], $v['key'], true); foreach($tables_auxiliaires as $k => $v) $fcreate($k, $v['field'], $v['key'], false); // Init ou Re-init ==> replace pas insert $desc = $tables_principales['spip_types_documents']; foreach($tables_images as $k => $v) { $freplace('spip_types_documents', array('extension' => $k, 'inclus' => 'image', 'titre' => $v), $desc); } foreach($tables_sequences as $k => $v) $freplace('spip_types_documents', array('extension' => $k, 'titre' => $v, 'inclus'=> 'embed'), $desc); foreach($tables_documents as $k => $v) $freplace('spip_types_documents', array('extension' => $k, 'titre' => $v, 'inclus' => 'non'), $desc); foreach ($tables_mime as $extension => $type_mime) $freplace('spip_types_documents', array("mime_type" => $type_mime, "extension" => $extension), $desc); } // http://doc.spip.org/@stripslashes_base /* function stripslashes_base($table, $champs) { $modifs = ''; reset($champs); while (list(, $champ) = each($champs)) { $modifs[] = $champ . '=REPLACE(REPLACE(' .$champ. ',"\\\\\'", "\'"), \'\\\\"\', \'"\')'; } spip_query("UPDATE $table SET ".join(',', $modifs)); }*/ ?> vieille_base/1915/create.php000066600000004222151453265520011556 0ustar00 $v) spip_create_vieille_table($k, $v['field'], $v['key'], true); foreach($tables_auxiliaires as $k => $v) spip_create_vieille_table($k, $v['field'], $v['key'], false); foreach($tables_images as $k => $v) spip_query("INSERT IGNORE INTO spip_types_documents (extension, inclus, titre, id_type) VALUES ('$k', 'image', '" . (is_numeric($v) ? (strtoupper($k) . "', $v") : "$v', 0") . ")"); foreach($tables_sequences as $k => $v) spip_query("INSERT IGNORE INTO spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'embed')"); foreach($tables_documents as $k => $v) spip_query("INSERT IGNORE INTO spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'non')"); foreach ($tables_mime as $extension => $type_mime) spip_query("UPDATE spip_types_documents SET mime_type='$type_mime' WHERE extension='$extension'"); } ?> vieille_base/1915/typedoc.php000066600000014222151453265520011763 0ustar00 1, 'png' => 2, 'gif' => 3, // Autres images (peuvent utiliser le tag ) 'bmp' => 'BMP', 'psd' => 'Photoshop', 'tif' => 'TIFF' ); // Multimedia (peuvent utiliser le tag ) $tables_sequences = array( 'aiff' => 'AIFF', 'asf' => 'Windows Media', 'avi' => 'Windows Media', 'flv' => 'Flash Video', 'mid' => 'Midi', 'mng' => 'MNG', 'mov' => 'QuickTime', 'mp3' => 'MP3', 'mpg' => 'MPEG', 'ogg' => 'Ogg', 'qt' => 'QuickTime', 'ra' => 'RealAudio', 'ram' => 'RealAudio', 'rm' => 'RealAudio', 'swf' => 'Flash', 'wav' => 'WAV', 'wmv' => 'Windows Media', 'svg' => 'Scalable Vector Graphics' ); // Documents varies $tables_documents = array( 'abw' => 'Abiword', 'ai' => 'Adobe Illustrator', 'bz2' => 'BZip', 'bin' => 'Binary Data', 'blend' => 'Blender', 'c' => 'C source', 'css' => 'Cascading Style Sheet', 'deb' => 'Debian', 'doc' => 'Word', 'djvu' => 'DjVu', 'dvi' => 'LaTeX DVI', 'eps' => 'PostScript', 'gz' => 'GZ', 'h' => 'C header', 'html' => 'HTML', 'pas' => 'Pascal', 'pdf' => 'PDF', 'pgn' => 'Portable Game Notation', 'ppt' => 'PowerPoint', 'ps' => 'PostScript', 'rpm' => 'RedHat/Mandrake/SuSE', 'rtf' => 'RTF', 'sdd' => 'StarOffice', 'sdw' => 'StarOffice', 'sit' => 'Stuffit', 'sxc' => 'OpenOffice Calc', 'sxi' => 'OpenOffice Impress', 'sxw' => 'OpenOffice', 'tex' => 'LaTeX', 'tgz' => 'TGZ', 'torrent' => 'BitTorrent', 'ttf' => 'TTF Font', 'txt' => 'texte', 'xcf' => 'GIMP multi-layer', 'xls' => 'Excel', 'xml' => 'XML', 'zip' => 'Zip', // open document format 'odt' => 'opendocument text', 'ods' => 'opendocument spreadsheet', 'odp' => 'opendocument presentation', 'odg' => 'opendocument graphics', 'odc' => 'opendocument chart', 'odf' => 'opendocument formula', 'odb' => 'opendocument database', 'odi' => 'opendocument image', 'odm' => 'opendocument text-master', 'ott' => 'opendocument text-template', 'ots' => 'opendocument spreadsheet-template', 'otp' => 'opendocument presentation-template', 'otg' => 'opendocument graphics-template' ); $tables_mime = array( // Images reconnues par PHP 'jpg'=>'image/jpeg', 'png'=>'image/png', 'gif'=>'image/gif', // Autres images (peuvent utiliser le tag ) 'bmp'=>'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp 'psd'=>'image/x-photoshop', // pas IANA 'tif'=>'image/tiff', // Multimedia (peuvent utiliser le tag ) 'aiff'=>'audio/x-aiff', 'asf'=>'video/x-ms-asf', 'avi'=>'video/x-msvideo', 'flv' => 'video/x-flv', 'mid'=>'audio/midi', 'mng'=>'video/x-mng', 'mov'=>'video/quicktime', 'mp3'=>'audio/mpeg', 'mpg'=>'video/mpeg', 'ogg'=>'application/ogg', 'qt' =>'video/quicktime', 'ra' =>'audio/x-pn-realaudio', 'ram'=>'audio/x-pn-realaudio', 'rm' =>'audio/x-pn-realaudio', 'swf'=>'application/x-shockwave-flash', 'wav'=>'audio/x-wav', 'wmv'=>'video/x-ms-wmv', 'svg'=>'image/svg+xml', // Documents varies 'ai' =>'application/illustrator', 'abw' =>'application/abiword', 'bin' => 'application/octet-stream', # le tout-venant 'blend' => 'application/x-blender', 'bz2'=>'application/x-bzip2', 'c' =>'text/x-csrc', 'css'=>'text/css', 'deb'=>'application/x-debian-package', 'doc'=>'application/msword', 'djvu'=>'image/vnd.djvu', 'dvi'=>'application/x-dvi', 'eps'=>'application/postscript', 'gz' =>'application/x-gzip', 'h' =>'text/x-chdr', 'html'=>'text/html', 'pas'=>'text/x-pascal', 'pdf'=>'application/pdf', 'pgn' =>'application/x-chess-pgn', 'ppt'=>'application/vnd.ms-powerpoint', 'ps' =>'application/postscript', 'rpm'=>'application/x-redhat-package-manager', 'rtf'=>'application/rtf', 'sdd'=>'application/vnd.stardivision.impress', 'sdw'=>'application/vnd.stardivision.writer', 'sit'=>'application/x-stuffit', 'sxc'=>'application/vnd.sun.xml.calc', 'sxi'=>'application/vnd.sun.xml.impress', 'sxw'=>'application/vnd.sun.xml.writer', 'tex'=>'text/x-tex', 'tgz'=>'application/x-gtar', 'torrent' => 'application/x-bittorrent', 'ttf'=>'application/x-font-ttf', 'txt'=>'text/plain', 'xcf'=>'application/x-xcf', 'xls'=>'application/vnd.ms-excel', 'xml'=>'application/xml', 'zip'=>'application/zip', // open document format 'odt' => 'application/vnd.oasis.opendocument.text', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'odp' => 'application/vnd.oasis.opendocument.presentation', 'odg' => 'application/vnd.oasis.opendocument.graphics', 'odc' => 'application/vnd.oasis.opendocument.chart', 'odf' => 'application/vnd.oasis.opendocument.formula', 'odb' => 'application/vnd.oasis.opendocument.database', 'odi' => 'application/vnd.oasis.opendocument.image', 'odm' => 'application/vnd.oasis.opendocument.text-master', 'ott' => 'application/vnd.oasis.opendocument.text-template', 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 'otg' => 'application/vnd.oasis.opendocument.graphics-template' ); ?> vieille_base/1915/auxiliaires.php000066600000030367151453265520012643 0ustar00 "BIGINT (21) DEFAULT '0' NOT NULL", "email_unique" => "CHAR (3) NOT NULL", "site_obli" => "CHAR (3) NOT NULL", "site_unique" => "CHAR (3) NOT NULL", "message" => "CHAR (3) NOT NULL", "texte" => "LONGBLOB NOT NULL", "maj" => "TIMESTAMP"); $spip_petitions_key = array( "PRIMARY KEY" => "id_article"); $spip_visites = array( "date" => "DATE NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_key = array( "PRIMARY KEY" => "date"); $spip_visites_articles = array( "date" => "DATE NOT NULL", "id_article" => "INT UNSIGNED NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_articles_key = array( "PRIMARY KEY" => "date, id_article"); $spip_referers = array( "referer_md5" => "BIGINT UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "visites_jour" => "INT UNSIGNED NOT NULL", "visites_veille"=> "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_key = array( "PRIMARY KEY" => "referer_md5"); $spip_referers_articles = array( "id_article" => "INT UNSIGNED NOT NULL", "referer_md5" => "BIGINT UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_articles_key = array( "PRIMARY KEY" => "id_article, referer_md5", "KEY referer_md5" => "referer_md5"); $spip_auteurs_articles = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_auteurs_articles_key = array( "PRIMARY KEY" => "id_auteur, id_article", "KEY id_article" => "id_article"); $spip_auteurs_rubriques = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_auteurs_rubriques_key = array( "PRIMARY KEY" => "id_auteur, id_rubrique", "KEY id_rubrique" => "id_rubrique"); $spip_auteurs_messages = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_message" => "BIGINT (21) DEFAULT '0' NOT NULL", "vu" => "CHAR (3) NOT NULL"); $spip_auteurs_messages_key = array( "PRIMARY KEY" => "id_auteur, id_message", "KEY id_message" => "id_message"); $spip_documents_articles = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_articles_key = array( "KEY id_document" => "id_document", "KEY id_article" => "id_article"); $spip_documents_rubriques = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_rubriques_key = array( "KEY id_document" => "id_document", "KEY id_rubrique" => "id_rubrique"); $spip_documents_breves = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_breve" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_breves_key = array( "KEY id_document" => "id_document", "KEY id_breve" => "id_breve"); $spip_mots_articles = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_articles_key = array( "PRIMARY KEY" => "id_article, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_breves = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_breve" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_breves_key = array( "PRIMARY KEY" => "id_breve, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_rubriques = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_rubriques_key = array( "PRIMARY KEY" => "id_rubrique, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_syndic = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_syndic" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_syndic_key = array( "PRIMARY KEY" => "id_syndic, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_forum = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_forum" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_forum_key = array( "PRIMARY KEY" => "id_forum, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_documents = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_documents_key = array( "PRIMARY KEY" => "id_document, id_mot", "KEY id_mot" => "id_mot"); $spip_meta = array( "nom" => "VARCHAR (255) NOT NULL", "valeur" => "text DEFAULT ''", "maj" => "TIMESTAMP"); $spip_meta_key = array( "PRIMARY KEY" => "nom"); $spip_index = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_objet" => "INT UNSIGNED NOT NULL", "id_table" => "TINYINT UNSIGNED NOT NULL" ); $spip_index_key = array( "KEY `hash`" => "`hash`", "KEY id_objet" => "id_objet", "KEY id_table" => "id_table"); $spip_index_dico = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "dico" => "VARCHAR (30) NOT NULL"); $spip_index_dico_key = array( "PRIMARY KEY" => "dico"); $spip_versions = array ( "id_article" => "bigint(21) NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "titre_version" => "text DEFAULT '' NOT NULL", "permanent" => "char(3) NOT NULL", "champs" => "text NOT NULL"); $spip_versions_key = array ( "PRIMARY KEY" => "id_article, id_version", "KEY date" => "id_article, date", "KEY id_auteur" => "id_auteur"); $spip_versions_fragments = array( "id_fragment" => "int unsigned DEFAULT '0' NOT NULL", "version_min" => "int unsigned DEFAULT '0' NOT NULL", "version_max" => "int unsigned DEFAULT '0' NOT NULL", "id_article" => "bigint(21) NOT NULL", "compress" => "tinyint NOT NULL", "fragment" => "longblob NOT NULL"); $spip_versions_fragments_key = array( "PRIMARY KEY" => "id_article, id_fragment, version_min"); $spip_caches = array( "fichier" => "char (64) NOT NULL", "id" => "char (64) NOT NULL", // i=par id, t=timer, x=suppression "type" => "CHAR (1) DEFAULT 'i' NOT NULL", "taille" => "integer DEFAULT '0' NOT NULL"); $spip_caches_key = array( "PRIMARY KEY" => "fichier, id", "KEY fichier" => "fichier", "KEY id" => "id"); $spip_ortho_cache = array( "lang" => "VARCHAR(10) NOT NULL", "mot" => "VARCHAR(255) BINARY NOT NULL", "ok" => "TINYINT NOT NULL", "suggest" => "BLOB NOT NULL", "maj" => "TIMESTAMP"); $spip_ortho_cache_key = array( "PRIMARY KEY" => "lang, mot", "KEY maj" => "maj"); $spip_ortho_dico = array( "lang" => "VARCHAR(10) NOT NULL", "mot" => "VARCHAR(255) BINARY NOT NULL", "id_auteur" => "BIGINT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_ortho_dico_key = array( "PRIMARY KEY" => "lang, mot"); global $tables_auxiliaires; $tables_auxiliaires['spip_petitions'] = array( 'field' => &$spip_petitions, 'key' => &$spip_petitions_key ); $tables_auxiliaires['spip_visites'] = array( 'field' => &$spip_visites, 'key' => &$spip_visites_key); $tables_auxiliaires['spip_visites_articles'] = array( 'field' => &$spip_visites_articles, 'key' => &$spip_visites_articles_key); $tables_auxiliaires['spip_referers'] = array( 'field' => &$spip_referers, 'key' => &$spip_referers_key); $tables_auxiliaires['spip_referers_articles'] = array( 'field' => &$spip_referers_articles, 'key' => &$spip_referers_articles_key); $tables_auxiliaires['spip_auteurs_articles'] = array( 'field' => &$spip_auteurs_articles, 'key' => &$spip_auteurs_articles_key); $tables_auxiliaires['spip_auteurs_rubriques'] = array( 'field' => &$spip_auteurs_rubriques, 'key' => &$spip_auteurs_rubriques_key); $tables_auxiliaires['spip_auteurs_messages'] = array( 'field' => &$spip_auteurs_messages, 'key' => &$spip_auteurs_messages_key); $tables_auxiliaires['spip_documents_articles'] = array( 'field' => &$spip_documents_articles, 'key' => &$spip_documents_articles_key); $tables_auxiliaires['spip_documents_rubriques'] = array( 'field' => &$spip_documents_rubriques, 'key' => &$spip_documents_rubriques_key); $tables_auxiliaires['spip_documents_breves'] = array( 'field' => &$spip_documents_breves, 'key' => &$spip_documents_breves_key); $tables_auxiliaires['spip_mots_articles'] = array( 'field' => &$spip_mots_articles, 'key' => &$spip_mots_articles_key); $tables_auxiliaires['spip_mots_breves'] = array( 'field' => &$spip_mots_breves, 'key' => &$spip_mots_breves_key); $tables_auxiliaires['spip_mots_rubriques'] = array( 'field' => &$spip_mots_rubriques, 'key' => &$spip_mots_rubriques_key); $tables_auxiliaires['spip_mots_syndic'] = array( 'field' => &$spip_mots_syndic, 'key' => &$spip_mots_syndic_key); $tables_auxiliaires['spip_mots_forum'] = array( 'field' => &$spip_mots_forum, 'key' => &$spip_mots_forum_key); $tables_auxiliaires['spip_mots_documents'] = array( 'field' => &$spip_mots_documents, 'key' => &$spip_mots_documents_key); $tables_auxiliaires['spip_meta'] = array( 'field' => &$spip_meta, 'key' => &$spip_meta_key); $tables_auxiliaires['spip_index'] = array( 'field' => &$spip_index, 'key' => &$spip_index_key); $tables_auxiliaires['spip_index_dico'] = array( 'field' => &$spip_index_dico, 'key' => &$spip_index_dico_key); $tables_auxiliaires['spip_versions'] = array( 'field' => &$spip_versions, 'key' => &$spip_versions_key); $tables_auxiliaires['spip_versions_fragments'] = array( 'field' => &$spip_versions_fragments, 'key' => &$spip_versions_fragments_key); $tables_auxiliaires['spip_caches'] = array( 'field' => &$spip_caches, 'key' => &$spip_caches_key); $tables_auxiliaires['spip_ortho_cache'] = array( 'field' => &$spip_ortho_cache, 'key' => &$spip_ortho_cache_key); $tables_auxiliaires['spip_ortho_dico'] = array( 'field' => &$spip_ortho_dico, 'key' => &$spip_ortho_dico_key); // // tableau des tables de jointures // Ex: gestion du critere {id_mot} dans la boucle(ARTICLES) global $tables_jointures; $tables_jointures['spip_articles'][]= 'mots_articles'; $tables_jointures['spip_articles'][]= 'auteurs_articles'; $tables_jointures['spip_articles'][]= 'documents_articles'; $tables_jointures['spip_articles'][]= 'mots'; $tables_jointures['spip_articles'][]= 'signatures'; $tables_jointures['spip_auteurs'][]= 'auteurs_articles'; $tables_jointures['spip_auteurs'][]= 'mots'; $tables_jointures['spip_breves'][]= 'mots_breves'; $tables_jointures['spip_breves'][]= 'documents_breves'; $tables_jointures['spip_breves'][]= 'mots'; $tables_jointures['spip_documents'][]= 'documents_articles'; $tables_jointures['spip_documents'][]= 'documents_rubriques'; $tables_jointures['spip_documents'][]= 'documents_breves'; $tables_jointures['spip_documents'][]= 'mots_documents'; $tables_jointures['spip_documents'][]= 'types_documents'; $tables_jointures['spip_documents'][]= 'mots'; $tables_jointures['spip_forum'][]= 'mots_forum'; $tables_jointures['spip_forum'][]= 'mots'; $tables_jointures['spip_rubriques'][]= 'mots_rubriques'; $tables_jointures['spip_rubriques'][]= 'documents_rubriques'; $tables_jointures['spip_rubriques'][]= 'mots'; $tables_jointures['spip_syndic'][]= 'mots_syndic'; $tables_jointures['spip_syndic'][]= 'mots'; $tables_jointures['spip_syndic_articles'][]= 'syndic'; $tables_jointures['spip_syndic_articles'][]= 'mots'; $tables_jointures['spip_mots'][]= 'mots_articles'; $tables_jointures['spip_mots'][]= 'mots_breves'; $tables_jointures['spip_mots'][]= 'mots_forum'; $tables_jointures['spip_mots'][]= 'mots_rubriques'; $tables_jointures['spip_mots'][]= 'mots_syndic'; $tables_jointures['spip_mots'][]= 'mots_documents'; $tables_jointures['spip_groupes_mots'][]= 'mots'; ?> vieille_base/1915/serial.php000066600000033646151453265520011606 0ustar00 "bigint(21) NOT NULL", "surtitre" => "text NOT NULL", "titre" => "text NOT NULL", "soustitre" => "text NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "descriptif" => "text NOT NULL", "chapo" => "mediumtext NOT NULL", "texte" => "longblob NOT NULL", "ps" => "mediumtext NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "date_redac" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "visites" => "INTEGER DEFAULT '0' NOT NULL", "referers" => "INTEGER DEFAULT '0' NOT NULL", "popularite" => "DOUBLE DEFAULT '0' NOT NULL", "accepter_forum" => "CHAR(3) NOT NULL", "date_modif" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "id_trad" => "bigint(21) DEFAULT '0' NOT NULL", "extra" => "longblob NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "nom_site" => "tinytext NOT NULL", "url_site" => "VARCHAR(255) NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL"); $spip_articles_key = array( "PRIMARY KEY" => "id_article", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY id_trad" => "id_trad", "KEY lang" => "lang", "KEY statut" => "statut, date", "KEY url_site" => "url_site", "KEY date_modif" => "date_modif", "KEY idx" => "idx", "KEY url_propre" => "url_propre"); $spip_auteurs = array( "id_auteur" => "bigint(21) NOT NULL", "nom" => "text NOT NULL", "bio" => "text NOT NULL", "email" => "tinytext NOT NULL", "nom_site" => "tinytext NOT NULL", "url_site" => "text NOT NULL", "login" => "VARCHAR(255) BINARY NOT NULL", "pass" => "tinytext NOT NULL", "low_sec" => "tinytext NOT NULL", "statut" => "VARCHAR(255) NOT NULL", "maj" => "TIMESTAMP", "pgp" => "BLOB NOT NULL", "htpass" => "tinyblob NOT NULL", "en_ligne" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "imessage" => "VARCHAR(3) NOT NULL", "messagerie" => "VARCHAR(3) NOT NULL", "alea_actuel" => "tinytext NOT NULL", "alea_futur" => "tinytext NOT NULL", "prefs" => "tinytext NOT NULL", "cookie_oubli" => "tinytext NOT NULL", "source" => "VARCHAR(10) DEFAULT 'spip' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "extra" => "longblob NULL"); $spip_auteurs_key = array( "PRIMARY KEY" => "id_auteur", "KEY login" => "login", "KEY statut" => "statut", "KEY lang" => "lang", "KEY idx" => "idx", "KEY en_ligne" => "en_ligne", "KEY url_propre" => "url_propre"); $spip_breves = array( "id_breve" => "bigint(21) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "texte" => "longblob NOT NULL", "lien_titre" => "text NOT NULL", "lien_url" => "text NOT NULL", "statut" => "varchar(6) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "maj" => "TIMESTAMP", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL", "url_propre" => "VARCHAR(255) NOT NULL"); $spip_breves_key = array( "PRIMARY KEY" => "id_breve", "KEY idx" => "idx", "KEY id_rubrique" => "id_rubrique", "KEY url_propre" => "url_propre"); $spip_messages = array( "id_message" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "texte" => "longblob NOT NULL", "type" => "varchar(6) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "rv" => "varchar(3) NOT NULL", "statut" => "varchar(6) NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "maj" => "TIMESTAMP"); $spip_messages_key = array( "PRIMARY KEY" => "id_message", "KEY id_auteur" => "id_auteur"); $spip_mots = array( "id_mot" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "id_groupe" => "bigint(21) NOT NULL", "type" => "text NOT NULL", "extra" => "longblob NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "maj" => "TIMESTAMP"); $spip_mots_key = array( "PRIMARY KEY" => "id_mot", "KEY idx" => "idx", "KEY url_propre" => "url_propre"); $spip_groupes_mots = array( "id_groupe" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "unseul" => "varchar(3) NOT NULL", "obligatoire" => "varchar(3) NOT NULL", "articles" => "varchar(3) NOT NULL", "breves" => "varchar(3) NOT NULL", "rubriques" => "varchar(3) NOT NULL", "syndic" => "varchar(3) NOT NULL", "minirezo" => "varchar(3) NOT NULL", "comite" => "varchar(3) NOT NULL", "forum" => "varchar(3) NOT NULL", "maj" => "TIMESTAMP"); $spip_groupes_mots_key = array( "PRIMARY KEY" => "id_groupe"); $spip_rubriques = array( "id_rubrique" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "id_import" => "BIGINT DEFAULT '0'", "statut" => "VARCHAR(10) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL", "url_propre" => "VARCHAR(255) NOT NULL", "statut_tmp" => "VARCHAR(10) NOT NULL", "date_tmp" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL" ); $spip_rubriques_key = array( "PRIMARY KEY" => "id_rubrique", "KEY lang" => "lang", "KEY idx" => "idx", "KEY id_parent" => "id_parent", "KEY url_propre" => "url_propre"); $spip_documents = array( "id_document" => "bigint(21) NOT NULL", "id_vignette" => "bigint(21) DEFAULT '0' NOT NULL", "id_type" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "descriptif" => "text NOT NULL", "fichier" => "varchar(255) NOT NULL", "taille" => "integer NOT NULL", "largeur" => "integer NOT NULL", "hauteur" => "integer NOT NULL", "mode" => "ENUM('vignette', 'document') NOT NULL", "inclus" => "VARCHAR(3) DEFAULT 'non'", "distant" => "VARCHAR(3) DEFAULT 'non'", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_documents_key = array( "PRIMARY KEY" => "id_document", "KEY id_vignette" => "id_vignette", "KEY mode" => "mode", "KEY id_type" => "id_type"); $spip_types_documents = array( "id_type" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "extension" => "varchar(10) NOT NULL", "mime_type" => "varchar(100) NOT NULL", "inclus" => "ENUM('non', 'image', 'embed') NOT NULL DEFAULT 'non'", "upload" => "ENUM('oui', 'non') NOT NULL DEFAULT 'oui'", "maj" => "TIMESTAMP"); $spip_types_documents_key = array( "PRIMARY KEY" => "id_type", "UNIQUE extension" => "extension", "KEY inclus" => "inclus"); $spip_syndic = array( "id_syndic" => "bigint(21) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "nom_site" => "blob NOT NULL", "url_site" => "blob NOT NULL", "url_syndic" => "blob NOT NULL", "descriptif" => "blob NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "syndication" => "VARCHAR(3) NOT NULL", "statut" => "VARCHAR(10) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_syndic" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_index" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "extra" => "longblob NULL", "moderation" => "VARCHAR(3) DEFAULT 'non'", "miroir" => "VARCHAR(3) DEFAULT 'non'", "oubli" => "VARCHAR(3) DEFAULT 'non'", "resume" => "VARCHAR(3) DEFAULT 'oui'" ); $spip_syndic_key = array( "PRIMARY KEY" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY idx" => "idx", "KEY statut" => "statut, date_syndic", "KEY url_propre" => "url_propre"); $spip_syndic_articles = array( "id_syndic_article" => "bigint(21) NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "url" => "VARCHAR(255) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lesauteurs" => "text NOT NULL", "maj" => "TIMESTAMP", "statut" => "VARCHAR(10) NOT NULL", "descriptif" => "blob NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "url_source" => "TINYTEXT DEFAULT '' NOT NULL", "source" => "TINYTEXT DEFAULT '' NOT NULL", "tags" => "TEXT DEFAULT '' NOT NULL"); $spip_syndic_articles_key = array( "PRIMARY KEY" => "id_syndic_article", "KEY id_syndic" => "id_syndic", "KEY statut" => "statut", "KEY url" => "url"); $spip_forum = array( "id_forum" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "id_thread" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "texte" => "mediumtext NOT NULL", "auteur" => "text NOT NULL", "email_auteur" => "text NOT NULL", "nom_site" => "text NOT NULL", "url_site" => "text NOT NULL", "statut" => "varchar(8) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "ip" => "varchar(16)", "maj" => "TIMESTAMP", "id_auteur" => "BIGINT DEFAULT '0' NOT NULL", "id_message" => "bigint(21) DEFAULT '0' NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_forum_key = array( "PRIMARY KEY" => "id_forum", "KEY id_parent" => "id_parent", "KEY id_rubrique" => "id_rubrique", "KEY id_article" => "id_article", "KEY id_breve" => "id_breve", "KEY id_message" => "id_message", "KEY id_syndic" => "id_syndic", "KEY idx" => "idx", "KEY statut" => "statut, date_heure"); $spip_signatures = array( "id_signature" => "bigint(21) NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "date_time" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "nom_email" => "text NOT NULL", "ad_email" => "text NOT NULL", "nom_site" => "text NOT NULL", "url_site" => "text NOT NULL", "message" => "mediumtext NOT NULL", "statut" => "varchar(10) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_signatures_key = array( "PRIMARY KEY" => "id_signature", "KEY id_article" => "id_article", "KEY idx" => "idx", "KEY statut" => "statut"); $spip_ajax_fonc = array( "id_ajax_fonc" => "bigint(21) NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "variables" => "text NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "`hash`" => "BIGINT UNSIGNED NOT NULL" ); $spip_ajax_fonc_key = array( "PRIMARY KEY" => "id_ajax_fonc", "KEY `hash`" => "`hash`"); global $tables_principales; /// Attention: mes_fonctions peut avoir deja defini cette variable /// il faut donc rajouter, mais pas reinitialiser $tables_principales['spip_articles'] = array('field' => &$spip_articles, 'key' => &$spip_articles_key); $tables_principales['spip_auteurs'] = array('field' => &$spip_auteurs, 'key' => &$spip_auteurs_key); $tables_principales['spip_breves'] = array('field' => &$spip_breves, 'key' => &$spip_breves_key); $tables_principales['spip_messages'] = array('field' => &$spip_messages, 'key' => &$spip_messages_key); $tables_principales['spip_mots'] = array('field' => &$spip_mots, 'key' => &$spip_mots_key); $tables_principales['spip_groupes_mots'] = array('field' => &$spip_groupes_mots, 'key' => &$spip_groupes_mots_key); $tables_principales['spip_rubriques'] = array('field' => &$spip_rubriques, 'key' => &$spip_rubriques_key); $tables_principales['spip_documents'] = array('field' => &$spip_documents, 'key' => &$spip_documents_key); $tables_principales['spip_types_documents'] = array('field' => &$spip_types_documents, 'key' => &$spip_types_documents_key); $tables_principales['spip_syndic'] = array('field' => &$spip_syndic, 'key' => &$spip_syndic_key); $tables_principales['spip_syndic_articles'] = array('field' => &$spip_syndic_articles, 'key' => &$spip_syndic_articles_key); $tables_principales['spip_forum'] = array('field' => &$spip_forum, 'key' => &$spip_forum_key); $tables_principales['spip_signatures'] = array('field' => &$spip_signatures, 'key' => &$spip_signatures_key); $tables_principales['spip_ajax_fonc'] = array('field' => &$spip_ajax_fonc, 'key' => &$spip_ajax_fonc_key); ?> vieille_base/1927/auxiliaires.php000066600000030550151453265520012640 0ustar00 "BIGINT (21) DEFAULT '0' NOT NULL", "email_unique" => "CHAR (3) NOT NULL", "site_obli" => "CHAR (3) NOT NULL", "site_unique" => "CHAR (3) NOT NULL", "message" => "CHAR (3) NOT NULL", "texte" => "LONGBLOB NOT NULL", "maj" => "TIMESTAMP"); $spip_petitions_key = array( "PRIMARY KEY" => "id_article"); $spip_visites = array( "date" => "DATE NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_key = array( "PRIMARY KEY" => "date"); $spip_visites_articles = array( "date" => "DATE NOT NULL", "id_article" => "INT UNSIGNED NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_visites_articles_key = array( "PRIMARY KEY" => "date, id_article"); $spip_referers = array( "referer_md5" => "BIGINT UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "visites_jour" => "INT UNSIGNED NOT NULL", "visites_veille"=> "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_key = array( "PRIMARY KEY" => "referer_md5"); $spip_referers_articles = array( "id_article" => "INT UNSIGNED NOT NULL", "referer_md5" => "BIGINT UNSIGNED NOT NULL", "date" => "DATE NOT NULL", "referer" => "VARCHAR (255) NOT NULL", "visites" => "INT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_referers_articles_key = array( "PRIMARY KEY" => "id_article, referer_md5", "KEY referer_md5" => "referer_md5"); $spip_auteurs_articles = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_auteurs_articles_key = array( "PRIMARY KEY" => "id_auteur, id_article", "KEY id_article" => "id_article"); $spip_auteurs_rubriques = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_auteurs_rubriques_key = array( "PRIMARY KEY" => "id_auteur, id_rubrique", "KEY id_rubrique" => "id_rubrique"); $spip_auteurs_messages = array( "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_message" => "BIGINT (21) DEFAULT '0' NOT NULL", "vu" => "CHAR (3) NOT NULL"); $spip_auteurs_messages_key = array( "PRIMARY KEY" => "id_auteur, id_message", "KEY id_message" => "id_message"); $spip_documents_articles = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_articles_key = array( "PRIMARY KEY" => "id_article, id_document", "KEY id_document" => "id_document"); $spip_documents_rubriques = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_rubriques_key = array( "PRIMARY KEY" => "id_rubrique, id_document", "KEY id_document" => "id_document"); $spip_documents_breves = array( "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_breve" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_documents_breves_key = array( "PRIMARY KEY" => "id_breve, id_document", "KEY id_document" => "id_document"); $spip_mots_articles = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_articles_key = array( "PRIMARY KEY" => "id_article, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_breves = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_breve" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_breves_key = array( "PRIMARY KEY" => "id_breve, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_rubriques = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_rubrique" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_rubriques_key = array( "PRIMARY KEY" => "id_rubrique, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_syndic = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_syndic" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_syndic_key = array( "PRIMARY KEY" => "id_syndic, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_forum = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_forum" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_forum_key = array( "PRIMARY KEY" => "id_forum, id_mot", "KEY id_mot" => "id_mot"); $spip_mots_documents = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_document" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_documents_key = array( "PRIMARY KEY" => "id_document, id_mot", "KEY id_mot" => "id_mot"); $spip_meta = array( "nom" => "VARCHAR (255) NOT NULL", "valeur" => "text DEFAULT ''", "impt" => "ENUM('non', 'oui') DEFAULT 'oui' NOT NULL", "maj" => "TIMESTAMP"); $spip_meta_key = array( "PRIMARY KEY" => "nom"); $spip_index = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "points" => "INT UNSIGNED DEFAULT '0' NOT NULL", "id_objet" => "INT UNSIGNED NOT NULL", "id_table" => "TINYINT UNSIGNED NOT NULL" ); $spip_index_key = array( "KEY `hash`" => "`hash`", "KEY id_objet" => "id_objet", "KEY id_table" => "id_table"); $spip_index_dico = array( "`hash`" => "BIGINT UNSIGNED NOT NULL", "dico" => "VARCHAR (30) NOT NULL"); $spip_index_dico_key = array( "PRIMARY KEY" => "dico"); $spip_versions = array ( "id_article" => "bigint(21) NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "id_auteur" => "VARCHAR(23) NOT NULL", # stocke aussi IP(v6) "titre_version" => "text DEFAULT '' NOT NULL", "permanent" => "char(3) NOT NULL", "champs" => "text NOT NULL"); $spip_versions_key = array ( "PRIMARY KEY" => "id_article, id_version", "KEY date" => "id_article, date", "KEY id_auteur" => "id_auteur"); $spip_versions_fragments = array( "id_fragment" => "int unsigned DEFAULT '0' NOT NULL", "version_min" => "int unsigned DEFAULT '0' NOT NULL", "version_max" => "int unsigned DEFAULT '0' NOT NULL", "id_article" => "bigint(21) NOT NULL", "compress" => "tinyint NOT NULL", "fragment" => "longblob NOT NULL"); $spip_versions_fragments_key = array( "PRIMARY KEY" => "id_article, id_fragment, version_min"); $spip_caches = array( "fichier" => "char (64) NOT NULL", "id" => "char (64) NOT NULL", // i=par id, t=timer, x=suppression "type" => "CHAR (1) DEFAULT 'i' NOT NULL", "taille" => "integer DEFAULT '0' NOT NULL"); $spip_caches_key = array( "PRIMARY KEY" => "fichier, id", "KEY fichier" => "fichier", "KEY id" => "id"); $spip_ortho_cache = array( "lang" => "VARCHAR(10) NOT NULL", "mot" => "VARCHAR(255) BINARY NOT NULL", "ok" => "TINYINT NOT NULL", "suggest" => "BLOB NOT NULL", "maj" => "TIMESTAMP"); $spip_ortho_cache_key = array( "PRIMARY KEY" => "lang, mot", "KEY maj" => "maj"); $spip_ortho_dico = array( "lang" => "VARCHAR(10) NOT NULL", "mot" => "VARCHAR(255) BINARY NOT NULL", "id_auteur" => "BIGINT UNSIGNED NOT NULL", "maj" => "TIMESTAMP"); $spip_ortho_dico_key = array( "PRIMARY KEY" => "lang, mot"); global $tables_auxiliaires; $tables_auxiliaires['spip_petitions'] = array( 'field' => &$spip_petitions, 'key' => &$spip_petitions_key ); $tables_auxiliaires['spip_visites'] = array( 'field' => &$spip_visites, 'key' => &$spip_visites_key); $tables_auxiliaires['spip_visites_articles'] = array( 'field' => &$spip_visites_articles, 'key' => &$spip_visites_articles_key); $tables_auxiliaires['spip_referers'] = array( 'field' => &$spip_referers, 'key' => &$spip_referers_key); $tables_auxiliaires['spip_referers_articles'] = array( 'field' => &$spip_referers_articles, 'key' => &$spip_referers_articles_key); $tables_auxiliaires['spip_auteurs_articles'] = array( 'field' => &$spip_auteurs_articles, 'key' => &$spip_auteurs_articles_key); $tables_auxiliaires['spip_auteurs_rubriques'] = array( 'field' => &$spip_auteurs_rubriques, 'key' => &$spip_auteurs_rubriques_key); $tables_auxiliaires['spip_auteurs_messages'] = array( 'field' => &$spip_auteurs_messages, 'key' => &$spip_auteurs_messages_key); $tables_auxiliaires['spip_documents_articles'] = array( 'field' => &$spip_documents_articles, 'key' => &$spip_documents_articles_key); $tables_auxiliaires['spip_documents_rubriques'] = array( 'field' => &$spip_documents_rubriques, 'key' => &$spip_documents_rubriques_key); $tables_auxiliaires['spip_documents_breves'] = array( 'field' => &$spip_documents_breves, 'key' => &$spip_documents_breves_key); $tables_auxiliaires['spip_mots_articles'] = array( 'field' => &$spip_mots_articles, 'key' => &$spip_mots_articles_key); $tables_auxiliaires['spip_mots_breves'] = array( 'field' => &$spip_mots_breves, 'key' => &$spip_mots_breves_key); $tables_auxiliaires['spip_mots_rubriques'] = array( 'field' => &$spip_mots_rubriques, 'key' => &$spip_mots_rubriques_key); $tables_auxiliaires['spip_mots_syndic'] = array( 'field' => &$spip_mots_syndic, 'key' => &$spip_mots_syndic_key); $tables_auxiliaires['spip_mots_forum'] = array( 'field' => &$spip_mots_forum, 'key' => &$spip_mots_forum_key); $tables_auxiliaires['spip_mots_documents'] = array( 'field' => &$spip_mots_documents, 'key' => &$spip_mots_documents_key); $tables_auxiliaires['spip_meta'] = array( 'field' => &$spip_meta, 'key' => &$spip_meta_key); $tables_auxiliaires['spip_index'] = array( 'field' => &$spip_index, 'key' => &$spip_index_key); $tables_auxiliaires['spip_index_dico'] = array( 'field' => &$spip_index_dico, 'key' => &$spip_index_dico_key); $tables_auxiliaires['spip_versions'] = array( 'field' => &$spip_versions, 'key' => &$spip_versions_key); $tables_auxiliaires['spip_versions_fragments'] = array( 'field' => &$spip_versions_fragments, 'key' => &$spip_versions_fragments_key); $tables_auxiliaires['spip_caches'] = array( 'field' => &$spip_caches, 'key' => &$spip_caches_key); $tables_auxiliaires['spip_ortho_cache'] = array( 'field' => &$spip_ortho_cache, 'key' => &$spip_ortho_cache_key); $tables_auxiliaires['spip_ortho_dico'] = array( 'field' => &$spip_ortho_dico, 'key' => &$spip_ortho_dico_key); // // tableau des tables de jointures // Ex: gestion du critere {id_mot} dans la boucle(ARTICLES) global $tables_jointures; $tables_jointures['spip_articles'][]= 'mots_articles'; $tables_jointures['spip_articles'][]= 'auteurs_articles'; $tables_jointures['spip_articles'][]= 'documents_articles'; $tables_jointures['spip_articles'][]= 'mots'; $tables_jointures['spip_articles'][]= 'signatures'; $tables_jointures['spip_auteurs'][]= 'auteurs_articles'; $tables_jointures['spip_auteurs'][]= 'mots'; $tables_jointures['spip_breves'][]= 'mots_breves'; $tables_jointures['spip_breves'][]= 'documents_breves'; $tables_jointures['spip_breves'][]= 'mots'; $tables_jointures['spip_documents'][]= 'documents_articles'; $tables_jointures['spip_documents'][]= 'documents_rubriques'; $tables_jointures['spip_documents'][]= 'documents_breves'; $tables_jointures['spip_documents'][]= 'mots_documents'; $tables_jointures['spip_documents'][]= 'types_documents'; $tables_jointures['spip_documents'][]= 'mots'; $tables_jointures['spip_forum'][]= 'mots_forum'; $tables_jointures['spip_forum'][]= 'mots'; $tables_jointures['spip_rubriques'][]= 'mots_rubriques'; $tables_jointures['spip_rubriques'][]= 'documents_rubriques'; $tables_jointures['spip_rubriques'][]= 'mots'; $tables_jointures['spip_syndic'][]= 'mots_syndic'; $tables_jointures['spip_syndic'][]= 'mots'; $tables_jointures['spip_syndic_articles'][]= 'syndic'; $tables_jointures['spip_syndic_articles'][]= 'mots'; $tables_jointures['spip_mots'][]= 'mots_articles'; $tables_jointures['spip_mots'][]= 'mots_breves'; $tables_jointures['spip_mots'][]= 'mots_forum'; $tables_jointures['spip_mots'][]= 'mots_rubriques'; $tables_jointures['spip_mots'][]= 'mots_syndic'; $tables_jointures['spip_mots'][]= 'mots_documents'; $tables_jointures['spip_groupes_mots'][]= 'mots'; ?> vieille_base/1927/typedoc.php000066600000015060151453265520011767 0ustar00 1, 'png' => 2, 'gif' => 3, // Autres images (peuvent utiliser le tag ) 'bmp' => 'BMP', 'tif' => 'TIFF' ); // Multimedia (peuvent utiliser le tag ) $tables_sequences = array( 'aiff' => 'AIFF', 'asf' => 'Windows Media', 'avi' => 'AVI', 'flv' => 'Flash Video', 'mid' => 'Midi', 'mng' => 'MNG', 'mka' => 'Matroska Audio', 'mkv' => 'Matroska Video', 'mov' => 'QuickTime', 'mp3' => 'MP3', 'mp4' => 'MPEG4', 'mpg' => 'MPEG', 'ogg' => 'Ogg', 'qt' => 'QuickTime', 'ra' => 'RealAudio', 'ram' => 'RealAudio', 'rm' => 'RealAudio', 'svg' => 'Scalable Vector Graphics', 'swf' => 'Flash', 'wav' => 'WAV', 'wmv' => 'Windows Media' ); // Documents varies $tables_documents = array( 'abw' => 'Abiword', 'ai' => 'Adobe Illustrator', 'bz2' => 'BZip', 'bin' => 'Binary Data', 'blend' => 'Blender', 'c' => 'C source', 'css' => 'Cascading Style Sheet', 'csv' => 'Comma Separated Values', 'deb' => 'Debian', 'doc' => 'Word', 'djvu' => 'DjVu', 'dvi' => 'LaTeX DVI', 'eps' => 'PostScript', 'gz' => 'GZ', 'h' => 'C header', 'html' => 'HTML', 'kml' => 'Keyhole Markup Language', 'kmz' => 'Google Earth Placemark File', 'pas' => 'Pascal', 'pdf' => 'PDF', 'pgn' => 'Portable Game Notation', 'ppt' => 'PowerPoint', 'ps' => 'PostScript', 'psd' => 'Photoshop', 'rpm' => 'RedHat/Mandrake/SuSE', 'rtf' => 'RTF', 'sdd' => 'StarOffice', 'sdw' => 'StarOffice', 'sit' => 'Stuffit', 'sxc' => 'OpenOffice Calc', 'sxi' => 'OpenOffice Impress', 'sxw' => 'OpenOffice', 'tex' => 'LaTeX', 'tgz' => 'TGZ', 'torrent' => 'BitTorrent', 'ttf' => 'TTF Font', 'txt' => 'texte', 'xcf' => 'GIMP multi-layer', 'xls' => 'Excel', 'xml' => 'XML', 'zip' => 'Zip', // open document format 'odt' => 'opendocument text', 'ods' => 'opendocument spreadsheet', 'odp' => 'opendocument presentation', 'odg' => 'opendocument graphics', 'odc' => 'opendocument chart', 'odf' => 'opendocument formula', 'odb' => 'opendocument database', 'odi' => 'opendocument image', 'odm' => 'opendocument text-master', 'ott' => 'opendocument text-template', 'ots' => 'opendocument spreadsheet-template', 'otp' => 'opendocument presentation-template', 'otg' => 'opendocument graphics-template', ); $tables_mime = array( // Images reconnues par PHP 'jpg'=>'image/jpeg', 'png'=>'image/png', 'gif'=>'image/gif', // Autres images (peuvent utiliser le tag ) 'bmp'=>'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp 'tif'=>'image/tiff', // Multimedia (peuvent utiliser le tag ) 'aiff'=>'audio/x-aiff', 'asf'=>'video/x-ms-asf', 'avi'=>'video/x-msvideo', 'flv' => 'video/x-flv', 'mid'=>'audio/midi', 'mka' => 'audio/mka', 'mkv' => 'video/mkv', 'mng'=>'video/x-mng', 'mov'=>'video/quicktime', 'mp3'=>'audio/mpeg', 'mp4' => 'application/mp4', 'mpg'=>'video/mpeg', 'ogg'=>'application/ogg', 'qt' =>'video/quicktime', 'ra' =>'audio/x-pn-realaudio', 'ram'=>'audio/x-pn-realaudio', 'rm' =>'audio/x-pn-realaudio', 'svg'=>'image/svg+xml', 'swf'=>'application/x-shockwave-flash', 'wav'=>'audio/x-wav', 'wmv'=>'video/x-ms-wmv', // Documents varies 'ai' =>'application/illustrator', 'abw' =>'application/abiword', 'bin' => 'application/octet-stream', # le tout-venant 'blend' => 'application/x-blender', 'bz2'=>'application/x-bzip2', 'c' =>'text/x-csrc', 'css'=>'text/css', 'csv'=>'text/csv', 'deb'=>'application/x-debian-package', 'doc'=>'application/msword', 'djvu'=>'image/vnd.djvu', 'dvi'=>'application/x-dvi', 'eps'=>'application/postscript', 'gz' =>'application/x-gzip', 'h' =>'text/x-chdr', 'html'=>'text/html', 'kml'=>'application/vnd.google-earth.kml+xml', 'kmz'=>'application/vnd.google-earth.kmz', 'pas'=>'text/x-pascal', 'pdf'=>'application/pdf', 'pgn' =>'application/x-chess-pgn', 'ppt'=>'application/vnd.ms-powerpoint', 'ps' =>'application/postscript', 'psd'=>'image/x-photoshop', // pas enregistre par IANA 'rpm'=>'application/x-redhat-package-manager', 'rtf'=>'application/rtf', 'sdd'=>'application/vnd.stardivision.impress', 'sdw'=>'application/vnd.stardivision.writer', 'sit'=>'application/x-stuffit', 'sxc'=>'application/vnd.sun.xml.calc', 'sxi'=>'application/vnd.sun.xml.impress', 'sxw'=>'application/vnd.sun.xml.writer', 'tex'=>'text/x-tex', 'tgz'=>'application/x-gtar', 'torrent' => 'application/x-bittorrent', 'ttf'=>'application/x-font-ttf', 'txt'=>'text/plain', 'xcf'=>'application/x-xcf', 'xls'=>'application/vnd.ms-excel', 'xml'=>'application/xml', 'zip'=>'application/zip', // open document format 'odt' => 'application/vnd.oasis.opendocument.text', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'odp' => 'application/vnd.oasis.opendocument.presentation', 'odg' => 'application/vnd.oasis.opendocument.graphics', 'odc' => 'application/vnd.oasis.opendocument.chart', 'odf' => 'application/vnd.oasis.opendocument.formula', 'odb' => 'application/vnd.oasis.opendocument.database', 'odi' => 'application/vnd.oasis.opendocument.image', 'odm' => 'application/vnd.oasis.opendocument.text-master', 'ott' => 'application/vnd.oasis.opendocument.text-template', 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 'otg' => 'application/vnd.oasis.opendocument.graphics-template' ); ?> vieille_base/1927/serial.php000066600000032666151453265520011612 0ustar00 "bigint(21) NOT NULL", "surtitre" => "text NOT NULL", "titre" => "text NOT NULL", "soustitre" => "text NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "descriptif" => "text NOT NULL", "chapo" => "mediumtext NOT NULL", "texte" => "longblob NOT NULL", "ps" => "mediumtext NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "date_redac" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "visites" => "INTEGER DEFAULT '0' NOT NULL", "referers" => "INTEGER DEFAULT '0' NOT NULL", "popularite" => "DOUBLE DEFAULT '0' NOT NULL", "accepter_forum" => "CHAR(3) NOT NULL", "date_modif" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "id_trad" => "bigint(21) DEFAULT '0' NOT NULL", "extra" => "longblob NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "id_version" => "int unsigned DEFAULT '0' NOT NULL", "nom_site" => "tinytext NOT NULL", "url_site" => "VARCHAR(255) NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL"); $spip_articles_key = array( "PRIMARY KEY" => "id_article", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY id_trad" => "id_trad", "KEY lang" => "lang", "KEY statut" => "statut, date", "KEY url_site" => "url_site", "KEY date_modif" => "date_modif", "KEY idx" => "idx", "KEY url_propre" => "url_propre"); $spip_auteurs = array( "id_auteur" => "bigint(21) NOT NULL", "nom" => "text NOT NULL", "bio" => "text NOT NULL", "email" => "tinytext NOT NULL", "nom_site" => "tinytext NOT NULL", "url_site" => "text NOT NULL", "login" => "VARCHAR(255) BINARY NOT NULL", "pass" => "tinytext NOT NULL", "low_sec" => "tinytext NOT NULL", "statut" => "VARCHAR(255) NOT NULL", "maj" => "TIMESTAMP", "pgp" => "BLOB NOT NULL", "htpass" => "tinyblob NOT NULL", "en_ligne" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "imessage" => "VARCHAR(3) NOT NULL", "messagerie" => "VARCHAR(3) NOT NULL", "alea_actuel" => "tinytext NOT NULL", "alea_futur" => "tinytext NOT NULL", "prefs" => "tinytext NOT NULL", "cookie_oubli" => "tinytext NOT NULL", "source" => "VARCHAR(10) DEFAULT 'spip' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "extra" => "longblob NULL"); $spip_auteurs_key = array( "PRIMARY KEY" => "id_auteur", "KEY login" => "login", "KEY statut" => "statut", "KEY lang" => "lang", "KEY idx" => "idx", "KEY en_ligne" => "en_ligne", "KEY url_propre" => "url_propre"); $spip_breves = array( "id_breve" => "bigint(21) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "texte" => "longblob NOT NULL", "lien_titre" => "text NOT NULL", "lien_url" => "text NOT NULL", "statut" => "varchar(6) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "maj" => "TIMESTAMP", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL", "url_propre" => "VARCHAR(255) NOT NULL"); $spip_breves_key = array( "PRIMARY KEY" => "id_breve", "KEY idx" => "idx", "KEY id_rubrique" => "id_rubrique", "KEY url_propre" => "url_propre"); $spip_messages = array( "id_message" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "texte" => "longblob NOT NULL", "type" => "varchar(6) NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "rv" => "varchar(3) NOT NULL", "statut" => "varchar(6) NOT NULL", "id_auteur" => "bigint(21) NOT NULL", "maj" => "TIMESTAMP"); $spip_messages_key = array( "PRIMARY KEY" => "id_message", "KEY id_auteur" => "id_auteur"); $spip_mots = array( "id_mot" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "id_groupe" => "bigint(21) NOT NULL", "type" => "text NOT NULL", "extra" => "longblob NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "maj" => "TIMESTAMP"); $spip_mots_key = array( "PRIMARY KEY" => "id_mot", "KEY idx" => "idx", "KEY url_propre" => "url_propre"); $spip_groupes_mots = array( "id_groupe" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "unseul" => "varchar(3) NOT NULL", "obligatoire" => "varchar(3) NOT NULL", "articles" => "varchar(3) NOT NULL", "breves" => "varchar(3) NOT NULL", "rubriques" => "varchar(3) NOT NULL", "syndic" => "varchar(3) NOT NULL", "minirezo" => "varchar(3) NOT NULL", "comite" => "varchar(3) NOT NULL", "forum" => "varchar(3) NOT NULL", "maj" => "TIMESTAMP"); $spip_groupes_mots_key = array( "PRIMARY KEY" => "id_groupe"); $spip_rubriques = array( "id_rubrique" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "texte" => "longblob NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "maj" => "TIMESTAMP", "export" => "VARCHAR(10) DEFAULT 'oui'", "id_import" => "BIGINT DEFAULT '0'", "statut" => "VARCHAR(10) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "langue_choisie" => "VARCHAR(3) DEFAULT 'non'", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "extra" => "longblob NULL", "url_propre" => "VARCHAR(255) NOT NULL", "statut_tmp" => "VARCHAR(10) NOT NULL", "date_tmp" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL" ); $spip_rubriques_key = array( "PRIMARY KEY" => "id_rubrique", "KEY lang" => "lang", "KEY idx" => "idx", "KEY id_parent" => "id_parent", "KEY url_propre" => "url_propre"); $spip_documents = array( "id_document" => "bigint(21) NOT NULL", "id_vignette" => "bigint(21) DEFAULT '0' NOT NULL", "id_type" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "descriptif" => "text NOT NULL", "fichier" => "varchar(255) NOT NULL", "taille" => "integer NOT NULL", "largeur" => "integer NOT NULL", "hauteur" => "integer NOT NULL", "mode" => "ENUM('vignette', 'document') NOT NULL", "distant" => "VARCHAR(3) DEFAULT 'non'", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_documents_key = array( "PRIMARY KEY" => "id_document", "KEY id_vignette" => "id_vignette", "KEY mode" => "mode", "KEY id_type" => "id_type"); $spip_types_documents = array( "id_type" => "bigint(21) NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "extension" => "varchar(10) NOT NULL", "mime_type" => "varchar(100) NOT NULL", "inclus" => "ENUM('non', 'image', 'embed') NOT NULL DEFAULT 'non'", "upload" => "ENUM('oui', 'non') NOT NULL DEFAULT 'oui'", "maj" => "TIMESTAMP"); $spip_types_documents_key = array( "PRIMARY KEY" => "id_type", "UNIQUE extension" => "extension", "KEY inclus" => "inclus"); $spip_syndic = array( "id_syndic" => "bigint(21) NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", "nom_site" => "blob NOT NULL", "url_site" => "blob NOT NULL", "url_syndic" => "blob NOT NULL", "descriptif" => "blob NOT NULL", "url_propre" => "VARCHAR(255) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP", "syndication" => "VARCHAR(3) NOT NULL", "statut" => "VARCHAR(10) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_syndic" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_index" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "extra" => "longblob NULL", "moderation" => "VARCHAR(3) DEFAULT 'non'", "miroir" => "VARCHAR(3) DEFAULT 'non'", "oubli" => "VARCHAR(3) DEFAULT 'non'", "resume" => "VARCHAR(3) DEFAULT 'oui'" ); $spip_syndic_key = array( "PRIMARY KEY" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY idx" => "idx", "KEY statut" => "statut, date_syndic", "KEY url_propre" => "url_propre"); $spip_syndic_articles = array( "id_syndic_article" => "bigint(21) NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL", "titre" => "text NOT NULL", "url" => "VARCHAR(255) NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "lesauteurs" => "text NOT NULL", "maj" => "TIMESTAMP", "statut" => "VARCHAR(10) NOT NULL", "descriptif" => "blob NOT NULL", "lang" => "VARCHAR(10) DEFAULT '' NOT NULL", "url_source" => "TINYTEXT DEFAULT '' NOT NULL", "source" => "TINYTEXT DEFAULT '' NOT NULL", "tags" => "TEXT DEFAULT '' NOT NULL"); $spip_syndic_articles_key = array( "PRIMARY KEY" => "id_syndic_article", "KEY id_syndic" => "id_syndic", "KEY statut" => "statut", "KEY url" => "url"); $spip_forum = array( "id_forum" => "bigint(21) NOT NULL", "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "id_thread" => "bigint(21) DEFAULT '0' NOT NULL", "id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "id_breve" => "bigint(21) DEFAULT '0' NOT NULL", "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "texte" => "mediumtext NOT NULL", "auteur" => "text NOT NULL", "email_auteur" => "text NOT NULL", "nom_site" => "text NOT NULL", "url_site" => "text NOT NULL", "statut" => "varchar(8) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "ip" => "varchar(16)", "maj" => "TIMESTAMP", "id_auteur" => "BIGINT DEFAULT '0' NOT NULL", "id_message" => "bigint(21) DEFAULT '0' NOT NULL", "id_syndic" => "bigint(21) DEFAULT '0' NOT NULL"); $spip_forum_key = array( "PRIMARY KEY" => "id_forum", "KEY id_parent" => "id_parent", "KEY id_article" => "id_article", "KEY id_breve" => "id_breve", "KEY id_message" => "id_message", "KEY id_syndic" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY idx" => "idx", "KEY statut" => "statut, date_heure"); $spip_signatures = array( "id_signature" => "bigint(21) NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "date_time" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "nom_email" => "text NOT NULL", "ad_email" => "text NOT NULL", "nom_site" => "text NOT NULL", "url_site" => "text NOT NULL", "message" => "mediumtext NOT NULL", "statut" => "varchar(10) NOT NULL", "idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP"); $spip_signatures_key = array( "PRIMARY KEY" => "id_signature", "KEY id_article" => "id_article", "KEY idx" => "idx", "KEY statut" => "statut"); global $tables_principales; /// Attention: mes_fonctions peut avoir deja defini cette variable /// il faut donc rajouter, mais pas reinitialiser $tables_principales['spip_articles'] = array('field' => &$spip_articles, 'key' => &$spip_articles_key); $tables_principales['spip_auteurs'] = array('field' => &$spip_auteurs, 'key' => &$spip_auteurs_key); $tables_principales['spip_breves'] = array('field' => &$spip_breves, 'key' => &$spip_breves_key); $tables_principales['spip_messages'] = array('field' => &$spip_messages, 'key' => &$spip_messages_key); $tables_principales['spip_mots'] = array('field' => &$spip_mots, 'key' => &$spip_mots_key); $tables_principales['spip_groupes_mots'] = array('field' => &$spip_groupes_mots, 'key' => &$spip_groupes_mots_key); $tables_principales['spip_rubriques'] = array('field' => &$spip_rubriques, 'key' => &$spip_rubriques_key); $tables_principales['spip_documents'] = array('field' => &$spip_documents, 'key' => &$spip_documents_key); $tables_principales['spip_types_documents'] = array('field' => &$spip_types_documents, 'key' => &$spip_types_documents_key); $tables_principales['spip_syndic'] = array('field' => &$spip_syndic, 'key' => &$spip_syndic_key); $tables_principales['spip_syndic_articles'] = array('field' => &$spip_syndic_articles, 'key' => &$spip_syndic_articles_key); $tables_principales['spip_forum'] = array('field' => &$spip_forum, 'key' => &$spip_forum_key); $tables_principales['spip_signatures'] = array('field' => &$spip_signatures, 'key' => &$spip_signatures_key); ?> vieille_base/1927/create.php000066600000004261151453265520011564 0ustar00 $v) spip_create_vieille_table($k, $v['field'], $v['key'], true); foreach($tables_auxiliaires as $k => $v) spip_create_vieille_table($k, $v['field'], $v['key'], false); foreach($tables_images as $k => $v) sql_query("INSERT IGNORE INTO spip_types_documents (extension, inclus, titre, id_type) VALUES ('$k', 'image', '" . (is_numeric($v) ? (strtoupper($k) . "', $v") : "$v', 0") . ")"); foreach($tables_sequences as $k => $v) sql_query("INSERT IGNORE INTO spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'embed')"); foreach($tables_documents as $k => $v) sql_query("INSERT IGNORE INTO spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'non')"); foreach ($tables_mime as $extension => $type_mime) sql_query("UPDATE spip_types_documents SET mime_type='$type_mime' WHERE extension='$extension'"); } ?> v014.php000066600000033165151453265520005773 0ustar00 0"); $types = array('jpg' => 1, 'png' => 2, 'gif' => 3); while ($row = @sql_fetch($result)) { $id_article = $row['id_article']; $images = $row['images']; $images = explode(",", $images); reset($images); $replace = '_orig_'; foreach ($images as $val) { $image = explode("|", $val); $fichier = $image[0]; $largeur = $image[1]; $hauteur = $image[2]; preg_match(",-([0-9]+)\.(gif|jpg|png)$,i", $fichier, $match); $id_type = intval($types[$match[2]]); $num_img = $match[1]; $fichier = _DIR_IMG . $fichier; $taille = @filesize($fichier); // ici on n'a pas les fonctions absctract ! $s = spip_query("INSERT INTO spip_documents (titre, id_type, fichier, mode, largeur, hauteur, taille) VALUES ('image $largeur x $hauteur', $id_type, '$fichier', 'vignette', '$largeur', '$hauteur', '$taille')"); $id_document = mysql_insert_id($s); if ($id_document > 0) { spip_query("INSERT INTO spip_documents_articles (id_document, id_article) VALUES ($id_document, $id_article)"); $replace = "REPLACE($replace, ' $fichier, 'id_article' => $id_article)); exit; } } $replace = "REPLACE($replace, ' non, prio (priori), pos (posteriori), abo (abonnement) $accepter_forum = substr($GLOBALS['meta']["forums_publics"],0,3) ; $result = spip_query("ALTER TABLE spip_articles CHANGE accepter_forum accepter_forum CHAR(3) NOT NULL"); $result = spip_query("UPDATE spip_articles SET accepter_forum='$accepter_forum' WHERE accepter_forum != 'non'"); maj_version (1.414); } /* if ($version_installee == 1.415) { spip_query("ALTER TABLE spip_documents DROP inclus"); maj_version (1.415); } */ if (upgrade_vers(1.417, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_syndic_articles DROP date_index"); maj_version (1.417); } if (upgrade_vers(1.418, $version_installee, $version_cible)) { $result = spip_query("SELECT * FROM spip_auteurs WHERE statut = '0minirezo' AND email != '' ORDER BY id_auteur LIMIT 1"); if ($webmaster = sql_fetch($result)) { ecrire_meta('email_webmaster', $webmaster['email']); } maj_version (1.418); } if (upgrade_vers(1.419, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_auteurs ADD alea_actuel TINYTEXT DEFAULT ''"); spip_query("ALTER TABLE spip_auteurs ADD alea_futur TINYTEXT DEFAULT ''"); spip_query("UPDATE spip_auteurs SET alea_futur = FLOOR(32000*RAND())"); maj_version (1.419); } if (upgrade_vers(1.420, $version_installee, $version_cible)) { spip_query("UPDATE spip_auteurs SET alea_actuel='' WHERE statut='nouveau'"); maj_version (1.420); } if (upgrade_vers(1.421, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_articles ADD auteur_modif bigint(21) DEFAULT '0' NOT NULL"); spip_query("ALTER TABLE spip_articles ADD date_modif datetime DEFAULT '0000-00-00 00:00:00' NOT NULL"); maj_version (1.421); } if (upgrade_vers(1.432, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_articles DROP referers"); spip_query("ALTER TABLE spip_articles ADD referers INTEGER DEFAULT '0' NOT NULL"); spip_query("ALTER TABLE spip_articles ADD popularite INTEGER DEFAULT '0' NOT NULL"); maj_version (1.432); } if (upgrade_vers(1.436, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_documents ADD date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL"); maj_version (1.436); } if (upgrade_vers(1.437, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_visites ADD maj TIMESTAMP"); spip_query("ALTER TABLE spip_visites_referers ADD maj TIMESTAMP"); maj_version (1.437); } if (upgrade_vers(1.438, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_articles ADD INDEX id_secteur (id_secteur)"); spip_query("ALTER TABLE spip_articles ADD INDEX statut (statut, date)"); maj_version (1.438); } if (upgrade_vers(1.439, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_syndic ADD INDEX statut (statut, date_syndic)"); spip_query("ALTER TABLE spip_syndic_articles ADD INDEX statut (statut)"); spip_query("ALTER TABLE spip_syndic_articles CHANGE url url VARCHAR(255) NOT NULL"); spip_query("ALTER TABLE spip_syndic_articles ADD INDEX url (url)"); maj_version (1.439); } if (upgrade_vers(1.440, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_visites_temp CHANGE ip ip INTEGER UNSIGNED NOT NULL"); maj_version (1.440); } if (upgrade_vers(1.441, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_visites_temp CHANGE date date DATE NOT NULL"); spip_query("ALTER TABLE spip_visites CHANGE date date DATE NOT NULL"); spip_query("ALTER TABLE spip_visites_referers CHANGE date date DATE NOT NULL"); maj_version (1.441); } if (upgrade_vers(1.442, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_auteurs ADD prefs TINYTEXT NOT NULL"); maj_version (1.442); } if (upgrade_vers(1.443, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_auteurs CHANGE login login VARCHAR(255) BINARY NOT NULL"); spip_query("ALTER TABLE spip_auteurs CHANGE statut statut VARCHAR(255) NOT NULL"); spip_query("ALTER TABLE spip_auteurs ADD INDEX login (login)"); spip_query("ALTER TABLE spip_auteurs ADD INDEX statut (statut)"); maj_version (1.443); } if (upgrade_vers(1.444, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_syndic ADD moderation VARCHAR(3) NOT NULL"); maj_version (1.444); } if (upgrade_vers(1.457, $version_installee, $version_cible)) { spip_query("DROP TABLE spip_visites"); spip_query("DROP TABLE spip_visites_temp"); spip_query("DROP TABLE spip_visites_referers"); creer_base(); // crade, a ameliorer :-(( maj_version (1.457); } if (upgrade_vers(1.458, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_auteurs ADD cookie_oubli TINYTEXT NOT NULL"); maj_version (1.458); } if (upgrade_vers(1.459, $version_installee, $version_cible)) { $result = spip_query("SELECT type FROM spip_mots GROUP BY type"); while ($row = sql_fetch($result)) { $type = addslashes($row['type']); $res = spip_query("SELECT * FROM spip_groupes_mots WHERE titre='$type'"); if (sql_count($res) == 0) { $s = spip_query("INSERT INTO spip_groupes_mots (titre, unseul, obligatoire, articles, breves, rubriques, syndic, minirezo, comite, forum) VALUES ('$type', 'non', 'non', 'oui', 'oui', 'non', 'oui', 'oui', 'oui', 'non')"); if ($id_groupe = mysql_insert_id($s)) spip_query("UPDATE spip_mots SET id_groupe = '$id_groupe' WHERE type='$type'"); } } spip_query("UPDATE spip_articles SET popularite=0"); maj_version (1.459); } if (upgrade_vers(1.460, $version_installee, $version_cible)) { // remettre les mots dans les groupes dupliques par erreur // dans la precedente version du paragraphe de maj 1.459 // et supprimer ceux-ci $result = spip_query("SELECT * FROM spip_groupes_mots ORDER BY id_groupe"); while ($row = sql_fetch($result)) { $titre = addslashes($row['titre']); if (! $vu[$titre] ) { $vu[$titre] = true; $id_groupe = $row['id_groupe']; spip_query("UPDATE spip_mots SET id_groupe=$id_groupe WHERE type='$titre'"); sql_delete("spip_groupes_mots", "titre='$titre' AND id_groupe<>$id_groupe"); } } maj_version (1.460); } if (upgrade_vers(1.462, $version_installee, $version_cible)) { spip_query("UPDATE spip_types_documents SET inclus='embed' WHERE inclus!='non' AND extension IN ('aiff', 'asf', 'avi', 'mid', 'mov', 'mp3', 'mpg', 'ogg', 'qt', 'ra', 'ram', 'rm', 'swf', 'wav', 'wmv')"); maj_version (1.462); } if (upgrade_vers(1.463, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_articles CHANGE popularite popularite DOUBLE"); spip_query("ALTER TABLE spip_visites_temp ADD maj TIMESTAMP"); spip_query("ALTER TABLE spip_referers_temp ADD maj TIMESTAMP"); maj_version (1.463); } // l'upgrade < 1.462 ci-dessus etait fausse, d'ou correctif if (upgrade_vers(1.464, $version_installee, $version_cible) AND ($version_installee >= 1.462)) { $res = spip_query("SELECT id_type, extension FROM spip_types_documents WHERE id_type NOT IN (1,2,3)"); while ($row = sql_fetch($res)) { $extension = $row['extension']; $id_type = $row['id_type']; spip_query("UPDATE spip_documents SET id_type=$id_type WHERE fichier like '%.$extension'"); } maj_version (1.464); } if (upgrade_vers(1.465, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_articles CHANGE popularite popularite DOUBLE NOT NULL"); maj_version (1.465); } if (upgrade_vers(1.466, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_auteurs ADD source VARCHAR(10) DEFAULT 'spip' NOT NULL"); maj_version (1.466); } if (upgrade_vers(1.468, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_auteurs ADD INDEX en_ligne (en_ligne)"); spip_query("ALTER TABLE spip_forum ADD INDEX statut (statut, date_heure)"); maj_version (1.468); } if (upgrade_vers(1.470, $version_installee, $version_cible)) { if ($version_installee >= 1.467) { // annule les "listes de diff" spip_query("DROP TABLE spip_listes"); spip_query("ALTER TABLE spip_auteurs DROP abonne"); spip_query("ALTER TABLE spip_auteurs DROP abonne_pass"); } maj_version (1.470); } if (upgrade_vers(1.471, $version_installee, $version_cible)) { if ($version_installee >= 1.470) { // annule les "maj" spip_query("ALTER TABLE spip_auteurs_articles DROP maj TIMESTAMP"); spip_query("ALTER TABLE spip_auteurs_rubriques DROP maj TIMESTAMP"); spip_query("ALTER TABLE spip_auteurs_messages DROP maj TIMESTAMP"); spip_query("ALTER TABLE spip_documents_articles DROP maj TIMESTAMP"); spip_query("ALTER TABLE spip_documents_rubriques DROP maj TIMESTAMP"); spip_query("ALTER TABLE spip_documents_breves DROP maj TIMESTAMP"); spip_query("ALTER TABLE spip_mots_articles DROP maj TIMESTAMP"); spip_query("ALTER TABLE spip_mots_breves DROP maj TIMESTAMP"); spip_query("ALTER TABLE spip_mots_rubriques DROP maj TIMESTAMP"); spip_query("ALTER TABLE spip_mots_syndic DROP maj TIMESTAMP"); spip_query("ALTER TABLE spip_mots_forum DROP maj TIMESTAMP"); } maj_version (1.471); } if (upgrade_vers(1.472, $version_installee, $version_cible)) { spip_query("ALTER TABLE spip_referers ADD visites_jour INTEGER UNSIGNED NOT NULL"); maj_version (1.472); } if (upgrade_vers(1.473, $version_installee, $version_cible)) { spip_query("UPDATE spip_syndic_articles SET url = REPLACE(url, '&', '&')"); spip_query("UPDATE spip_syndic SET url_site = REPLACE(url_site, '&', '&')"); maj_version (1.473); } } ?> v013.php000066600000005623151453265520005770 0ustar00