Changeset 90080 in spip-zone


Ignore:
Timestamp:
Jun 10, 2015, 4:00:14 PM (6 years ago)
Author:
fil@…
Message:

compatbilite spip 2.0 (qui n'offre pas la fonction _nano_sha256())

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/memoization/public/cacher.php

    r84087 r90080  
    5050                include_spip('inc/acces');
    5151                include_spip('auth/sha256.inc');
    52                 ecrire_meta('cache_signature', _nano_sha256($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SERVER_SIGNATURE"] . creer_uniqid()), 'non');
     52                $sigfunc = function_exists('_nano_sha256') ? '_nano_sha256' : 'md5';
     53                ecrire_meta('cache_signature', $sigfunc($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SERVER_SIGNATURE"] . creer_uniqid()), 'non');
    5354        }
    5455        return crc32($GLOBALS['meta']['cache_signature'].$page['texte']);
Note: See TracChangeset for help on using the changeset viewer.