Changeset 7788 in spip-zone


Ignore:
Timestamp:
Dec 6, 2006, 3:23:03 AM (12 years ago)
Author:
patfr@…
Message:

compat 1.9.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/_stable_/jeux/jeux_utils.php

    r7786 r7788  
    126126function jeux_javascript($b) {
    127127 $f = find_in_path("javascript/$b.js");
     128 if (!$f && @is_readable($s = _DIR_IMG_PACK .$b.'.js')) $f = $s;                // compatibilite avec 1.9.1
    128129 return $f?'<script type="text/javascript" src="'.$f.'"></script>'."\n":'';
    129130}
     
    131132// deux fonctions qui utilisent inc/layer.php
    132133function jeux_block_init() {
     134  global $spip_version_code;
     135  if ($spip_version_code<1.92) { $temp = _DIR_IMG_PACK; define(_DIR_IMG_PACK, 'ecrire/'._DIR_IMG_PACK); }       // compatibilite avec 1.9.1
    133136  include_spip('inc/layer');
    134   //verif_butineur();
     137  if ($spip_version_code<1.92) define(_DIR_IMG_PACK, $temp);            // compatibilite avec 1.9.1
    135138}
    136139function jeux_block_invisible($id, $texte, $block) {
    137  return $texte?bouton_block_invisible($id).$texte.debut_block_invisible($id).$block.fin_block():'';
     140 global $spip_version_code;
     141 if (!$texte) return '';
     142 return $spip_version_code<1.92?
     143        bouton_block_visible($id).$texte.debut_block_visible($id).$block.fin_block()
     144        :bouton_block_invisible($id).$texte.debut_block_invisible($id).$block.fin_block();
    138145}
    139146
Note: See TracChangeset for help on using the changeset viewer.