uawdijnntqw1x1x1
IP : 216.73.216.146
Hostname : webm008.cluster111.gra.hosting.ovh.net
Kernel : Linux webm008.cluster111.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
OS : Linux
PATH:
/
home
/
bourgleram
/
www
/
c4d43
/
..
/
local
/
cache-css
/
..
/
..
/
.
/
398a1
/
base.tar
/
/
urls.php000066600000004015152522326340006252 0ustar00<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined('_ECRIRE_INC_VERSION')) return; /** * Declarer les interfaces * * @param array $interfaces * @return array */ function urls_declarer_tables_interfaces($interfaces) { $interfaces['table_des_tables']['urls']='urls'; return $interfaces; } /** * Tables de jointures * * @param array $tables_auxiliaires * @return array */ function urls_declarer_tables_auxiliaires($tables_auxiliaires){ $spip_urls = array( // un id parent eventuel, pour discriminer les doublons arborescents "id_parent" => "bigint(21) DEFAULT '0' NOT NULL", "url" => "VARCHAR(255) NOT NULL", // la table cible "type" => "varchar(25) 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", // nombre de segments dans url "segments" => "SMALLINT(3) DEFAULT '1' NOT NULL", // URL permanente, prioritaire "perma" => "TINYINT(1) DEFAULT '0' NOT NULL", ); $spip_urls_key = array( "PRIMARY KEY" => "id_parent, url", "KEY type" => "type, id_objet"); $tables_auxiliaires['spip_urls'] = array( 'field' => &$spip_urls, 'key' => &$spip_urls_key); return $tables_auxiliaires; } ?>sites.php000066600000015414152522473010006416 0ustar00<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined('_ECRIRE_INC_VERSION')) return; /** * Interfaces des tables syndic et syndic article * * @param array $interfaces * @return array */ function sites_declarer_tables_interfaces($interfaces){ $interfaces['table_des_tables']['sites']='syndic'; // compat pour les boucles (SITES) $interfaces['table_des_tables']['syndication']='syndic'; $interfaces['table_des_tables']['syndic']='syndic'; $interfaces['table_des_tables']['syndic_articles']='syndic_articles'; # ne sert plus ? verifier balise_URL_ARTICLE $interfaces['exceptions_des_tables']['syndic_articles']['url_article']='url'; # ne sert plus ? verifier balise_LESAUTEURS $interfaces['exceptions_des_tables']['syndic_articles']['lesauteurs']='lesauteurs'; $interfaces['exceptions_des_tables']['syndic_articles']['url_site']=array('syndic', 'url_site'); $interfaces['exceptions_des_tables']['syndic_articles']['nom_site']=array('syndic', 'nom_site'); $interfaces['table_date']['syndication'] = 'date'; $interfaces['tables_jointures']['spip_syndic_articles'][]= 'syndic'; $interfaces['table_des_traitements']['NOM_SITE'][]= _TRAITEMENT_TYPO; // Articles syndiques : passage des donnees telles quelles, sans traitement typo // la securite et conformite XHTML de ces champs est assuree par safehtml() foreach(array('DESCRIPTIF','SOURCE','URL','URL_SOURCE','LESAUTEURS','TAGS') as $balise) if (!isset($interfaces['table_des_traitements'][$balise]['syndic_articles'])) $interfaces['table_des_traitements'][$balise]['syndic_articles'] = 'safehtml(%s)'; else if (strpos($interfaces['table_des_traitements'][$balise]['syndic_articles'],'safehtml')==false) $interfaces['table_des_traitements'][$balise]['syndic_articles'] = 'safehtml('.$interfaces['table_des_traitements'][$balise]['syndic_articles'].')'; return $interfaces; } function sites_declarer_tables_objets_sql($tables){ $tables['spip_syndic'] = array( 'table_objet_surnoms'=>array('site'), 'type'=>'site', 'type_surnoms' => array('syndic'), 'texte_retour' => 'icone_retour', 'texte_objets' => 'icone_sites_references', 'texte_objet' => 'sites:icone_site_reference', 'texte_modifier' => 'sites:icone_modifier_site', 'texte_creer' => 'sites:icone_referencer_nouveau_site', 'info_aucun_objet'=> 'info_aucun_site', 'info_1_objet' => 'info_1_site', 'info_nb_objets' => 'info_nb_sites', 'titre' => "nom_site AS titre, '' AS lang", 'date' => 'date', 'principale' => 'oui', 'field'=> 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", "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", "moderation" => "VARCHAR(3) DEFAULT 'non'", "miroir" => "VARCHAR(3) DEFAULT 'non'", "oubli" => "VARCHAR(3) DEFAULT 'non'", "resume" => "VARCHAR(3) DEFAULT 'oui'" ), 'key' => array( "PRIMARY KEY" => "id_syndic", "KEY id_rubrique" => "id_rubrique", "KEY id_secteur" => "id_secteur", "KEY statut" => "statut, date_syndic", ), 'join' => array( "id_syndic"=>"id_syndic", "id_rubrique"=>"id_rubrique" ), 'statut' => array( array('champ'=>'statut','publie'=>'publie','previsu'=>'publie,prop','exception'=>'statut') ), 'texte_changer_statut' => 'sites:info_statut_site_1', 'statut_textes_instituer' => array( 'prop' => 'texte_statut_propose_evaluation', 'publie' => 'texte_statut_publie', 'refuse' => 'texte_statut_poubelle', ), 'rechercher_champs' => array( 'nom_site' => 5, 'url_site' => 1, 'descriptif' => 3 ), 'champs_versionnes' => array('id_rubrique', 'id_secteur', 'nom_site', 'url_site', 'url_syndic','descriptif'), ); $tables['spip_syndic_articles'] = array( 'table_objet_surnoms'=>array('syndic_article'), 'texte_retour' => 'icone_retour', 'texte_objets' => 'sites:icone_articles_syndic', 'texte_objet' => 'sites:icone_article_syndic', 'texte_modifier' => 'icone_modifier_article', # inutile en vrai 'info_aucun_objet'=> 'info_aucun_article_syndique', 'info_1_objet' => 'info_1_article_syndique', 'info_nb_objets' => 'info_nb_articles_syndiques', 'icone_objet' => 'site', // pas de page propre ni dans ecrire ni dans le site public 'url_voir'=>'', 'url_edit'=>'', 'page'=>'', 'date' => 'date', 'editable' => 'non', 'principale' => 'oui', 'field'=> 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" ), 'key' => array( "PRIMARY KEY" => "id_syndic_article", "KEY id_syndic" => "id_syndic", "KEY statut" => "statut", "KEY url" => "url" ), 'join' => array( "id_syndic_article"=>"id_syndic_article", "id_syndic"=>"id_syndic" ), 'statut' => array( array('champ'=>'statut','publie'=>'publie','previsu'=>'publie,prop','exception'=>'statut'), array('champ'=>array(array('spip_syndic','id_syndic'),'statut'),'publie'=>'publie','previsu'=>'publie,prop','exception'=>'statut'), ), 'statut_images' => array( 'puce-rouge-anim.gif','publie'=>'puce-publier-8.png','refuse'=>'puce-supprimer-8.png','dispo'=>'puce-proposer-8.png','off'=>'puce-refuser-8.png', ), 'rechercher_champs' => array( 'titre' => 5, 'descriptif' => 1 ) ); return $tables; } ?> petitions.php000066600000012204152522474170007307 0ustar00<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined('_ECRIRE_INC_VERSION')) return; /** * Interfaces des tables petitions et signatures pour le compilateur * * @param array $interfaces * @return array */ function petitions_declarer_tables_interfaces($interfaces){ $interfaces['table_des_tables']['petitions']='petitions'; $interfaces['table_des_tables']['signatures']='signatures'; $interfaces['exceptions_des_tables']['signatures']['date']='date_time'; $interfaces['exceptions_des_tables']['signatures']['nom']='nom_email'; $interfaces['exceptions_des_tables']['signatures']['email']='ad_email'; $interfaces['tables_jointures']['spip_articles'][]= 'petitions'; $interfaces['tables_jointures']['spip_articles'][]= 'signatures'; $interfaces['exceptions_des_jointures']['petition'] = array('spip_petitions', 'texte'); $interfaces['exceptions_des_jointures']['id_signature']= array('spip_signatures', 'id_signature'); $interfaces['table_des_traitements']['MESSAGE'][]= _TRAITEMENT_RACCOURCIS; // Signatures : passage des donnees telles quelles, sans traitement typo // la securite et conformite XHTML de ces champs est assuree par safehtml() foreach(array('NOM_EMAIL','AD_EMAIL','NOM_SITE','URL_SITE','MESSAGE') as $balise) if (!isset($interfaces['table_des_traitements'][$balise]['signatures'])) $interfaces['table_des_traitements'][$balise]['signatures'] = 'liens_nofollow(safehtml(%s))'; else if (strpos($interfaces['table_des_traitements'][$balise]['signatures'],'safehtml')==false) $interfaces['table_des_traitements'][$balise]['signatures'] = 'liens_nofollow(safehtml('.$interfaces['table_des_traitements'][$balise]['signatures'].'))'; return $interfaces; } function petitions_declarer_tables_objets_sql($tables){ $tables['spip_petitions'] = array( 'url_voir'=>'controler_petition', 'url_edit'=>'controler_petition', 'editable'=>'non', 'principale' => 'oui', 'page'=>'', // pas de page editoriale pour une petition 'texte_retour' => 'icone_retour', 'texte_objets' => 'petitions:titre_petitions', 'texte_objet' => 'petitions:titre_petition', 'titre' => "texte as titre, '' AS lang", 'field'=> array( "id_petition" => "bigint(21) NOT NULL", "id_article" => "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", "statut" => "VARCHAR (10) DEFAULT 'publie' NOT NULL", "maj" => "TIMESTAMP" ), 'key' => array( "PRIMARY KEY" => "id_petition", "UNIQUE id_article" => "id_article" ), 'statut' => array( array('champ'=>'statut','publie'=>'publie,off','previsu'=>'publie,off','exception'=>array('statut')), ), ); $tables['spip_signatures'] = array( 'url_voir'=>'controler_petition', 'url_edit'=>'controler_petition', 'editable'=>'non', 'principale' => 'oui', 'page'=>'', // pas de page editoriale pour une signature 'texte_retour' => 'icone_retour', 'texte_objets' => 'public:signatures_petition', 'texte_objet' => 'entree_signature', 'info_aucun_objet'=> 'petitions:aucune_signature', 'info_1_objet' => 'petitions:une_signature', 'info_nb_objets' => 'petitions:nombre_signatures', 'titre' => "nom_email as titre, '' AS lang", 'date' => 'date_time', 'field'=> array( "id_signature" => "bigint(21) NOT NULL", "id_petition" => "bigint(21) DEFAULT '0' 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" ), 'key' => array( "PRIMARY KEY" => "id_signature", "KEY id_petition" => "id_petition", # "KEY id_article" => "id_article", "KEY statut" => "statut" ), 'join' => array( "id_signature"=>"id_signature", "id_petition"=>"id_petition" ), 'tables_jointures'=> array( 'petitions' ), 'statut' => array( array('champ'=>'statut','publie'=>'publie','previsu'=>'publie','exception'=>array('statut','tout')), ), 'rechercher_champs' => array( 'nom_email' => 2, 'ad_email' => 4, 'nom_site' => 2, 'url_site' => 4, 'message' => 1 ), 'icone_objet' => 'petition', ); return $tables; } ?> delete_referers.php000066600000002771152522474330010436 0ustar00<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined("_ECRIRE_INC_VERSION")) return; // securiser // faudrait plutot recuperer dans inc_serialbase et inc_auxbase // mais il faudra prevenir ceux qui affectent les globales qui s'y trouvent // Afficher la liste de ce qu'on va detruire et demander confirmation // ca vaudrait mieux /** * Supprimer les referers * @param strinf $titre * @param bool $reprise * @return string */ function base_delete_referers_dist($titre='', $reprise='') { if (!$titre) return; // anti-testeur automatique sql_delete("spip_referers"); sql_delete("spip_referers_articles"); sql_update("spip_articles", array('referers'=>0)); // un pipeline pour detruire les tables de referers installees par les plugins ? //pipeline('delete_referers', ''); spip_log("raz des referers operee redirige vers " . _request('redirect')); } ?> stats.php000066600000004754152522474330006440 0ustar00<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined("_ECRIRE_INC_VERSION")) return; function stats_declarer_tables_auxiliaires($tables_auxiliaires){ $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", "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"); $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); return $tables_auxiliaires; } ?> delete_stats.php000066600000003115152522474330007750 0ustar00<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined("_ECRIRE_INC_VERSION")) return; // securiser // faudrait plutot recuperer dans inc_serialbase et inc_auxbase // mais il faudra prevenir ceux qui affectent les globales qui s'y trouvent // Afficher la liste de ce qu'on va detruire et demander confirmation // ca vaudrait mieux /** * Supprimer les stats * @param strinf $titre * @param bool $reprise * @return string */ function base_delete_stats_dist($titre='', $reprise='') { if (!$titre) return; // anti-testeur automatique sql_delete("spip_visites"); sql_delete("spip_visites_articles"); sql_delete("spip_referers"); sql_delete("spip_referers_articles"); sql_update("spip_articles", array('visites'=>0, 'referers'=>0, 'popularite'=>0)); // un pipeline pour detruire les tables de stats installees par les plugins pipeline('delete_statistiques', ''); spip_log("raz des stats operee redirige vers " . _request('redirect')); } ?> breves.php000066600000007311152522474450006563 0ustar00<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined('_ECRIRE_INC_VERSION')) return; /** * Interfaces des tables breves pour le compilateur * * @param array $interfaces * @return array */ function breves_declarer_tables_interfaces($interfaces) { $interfaces['table_des_tables']['breves'] = 'breves'; $interfaces['exceptions_des_tables']['breves']['id_secteur'] = 'id_rubrique'; $interfaces['exceptions_des_tables']['breves']['date'] = 'date_heure'; $interfaces['exceptions_des_tables']['breves']['nom_site'] = 'lien_titre'; $interfaces['exceptions_des_tables']['breves']['url_site'] = 'lien_url'; $interfaces['table_des_traitements']['LIEN_TITRE'][]= _TRAITEMENT_TYPO; $interfaces['table_des_traitements']['LIEN_URL'][]= 'vider_url(%s)'; return $interfaces; } function breves_declarer_tables_objets_sql($tables){ $tables['spip_breves'] = array( 'texte_retour' => 'icone_retour', 'texte_objets' => 'breves:breves', 'texte_objet' => 'breves:breve', 'texte_modifier' => 'breves:icone_modifier_breve', 'texte_creer' => 'breves:icone_nouvelle_breve', 'info_aucun_objet'=> 'breves:info_aucun_breve', 'info_1_objet' => 'breves:info_1_breve', 'info_nb_objets' => 'breves:info_nb_breves', 'texte_logo_objet' => 'breves:logo_breve', 'texte_langue_objet' => 'breves:titre_langue_breve', 'titre' => 'titre, lang', 'date' => 'date_heure', 'principale' => 'oui', 'field'=> 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" ), 'key' => array( "PRIMARY KEY" => "id_breve", "KEY id_rubrique" => "id_rubrique", ), 'join' => array( "id_breve"=>"id_breve", "id_rubrique"=>"id_rubrique" ), 'statut' => array( array( 'champ'=>'statut', 'publie'=>'publie', 'previsu'=>'publie,prop', 'exception'=>'statut' ) ), 'texte_changer_statut' => 'breves:entree_breve_publiee', 'aide_changer_statut' => 'brevesstatut', 'statut_titres' => array( 'prop' => 'breves:titre_breve_proposee', 'publie' => 'breves:titre_breve_publiee', 'refuse' => 'breves:titre_breve_refusee', ), 'statut_textes_instituer' => array( 'prop' => 'breves:item_breve_proposee', //_T('texte_statut_propose_evaluation') 'publie' => 'breves:item_breve_validee', //_T('texte_statut_publie') 'refuse' => 'breves:item_breve_refusee', //_T('texte_statut_refuse') ), 'rechercher_champs' => array( 'titre' => 8, 'texte' => 2, 'lien_titre' => 1, 'lien_url' => 1 ), 'rechercher_jointures' => array( 'document' => array('titre' => 2, 'descriptif' => 1) ), 'champs_versionnes' => array('id_rubrique', 'titre', 'lien_titre', 'lien_url', 'texte'), ); return $tables; } ?> typedoc.php000066600000032457152522474600006752 0ustar00<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined('_ECRIRE_INC_VERSION')) return; global $tables_images, $tables_sequences, $tables_documents, $tables_mime, $mime_alias; $tables_images = array( // Images reconnues par PHP 'jpg' => 'JPEG', 'png' => 'PNG', 'gif' => 'GIF', // Autres images (peuvent utiliser le tag <img>) 'bmp' => 'BMP', ); // Multimedia (peuvent utiliser le tag <embed>) $tables_sequences = array( 'aac' => 'Advanced Audio Coding', 'ac3' => 'AC-3 Compressed Audio', 'aifc' => 'Compressed AIFF Audio', 'aiff' => 'AIFF', 'amr' => 'Adaptive Multi-Rate Audio', 'anx' => 'Annodex', 'ape' => 'Monkey\'s Audio File', 'axa' => 'Annodex Audio', 'axv' => 'Annodex Video', 'asf' => 'Windows Media', 'avi' => 'AVI', 'dv' => 'Digital Video', 'f4a' => 'Audio for Adobe Flash Player', 'f4b' => 'Audio Book for Adobe Flash Player', 'f4p' => 'Protected Video for Adobe Flash Player', 'f4v' => 'Video for Adobe Flash Player', 'flac' => 'Free Lossless Audio Codec', 'flv' => 'Flash Video', 'm2p' => 'MPEG-PS', 'm2ts' => 'BDAV MPEG-2 Transport Stream', 'm4a' => 'MPEG4 Audio', 'm4b' => 'MPEG4 Audio', 'm4p' => 'MPEG4 Audio', 'm4r' => 'iPhone Ringtone', 'm4v' => 'MPEG4 Video', 'mid' => 'Midi', 'mng' => 'MNG', 'mka' => 'Matroska Audio', 'mkv' => 'Matroska Video', 'mov' => 'QuickTime', 'mp3' => 'MP3', 'mp4' => 'MPEG4', 'mpc' => 'Musepack', 'mpg' => 'MPEG', 'mts' => 'AVCHD MPEG-2 transport stream', 'oga' => 'Ogg Audio', 'ogg' => 'Ogg Vorbis', 'ogv' => 'Ogg Video', 'ogx' => 'Ogg Multiplex', 'qt' => 'QuickTime', 'ra' => 'RealAudio', 'ram' => 'RealAudio', 'rm' => 'RealAudio', 'spx' => 'Ogg Speex', 'svg' => 'Scalable Vector Graphics', 'svgz' => 'Compressed Scalable Vector Graphic', 'swf' => 'Flash', 'tif' => 'TIFF', 'ts' => 'MPEG transport stream', 'wav' => 'WAV', 'webm' => 'WebM', 'wma' => 'Windows Media Audio', 'wmv' => 'Windows Media Video', 'y4m' => 'YUV4MPEG2', '3ga' => '3GP Audio File', '3gp' => '3rd Generation Partnership Project' ); // Documents varies $tables_documents = array( '7z' => '7 Zip', 'abw' => 'Abiword', 'ai' => 'Adobe Illustrator', 'asx' => 'Advanced Stream Redirector', 'bib' => 'BibTeX', 'bz2' => 'BZip', 'bin' => 'Binary Data', 'blend' => 'Blender', 'c' => 'C source', 'cls' => 'LaTeX Class', 'csl' => 'Citation Style Language', 'css' => 'Cascading Style Sheet', 'csv' => 'Comma Separated Values', 'deb' => 'Debian', 'doc' => 'Word', 'dot' => 'Word Template', 'djvu' => 'DjVu', 'dvi' => 'LaTeX DVI', 'emf' => 'Enhanced Metafile', 'enl' => 'EndNote Library', 'ens' => 'EndNote Style', 'epub' => 'EPUB', 'eps' => 'PostScript', 'gpx' => 'GPS eXchange Format', 'gz' => 'GZ', 'h' => 'C header', 'html' => 'HTML', 'jar' => 'Java Archive', 'json' => 'JSON', 'kml' => 'Keyhole Markup Language', 'kmz' => 'Google Earth Placemark File', 'lyx' => 'Lyx file', 'mathml' => 'MathML', 'mbtiles' => 'MBTiles', 'm3u' => 'M3U Playlist', 'm3u8' => 'M3U8 Playlist', 'm4u' => 'MPEG4 Playlist', 'pas' => 'Pascal', 'pdf' => 'PDF', 'pgn' => 'Portable Game Notation', 'pls' => 'Playlist', 'pot' => 'PowerPoint Template', 'ppt' => 'PowerPoint', 'ps' => 'PostScript', 'psd' => 'Photoshop', 'rar' => 'WinRAR', 'rdf' => 'Resource Description Framework', 'ris' => 'RIS', 'rpm' => 'RedHat/Mandrake/SuSE', 'rtf' => 'RTF', 'sdc' => 'StarOffice Spreadsheet', 'sdd' => 'StarOffice Presentation', 'sdw' => 'StarOffice Writer document', 'sit' => 'Stuffit', 'sla' => 'Scribus', 'srt' => 'SubRip Subtitle', 'ssa' => 'SubStation Alpha Subtitle', 'sty' => 'LaTeX Style Sheet', 'sxc' => 'OpenOffice.org Calc', 'sxi' => 'OpenOffice.org Impress', 'sxw' => 'OpenOffice.org', 'tar' => 'Tar', 'tex' => 'LaTeX', 'tgz' => 'TGZ', 'torrent' => 'BitTorrent', 'ttf' => 'TTF Font', 'txt' => 'Texte', 'usf' => 'Universal Subtitle Format', 'wmf' => 'Windows Metafile', 'wpl' => 'Windows Media Player Playlist', 'xcf' => 'GIMP multi-layer', 'xspf' => 'XSPF', 'xls' => 'Excel', 'xlt' => 'Excel Template', 'xml' => 'XML', 'y4m' => 'YUV4MPEG2', 'yaml' => 'YAML', 'zip' => 'Zip', // open document format 'odb' => 'OpenDocument Database', 'odc' => 'OpenDocument Chart', 'odf' => 'OpenDocument Formula', 'odg' => 'OpenDocument Graphics', 'odi' => 'OpenDocument Image', 'odm' => 'OpenDocument Text-master', 'odp' => 'OpenDocument Presentation', 'ods' => 'OpenDocument Spreadsheet', 'odt' => 'OpenDocument Text', 'otg' => 'OpenDocument Graphics-template', 'otp' => 'OpenDocument Presentation-template', 'ots' => 'OpenDocument Spreadsheet-template', 'ott' => 'OpenDocument Text-template', // Open XML File Formats 'docm' => 'Word', 'docx' => 'Word', 'dotm' => 'Word template', 'dotx' => 'Word template', 'potm' => 'Powerpoint template', 'potx' => 'Powerpoint template', 'ppam' => 'Powerpoint addin', 'ppsm' => 'Powerpoint slideshow', 'ppsx' => 'Powerpoint slideshow', 'pptm' => 'Powerpoint', 'pptx' => 'Powerpoint', 'xlam' => 'Excel', 'xlsb' => 'Excel binary', 'xlsm' => 'Excel', 'xlsx' => 'Excel', 'xltm' => 'Excel template', 'xltx' => 'Excel template' ); $tables_mime = array( // Images reconnues par PHP 'jpg' => 'image/jpeg', 'png' => 'image/png', 'gif' => 'image/gif', // Autres images (peuvent utiliser le tag <img>) 'bmp' => 'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp 'tif' => 'image/tiff', // Multimedia (peuvent utiliser le tag <embed>) 'aac' => 'audio/mp4a-latm', 'ac3' => 'audio/x-aac', 'aifc' => 'audio/x-aifc', 'aiff' => 'audio/x-aiff', 'amr' => 'audio/amr', 'ape' => 'audio/x-monkeys-audio', 'asf' => 'video/x-ms-asf', 'avi' => 'video/x-msvideo', 'anx' => 'application/annodex', 'axa' => 'audio/annodex', 'axv' => 'video/annodex', 'dv' => 'video/x-dv', 'f4a' => 'audio/mp4', 'f4b' => 'audio/mp4', 'f4p' => 'video/mp4', 'f4v' => 'video/mp4', 'flac' => 'audio/x-flac', 'flv' => 'video/x-flv', 'm2p' => 'video/MP2P', 'm2ts' => 'video/MP2T', 'm4a' => 'audio/mp4a-latm', 'm4b' => 'audio/mp4a-latm', 'm4p' => 'audio/mp4a-latm', 'm4r' => 'audio/aac', 'm4u' => 'video/vnd.mpegurl', 'm4v' => 'video/x-m4v', 'mid' => 'audio/midi', 'mka' => 'audio/mka', 'mkv' => 'video/mkv', 'mng' => 'video/x-mng', 'mov' => 'video/quicktime', 'mp3' => 'audio/mpeg', 'mp4' => 'application/mp4', 'mpc' => 'audio/x-musepack', 'mpg' => 'video/mpeg', 'mts' => 'video/MP2T', 'oga' => 'audio/ogg', 'ogg' => 'audio/ogg', 'ogv' => 'video/ogg', 'ogx' => 'application/ogg', 'qt' => 'video/quicktime', 'ra' => 'audio/x-pn-realaudio', 'ram' => 'audio/x-pn-realaudio', 'rm' => 'audio/x-pn-realaudio', 'spx' => 'audio/ogg', 'svg' => 'image/svg+xml', 'svgz' => 'image/svg+xml', 'swf' => 'application/x-shockwave-flash', 'ts' => 'video/MP2T', 'wav' => 'audio/x-wav', 'webm' => 'video/webm', 'wma' => 'audio/x-ms-wma', 'wmv' => 'video/x-ms-wmv', 'y4m' => 'video/x-raw-yuv', '3gp' => 'video/3gpp', '3ga' => 'audio/3ga', // Documents varies '7z' => 'application/x-7z-compressed', 'ai' => 'application/illustrator', 'abw' => 'application/abiword', 'asx' => 'video/x-ms-asf', 'bib' => 'application/x-bibtex', 'bin' => 'application/octet-stream', # le tout-venant 'blend' => 'application/x-blender', 'bz2' => 'application/x-bzip2', 'c' => 'text/x-csrc', 'csl' => 'application/xml', 'css' => 'text/css', 'csv' => 'text/csv', 'deb' => 'application/x-debian-package', 'doc' => 'application/msword', 'dot' => 'application/msword', 'djvu' => 'image/vnd.djvu', 'dvi' => 'application/x-dvi', 'emf' => 'image/x-emf', 'enl' => 'application/octet-stream', 'ens' => 'application/octet-stream', 'eps' => 'application/postscript', 'epub' => 'application/epub+zip', // pas enregistre par IANA 'gpx' => 'application/gpx+xml', // pas enregistre par IANA 'gz' => 'application/x-gzip', 'h' => 'text/x-chdr', 'html' => 'text/html', 'jar' => 'application/java-archive', 'json' => 'application/json', 'kml' => 'application/vnd.google-earth.kml+xml', 'kmz' => 'application/vnd.google-earth.kmz', 'lyx' => 'application/x-lyx', 'm3u' => 'text/plain', 'm3u8' => 'text/plain', 'mathml' => 'application/mathml+xml', 'mbtiles' => 'application/x-sqlite3', 'pas' => 'text/x-pascal', 'pdf' => 'application/pdf', 'pgn' => 'application/x-chess-pgn', 'pls' => 'text/plain', 'ppt' => 'application/vnd.ms-powerpoint', 'pot' => 'application/vnd.ms-powerpoint', 'ps' => 'application/postscript', 'psd' => 'image/x-photoshop', // pas enregistre par IANA 'rar' => 'application/x-rar-compressed', 'rdf' => 'application/rdf+xml', 'ris' => 'application/x-research-info-systems', 'rpm' => 'application/x-redhat-package-manager', 'rtf' => 'application/rtf', 'sdc' => 'application/vnd.stardivision.calc', 'sdd' => 'application/vnd.stardivision.impress', 'sdw' => 'application/vnd.stardivision.writer', 'sit' => 'application/x-stuffit', 'sla' => 'application/x-scribus', 'srt' => 'text/plain', 'ssa' => 'text/plain', 'sxc' => 'application/vnd.sun.xml.calc', 'sxi' => 'application/vnd.sun.xml.impress', 'sxw' => 'application/vnd.sun.xml.writer', 'tar' => 'application/x-tar', 'tex' => 'text/x-tex', 'tgz' => 'application/x-gtar', 'torrent' => 'application/x-bittorrent', 'ttf' => 'application/x-font-ttf', 'txt' => 'text/plain', 'usf' => 'application/xml', 'xcf' => 'application/x-xcf', 'xls' => 'application/vnd.ms-excel', 'xlt' => 'application/vnd.ms-excel', 'wmf' => 'image/x-emf', 'wpl' => 'application/vnd.ms-wpl', 'xspf' => 'application/xspf+xml', 'xml' => 'application/xml', 'yaml' => 'text/yaml', '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', // Open XML File Formats 'docm' => 'application/vnd.ms-word.document.macroEnabled.12', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12', 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12', 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' ); $mime_alias = array ( 'application/x-ogg' => 'application/ogg', 'audio/3gpp' => 'video/3gpp', 'audio/x-mpeg' => 'audio/mpeg', 'audio/x-musepack' => 'audio/musepack', 'audio/webm' => 'video/webm', 'video/flv' => 'video/x-flv', 'video/mp4' => 'application/mp4', 'image/jpg' => 'image/jpeg' ); ?> medias.php000066600000022552152522474600006540 0ustar00<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined('_ECRIRE_INC_VERSION')) return; /** * Interfaces des tables breves pour le compilateur * * @param array $interfaces * @return array */ function medias_declarer_tables_interfaces($interfaces) { $interfaces['table_des_tables']['documents']='documents'; $interfaces['table_des_tables']['types_documents']='types_documents'; $interfaces['exceptions_des_tables']['documents']['type_document']=array('types_documents', 'titre'); $interfaces['exceptions_des_tables']['documents']['extension_document']=array('types_documents', 'extension'); $interfaces['exceptions_des_tables']['documents']['mime_type']=array('types_documents', 'mime_type'); $interfaces['exceptions_des_tables']['documents']['media_document']=array('types_documents', 'media'); $interfaces['exceptions_des_jointures']['spip_documents']['id_forum']=array('spip_documents_liens','id_forum'); $interfaces['exceptions_des_jointures']['spip_documents']['vu']=array('spip_documents_liens', 'vu'); $interfaces['table_date']['types_documents']='date'; $interfaces['table_des_traitements']['FICHIER']['documents']= 'get_spip_doc(%s)'; return $interfaces; } /** * Table principale spip_documents et spip_types_documents * * @param array $tables_principales * @return array */ function medias_declarer_tables_principales($tables_principales) { $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') DEFAULT 'non' NOT NULL", "upload" => "ENUM('oui', 'non') DEFAULT 'oui' NOT NULL", "media_defaut" => "varchar(10) DEFAULT 'file' NOT NULL", "maj" => "TIMESTAMP"); $spip_types_documents_key = array( "PRIMARY KEY" => "extension", "KEY inclus" => "inclus"); $tables_principales['spip_types_documents'] = array('field' => &$spip_types_documents, 'key' => &$spip_types_documents_key); return $tables_principales; } /** * Table des liens documents-objets spip_documents_liens * @param array $tables_auxiliaires * @return array */ function medias_declarer_tables_auxiliaires($tables_auxiliaires) { $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", "KEY id_objet" => "id_objet", "KEY objet" => "objet", ); $tables_auxiliaires['spip_documents_liens'] = array( 'field' => &$spip_documents_liens, 'key' => &$spip_documents_liens_key); return $tables_auxiliaires; } /** * Declarer le surnom des breves * * @param array $surnoms * @return array */ function medias_declarer_tables_objets_surnoms($surnoms) { $surnoms['type_document'] = "types_documents"; # hum #$surnoms['extension'] = "types_documents"; # hum #$surnoms['type'] = "types_documents"; # a ajouter pour id_table_objet('type')=='extension' ? return $surnoms; } function medias_declarer_tables_objets_sql($tables){ $tables['spip_articles']['champs_versionnes'][] = 'jointure_documents'; $tables['spip_documents'] = array( 'table_objet_surnoms'=>array('doc','img','emb'), 'type_surnoms' => array(), 'url_voir' => 'document_edit', 'url_edit' => 'document_edit', 'page'=>'', 'texte_retour' => 'icone_retour', 'texte_objets' => 'medias:objet_documents', 'texte_objet' => 'medias:objet_document', 'texte_modifier' => 'medias:info_modifier_document', 'info_aucun_objet'=> 'medias:aucun_document', 'info_1_objet' => 'medias:un_document', 'info_nb_objets' => 'medias:des_documents', 'titre' => "CASE WHEN length(titre)>0 THEN titre ELSE fichier END as titre, '' AS lang", 'date' => 'date', 'principale'=>'oui', 'field' => 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" => "text NOT NULL DEFAULT ''", "taille" => "bigint", "largeur" => "integer", "hauteur" => "integer", "media" => "varchar(10) DEFAULT 'file' NOT NULL", "mode" => "varchar(10) DEFAULT 'document' NOT NULL", "distant" => "VARCHAR(3) DEFAULT 'non'", "statut" => "varchar(10) DEFAULT '0' NOT NULL", "credits" => "varchar(255) DEFAULT '' NOT NULL", "date_publication" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "brise" => "tinyint DEFAULT 0", "maj" => "TIMESTAMP" ), 'key' => array( "PRIMARY KEY" => "id_document", "KEY id_vignette" => "id_vignette", "KEY mode" => "mode", "KEY extension" => "extension" ), 'join' => array( "id_document"=>"id_document", "extension"=>"extension" ), 'statut'=> array( array( 'champ' => 'statut', 'publie' => 'publie', 'previsu' => 'publie,prop,prepa', 'post_date' => 'date_publication', 'exception' => array('statut','tout') ) ), 'tables_jointures' => array('types_documents'), 'rechercher_champs' => array( 'titre' => 3, 'descriptif' => 1, 'fichier' => 1, 'credits' => 1, ), 'champs_editables' => array('titre', 'descriptif', 'date', 'taille', 'largeur','hauteur','mode','credits','fichier','distant','extension', 'id_vignette', 'media'), 'champs_versionnes' => array('id_vignette', 'titre', 'descriptif', 'hauteur', 'largeur', 'mode','credits','distant'), 'modeles' => array('document','doc','img','emb','image','video','text','audio','application'), ); // jointures sur les forum pour tous les objets $tables[]['tables_jointures'][]= 'documents_liens'; // recherche jointe sur les documents pour les articles et rubriques $tables['spip_articles']['rechercher_jointures']['document'] = array('titre' => 2, 'descriptif' => 1); $tables['spip_rubriques']['rechercher_jointures']['document'] = array('titre' => 2, 'descriptif' => 1); return $tables; } /** * Creer la table des types de document * * http://code.spip.net/@creer_base_types_doc * * @param string $serveur * @return void */ function creer_base_types_doc($serveur='', $champ_media="media_defaut") { global $tables_images, $tables_sequences, $tables_documents, $tables_mime; include_spip('base/typedoc'); include_spip('base/abstract_sql'); // charger en memoire tous les types deja definis pour limiter les requettes $rows = sql_allfetsel('mime_type,titre,inclus,extension,'.$champ_media.',upload,descriptif','spip_types_documents','','','','','',$serveur); $deja = array(); foreach ($rows as $k=>$row){ $deja[$row['extension']] = &$rows[$k]; } $insertions = array(); $updates = array(); foreach ($tables_mime as $extension => $type_mime) { if (isset($tables_images[$extension])) { $titre = $tables_images[$extension]; $inclus='image'; } else if (isset($tables_sequences[$extension])) { $titre = $tables_sequences[$extension]; $inclus='embed'; } else { $inclus='non'; if (isset($tables_documents[$extension])) $titre = $tables_documents[$extension]; else $titre = ''; } // type de media $media = "file"; if (preg_match(",^image/,",$type_mime) OR in_array($type_mime,array('application/illustrator'))) $media = "image"; elseif (preg_match(",^audio/,",$type_mime)) $media = "audio"; elseif (preg_match(",^video/,",$type_mime) OR in_array($type_mime,array('application/ogg','application/x-shockwave-flash','application/mp4'))) $media = "video"; $set = array( 'mime_type' => $type_mime, 'titre' => $titre, 'inclus' => $inclus, 'extension' => $extension, $champ_media => $media, 'upload' => 'oui', 'descriptif' => '', ); if (!isset($deja[$extension])){ $insertions[] = $set; } elseif (array_diff($deja[$extension],$set)){ $updates[$extension] = $set; } } if (count($updates)){ foreach ($updates as $extension=>$set){ sql_updateq('spip_types_documents',$set,'extension='.sql_quote($extension)); } } if ($insertions) sql_insertq_multi('spip_types_documents', $insertions, '', $serveur); } /** * Optimiser la base de donnee en supprimant les liens orphelins * * @param int $n * @return int */ function medias_optimiser_base_disparus($flux){ include_spip('action/editer_liens'); // optimiser les liens morts : // entre documents vers des objets effaces // depuis des documents effaces $flux['data'] += objet_optimiser_liens(array('document'=>'*'),'*'); // on ne nettoie volontairement pas automatiquement les documents orphelins return $flux; } ?>
/home/bourgleram/www/c4d43/../local/cache-css/../.././398a1/base.tar