3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2007 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined("_ECRIRE_INC_VERSION")) return;
16 // Recupere et affiche (en ajax) une fonction memorisee dans inc/presentation
17 // http://doc.spip.org/@exec_memoriser_dist
18 function exec_memoriser_dist()
20 $hash = _request('hash');
21 lire_fichier(_DIR_SESSIONS
.'ajax_fonctions.txt', $ajax_fonctions);
22 $ajax_fonctions = @unserialize($ajax_fonctions);
23 if ($res = $ajax_fonctions[$hash]) {
24 list(,$t,$r,$p,$f) = $res;
26 $cpt = spip_fetch_array(spip_query("SELECT COUNT(*) AS n FROM " . $r['FROM'] . ($r['WHERE'] ?
(' WHERE ' . $r['WHERE']) : '') . ($r['GROUP BY'] ?
(' GROUP BY ' . $r['GROUP BY']) : '')));
28 include_spip('inc/presentation');
29 ajax_retour(afficher_articles_trad($t, $r, $f, $p, $hash, $cpt['n'], _request('trad')));
32 spip_log("memoriser $q vide");