Skip to Content.
Sympa Menu

devel - Re: [sympa-developpers] [sympa-commits] sympa[9951] branches/sympa-6.1-branch/src/lib/List.pm: [feature] Now you can define a "scenari" directory in the lists family directory.

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: David Verdin <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-developpers] [sympa-commits] sympa[9951] branches/sympa-6.1-branch/src/lib/List.pm: [feature] Now you can define a "scenari" directory in the lists family directory.
  • Date: Wed, 06 Nov 2013 17:47:44 +0100

Yay!
Commit messages work again!

Le 06/11/13 17:44, address@concealed a écrit :
sympa[9951] branches/sympa-6.1-branch/src/lib/List.pm: [feature] Now you can define a "scenari" directory in the lists family directory.
Revision
9951
Author
david.verdin
Date
2013-11-06 17:44:00 +0100 (mer. 06 nov. 2013)

Log Message

[feature] Now you can define a "scenari" directory in the lists family directory. These scenarii will be available for lists instantiated from this family.
The "scenari" directory must be put directly in the family directory, not in the overall "families" directory. For example, if you want to define scenarii specific to the "staff" family, you must define a scenari directory in the /home/sympa/etc/families/staff/ directory. Not in /home/sympa/etc/families/.

Modified Paths

  • branches/sympa-6.1-branch/src/lib/List.pm

Diff

Modified: branches/sympa-6.1-branch/src/lib/List.pm (9950 => 9951)


--- branches/sympa-6.1-branch/src/lib/List.pm	2013-10-25 14:48:10 UTC (rev 9950)
+++ branches/sympa-6.1-branch/src/lib/List.pm	2013-11-06 16:44:00 UTC (rev 9951)
@@ -7773,13 +7773,25 @@
     my $directory = "$self->{'dir'}";
     my %list_of_scenario;
     my %skip_scenario;
-
-    foreach my $dir (
-        "$directory/scenari",
-        "$Conf::Conf{'etc'}/$robot/scenari",
-        "$Conf::Conf{'etc'}/scenari",
-        Sympa::Constants::DEFAULTDIR . '/scenari'
-    ) {
+    my @list_of_scenario_dir;
+    if (defined $self->{'admin'}{'family_name'} ) {
+	@list_of_scenario_dir = (
+	    "$directory/scenari",
+	    "$Conf::Conf{'etc'}/$robot/families/$self->{'admin'}{'family_name'}/scenari",
+	    "$Conf::Conf{'etc'}/families/$self->{'admin'}{'family_name'}/scenari",
+	    "$Conf::Conf{'etc'}/$robot/scenari",
+	    "$Conf::Conf{'etc'}/scenari",
+	    Sympa::Constants::DEFAULTDIR . '/scenari'
+	);
+    }else{
+	@list_of_scenario_dir = (
+	    "$directory/scenari",
+	    "$Conf::Conf{'etc'}/$robot/scenari",
+	    "$Conf::Conf{'etc'}/scenari",
+	    Sympa::Constants::DEFAULTDIR . '/scenari'
+	);
+    }
+    foreach my $dir (@list_of_scenario_dir) {
 	next unless (-d $dir);
 	
 	my $scenario_regexp = &tools::get_regexp('scenario');

--
A bug in Sympa? Quick! To the bug tracker!

 
David Verdin
Études et projets applicatifs
 

Tél : +33 2 23 23 69 71
Fax : +33 2 23 23 71 21
 

www.renater.fr
RENATER
263 Avenue du Gal Leclerc
35042 Rennes Cedex



PNG image

Attachment: smime.p7s
Description: Signature cryptographique S/MIME



  • Re: [sympa-developpers] [sympa-commits] sympa[9951] branches/sympa-6.1-branch/src/lib/List.pm: [feature] Now you can define a "scenari" directory in the lists family directory., David Verdin, 11/06/2013

Archive powered by MHonArc 2.6.19+.

Top of Page