source: trunk/gsdl/perllib/plugins/RecPlug.pm@ 10218

Last change on this file since 10218 was 10218, checked in by kjdon, 19 years ago

Jeffrey's new parsing modifications, committed approx 6 July, 15.16

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 21.3 KB
Line 
1###########################################################################
2#
3# RecPlug.pm --
4# A component of the Greenstone digital library software
5# from the New Zealand Digital Library Project at the
6# University of Waikato, New Zealand.
7#
8# Copyright (C) 1999 New Zealand Digital Library Project
9#
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program; if not, write to the Free Software
22# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23#
24###########################################################################
25
26# RecPlug is a plugin which recurses through directories processing
27# each file it finds.
28
29# RecPlug has one option: use_metadata_files. When this is set, it will
30# check each directory for an XML file called "metadata.xml" that specifies
31# metadata for the files (and subdirectories) in the directory.
32#
33# Here's an example of a metadata file that uses three FileSet structures
34# (ignore the # characters):
35
36#<?xml version="1.0" encoding="UTF-8" standalone="no"?>
37#<!DOCTYPE DirectoryMetadata SYSTEM "http://greenstone.org/dtd/DirectoryMetadata/1.0/DirectoryMetadata.dtd">
38#<DirectoryMetadata>
39# <FileSet>
40# <FileName>nugget.*</FileName>
41# <Description>
42# <Metadata name="Title">Nugget Point, The Catlins</Metadata>
43# <Metadata name="Place" mode="accumulate">Nugget Point</Metadata>
44# </Description>
45# </FileSet>
46# <FileSet>
47# <FileName>nugget-point-1.jpg</FileName>
48# <Description>
49# <Metadata name="Title">Nugget Point Lighthouse, The Catlins</Metadata>
50# <Metadata name="Subject">Lighthouse</Metadata>
51# </Description>
52# </FileSet>
53# <FileSet>
54# <FileName>kaka-point-dir</FileName>
55# <Description>
56# <Metadata name="Title">Kaka Point, The Catlins</Metadata>
57# </Description>
58# </FileSet>
59#</DirectoryMetadata>
60
61# Metadata elements are read and applied to files in the order they appear
62# in the file.
63#
64# The FileName element describes the subfiles in the directory that the
65# metadata applies to as a perl regular expression (a FileSet group may
66# contain multiple FileName elements). So, <FileName>nugget.*</FileName>
67# indicates that the metadata records in the following Description block
68# apply to every subfile that starts with "nugget". For these files, a
69# Title metadata element is set, overriding any old value that the Title
70# might have had.
71#
72# Occasionally, we want to have multiple metadata values applied to a
73# document; in this case we use the "mode=accumulate" attribute of the
74# particular Metadata element. In the second metadata element of the first
75# FileSet above, the "Place" metadata is accumulating, and may therefore be
76# given several values. If we wanted to override these values and use a
77# single metadata element again, we could set the mode attribute to
78# "override" instead. Remember: every element is assumed to be in override
79# mode unless you specify otherwise, so if you want to accumulate metadata
80# for some field, every occurance must have "mode=accumulate" specified.
81#
82# The second FileSet element above applies to a specific file, called
83# nugget-point-1.jpg. This element overrides the Title metadata set in the
84# first FileSet, and adds a "Subject" metadata field.
85#
86# The third and final FileSet sets metadata for a subdirectory rather than
87# a file. The metadata specified (a Title) will be passed into the
88# subdirectory and applied to every file that occurs in the subdirectory
89# (and to every subsubdirectory and its contents, and so on) unless the
90# metadata is explictly overridden later in the import.
91
92
93
94package RecPlug;
95
96use BasPlug;
97use plugin;
98use util;
99
100use File::Basename;
101
102
103BEGIN {
104 @RecPlug::ISA = ('BasPlug');
105 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan");
106}
107
108use XMLParser;
109
110my $arguments =
111 [ { 'name' => "block_exp",
112 'desc' => "{BasPlug.block_exp}",
113 'type' => "regexp",
114 'deft' => &get_default_block_exp(),
115 'reqd' => "no" },
116 { 'name' => "use_metadata_files",
117 'desc' => "{RecPlug.use_metadata_files}",
118 'type' => "flag",
119 'reqd' => "no" },
120 { 'name' => "recheck_directories",
121 'desc' => "{RecPlug.recheck_directories}",
122 'type' => "flag",
123 'reqd' => "no" } ];
124
125my $options = { 'name' => "RecPlug",
126 'desc' => "{RecPlug.desc}",
127 'abstract' => "no",
128 'inherits' => "yes",
129 'args' => $arguments };
130
131
132my ($self);
133
134sub new {
135 my ($class) = shift (@_);
136 my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
137 push(@$pluginlist, $class);
138
139 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
140 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
141
142 $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
143 if ($self->{'use_metadata_files'}) {
144 # create XML::Parser object for parsing metadata.xml files
145 my $parser = new XML::Parser('Style' => 'Stream',
146 'Handlers' => {'Char' => \&Char,
147 'Doctype' => \&Doctype
148 });
149
150 $self->{'parser'} = $parser;
151 $self->{'in_filename'} = 0;
152 }
153
154 $self->{'subdir_extrametakeys'} = {};
155
156 return bless $self, $class;
157}
158
159sub begin {
160 my $self = shift (@_);
161 my ($pluginfo, $base_dir, $processor, $maxdocs) = @_;
162
163 my $proc_package_name = ref $processor;
164
165 if ($proc_package_name !~ /buildproc$/) {
166
167 # Only lookup timestamp info for import.pl
168
169 my $output_dir = $processor->getoutputdir();
170 my $archives_inf = &util::filename_cat($output_dir,"archives.inf");
171
172 if ( -e $archives_inf ) {
173 $self->{'inf_timestamp'} = -M $archives_inf;
174 }
175 }
176
177 $self->SUPER::begin($pluginfo, $base_dir, $processor, $maxdocs);
178}
179
180
181# return 1 if this class might recurse using $pluginfo
182sub is_recursive {
183 my $self = shift (@_);
184
185 return 1;
186}
187
188sub get_default_block_exp {
189 my $self = shift (@_);
190
191 return 'CVS';
192}
193
194# return number of files processed, undef if can't process
195# Note that $base_dir might be "" and that $file might
196# include directories
197
198# This function passes around metadata hash structures. Metadata hash
199# structures are hashes that map from a (scalar) key (the metadata element
200# name) to either a scalar metadata value or a reference to an array of
201# such values.
202
203sub read {
204 my $self = shift (@_);
205 my ($pluginfo, $base_dir, $file, $in_metadata, $processor, $maxdocs, $total_count, $gli) = @_;
206
207 my $outhandle = $self->{'outhandle'};
208 my $verbosity = $self->{'verbosity'};
209 my $read_metadata_files = $self->{'use_metadata_files'};
210
211 # Calculate the directory name and ensure it is a directory and
212 # that it is not explicitly blocked.
213 my $dirname = $file;
214 $dirname = &util::filename_cat ($base_dir, $file) if $base_dir =~ /\w/;
215 return undef unless (-d $dirname);
216 return 0 if ($self->{'block_exp'} ne "" && $dirname =~ /$self->{'block_exp'}/);
217
218 # check to make sure we're not reading the archives or index directory
219 my $gsdlhome = quotemeta($ENV{'GSDLHOME'});
220 if ($dirname =~ m/^$gsdlhome\/.*?\/import.*?\/(archives|index)$/) {
221 print $outhandle "RecPlug: $dirname appears to be a reference to a Greenstone collection, skipping.\n";
222 return 0;
223 }
224
225 # check to see we haven't got a cyclic path...
226 if ($dirname =~ m%(/.*){,41}%) {
227 print $outhandle "RecPlug: $dirname is 40 directories deep, is this a recursive path? if not increase constant in RecPlug.pm.\n";
228 return 0;
229 }
230
231 # check to see we haven't got a cyclic path...
232 if ($dirname =~ m%.*?import/(.+?)/import/\1.*%) {
233 print $outhandle "RecPlug: $dirname appears to be in a recursive loop...\n";
234 return 0;
235 }
236
237 if (($verbosity > 2) && ((scalar keys %$in_metadata) > 0)) {
238 print $outhandle "RecPlug: metadata passed in: ",
239 join(", ", keys %$in_metadata), "\n";
240 }
241
242 # Recur over directory contents.
243 my (@dir, $subfile);
244 my $count = 0;
245
246 print $outhandle "RecPlug: getting directory $dirname\n" if ($verbosity);
247
248 # find all the files in the directory
249 if (!opendir (DIR, $dirname)) {
250 if ($gli) {
251 print STDERR "<ProcessingError n='$file' r='Could not read directory $dirname'>\n";
252 }
253 print $outhandle "RecPlug: WARNING - couldn't read directory $dirname\n";
254 return -1; # error in processing
255 }
256 @dir = readdir (DIR);
257 closedir (DIR);
258
259 # Re-order the files in the list so any directories ending with .all are moved to the end
260 for (my $i = scalar(@dir) - 1; $i >= 0; $i--) {
261 if (-d &util::filename_cat($dirname, $dir[$i]) && $dir[$i] =~ /\.all$/) {
262 push(@dir, splice(@dir, $i, 1));
263 }
264 }
265
266 # read XML metadata files (if supplied)
267 my $additionalmetadata = 0; # is there extra metadata available?
268 my %extrametadata; # maps from filespec to extra metadata keys
269 my @extrametakeys; # keys of %extrametadata in order read
270
271 my $dirsepre = &util::get_re_dirsep();
272 my $dirsep = &util::get_dirsep();
273 my $local_dirname = $dirname;
274 $local_dirname =~ s/^$base_dir($dirsepre)//;
275 $local_dirname .= $dirsep;
276
277 if (defined $self->{'subdir_extrametakeys'}->{$local_dirname}) {
278 my $extrakeys = $self->{'subdir_extrametakeys'}->{$local_dirname};
279 foreach my $ek (@$extrakeys) {
280 my $extrakeys_re = $ek->{'re'};
281 my $extrakeys_md = $ek->{'md'};
282 push(@extrametakeys,$extrakeys_re);
283 $extrametadata{$extrakeys_re} = $extrakeys_md;
284 }
285 delete($self->{'subdir_extrametakeys'}->{$local_dirname});
286 }
287
288 if ($read_metadata_files) {
289 #read the directory "metadata.xml" file
290 my $metadatafile = &util::filename_cat ($dirname, 'metadata.xml');
291 if (-e $metadatafile) {
292 print $outhandle "RecPlug: found metadata in $metadatafile\n"
293 if ($verbosity);
294 $self->read_metadata_xml_file($metadatafile, \%extrametadata, \@extrametakeys);
295 $additionalmetadata = 1;
296 }
297 }
298
299 # apply metadata pass for each of the files in the directory
300 my $out_metadata;
301 my $num_files = scalar(@dir);
302 for (my $i = 0; $i < scalar(@dir); $i++) {
303 my $subfile = $dir[$i];
304 my $this_file_base_dir = $base_dir;
305 last if ($maxdocs != -1 && $count >= $maxdocs);
306 next if ($subfile =~ m/^\.\.?$/);
307 #next if ($read_metadata_files && $subfile =~ /metadata\.xml$/);
308
309 # Recursively read each $subfile
310 print $outhandle "RecPlug metadata recurring: $subfile\n" if ($verbosity > 2);
311
312 $count += &plugin::metadata_read ($pluginfo, $this_file_base_dir,
313 &util::filename_cat($file, $subfile),
314 $out_metadata, \@extrametakeys, \%extrametadata,
315 $processor, $maxdocs, $gli);
316 $additionalmetadata = 1;
317 }
318
319 # filter out any extrametakeys that mention subdirectories and store
320 # for later use (i.e. when that sub-directory is being processed)
321
322 foreach my $ek (@extrametakeys) {
323 my ($subdir_re,$extrakey_dir) = &File::Basename::fileparse($ek);
324 $extrakey_dir =~ s/\\\./\./g; # remove RE syntax
325
326 my $dirsep_re = &util::get_re_dirsep();
327
328 if ($ek =~ m/$dirsep_re/) { # specifies at least one directory
329 my $md = $extrametadata{$ek};
330
331 my $subdir_extrametakeys = $self->{'subdir_extrametakeys'};
332
333 my $subdir_rec = { 're' => $subdir_re, 'md' => $md };
334 push(@{$subdir_extrametakeys->{$extrakey_dir}},$subdir_rec);
335 }
336 }
337
338 # import each of the files in the directory
339 $count=0;
340 for (my $i = 0; $i <= scalar(@dir); $i++) {
341 # When every file in the directory has been done, pause for a moment (figuratively!)
342 # If the -recheck_directories argument hasn't been provided, stop now (default)
343 # Otherwise, re-read the contents of the directory to check for new files
344 # Any new files are added to the @dir list and are processed as normal
345 # This is necessary when documents to be indexed are specified in bibliographic DBs
346 # These files are copied/downloaded and stored in a new folder at import time
347 if ($i == $num_files) {
348 last unless $self->{'recheck_directories'};
349
350 # Re-read the files in the directory to see if there are any new files
351 last if (!opendir (DIR, $dirname));
352 my @dirnow = readdir (DIR);
353 closedir (DIR);
354
355 # We're only interested if there are more files than there were before
356 last if (scalar(@dirnow) <= scalar(@dir));
357
358 # Any new files are added to the end of @dir to get processed by the loop
359 my $j;
360 foreach my $subfilenow (@dirnow) {
361 for ($j = 0; $j < $num_files; $j++) {
362 last if ($subfilenow eq $dir[$j]);
363 }
364 if ($j == $num_files) {
365 # New file
366 push(@dir, $subfilenow);
367 }
368 }
369 # When the new files have been processed, check again
370 $num_files = scalar(@dir);
371 }
372
373 my $subfile = $dir[$i];
374 my $this_file_base_dir = $base_dir;
375 last if ($maxdocs != -1 && ($count + $total_count) >= $maxdocs);
376 next if ($subfile =~ /^\.\.?$/);
377 next if ($read_metadata_files && $subfile =~ /metadata\.xml$/);
378
379 # Follow Windows shortcuts
380 if ($subfile =~ /(?i)\.lnk$/ && $ENV{'GSDLOS'} =~ /^windows$/i) {
381 require Win32::Shortcut;
382 my $shortcut = new Win32::Shortcut(&util::filename_cat($dirname, $subfile));
383 if ($shortcut) {
384 # The file to be processed is now the target of the shortcut
385 $this_file_base_dir = "";
386 $file = "";
387 $subfile = $shortcut->Path;
388 }
389 }
390
391 # check for a symlink pointing back to a leading directory
392 if (-d "$dirname/$subfile" && -l "$dirname/$subfile") {
393 # readlink gives a "fatal error" on systems that don't implement
394 # symlinks. This assumes the the -l test above would fail on those.
395 my $linkdest=readlink "$dirname/$subfile";
396 if (!defined ($linkdest)) {
397 # system error - file not found?
398 warn "RecPlug: symlink problem - $!";
399 } else {
400 # see if link points to current or a parent directory
401 if ($linkdest =~ m@^[\./\\]+$@ ||
402 index($dirname, $linkdest) != -1) {
403 warn "RecPlug: Ignoring recursive symlink ($dirname/$subfile -> $linkdest)\n";
404 next;
405 ;
406 }
407 }
408 }
409
410 print $outhandle "RecPlug: preparing metadata for $subfile\n" if ($verbosity > 2);
411
412 # Make a copy of $in_metadata to pass to $subfile
413 $out_metadata = {};
414 &combine_metadata_structures($out_metadata, $in_metadata);
415
416 # Next add metadata read in XML files (if it is supplied)
417 if ($additionalmetadata == 1) {
418
419 my ($filespec, $mdref);
420 foreach $filespec (@extrametakeys) {
421 if ($subfile =~ /^$filespec$/) {
422 print $outhandle "File \"$subfile\" matches filespec \"$filespec\"\n"
423 if ($verbosity > 2);
424 $mdref = $extrametadata{$filespec};
425 &combine_metadata_structures($out_metadata, $mdref);
426 }
427 }
428 }
429
430
431 my $file_subfile = &util::filename_cat($file, $subfile);
432 my $filename_subfile
433 = &util::filename_cat($this_file_base_dir,$file_subfile);
434 if (defined $self->{'inf_timestamp'}) {
435 my $inf_timestamp = $self->{'inf_timestamp'};
436
437 if (! -d $filename_subfile) {
438 my $filename_timestamp = -M $filename_subfile;
439 if ($filename_timestamp > $inf_timestamp) {
440 # filename has been around for longer than inf
441##### print $outhandle "**** Skipping $subfile\n";
442 next;
443 }
444 }
445 }
446
447 # Recursively read each $subfile
448 print $outhandle "RecPlug recurring: $subfile\n" if ($verbosity > 2);
449
450 $count += &plugin::read ($pluginfo, $this_file_base_dir,
451 $file_subfile,
452 $out_metadata, $processor, $maxdocs, ($total_count + $count), $gli);
453 }
454
455 return $count;
456}
457
458
459
460# Read a manually-constructed metadata file and store the data
461# it contains in the $metadataref structure.
462#
463# (metadataref is a reference to a hash whose keys are filenames
464# and whose values are metadata hash structures.)
465
466sub read_metadata_xml_file {
467 my $self = shift(@_);
468 my ($filename, $metadataref, $metakeysref) = @_;
469 $self->{'metadataref'} = $metadataref;
470 $self->{'metakeysref'} = $metakeysref;
471
472 eval {
473 $self->{'parser'}->parsefile($filename);
474 };
475
476 if ($@) {
477 die "RecPlug: ERROR $filename is not a well formed metadata.xml file ($@)\n";
478 }
479}
480
481sub Doctype {
482 my ($expat, $name, $sysid, $pubid, $internal) = @_;
483
484 # allow the short-lived and badly named "GreenstoneDirectoryMetadata" files
485 # to be processed as well as the "DirectoryMetadata" files which should now
486 # be created by import.pl
487 die if ($name !~ /^(Greenstone)?DirectoryMetadata$/);
488}
489
490sub StartTag {
491 my ($expat, $element) = @_;
492
493 if ($element eq "FileSet") {
494 $self->{'saved_targets'} = [];
495 $self->{'saved_metadata'} = {};
496 }
497 elsif ($element eq "FileName") {
498 $self->{'in_filename'} = 1;
499 }
500 elsif ($element eq "Metadata") {
501 $self->{'metadata_name'} = $_{'name'};
502 if ((defined $_{'mode'}) && ($_{'mode'} eq "accumulate")) {
503 $self->{'metadata_accumulate'} = 1;
504 } else {
505 $self->{'metadata_accumulate'} = 0;
506 }
507 }
508}
509
510sub EndTag {
511 my ($expat, $element) = @_;
512
513 if ($element eq "FileSet") {
514 push (@{$self->{'metakeysref'}}, @{$self->{'saved_targets'}});
515 foreach my $target (@{$self->{'saved_targets'}}) {
516 my $file_metadata = $self->{'metadataref'}->{$target};
517 my $saved_metadata = $self->{'saved_metadata'};
518 if (!defined $file_metadata) {
519 $self->{'metadataref'}->{$target} = $saved_metadata;
520 }
521 else {
522 $self->combine_metadata_structures($file_metadata,$saved_metadata);
523 }
524 }
525 }
526 elsif ($element eq "FileName") {
527 $self->{'in_filename'} = 0;
528 }
529 elsif ($element eq "Metadata") {
530 $self->{'metadata_name'} = "";
531 }
532
533}
534
535sub store_saved_metadata
536{
537 my $self = shift(@_);
538 my ($mname,$mvalue,$md_accumulate) = @_;
539
540 if (defined $self->{'saved_metadata'}->{$mname}) {
541 if ($md_accumulate) {
542 # accumulate mode - add value to existing value(s)
543 if (ref ($self->{'saved_metadata'}->{$mname}) eq "ARRAY") {
544 push (@{$self->{'saved_metadata'}->{$mname}}, $mvalue);
545 } else {
546 $self->{'saved_metadata'}->{$mname} =
547 [$self->{'saved_metadata'}->{$mname}, $mvalue];
548 }
549 } else {
550 # override mode
551 $self->{'saved_metadata'}->{$mname} = $mvalue;
552 }
553 } else {
554 if ($md_accumulate) {
555 # accumulate mode - add value into (currently empty) array
556 $self->{'saved_metadata'}->{$mname} = [$mvalue];
557 } else {
558 # override mode
559 $self->{'saved_metadata'}->{$mname} = $mvalue;
560 }
561 }
562}
563
564
565sub Text {
566
567 if ($self->{'in_filename'}) {
568 # $_ == FileName content
569 push (@{$self->{'saved_targets'}}, $_);
570 }
571 elsif (defined ($self->{'metadata_name'}) && $self->{'metadata_name'} ne "") {
572 # $_ == Metadata content
573 my $mname = $self->{'metadata_name'};
574 my $mvalue = $_;
575 my $md_accumulate = $self->{'metadata_accumulate'};
576 $self->store_saved_metadata($mname,$mvalue,$md_accumulate);
577 }
578}
579
580# This Char function overrides the one in XML::Parser::Stream to overcome a
581# problem where $expat->{Text} is treated as the return value, slowing
582# things down significantly in some cases.
583sub Char {
584 use bytes; # Necessary to prevent encoding issues with XML::Parser 2.31+
585 $_[0]->{'Text'} .= $_[1];
586 return undef;
587}
588
589# Combine two metadata structures. Given two references to metadata
590# element structures, add every field of the second ($mdref2) to the first
591# ($mdref1).
592#
593# Afterwards $mdref1 will be updated, and $mdref2 will be unchanged.
594#
595# We have to be careful about the way we merge metadata when one metadata
596# structure is in "override" mode and one is in "merge" mode. In fact, we
597# use the mode from the second structure, $mdref2, because it is generally
598# defined later (lower in the directory structure) and is therefore more
599# "local" to the document concerned.
600#
601# Another issue is the use of references to pass metadata around. If we
602# simply copy one metadata structure reference to another, then we're
603# effectively just copyinga pointer, and changes to the new referene
604# will affect the old (copied) one also. This also applies to ARRAY
605# references used as metadata element values (hence the "clonedata"
606# function below).
607
608sub combine_metadata_structures {
609 my ($mdref1, $mdref2) = @_;
610 my ($key, $value1, $value2);
611
612 foreach $key (keys %$mdref2) {
613
614 $value1 = $mdref1->{$key};
615 $value2 = $mdref2->{$key};
616
617 # If there is no existing value for this metadata field in
618 # $mdref1, so we simply copy the value from $mdref2 over.
619 if (!defined $value1) {
620 $mdref1->{$key} = &clonedata($value2);
621 }
622 # Otherwise we have to add the new values to the existing ones.
623 # If the second structure is accumulated, then acculate all the
624 # values into the first structure
625 elsif ((ref $value2) eq "ARRAY") {
626 # If the first metadata element is a scalar we have to
627 # convert it into an array before we add anything more.
628 if ((ref $value1) ne 'ARRAY') {
629 $mdref1->{$key} = [$value1];
630 $value1 = $mdref1->{$key};
631 }
632 # Now add the value(s) from the second array to the first
633 $value2 = &clonedata($value2);
634 push @$value1, @$value2;
635 }
636 # Finally, If the second structure is not an array erference, we
637 # know it is in override mode, so override the first structure.
638 else {
639 $mdref1->{$key} = &clonedata($value2);
640 }
641 }
642}
643
644
645# Make a "cloned" copy of a metadata value.
646# This is trivial for a simple scalar value,
647# but not for an array reference.
648
649sub clonedata {
650 my ($value) = @_;
651 my $result;
652
653 if ((ref $value) eq 'ARRAY') {
654 $result = [];
655 foreach my $item (@$value) {
656 push @$result, $item;
657 }
658 } else {
659 $result = $value;
660 }
661 return $result;
662}
663
664
6651;
Note: See TracBrowser for help on using the repository browser.