Changeset 49028 in spip-zone
- Timestamp:
- Jun 24, 2011, 9:50:28 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/telepathe/trunk/telepathe_fonctions.php
r48847 r49028 2 2 3 3 function telepathe($contenu=null, $type=null) { 4 static $t; 4 static $id = ' '; 5 static $t = array(); 5 6 6 7 // id = initialisation 7 if ($type == 'id') 8 $t = array(); 8 if ($type == 'id') { 9 $id = $contenu; 10 $t[$id] = array(); 11 } 9 12 10 13 // autre, remplir 11 14 if (!is_null($type) 12 AND is_array($t )) {15 AND is_array($t[$id])) { 13 16 14 17 # un pipeline qui permet de traiter tout le contenu a envoyer, … … 21 24 switch($r[2]) { 22 25 case '': 23 $t[$ r[1]] = $contenu;26 $t[$id][$r[1]] = $contenu; 24 27 break; 25 28 case '*': 26 $t[$ r[1]][] = $contenu;29 $t[$id][$r[1]][] = $contenu; 27 30 break; 28 31 case '+': 29 $t[$ r[1]] .= $contenu;32 $t[$id][$r[1]] .= $contenu; 30 33 break; 31 34 } … … 41 44 function telepathe_formater($html) { 42 45 43 $v = telepathe(); 44 $r = array($v['id'] => $v); 46 $r = telepathe(); 45 47 46 48 switch (_request('format')) {
Note: See TracChangeset
for help on using the changeset viewer.