Changeset 48850 in spip-zone for _plugins_/statsjs/statsjs_pipelines.php
- Timestamp:
- Jun 16, 2011, 3:21:45 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/statsjs/statsjs_pipelines.php
r46381 r48850 5 5 if (!$GLOBALS['html']) return $page; 6 6 7 // Identification de l'element 8 foreach($GLOBALS['contexte'] as $k => &$v) { 9 if (preg_match(',^id_(\w+)$,S', $k, $r) 10 AND ($id = intval($v))>0 11 ) { 12 $identifier = $r[1].$id; 7 // Identification automagique de l'element 8 // sauf si le squelette s'en est deja occupe 9 if (!strpos($page, '<meta name="SPIP.identifier" content="')) { 10 foreach($GLOBALS['contexte'] as $k => &$v) { 11 if (preg_match(',^id_(\w+)$,S', $k, $r) 12 AND ($id = intval($v))>0 13 ) { 14 $identifier = $r[1].$id; 15 } 16 } 17 if (isset($identifier)) { 18 $page = preg_replace(',</head>,i', 19 "\n".'<meta name="SPIP.identifier" content="'.$identifier.'" />'."\n".'\0', 20 $page, 1); 13 21 } 14 22 } 15 23 16 if (isset($identifier)) { 17 $page = preg_replace(',</head>,i', 18 "\n".'<meta name="SPIP.identifier" content="'.$identifier.'" />'."\n".'\0', 19 $page, 1); 20 } 21 24 // Insertion du mouchard JS 22 25 if (!strpos($page, '<!-- MOUCHARD STATS SPIP -->')) 23 26 $page = preg_replace(',</body>,i', statsjs_mouchard()."\n".'\0', $page, 1); 24 25 27 26 28 return $page;
Note: See TracChangeset
for help on using the changeset viewer.