Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * D�claration des filtres et balises |
---|
4 | * |
---|
5 | * @plugin Pages |
---|
6 | * @copyright 2013 |
---|
7 | * @author RastaPopoulos |
---|
8 | * @licence GNU/GPL |
---|
9 | * @package SPIP\Pages\Pipelines |
---|
10 | * @link http://contrib.spip.net/Pages-uniques |
---|
11 | */ |
---|
12 | |
---|
13 | if (!defined('_ECRIRE_INC_VERSION')) { |
---|
14 | return; |
---|
15 | } |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | // http://doc.spip.org/@balise_URL_ARTICLE_dist |
---|
20 | function balise_URL_PAGE_UNIQUE_dist($p) { |
---|
21 | |
---|
22 | $_id = interprete_argument_balise(1, $p); |
---|
23 | if (!$_id) { |
---|
24 | $msg = array('zbug_balise_sans_argument', array('balise' => ' URL_PAGE_UNIQUE')); |
---|
25 | erreur_squelette($msg, $p); |
---|
26 | $p->interdire_scripts = false; |
---|
27 | return $p; |
---|
28 | } |
---|
29 | |
---|
30 | if (!function_exists('generer_generer_url_arg')) { |
---|
31 | include_spip('balise/url_'); |
---|
32 | } |
---|
33 | |
---|
34 | $_id = "sql_getfetsel('id_article','spip_articles','page='.sql_quote($_id))"; |
---|
35 | $p->code = generer_generer_url_arg('article', $p, $_id); |
---|
36 | if (!$p->etoile) { |
---|
37 | $p->code = "vider_url($p->code)"; |
---|
38 | } |
---|
39 | $p->interdire_scripts = false; |
---|
40 | return $p; |
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.