source: spip-zone/_plugins_/forum_sectorise/forumsectorise_pipelines.php @ 57773

Last change on this file since 57773 was 57773, checked in by yffic@…, 8 years ago

Compat Spip3

File size: 562 bytes
Line 
1<?php
2if (!defined("_ECRIRE_INC_VERSION")) return;
3
4function forumsectorise_pre_insertion($flux) {
5        include_spip('inc/plugin');
6        if(spip_version_compare($GLOBALS['spip_version_branche'],"2.1.99","<")) {
7                $table = 'spip_articles' ;
8        } else {
9                $table = 'spip_article' ;
10        }
11
12        $conf_forumsectorise = lire_config('forumsectorise');
13        if (($flux['args']['table'] == $table) &&
14                 in_array($flux['data']['id_secteur'], $conf_forumsectorise['id_secteur'])) {
15                $flux['data']['accepter_forum'] = $conf_forumsectorise['type'];
16        }
17        return $flux;
18}
19
20
21?>
Note: See TracBrowser for help on using the repository browser.