Last change
on this file since 85654 was
82059,
checked in by cedric@…, 7 years ago
|
#URL_PAGE_UNIQUE permet de recuperer l'URL d'une page par son identifiant, unique
|
File size:
917 bytes
|
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")) return; |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | // http://doc.spip.org/@balise_URL_ARTICLE_dist |
---|
18 | function balise_URL_PAGE_UNIQUE_dist($p) { |
---|
19 | |
---|
20 | $_id = interprete_argument_balise(1,$p); |
---|
21 | if (!$_id) { |
---|
22 | $msg = array('zbug_balise_sans_argument', array('balise' => ' URL_PAGE_UNIQUE')); |
---|
23 | erreur_squelette($msg, $p); |
---|
24 | $p->interdire_scripts = false; |
---|
25 | return $p; |
---|
26 | } |
---|
27 | |
---|
28 | if (!function_exists("generer_generer_url_arg")) |
---|
29 | include_spip("balise/url_"); |
---|
30 | |
---|
31 | $_id = "sql_getfetsel('id_article','spip_articles','page='.sql_quote($_id))"; |
---|
32 | $p->code = generer_generer_url_arg('article', $p, $_id); |
---|
33 | if (!$p->etoile) |
---|
34 | $p->code = "vider_url($p->code)"; |
---|
35 | $p->interdire_scripts = false; |
---|
36 | return $p; |
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.