From 1668e6878a66c89a0ca6f02eae98e2eba536cb75 Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Sun, 19 Feb 2006 21:26:23 +0000 Subject: [PATCH] identifie repertoire et rubrique -> code mort + divers bug --- .gitattributes | 1 + ecrire/exec_spip_action_joindre.php | 5 +++-- ecrire/img_pack/feed.png | Bin 0 -> 725 bytes ecrire/inc_documents.php | 17 +++++------------ ecrire/inc_getdocument.php | 4 ++-- ecrire/inc_utils.php | 7 +++++++ 6 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 ecrire/img_pack/feed.png diff --git a/.gitattributes b/.gitattributes index 8a58abc576..61e78f8623 100644 --- a/.gitattributes +++ b/.gitattributes @@ -129,6 +129,7 @@ ecrire/img_pack/documents-48_rtl.png -text ecrire/img_pack/edit.gif -text ecrire/img_pack/effacer-cache-24.gif -text ecrire/img_pack/favicon.ico -text +ecrire/img_pack/feed.png -text ecrire/img_pack/fiche-perso-24.gif -text ecrire/img_pack/fiche-perso.png -text ecrire/img_pack/fleche-left.png -text diff --git a/ecrire/exec_spip_action_joindre.php b/ecrire/exec_spip_action_joindre.php index 66ff61566b..194c4ed95b 100644 --- a/ecrire/exec_spip_action_joindre.php +++ b/ecrire/exec_spip_action_joindre.php @@ -22,7 +22,7 @@ function spip_action_joindre_dist() $sousaction1, $sousaction2, $sousaction3, - $sousaction4, +# $sousaction4, # sousaction4 = code mort a supprimer $sousaction5, $url, $chemin, $ancre, $type, $id, $id_document, $_FILES, $HTTP_POST_FILES; @@ -119,6 +119,7 @@ function spip_action_joindre3($arg, $mode, $type, $id, $id_document,$hash, $id_a $hash, $id_auteur, $redirect, $actifs); } +/* code mort cf. sousaction4 // identifie les repertoires de upload aux rubriques Spip function spip_action_joindre4($arg, $mode, $type, $id, $id_document, $hash, $id_auteur, $redirect, &$documents_actifs) @@ -128,7 +129,7 @@ function spip_action_joindre4($arg, $mode, $type, $id, $id_document, $hash, $id_ identifie_repertoire_et_rubrique($upload, $id, $id_auteur); include_ecrire("inc_rubriques"); calculer_rubriques(); -} +} */ // Zip avec confirmation "tel quel" diff --git a/ecrire/img_pack/feed.png b/ecrire/img_pack/feed.png new file mode 100644 index 0000000000000000000000000000000000000000..eb47e1902070416f2c700bf7dd4e58d1c0f318ed GIT binary patch literal 725 zcmV;`0xJE9P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0007<Nkl<ZIE{6Z zL1<K06o$WZ-<vnnWX8mp!Ni0%ZH*whaT<yXjUWmtg0zcLDW&dQI@OIJAu0;GD9uLb zx~sZr-6%+*F2scxgAha$wbV+Q!~{(9VkYz6z4y3ylMy3cxcv7n{&W8S{6|K=FSnP< zox_EwP&EQ#1TkxI^$j9|^RVzT9*O7X&xNIO=Wu(my=s?VV?rS?1``S<q=Aha2of~V zKzq5X`p-j<=cjjQXdSt74=n>nkO16^G5mjHA0&$i&MFJ@me5GnDc9LU>)zw69<9fu z53b_IuOfEoJ+iBN1PD&;*>pA+3MMp2x`ZxHBZU&Cbpt_fh1~Y9;s1Xje*O;G);(#W z$kb3p^K1QvLiq6)M7w`PHuMAFZePScy51zaL|I7`BPJt6pAN9@#9y?0^9xbsD7<<? z`uh*~CpQ2HcAtTsT}`q}Jn9r9ChIPNAo)@zdsmhGcYk2Y{rKA#ag$k*Xx|Xt6mdyb z#5>+9(3vq-e*KE{)&(@4hNwt*=nC4lnflH1_{C`?Um~h}n~~F|g11qzJcB;HfxUJt zlO7cb_g}(EE44p=0^p;aNAYQ<K>ezPM$XZJ%j6DU!SoGc?~I`FG_tN6^T{B!@muIh zoF!D=g0oEvAb}9{Rxo{oNcRrp^MlxUk>vhw0Ob1j;1Z?&Y&4t2X9M_jRe>}%Y<UKf zr7W`9$t>ro2>?u6H$L?wFS0-RBHk*hAhVag)b*VKB7!e;;R_o{{vK^c74%f_R;fL{ zm)U9SCV4qUGCM`s5g`*NxBlF>t*feb<((yIM%5UYvx-j@Zx!#9LPwFBiARECo8@lp zwJ$)pGfk8<QBtco2Tlc#phi$*AQXrUK}$&8ERV!<^XJ|GGF?$Vk)<9400000NkvXX Hu0mjfz%Wr^ literal 0 HcmV?d00001 diff --git a/ecrire/inc_documents.php b/ecrire/inc_documents.php index 16aa2e04f0..9f46dd162f 100644 --- a/ecrire/inc_documents.php +++ b/ecrire/inc_documents.php @@ -439,7 +439,7 @@ function texte_upload_manuel($dir, $inclus = '') { $exts = array(); $dirs = array(); foreach ($fichiers as $f) { - $f = ereg_replace("^$dir/","",$f); + $f = preg_replace(",^$dir,",'',$f); if (ereg("\.([^.]+)$", $f, $match)) { $ext = strtolower($match[1]); if (!$exts[$ext]) { @@ -615,24 +615,17 @@ function afficher_transferer_upload($type, $texte_upload) else { return "<p><div style='color: #505050;'>\n" ._T('info_selectionner_fichier', - array('upload' => '<b>' . _DIR_TRANSFERT . '</b>')) + array('upload' => '<b>' . _DIR_TRANSFERT . '</b>')) ." :<br />" . "\n<select name='chemin' size='1' class='fondl'>" . $texte_upload . - "\n</select>" . - (($type != 'rubrique') ? "" : ("<br />". _L("et choisir le mode de transfert:"))) . + "\n</select>" . "\n<div align='". $GLOBALS['spip_lang_right'] . "'><input name='sousaction3' type='Submit' value='" . - _L('recopier'). + _T('bouton_choisir'). "' class='fondo'></div>" . - (($type != 'rubrique') ? "" : - ("\n<div align='". - $GLOBALS['spip_lang_right'] . - "'><input name='sousaction4' type='Submit' value='" . - _L('identifier repertoires et rubriques'). - "' class='fondo'></div>")) . - "</div>\n"; + "</div>\n"; } } diff --git a/ecrire/inc_getdocument.php b/ecrire/inc_getdocument.php index e354dcc289..cc0f99dc2e 100644 --- a/ecrire/inc_getdocument.php +++ b/ecrire/inc_getdocument.php @@ -452,7 +452,7 @@ function examiner_les_fichiers($files, $mode, $type, $id, $id_document, $hash, $ } } - +/* code mort cf sousaction4 function identifie_repertoire_et_rubrique($DIR, $id_rubrique, $id_auteur, $art=0) { static $exts = array(); @@ -564,7 +564,7 @@ WHERE id_rubrique=$id_rubrique"); return $collecte; } - +*/ // // Convertit le type numerique retourne par getimagesize() en extension fichier diff --git a/ecrire/inc_utils.php b/ecrire/inc_utils.php index 4d0b480aa8..ffddbe1984 100644 --- a/ecrire/inc_utils.php +++ b/ecrire/inc_utils.php @@ -653,6 +653,13 @@ function charger_generer_url() { // sinon fichier inc-urls-xxx OR include_local(_DIR_RACINE."inc-urls-".$GLOBALS['type_urls']); } + + if (!function_exists('generer_url_special')) { + function generer_url_special($special, $args='') { + return _DIR_RACINE . "page.php3?fond=$special". + ($args ? '&'.$args : ''); + } + } } -- GitLab