4 |
|
// |
5 |
|
// $Id$ |
6 |
|
|
7 |
< |
#include "Matcher.hpp" |
8 |
< |
#include "Page.hpp" |
7 |
> |
#include "SiteMapper.hpp" |
8 |
> |
#include "Matcher/Matcher.hpp" |
9 |
|
|
10 |
|
void Page::setUrl(const ext::String& url) |
11 |
|
{ |
12 |
< |
Matcher matcher("^http://(.+)(/.*)?$"); |
12 |
> |
Matcher matcher("^http://(.+)(/.*)?$", (PCRE_UNGREEDY | PCRE_DOTALL)); |
13 |
|
|
14 |
|
if (url == matcher) |
15 |
|
{ |
19 |
|
} |
20 |
|
else |
21 |
|
{ |
22 |
< |
api::Cerr << program << ": Page.setUrl(" << url << ") failure.\n"; |
22 |
> |
api::Cerr << SiteMapper::program << ": Page.setUrl(" << url << ") failure.\n"; |
23 |
|
|
24 |
< |
std::exit(1); |
24 |
> |
throw; |
25 |
|
} |
26 |
|
} |
27 |
|
|
58 |
|
{ |
59 |
|
xml::ScopeElement list(xml, "list"); |
60 |
|
|
61 |
< |
_mforeach (ext::Vector<Page>, child, page.children) xml << *child; |
61 |
> |
_foreach (ext::Vector<Page>, child, page.children) xml << *child; |
62 |
|
} |
63 |
|
|
64 |
|
return xml; |