Subversion Repositories Applications.wikini

Compare Revisions

Ignore whitespace Rev 59 → Rev 60

/branches/v1.0-pithivier/api/scripts/modules/migration_smart_flore/MigrationSmartFlore.php
35,12 → 35,13
protected function migrerFormatSmartFlore() {
 
$sections = array("Fiche simplifiée Smart'flore", "Introduction","Comment la reconnaître ?","Son histoire","Ses usages","Écologie & habitat","Ce qu'il faut savoir...","Sources");
// sections "souples" - attention, ne seront pas "quotées" mais interprétées comme morceaux de regexp directement !
$sections = array("Fiche simplifi.+e Smart.+flore", "Introduction","Comment la reconna.+tre.+","Son histoire","Ses usages",".+cologie.+habitat","Ce qu.+il faut savoir.+","Sources");
$nouvelles_sections = array(
"Description" => array("Introduction","Comment la reconnaître ?","Son histoire"),
"Usages" => array("Ses usages", "Ce qu'il faut savoir..."),
"Écologie & habitat" => array("Écologie & habitat"),
"Sources" => array("Sources")
"Description" => array("Introduction","Comment la reconna.+tre.+","Son histoire"),
"Usages" => array("Ses usages", "Ce qu.+il faut savoir.+"),
"Écologie & habitat" => array(".+cologie.+habitat"),
"Sources" => array("Sources")
);
$where_section = 'body NOT LIKE "';
/branches/v1.0-pithivier/api/scripts/bibliotheque/ManipulationPage.php
99,7 → 99,7
public function getSectionParTitre($page, $titre, $inclure_titre = false) {
$section = '';
$reg_exp = '/((=[=]+)[ ]*'.preg_quote(trim($titre), '/').'[ ]*=[=]+)[.]*/i';
$reg_exp = '/((=[=]+)[ ]*'. trim($titre) .'[ ]*=[=]+)[.]*/i';
$match = preg_split($reg_exp, $page, 2, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
if (count($match) > 3) {
$section = explode(trim($match[2]), $match[3], 2);