Subversion Repositories Applications.wikini

Rev

Rev 58 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 58 Rev 60
Line 97... Line 97...
97
		return $sectionTxt;
97
		return $sectionTxt;
98
	}
98
	}
Line 99... Line 99...
99
	
99
	
100
	public function getSectionParTitre($page, $titre, $inclure_titre = false) {
100
	public function getSectionParTitre($page, $titre, $inclure_titre = false) {
101
		$section = '';
101
		$section = '';
102
		$reg_exp = '/((=[=]+)[ ]*'.preg_quote(trim($titre), '/').'[ ]*=[=]+)[.]*/i';
102
		$reg_exp = '/((=[=]+)[ ]*'. trim($titre) .'[ ]*=[=]+)[.]*/i';
103
		$match = preg_split($reg_exp, $page, 2, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
103
		$match = preg_split($reg_exp, $page, 2, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
104
		if (count($match) > 3) {
104
		if (count($match) > 3) {
105
			$section = explode(trim($match[2]), $match[3], 2);
105
			$section = explode(trim($match[2]), $match[3], 2);
106
			$section = $section[0];
106
			$section = $section[0];