]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - IkiWiki/Plugin/inline.pm
Merge commit 'upstream/master' into prv/po
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
1 #!/usr/bin/perl
2 # Page inlining and blogging.
3 package IkiWiki::Plugin::inline;
5 use warnings;
6 use strict;
7 use Encode;
8 use IkiWiki 3.00;
9 use URI;
11 my %knownfeeds;
12 my %page_numfeeds;
13 my @inline;
14 my $nested=0;
16 sub import {
17         hook(type => "getopt", id => "inline", call => \&getopt);
18         hook(type => "getsetup", id => "inline", call => \&getsetup);
19         hook(type => "checkconfig", id => "inline", call => \&checkconfig);
20         hook(type => "sessioncgi", id => "inline", call => \&sessioncgi);
21         hook(type => "preprocess", id => "inline", 
22                 call => \&IkiWiki::preprocess_inline);
23         hook(type => "pagetemplate", id => "inline",
24                 call => \&IkiWiki::pagetemplate_inline);
25         hook(type => "format", id => "inline", call => \&format, first => 1);
26         # Hook to change to do pinging since it's called late.
27         # This ensures each page only pings once and prevents slow
28         # pings interrupting page builds.
29         hook(type => "change", id => "inline", call => \&IkiWiki::pingurl);
30 }
32 sub getopt () {
33         eval q{use Getopt::Long};
34         error($@) if $@;
35         Getopt::Long::Configure('pass_through');
36         GetOptions(
37                 "rss!" => \$config{rss},
38                 "atom!" => \$config{atom},
39                 "allowrss!" => \$config{allowrss},
40                 "allowatom!" => \$config{allowatom},
41                 "pingurl=s" => sub {
42                         push @{$config{pingurl}}, $_[1];
43                 },      
44         );
45 }
47 sub getsetup () {
48         return
49                 plugin => {
50                         safe => 1,
51                         rebuild => undef,
52                 },
53                 rss => {
54                         type => "boolean",
55                         example => 0,
56                         description => "enable rss feeds by default?",
57                         safe => 1,
58                         rebuild => 1,
59                 },
60                 atom => {
61                         type => "boolean",
62                         example => 0,
63                         description => "enable atom feeds by default?",
64                         safe => 1,
65                         rebuild => 1,
66                 },
67                 allowrss => {
68                         type => "boolean",
69                         example => 0,
70                         description => "allow rss feeds to be used?",
71                         safe => 1,
72                         rebuild => 1,
73                 },
74                 allowatom => {
75                         type => "boolean",
76                         example => 0,
77                         description => "allow atom feeds to be used?",
78                         safe => 1,
79                         rebuild => 1,
80                 },
81                 pingurl => {
82                         type => "string",
83                         example => "http://rpc.technorati.com/rpc/ping",
84                         description => "urls to ping (using XML-RPC) on feed update",
85                         safe => 1,
86                         rebuild => 0,
87                 },
88 }
90 sub checkconfig () {
91         if (($config{rss} || $config{atom}) && ! length $config{url}) {
92                 error(gettext("Must specify url to wiki with --url when using --rss or --atom"));
93         }
94         if ($config{rss}) {
95                 push @{$config{wiki_file_prune_regexps}}, qr/\.rss$/;
96         }
97         if ($config{atom}) {
98                 push @{$config{wiki_file_prune_regexps}}, qr/\.atom$/;
99         }
100         if (! exists $config{pingurl}) {
101                 $config{pingurl}=[];
102         }
105 sub format (@) {
106         my %params=@_;
108         # Fill in the inline content generated earlier. This is actually an
109         # optimisation.
110         $params{content}=~s{<div class="inline" id="([^"]+)"></div>}{
111                 delete @inline[$1,]
112         }eg;
113         return $params{content};
116 sub sessioncgi ($$) {
117         my $q=shift;
118         my $session=shift;
120         if ($q->param('do') eq 'blog') {
121                 my $page=titlepage(decode_utf8($q->param('title')));
122                 $page=~s/(\/)/"__".ord($1)."__"/eg; # don't create subdirs
123                 # if the page already exists, munge it to be unique
124                 my $from=$q->param('from');
125                 my $add="";
126                 while (exists $IkiWiki::pagecase{lc($from."/".$page.$add)}) {
127                         $add=1 unless length $add;
128                         $add++;
129                 }
130                 $q->param('page', $page.$add);
131                 # now go create the page
132                 $q->param('do', 'create');
133                 # make sure the editpage plugin in loaded
134                 if (IkiWiki->can("cgi_editpage")) {
135                         IkiWiki::cgi_editpage($q, $session);
136                 }
137                 else {
138                         error(gettext("page editing not allowed"));
139                 }
140                 exit;
141         }
144 # Back to ikiwiki namespace for the rest, this code is very much
145 # internal to ikiwiki even though it's separated into a plugin.
146 package IkiWiki;
148 my %toping;
149 my %feedlinks;
151 sub preprocess_inline (@) {
152         my %params=@_;
153         
154         if (! exists $params{pages} && ! exists $params{pagenames}) {
155                 error gettext("missing pages parameter");
156         }
157         my $raw=yesno($params{raw});
158         my $archive=yesno($params{archive});
159         my $rss=(($config{rss} || $config{allowrss}) && exists $params{rss}) ? yesno($params{rss}) : $config{rss};
160         my $atom=(($config{atom} || $config{allowatom}) && exists $params{atom}) ? yesno($params{atom}) : $config{atom};
161         my $quick=exists $params{quick} ? yesno($params{quick}) : 0;
162         my $feeds=exists $params{feeds} ? yesno($params{feeds}) : !$quick;
163         my $emptyfeeds=exists $params{emptyfeeds} ? yesno($params{emptyfeeds}) : 1;
164         my $feedonly=yesno($params{feedonly});
165         if (! exists $params{show} && ! $archive) {
166                 $params{show}=10;
167         }
168         if (! exists $params{feedshow} && exists $params{show}) {
169                 $params{feedshow}=$params{show};
170         }
171         my $desc;
172         if (exists $params{description}) {
173                 $desc = $params{description} 
174         }
175         else {
176                 $desc = $config{wikiname};
177         }
178         my $actions=yesno($params{actions});
179         if (exists $params{template}) {
180                 $params{template}=~s/[^-_a-zA-Z0-9]+//g;
181         }
182         else {
183                 $params{template} = $archive ? "archivepage" : "inlinepage";
184         }
186         my @list;
188         if (exists $params{pagenames}) {
189                 foreach my $p (qw(sort pages)) {
190                         if (exists $params{$p}) {
191                                 error sprintf(gettext("the %s and %s parameters cannot be used together"),
192                                         "pagenames", $p);
193                         }
194                 }
196                 @list = map { bestlink($params{page}, $_) }
197                         split ' ', $params{pagenames};
199                 $params{pages} = join(" or ", @list);
200         }
201         else {
202                 @list = pagespec_match_list(
203                         [ grep { $_ ne $params{page} } keys %pagesources ],
204                         $params{pages}, location => $params{page});
206                 if (exists $params{sort} && $params{sort} eq 'title') {
207                         @list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list;
208                 }
209                 elsif (exists $params{sort} && $params{sort} eq 'title_natural') {
210                         eval q{use Sort::Naturally};
211                         if ($@) {
212                                 error(gettext("Sort::Naturally needed for title_natural sort"));
213                         }
214                         @list=sort { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) } @list;
215                 }
216                 elsif (exists $params{sort} && $params{sort} eq 'mtime') {
217                         @list=sort { $pagemtime{$b} <=> $pagemtime{$a} } @list;
218                 }
219                 elsif (! exists $params{sort} || $params{sort} eq 'age') {
220                         @list=sort { $pagectime{$b} <=> $pagectime{$a} } @list;
221                 }
222                 else {
223                         error sprintf(gettext("unknown sort type %s"), $params{sort});
224                 }
225         }
227         if (yesno($params{reverse})) {
228                 @list=reverse(@list);
229         }
231         if (exists $params{skip}) {
232                 @list=@list[$params{skip} .. scalar @list - 1];
233         }
234         
235         my @feedlist;
236         if ($feeds) {
237                 if (exists $params{feedshow} &&
238                     $params{feedshow} && @list > $params{feedshow}) {
239                         @feedlist=@list[0..$params{feedshow} - 1];
240                 }
241                 else {
242                         @feedlist=@list;
243                 }
244         }
245         
246         if ($params{show} && @list > $params{show}) {
247                 @list=@list[0..$params{show} - 1];
248         }
250         add_depends($params{page}, $params{pages});
251         # Explicitly add all currently displayed pages as dependencies, so
252         # that if they are removed or otherwise changed, the inline will be
253         # sure to be updated.
254         foreach my $p ($#list >= $#feedlist ? @list : @feedlist) {
255                 add_depends($params{page}, $p);
256         }
257         
258         if ($feeds && exists $params{feedpages}) {
259                 @feedlist=pagespec_match_list(\@feedlist, $params{feedpages}, location => $params{page});
260         }
262         my ($feedbase, $feednum);
263         if ($feeds) {
264                 # Ensure that multiple feeds on a page go to unique files.
265                 
266                 # Feedfile can lead to conflicts if usedirs is not enabled,
267                 # so avoid supporting it in that case.
268                 delete $params{feedfile} if ! $config{usedirs};
269                 # Tight limits on legal feedfiles, to avoid security issues
270                 # and conflicts.
271                 if (defined $params{feedfile}) {
272                         if ($params{feedfile} =~ /\// ||
273                             $params{feedfile} !~ /$config{wiki_file_regexp}/) {
274                                 error("illegal feedfile");
275                         }
276                         $params{feedfile}=possibly_foolish_untaint($params{feedfile});
277                 }
278                 $feedbase=targetpage($params{destpage}, "", $params{feedfile});
280                 my $feedid=join("\0", $feedbase, map { $_."\0".$params{$_} } sort keys %params);
281                 if (exists $knownfeeds{$feedid}) {
282                         $feednum=$knownfeeds{$feedid};
283                 }
284                 else {
285                         if (exists $page_numfeeds{$params{destpage}}{$feedbase}) {
286                                 if ($feeds) {
287                                         $feednum=$knownfeeds{$feedid}=++$page_numfeeds{$params{destpage}}{$feedbase};
288                                 }
289                         }
290                         else {
291                                 $feednum=$knownfeeds{$feedid}="";
292                                 if ($feeds) {
293                                         $page_numfeeds{$params{destpage}}{$feedbase}=1;
294                                 }
295                         }
296                 }
297         }
299         my $rssurl=abs2rel($feedbase."rss".$feednum, dirname(htmlpage($params{destpage}))) if $feeds && $rss;
300         my $atomurl=abs2rel($feedbase."atom".$feednum, dirname(htmlpage($params{destpage}))) if $feeds && $atom;
302         my $ret="";
304         if (length $config{cgiurl} && ! $params{preview} && (exists $params{rootpage} ||
305             (exists $params{postform} && yesno($params{postform}))) &&
306             IkiWiki->can("cgi_editpage")) {
307                 # Add a blog post form, with feed buttons.
308                 my $formtemplate=template("blogpost.tmpl", blind_cache => 1);
309                 $formtemplate->param(cgiurl => $config{cgiurl});
310                 $formtemplate->param(rootpage => rootpage(%params));
311                 $formtemplate->param(rssurl => $rssurl) if $feeds && $rss;
312                 $formtemplate->param(atomurl => $atomurl) if $feeds && $atom;
313                 if (exists $params{postformtext}) {
314                         $formtemplate->param(postformtext =>
315                                 $params{postformtext});
316                 }
317                 else {
318                         $formtemplate->param(postformtext =>
319                                 gettext("Add a new post titled:"));
320                 }
321                 $ret.=$formtemplate->output;
322                 
323                 # The post form includes the feed buttons, so
324                 # emptyfeeds cannot be hidden.
325                 $emptyfeeds=1;
326         }
327         elsif ($feeds && !$params{preview} && ($emptyfeeds || @feedlist)) {
328                 # Add feed buttons.
329                 my $linktemplate=template("feedlink.tmpl", blind_cache => 1);
330                 $linktemplate->param(rssurl => $rssurl) if $rss;
331                 $linktemplate->param(atomurl => $atomurl) if $atom;
332                 $ret.=$linktemplate->output;
333         }
334         
335         if (! $feedonly) {
336                 require HTML::Template;
337                 my @params=IkiWiki::template_params($params{template}.".tmpl", blind_cache => 1);
338                 if (! @params) {
339                         error sprintf(gettext("nonexistant template %s"), $params{template});
340                 }
341                 my $template=HTML::Template->new(@params) unless $raw;
342         
343                 foreach my $page (@list) {
344                         my $file = $pagesources{$page};
345                         my $type = pagetype($file);
346                         if (! $raw || ($raw && ! defined $type)) {
347                                 unless ($archive && $quick) {
348                                         # Get the content before populating the
349                                         # template, since getting the content uses
350                                         # the same template if inlines are nested.
351                                         my $content=get_inline_content($page, $params{destpage});
352                                         $template->param(content => $content);
353                                 }
354                                 $template->param(pageurl => urlto($page, $params{destpage}));
355                                 $template->param(inlinepage => $page);
356                                 $template->param(title => pagetitle(basename($page)));
357                                 $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}));
358                                 $template->param(mtime => displaytime($pagemtime{$page}, $params{timeformat}));
359                                 $template->param(first => 1) if $page eq $list[0];
360                                 $template->param(last => 1) if $page eq $list[$#list];
361         
362                                 if ($actions) {
363                                         my $file = $pagesources{$page};
364                                         my $type = pagetype($file);
365                                         if ($config{discussion}) {
366                                                 if ($page !~ /.*\/\Q$config{discussionpage}\E$/ &&
367                                                     (length $config{cgiurl} ||
368                                                      exists $links{$page."/".$config{discussionpage}})) {
369                                                         $template->param(have_actions => 1);
370                                                         $template->param(discussionlink =>
371                                                                 htmllink($page,
372                                                                         $params{destpage},
373                                                                         $config{discussionpage},
374                                                                         noimageinline => 1,
375                                                                         forcesubpage => 1));
376                                                 }
377                                         }
378                                         if (length $config{cgiurl} && defined $type) {
379                                                 $template->param(have_actions => 1);
380                                                 $template->param(editurl => cgiurl(do => "edit", page => $page));
381                                         }
382                                 }
383         
384                                 run_hooks(pagetemplate => sub {
385                                         shift->(page => $page, destpage => $params{destpage},
386                                                 template => $template,);
387                                 });
388         
389                                 $ret.=$template->output;
390                                 $template->clear_params;
391                         }
392                         else {
393                                 if (defined $type) {
394                                         $ret.="\n".
395                                               linkify($page, $params{destpage},
396                                               preprocess($page, $params{destpage},
397                                               filter($page, $params{destpage},
398                                               readfile(srcfile($file)))));
399                                 }
400                         }
401                 }
402         }
403         
404         if ($feeds && ($emptyfeeds || @feedlist)) {
405                 if ($rss) {
406                         my $rssp=$feedbase."rss".$feednum;
407                         will_render($params{destpage}, $rssp);
408                         if (! $params{preview}) {
409                                 writefile($rssp, $config{destdir},
410                                         genfeed("rss",
411                                                 $config{url}."/".$rssp, $desc, $params{guid}, $params{destpage}, @feedlist));
412                                 $toping{$params{destpage}}=1 unless $config{rebuild};
413                                 $feedlinks{$params{destpage}}.=qq{<link rel="alternate" type="application/rss+xml" title="$desc (RSS)" href="$rssurl" />};
414                         }
415                 }
416                 if ($atom) {
417                         my $atomp=$feedbase."atom".$feednum;
418                         will_render($params{destpage}, $atomp);
419                         if (! $params{preview}) {
420                                 writefile($atomp, $config{destdir},
421                                         genfeed("atom", $config{url}."/".$atomp, $desc, $params{guid}, $params{destpage}, @feedlist));
422                                 $toping{$params{destpage}}=1 unless $config{rebuild};
423                                 $feedlinks{$params{destpage}}.=qq{<link rel="alternate" type="application/atom+xml" title="$desc (Atom)" href="$atomurl" />};
424                         }
425                 }
426         }
427         
428         return $ret if $raw || $nested;
429         push @inline, $ret;
430         return "<div class=\"inline\" id=\"$#inline\"></div>\n\n";
433 sub pagetemplate_inline (@) {
434         my %params=@_;
435         my $page=$params{page};
436         my $template=$params{template};
438         $template->param(feedlinks => $feedlinks{$page})
439                 if exists $feedlinks{$page} && $template->query(name => "feedlinks");
442 sub get_inline_content ($$) {
443         my $page=shift;
444         my $destpage=shift;
445         
446         my $file=$pagesources{$page};
447         my $type=pagetype($file);
448         if (defined $type) {
449                 $nested++;
450                 my $ret=htmlize($page, $destpage, $type,
451                        linkify($page, $destpage,
452                        preprocess($page, $destpage,
453                        filter($page, $destpage,
454                        readfile(srcfile($file))))));
455                 $nested--;
456                 return $ret;
457         }
458         else {
459                 return "";
460         }
463 sub date_822 ($) {
464         my $time=shift;
466         my $lc_time=POSIX::setlocale(&POSIX::LC_TIME);
467         POSIX::setlocale(&POSIX::LC_TIME, "C");
468         my $ret=POSIX::strftime("%a, %d %b %Y %H:%M:%S %z", localtime($time));
469         POSIX::setlocale(&POSIX::LC_TIME, $lc_time);
470         return $ret;
473 sub date_3339 ($) {
474         my $time=shift;
476         my $lc_time=POSIX::setlocale(&POSIX::LC_TIME);
477         POSIX::setlocale(&POSIX::LC_TIME, "C");
478         my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", gmtime($time));
479         POSIX::setlocale(&POSIX::LC_TIME, $lc_time);
480         return $ret;
483 sub absolute_urls ($$) {
484         # sucky sub because rss sucks
485         my $content=shift;
486         my $baseurl=shift;
488         my $url=$baseurl;
489         $url=~s/[^\/]+$//;
491         # what is the non path part of the url?
492         my $top_uri = URI->new($url);
493         $top_uri->path_query(""); # reset the path
494         my $urltop = $top_uri->as_string;
496         $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(#[^"]+)"/$1 href="$baseurl$2"/mig;
497         # relative to another wiki page
498         $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(?!\w+:)([^\/][^"]*)"/$1 href="$url$2"/mig;
499         $content=~s/(<img(?:\s+(?:class|id|width|height)\s*="?\w+"?)*)\s+src=\s*"(?!\w+:)([^\/][^"]*)"/$1 src="$url$2"/mig;
500         # relative to the top of the site
501         $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(?!\w+:)(\/[^"]*)"/$1 href="$urltop$2"/mig;
502         $content=~s/(<img(?:\s+(?:class|id|width|height)\s*="?\w+"?)*)\s+src=\s*"(?!\w+:)(\/[^"]*)"/$1 src="$urltop$2"/mig;
503         return $content;
506 sub genfeed ($$$$$@) {
507         my $feedtype=shift;
508         my $feedurl=shift;
509         my $feeddesc=shift;
510         my $guid=shift;
511         my $page=shift;
512         my @pages=@_;
513         
514         my $url=URI->new(encode_utf8(urlto($page,"",1)));
515         
516         my $itemtemplate=template($feedtype."item.tmpl", blind_cache => 1);
517         my $content="";
518         my $lasttime = 0;
519         foreach my $p (@pages) {
520                 my $u=URI->new(encode_utf8(urlto($p, "", 1)));
521                 my $pcontent = absolute_urls(get_inline_content($p, $page), $url);
523                 $itemtemplate->param(
524                         title => pagetitle(basename($p)),
525                         url => $u,
526                         permalink => $u,
527                         cdate_822 => date_822($pagectime{$p}),
528                         mdate_822 => date_822($pagemtime{$p}),
529                         cdate_3339 => date_3339($pagectime{$p}),
530                         mdate_3339 => date_3339($pagemtime{$p}),
531                 );
533                 if (exists $pagestate{$p}) {
534                         if (exists $pagestate{$p}{meta}{guid}) {
535                                 $itemtemplate->param(guid => $pagestate{$p}{meta}{guid});
536                         }
538                         if (exists $pagestate{$p}{meta}{updated}) {
539                                 $itemtemplate->param(mdate_822 => date_822($pagestate{$p}{meta}{updated}));
540                                 $itemtemplate->param(mdate_3339 => date_3339($pagestate{$p}{meta}{updated}));
541                         }
542                 }
544                 if ($itemtemplate->query(name => "enclosure")) {
545                         my $file=$pagesources{$p};
546                         my $type=pagetype($file);
547                         if (defined $type) {
548                                 $itemtemplate->param(content => $pcontent);
549                         }
550                         else {
551                                 my $size=(srcfile_stat($file))[8];
552                                 my $mime="unknown";
553                                 eval q{use File::MimeInfo};
554                                 if (! $@) {
555                                         $mime = mimetype($file);
556                                 }
557                                 $itemtemplate->param(
558                                         enclosure => $u,
559                                         type => $mime,
560                                         length => $size,
561                                 );
562                         }
563                 }
564                 else {
565                         $itemtemplate->param(content => $pcontent);
566                 }
568                 run_hooks(pagetemplate => sub {
569                         shift->(page => $p, destpage => $page,
570                                 template => $itemtemplate);
571                 });
573                 $content.=$itemtemplate->output;
574                 $itemtemplate->clear_params;
576                 $lasttime = $pagemtime{$p} if $pagemtime{$p} > $lasttime;
577         }
579         my $template=template($feedtype."page.tmpl", blind_cache => 1);
580         $template->param(
581                 title => $page ne "index" ? pagetitle($page) : $config{wikiname},
582                 wikiname => $config{wikiname},
583                 pageurl => $url,
584                 content => $content,
585                 feeddesc => $feeddesc,
586                 guid => $guid,
587                 feeddate => date_3339($lasttime),
588                 feedurl => $feedurl,
589                 version => $IkiWiki::version,
590         );
591         run_hooks(pagetemplate => sub {
592                 shift->(page => $page, destpage => $page,
593                         template => $template);
594         });
595         
596         return $template->output;
599 sub pingurl (@) {
600         return unless @{$config{pingurl}} && %toping;
602         eval q{require RPC::XML::Client};
603         if ($@) {
604                 debug(gettext("RPC::XML::Client not found, not pinging"));
605                 return;
606         }
608         # daemonize here so slow pings don't slow down wiki updates
609         defined(my $pid = fork) or error("Can't fork: $!");
610         return if $pid;
611         chdir '/';
612         POSIX::setsid() or error("Can't start a new session: $!");
613         open STDIN, '/dev/null';
614         open STDOUT, '>/dev/null';
615         open STDERR, '>&STDOUT' or error("Can't dup stdout: $!");
617         # Don't need to keep a lock on the wiki as a daemon.
618         IkiWiki::unlockwiki();
620         foreach my $page (keys %toping) {
621                 my $title=pagetitle(basename($page), 0);
622                 my $url=urlto($page, "", 1);
623                 foreach my $pingurl (@{$config{pingurl}}) {
624                         debug("Pinging $pingurl for $page");
625                         eval {
626                                 my $client = RPC::XML::Client->new($pingurl);
627                                 my $req = RPC::XML::request->new('weblogUpdates.ping',
628                                         $title, $url);
629                                 my $res = $client->send_request($req);
630                                 if (! ref $res) {
631                                         error("Did not receive response to ping");
632                                 }
633                                 my $r=$res->value;
634                                 if (! exists $r->{flerror} || $r->{flerror}) {
635                                         error("Ping rejected: ".(exists $r->{message} ? $r->{message} : "[unknown reason]"));
636                                 }
637                         };
638                         if ($@) {
639                                 error "Ping failed: $@";
640                         }
641                 }
642         }
644         exit 0; # daemon done
648 sub rootpage (@) {
649         my %params=@_;
651         my $rootpage;
652         if (exists $params{rootpage}) {
653                 $rootpage=bestlink($params{page}, $params{rootpage});
654                 if (!length $rootpage) {
655                         $rootpage=$params{rootpage};
656                 }
657         }
658         else {
659                 $rootpage=$params{page};
660         }
661         return $rootpage;