mioga-patch 35.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
diff --git a/INSTALL b/INSTALL
index ef0f369..b275a48 100644
--- a/INSTALL
+++ b/INSTALL
@@ -382,6 +382,8 @@ A default init script is provided in file web/conf/mioga2.init.d. This script wo
 Additional configuration for the Search engine
 ----------------------------------------------
 
+The default init script starts the search engine daemon.
+
 You must edit the crawl_sample.sh to specify default location for configuration files and rename it to crawl.sh.
 This script must be run by cron in a day basis with apache user (www-data for Debian)
 
diff --git a/Makefile.PL b/Makefile.PL
15
index 3582d20..c24e217 100644
16 17
--- a/Makefile.PL
+++ b/Makefile.PL
18 19
@@ -20,8 +20,10 @@
 # ============================================================================
20
 
21 22
 
+use Cwd;
23 24 25 26 27 28
 use ExtUtils::MakeMaker;
 use ExtUtils::MakeMaker::Config;
+use File::Find;
 
 # ****************************************************************************
 # 
29
@@ -67,6 +69,7 @@ sub CheckPreDepends {
30 31 32 33 34 35 36
 
 my $disable_check = grep {lc($_) eq 'disable_check'} @ARGV;
 
+if (! $disable_check) {
 CheckPreDepends({ # 'Data::Dumper' => '2.101',
 		  # 'DBI'          => '1.13',
 		  # 'DBD::Pg'      => '1.01',
37
@@ -75,7 +78,8 @@ CheckPreDepends({ # 'Data::Dumper' => '2.101',
38 39 40 41 42 43 44 45 46
 		  'Error'        => '0.15',
 		  # 'Net::LDAP'    => '0.25',
 		  # 'Unicode::String' => '2.06',
-	      });
+          })
+}
     
 require MiogaConf;
     
47
@@ -115,7 +119,7 @@ my $docsubdirs = "docs";
48 49 50 51 52 53 54 55
 # ----------------------------------------------------------------------------
 sub MY::processPL {
 return '
-# Not realy in the good section, but at a good place:
+# Not really in the good section, but at a good place:
 # between "all" and next "tardist"
 
 include config.mk
56
@@ -124,10 +128,7 @@ tardist: doc
57 58 59 60 61 62 63 64 65 66 67
 dist: doc
 install ::
 	if test -e $(TMP_DIR) ; then \
-            if test -d $(TMP_DIR) ; then \
-                ( su - $(APACHE_USER) -c "id" -s /bin/sh || \
-                    ( echo "===> Problem with \"$(APACHE_USER)\" user" ; exit 1 ) ) \
-            else \
+            if ! test -d $(TMP_DIR) ; then \
                 echo "===> File $(TMP_DIR) exists but is not a directory ..." ; \
                 exit 1 ; \
             fi \
68
@@ -156,6 +157,31 @@ install-all ::
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
 
 	(cd web && $(MAKE) setperms) || exit 1;
 
+slapos-compilation :: install
+	for i in bin locales web ; \
+	do \
+		(cd $$i && $(MAKE) install) || exit 1;\
+	done
+	# Create symlinks for static content that can be shared among all SlapOS instances	
+	for i in var/lib/Mioga2/static var/lib/Mioga2/conf/themes/default var/lib/Mioga2/conf/xsl; do \
+		mkdir -p `dirname "$(MIOGA_STATIC)/$$i"` && \
+		mv "$(MIOGA_BASE)/$$i" "$(MIOGA_STATIC)/$$i" && \
+		ln -s "$(MIOGA_STATIC)/$$i" "$(MIOGA_BASE)/$$i"; \
+	done
+	# copy a minimal build system into mioga/build
+	mkdir -p "$(MIOGA_BUILDINST)"
85
+	cp -R --parents \
86
+		Makefile.PL sql web/conf web/skel conf bin/search/crawl_sample.sh \
87
+		"$(MIOGA_BUILDINST)"
88 89
+
+slapos-instantiation ::
90 91
+	rm -Rf web/conf/apache; (cd web/conf && $(MAKE) apache)
+
92
+	for i in web/conf conf web/skel sql ; \
93 94 95 96 97 98 99
+	do \
+		(cd $$i && $(MAKE) install) || exit 1;\
+	done
+
 doc:
 	for i in ' . $docsubdirs . ' ; \
 	do \
100
@@ -176,9 +202,18 @@ installall: install install-all
101 102 103 104
 # 
 # ----------------------------------------------------------------------------
 
+my $Mioga2_pm = 'lib/Mioga2.pm';
105
+if ((not -e $Mioga2_pm) and exists($ENV{MIOGA_SITEPERL})) {
106
+    my $findfile = sub {
107 108 109
+        if ($_ eq 'Mioga2.pm') {
+            $Mioga2_pm = $File::Find::name;
+        }
110 111 112 113 114 115 116 117 118 119
+    };
+    find($findfile, $ENV{MIOGA_SITEPERL});
+}; 
 WriteMakefile(
    'NAME'  => 'Mioga',
    'DIR'   => ['bin', 'web',  'locales', 'docs', 'sql'],
-   'VERSION_FROM' => 'lib/Mioga2.pm',
+   'VERSION_FROM' => $Mioga2_pm,
 );
 
120 121 122 123 124
diff --git a/bin/mailinglist/miogamailinglist.pl b/bin/mailinglist/miogamailinglist.pl
index 80668e2..fa1603a 100755
--- a/bin/mailinglist/miogamailinglist.pl
+++ b/bin/mailinglist/miogamailinglist.pl
@@ -205,11 +205,11 @@ sub MsgSendStock
125 126 127 128 129 130 131 132 133 134 135 136 137
 sub CheckUTF8 {
     my ($str) = @_;
     
-    my $conv    = Text::Iconv->new('utf8', 'utf8');
+    my $conv    = Text::Iconv->new('UTF-8', 'UTF-8');
     my $tmp_str = $conv->convert($str);
     unless ($tmp_str) {
         my $charset = detect($str) || 'iso-8859-15'; # defaults to latin9
-        $conv = Text::Iconv->new($charset, "utf8");
+        $conv = Text::Iconv->new($charset, "UTF-8");
         $str  = $conv->convert($str);
     }
     return $str;
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
diff --git a/bin/notifier/searchengine.pl b/bin/notifier/searchengine.pl
index efd1ca2..fc5ba67 100755
--- a/bin/notifier/searchengine.pl
+++ b/bin/notifier/searchengine.pl
@@ -39,8 +39,7 @@ if (!open(FIFO, "+>$fifo")) {
     syslog('err', "Can't open fifo: $!. Exiting...");
 }
 my $flags   = fcntl(FIFO, F_GETFL, 0);
-
-
+my $crawler = $config->GetBinariesDir()."/crawl.sh";
 # MAIN LOOP
 
 my %instances;
@@ -53,7 +52,7 @@ while (1) {
 		$instances{$line} += 1;
     }
 	foreach my $inst (keys(%instances)) {
-		system("/usr/local/bin/crawl.sh $inst");
+		system("$crawler $inst");
 	}
     fcntl(FIFO, F_SETFL, $flags);
 }
diff --git a/conf/Config.xml b/conf/Config.xml
162
index e614cda..3a9b7e3 100644
163 164
--- a/conf/Config.xml
+++ b/conf/Config.xml
165 166 167 168 169 170 171 172 173 174
@@ -3,6 +3,9 @@
   <version module="Mioga2"/>
 
   <config>
+    <parameter name="init_sql" question="Initialize database ?"
+	       type="bool" default="no" xpath="/init_sql"/>
+
     <parameter name="instance_ident" question="First Mioga instance Identifier ?"
                type="text" default="Mioga"
                xpath="/instance_ident"/>
175 176 177
@@ -35,8 +38,18 @@
     <parameter name="authentication" question="Authentification method ?" 
                type="enum" default="Mioga2" values="Mioga2"
178
                xpath="/authentication"/>
179 180 181 182 183 184
-    
+
+    <parameter name="bin_dir" question="Directory for helper scripts and binaries ?" 
+               type="text" default="/usr/local/bin"
+               xpath="/bin_dir"/>
+
185 186 187 188 189 190 191 192 193 194
     <parameter name="Database settings" type="submenu">
+      <parameter name="db_host" question=" Mioga database server name or address ?" 
+                 type="text" default="localhost"
+                 xpath="/database/DBhost"/>              
+      <parameter name="db_port" question=" Mioga database server port ?" 
+                 type="text" default="5432"
+                 xpath="/database/DBport"/>              
       <parameter name="db_name" question=" Name of Mioga database ?" 
                  type="text" default="mioga2"
                  xpath="/database/DBname"/>              
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
@@ -462,7 +475,6 @@
 	<app ident="Portal" package="Mioga2::Portal"/>
   	<app ident="Search" package="Mioga2::Search"/>
     <app ident="Magellan" package="Mioga2::Magellan"/>
-    <app ident="Mermoz" package="Mioga2::Mermoz"/>
     <app ident="RSS" package="Mioga2::RSS"/>
     <app ident="Narkissos" package="Mioga2::Narkissos"/>
     <app ident="Colbert" package="Mioga2::Colbert"/>
@@ -476,7 +488,7 @@
   	<mioglet ident="Workspace" package="Mioga2::Portal::WSMioglet"/>
   	<mioglet ident="Organizer" package="Mioga2::Portal::OrgMioglet"/>
   	<mioglet ident="News" package="Mioga2::Portal::NewsMioglet"/>
-  	<mioglet ident="File" package="Mioga2::Portal::FileMioglet"/>
+  	<mioglet ident="File" package="Miorouga2::Portal::FileMioglet"/>
   	<mioglet ident="Articles" package="Mioga2::Portal::ArticlesMioglet"/>
     <mioglet ident="Poll" package="Mioga2::Portal::PollMioglet"/>
 	<mioglet ident="Search" package="Mioga2::Portal::SearchMioglet"/>
212 213 214 215 216
diff --git a/lib/Mioga2/Bottin.pm b/lib/Mioga2/Bottin.pm
index ba4cd8d..0db5651 100644
--- a/lib/Mioga2/Bottin.pm
+++ b/lib/Mioga2/Bottin.pm
@@ -1742,11 +1742,11 @@ sub InitSuperAdminMode {
217 218 219 220 221 222 223 224 225 226 227 228 229 230
 sub CheckUTF8 {
     my ($str) = @_;
     
-    my $conv    = Text::Iconv->new('utf8', 'utf8');
+    my $conv    = Text::Iconv->new('UTF-8', 'UTF-8');
     my $tmp_str = $conv->convert($str);
     unless ($tmp_str) {
-        my $charset = detect($str) || 'iso-8859-15'; # defaults to latin9
-        $conv = Text::Iconv->new($charset, "utf8");
+        my $charset = detect($str) || 'ISO-8859-15'; # defaults to latin9
+        $conv = Text::Iconv->new($charset, "UTF-8");
         $str  = $conv->convert($str);
     }
     return $str;
231 232 233 234 235
diff --git a/lib/Mioga2/Classes/URI.pm b/lib/Mioga2/Classes/URI.pm
index 8678b33..bf97e71 100644
--- a/lib/Mioga2/Classes/URI.pm
+++ b/lib/Mioga2/Classes/URI.pm
@@ -75,15 +75,16 @@ sub new {
Viktor Horvath's avatar
Viktor Horvath committed
236 237 238
   
   # convert uri to UTF-8
   my $uri     = uri_unescape($options{uri});
239 240 241
+    
   
   # attempt to see if uri is utf8 to avoid detection
Viktor Horvath's avatar
Viktor Horvath committed
242
-  my $conv    = Text::Iconv->new('utf8', 'utf8');
243 244
+  my $conv    = Text::Iconv->new('UTF-8', 'UTF-8');
   my $tmp_uri = $conv->convert($uri);
Viktor Horvath's avatar
Viktor Horvath committed
245
-  
246 247
+
   unless ($tmp_uri) {
248 249
-    my $charset = detect($uri) || 'iso-8859-15'; # defaults to latin9
+    my $charset = detect($uri) || 'ISO-8859-15'; # defaults to latin9
Viktor Horvath's avatar
Viktor Horvath committed
250 251
     warn "charset = '$charset' for uri = '$uri'" if $debug;
-    $conv = Text::Iconv->new($charset, "utf8");
252
+    $conv = Text::Iconv->new($charset, "UTF-8");
Viktor Horvath's avatar
Viktor Horvath committed
253 254 255
     $uri  = $conv->convert($uri);
     warn "==> converted uri = '$uri'" if $debug;
   }
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
diff --git a/lib/Mioga2/Config.pm b/lib/Mioga2/Config.pm
index b088823..4edac62 100644
--- a/lib/Mioga2/Config.pm
+++ b/lib/Mioga2/Config.pm
@@ -28,7 +28,7 @@ Config.pm: Access class to the current Mioga instance configuration.
 This module permits to access to the current Mioga instance
 configuration parameters.
 
-=head1 METHODS DESRIPTION
+=head1 METHODS DESCRIPTION
 
 =cut
 
diff --git a/lib/Mioga2/DAVFS.pm b/lib/Mioga2/DAVFS.pm
index b56c4ad..7810f82 100644
--- a/lib/Mioga2/DAVFS.pm
+++ b/lib/Mioga2/DAVFS.pm
@@ -141,10 +141,11 @@ use Mioga2::tools::APIAuthz;
274 275 276 277
 use Mioga2::tools::database;
 use Mioga2::tools::string_utils;
 use Mioga2::tools::Convert;
+use Net::INET6Glue::INET_is_INET6;
Viktor Horvath's avatar
Viktor Horvath committed
278 279 280 281 282 283 284 285
 use XML::LibXML ();
 use Mioga2::Constants;
 
-my $debug = 0;
+my $debug = 5;
 
 my $MULTI_STATUS	= 207;	# code DAV for the Multi-status response
 
286
@@ -756,13 +757,17 @@ sub make_request {
Viktor Horvath's avatar
Viktor Horvath committed
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304
 	my $host = $self->{host};
 	my $port = $self->{port};
 
+    my $hostport = $host;
+    $hostport = '['.$hostport.']' if $host =~ /:.*:/;
+    $hostport .= ':'.$port;
+
 	my $dav_uri   = $config->GetDAVBasePath;
 	my $mioga_uri = $config->GetBasePath;
 
 	my $orig_uri = Mioga2::Classes::URI->new( uri => $callbacks->{uri}->() );
 	my $uri      = $orig_uri->as_string;
 	$uri =~ s/^$mioga_uri/$dav_uri/;
-	$uri = Mioga2::Classes::URI->new( uri => "$protocol://$host:$port$uri" )
+	$uri = Mioga2::Classes::URI->new( uri => "$protocol://$hostport$uri" )
 	  ->as_string;
 	print STDERR "[Mioga2::DAVFS::make_request] uri = $uri\n" if $debug;
 
305
@@ -774,7 +779,7 @@ sub make_request {
Viktor Horvath's avatar
Viktor Horvath committed
306 307 308 309 310 311 312 313
 
 		# process headers
 		if ( $header =~ /^destination/i && $value !~ $dav_uri ) {
-			$value =~ s!(//)[^/]+$mioga_uri!$1$host$dav_uri!;
+			$value =~ s!(//)[^/]+$mioga_uri!$1$hostport$dav_uri!; # was only $host before!
 			$value = Mioga2::Classes::URI->new( uri => $value )->as_string;
 			$value = $self->escapeSpecialChars($value);
 		}
314 315 316 317 318
diff --git a/lib/Mioga2/Database.pm b/lib/Mioga2/Database.pm
index 4afa54b..ca8368c 100644
--- a/lib/Mioga2/Database.pm
+++ b/lib/Mioga2/Database.pm
@@ -61,7 +61,7 @@ sub new {
Viktor Horvath's avatar
Viktor Horvath committed
319 320 321 322 323 324 325 326
 	my $self = { };
 	bless($self, $class);
 
-	for my $attr (qw/DBIlogin DBIpasswd DBIdriver DBname/) {
+	for my $attr (qw/DBhost DBport DBIlogin DBIpasswd DBIdriver DBname/) {
 		if (!defined ($attributes{$attr})) {
 			throw Mioga2::Exception::DB ("[Mioga2::Database::new]", "Cannot connect to database: " . $DBI::errstr);
 		}
327
@@ -72,8 +72,10 @@ sub new {
Viktor Horvath's avatar
Viktor Horvath committed
328 329 330 331 332 333 334 335 336 337 338
 	my $dbiPassword = $self->{database}->{DBIpasswd};
 	my $dbDriver = $self->{database}->{DBIdriver};
 	my $dbName = $self->{database}->{DBname};
+    my $dbHost = $self->{database}->{DBhost};
+    my $dbPort = $self->{database}->{DBport};
 
-	my $datasource = "dbi:$dbDriver:dbname=$dbName";
+	my $datasource = "dbi:$dbDriver:dbname=$dbName;host=$dbHost;port=$dbPort";
 
 	$self->{dbh} = DBI->connect($datasource, $dbiUser, $dbiPassword);
 
339
diff --git a/lib/Mioga2/Exception/DB.pm b/lib/Mioga2/Exception/DB.pm
340
index 7ce5020..dd29d83 100644
341 342
--- a/lib/Mioga2/Exception/DB.pm
+++ b/lib/Mioga2/Exception/DB.pm
343 344 345 346 347 348 349 350 351 352 353 354 355 356
@@ -1,3 +1,4 @@
+
 # ============================================================================
 # Mioga2 Project (C) 2003-2007 The Mioga2 Project
 #
@@ -53,6 +54,7 @@ sub new {
     my($class, $function, $errDB, $errStr, $sql) = @_;
 	my $self = $class->SUPER::new(-text => "$errStr : $errDB");
 	$self->{errDB} = $errDB;
+    $self->{errStr} =  $errStr;
 	$self->{sql} = $sql;
 	$self->{function} = $function;
 	return $self;
@@ -76,6 +78,27 @@ sub as_string
357 358 359 360
 	return $string;
 }
 
+# ----------------------------------------------------------------------------
361 362 363 364 365 366 367 368 369 370 371 372
+=head2 getDBerr ()
+Return the error code as sent by the database connector.
+=cut 
+# ----------------------------------------------------------------------------
+sub getDBerr {
+    my ($self) = @_;
+    return $self->{errDB};
+}
+
+# ----------------------------------------------------------------------------
+=head2 getDBerrstr ()
+Return the error string as sent by the database connector.
373 374
+=cut 
+# ----------------------------------------------------------------------------
375
+sub getDBerrstr {
376
+    my ($self) = @_;
377
+    return $self->{errStr};
378 379 380 381
+}
+
+
 # ============================================================================
Viktor Horvath's avatar
Viktor Horvath committed
382
 
383 384 385 386 387 388
 =head1 PRIVATE METHODS DESCRIPTION
diff --git a/lib/Mioga2/InstanceList.pm b/lib/Mioga2/InstanceList.pm
index 3e2cf7a..a676a1b 100644
--- a/lib/Mioga2/InstanceList.pm
+++ b/lib/Mioga2/InstanceList.pm
@@ -423,7 +423,9 @@ sub Store {
389 390 391
 		$conf->RunHooks($self->{config}->{miogaconf});
 
 		# Run crawl.sh to initialize search engine database
392
-		my $crawlcmd = $self->{config}->{miogaconf}->GetMiogaPrefix () . "/bin/mioga2_index.pl --conf=" . $self->{config}->GetMiogaConfPath () . ' --search_conf=' . $self->{config}->GetInstallPath . "/conf/search_conf.xml" . ' ' . $self->Get ('ident');
393
+		my $crawlcmd = $self->{config}->{miogaconf}->GetMiogaPrefix () . "/bin/mioga2_index.pl --conf=" . $self->{config}->GetMiogaConfPath () 
394 395
+			. ' --search_conf=' . $self->{config}->{miogaconf}->GetInstallDir()."/conf/search_conf.xml" 
+                	. ' '. $self->Get ('ident');
396 397 398
 		system ("$crawlcmd");
 	}
 	elsif (scalar (keys (%{$self->{update}}))) {
399 400 401 402 403
diff --git a/lib/Mioga2/Magellan.pm b/lib/Mioga2/Magellan.pm
index 86e2e42..4b3814a 100644
--- a/lib/Mioga2/Magellan.pm
+++ b/lib/Mioga2/Magellan.pm
@@ -327,10 +327,13 @@ sub GetNodes {
Viktor Horvath's avatar
Viktor Horvath committed
404 405 406 407 408 409 410 411 412 413 414 415 416 417
 			$mygroup = $group;
 		}
 
+        my $host = $config->GetMiogaConf()->GetDAVHost();
+        $host = "[${host}]" if $host =~ /:.*?:/;
+
         my $resources = Mioga2::Magellan::DAV::GetCollection(
             $context,
             $context->GetSessionToken,
-            $config->GetMiogaConf ()->GetDAVProtocol () . "://" . $config->GetMiogaConf ()->GetDAVHost () . ":" . $config->GetMiogaConf ()->GetDAVPort (), $node
+            $config->GetMiogaConf ()->GetDAVProtocol () . "://" . $host . ":" . $config->GetMiogaConf ()->GetDAVPort (), $node
         );
 
 		$inconsistent = pop (@$resources);
418
@@ -853,7 +856,7 @@ sub GetResource {
419 420 421 422 423 424 425 426
 			);
 			print STDERR "mime = $mime\n content= $content\n" if ($debug);
 			if ($mime) {
-				#my $conv = Text::Iconv->new( 'utf8', 'utf8' );
+				#my $conv = Text::Iconv->new( 'UTF-8', 'UTF-8' );
 				#my $encoding = $conv->convert($content);
 				#if ($encoding) {
 				if ($mime =~ /(application\/xml)|(text\/)|(application\/xsl)/)
427 428 429 430 431
diff --git a/lib/Mioga2/Magellan/Archive.pm b/lib/Mioga2/Magellan/Archive.pm
index 842ae90..3b9e7f7 100644
--- a/lib/Mioga2/Magellan/Archive.pm
+++ b/lib/Mioga2/Magellan/Archive.pm
@@ -163,7 +163,7 @@ sub Content
432 433 434 435 436 437 438 439
         return undef;
     }
 
-    my $conv  = Text::Iconv->new('utf8', 'utf8');
+    my $conv  = Text::Iconv->new('UTF-8', 'UTF-8');
     my %folders;
     while(my $file = <PRG>) {
       chomp($file);
440 441 442 443 444
diff --git a/lib/Mioga2/Magellan/DAV.pm b/lib/Mioga2/Magellan/DAV.pm
index cdf77f1..116ebf4 100644
--- a/lib/Mioga2/Magellan/DAV.pm
+++ b/lib/Mioga2/Magellan/DAV.pm
@@ -106,7 +106,7 @@ sub ExecuteRequest
Viktor Horvath's avatar
Viktor Horvath committed
445 446 447 448 449 450 451 452
 	}
 
 	if ($response->code >= 500) {
-		warn "Mioga2::Magellan::ExecuteRequest Failed: " . $response->content;
+		warn "Mioga2::Magellan::DAV::ExecuteRequest Failed: " . $response->content;
 	}
 
 	return  $response;
453 454 455 456 457
diff --git a/lib/Mioga2/MailingList.pm b/lib/Mioga2/MailingList.pm
index c7d631c..3a92466 100644
--- a/lib/Mioga2/MailingList.pm
+++ b/lib/Mioga2/MailingList.pm
@@ -749,11 +749,11 @@ sub MailDeleteMsg
458 459 460 461 462 463 464 465 466 467 468 469 470 471
 sub CheckUTF8 {
     my ($str) = @_;
     
-    my $conv    = Text::Iconv->new('utf8', 'utf8');
+    my $conv    = Text::Iconv->new('UTF-8', 'UTF-8');
     my $tmp_str = $conv->convert($str);
     unless ($tmp_str) {
-        my $charset = detect($str) || 'iso-8859-15'; # defaults to latin9
-        $conv = Text::Iconv->new($charset, "utf8");
+        my $charset = detect($str) || 'ISO-8859-15'; # defaults to latin9
+        $conv = Text::Iconv->new($charset, "UTF-8");
         $str  = $conv->convert($str);
     }
     return $str;
472 473 474 475 476 477 478
diff --git a/lib/Mioga2/MiogaConf.pm b/lib/Mioga2/MiogaConf.pm
index 5b74a96..a46e27c 100644
--- a/lib/Mioga2/MiogaConf.pm
+++ b/lib/Mioga2/MiogaConf.pm
@@ -258,7 +258,7 @@ sub GetFilenameEncoding {
 sub GetBinariesDir {
 	my ($self) = @_;
Viktor Horvath's avatar
Viktor Horvath committed
479
 
480 481 482
-	return $self->{binaries_dir};
+	return $self->{bin_dir};
 }
Viktor Horvath's avatar
Viktor Horvath committed
483
 
484 485 486 487 488 489
 # ============================================================================
diff --git a/lib/Mioga2/Search.pm b/lib/Mioga2/Search.pm
index 2c20259..292f864 100644
--- a/lib/Mioga2/Search.pm
+++ b/lib/Mioga2/Search.pm
@@ -447,13 +447,13 @@ sub CheckArgs
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505
 	elsif (exists($context->{args}->{query})) {
 		$query_string = $context->{args}->{query};
 	}
-	my $conv    = Text::Iconv->new('utf8', 'utf8');
+	my $conv    = Text::Iconv->new('UTF-8', 'UTF-8');
  	my $tmp_query = $conv->convert($query_string);
   
 	unless ($tmp_query) {
-		my $charset = detect($query_string) || 'iso-8859-15'; # defaults to latin9
+		my $charset = detect($query_string) || 'ISO-8859-15'; # defaults to latin9
 		warn "charset = '$charset' for query_string = '$query_string'" if $debug;
-		$conv = Text::Iconv->new($charset, "utf8");
+		$conv = Text::Iconv->new($charset, "UTF-8");
 		$query_string  = $conv->convert($query_string);
 		warn "==> converted query_string = '$query_string'" if $debug;
 	}
506 507 508 509 510
diff --git a/lib/Mioga2/tools/string_utils.pm b/lib/Mioga2/tools/string_utils.pm
index c56cc3b..36bfa5a 100644
--- a/lib/Mioga2/tools/string_utils.pm
+++ b/lib/Mioga2/tools/string_utils.pm
@@ -46,6 +46,7 @@ use Mioga2::Content::XSLT;
Viktor Horvath's avatar
Viktor Horvath committed
511 512 513 514 515 516 517
 use Mioga2::XML::Simple;
 use Exporter;
 use Text::Iconv;
+use Encode;
 use Encode::Detect::Detector;
 use Data::Dumper;
 use HTML::TokeParser::Simple;
518
@@ -715,11 +716,11 @@ Check if string is UTF8 and convert it if needed
Viktor Horvath's avatar
Viktor Horvath committed
519 520 521 522
 sub st_CheckUTF8 {
     my ($str) = @_;
     
-    my $conv    = Text::Iconv->new('utf8', 'utf8');
523 524 525
+    my $conv    = Text::Iconv->new('UTF-8', 'UTF-8');
     my $tmp_str = $conv->convert($str);
     unless ($tmp_str) {
526
-        my $charset = detect($str) || 'iso-8859-15'; # defaults to latin9
Viktor Horvath's avatar
Viktor Horvath committed
527
-        $conv = Text::Iconv->new($charset, "utf8");
528
+        my $charset = detect($str) || 'ISO-8859-15'; # defaults to latin9
529
+        $conv = Text::Iconv->new($charset, "UTF-8");
Viktor Horvath's avatar
Viktor Horvath committed
530 531 532
         $str  = $conv->convert($str);
 		utf8::decode ($str);
     }
533 534 535 536 537
diff --git a/lib/MiogaConf.pm b/lib/MiogaConf.pm
index 0870174..bbcc80a 100644
--- a/lib/MiogaConf.pm
+++ b/lib/MiogaConf.pm
@@ -836,6 +836,10 @@ sub CheckDepends
538 539 540 541 542 543 544 545 546 547
 	my @missing;
 	my @missing_clib;
 
+	# Some modules rewrite $ENV{PATH} without hesitation when "require"d,      
+	# we need to put the old one back in place.                                
+	my $oldpath = $ENV{PATH}; 
+
 	foreach my $dep (@{$self->{CONFIG}->{dependencies}->[0]->{dep}}) {
 		my $version;
 		if(exists $dep->{version}) {
548
@@ -858,6 +862,7 @@ sub CheckDepends
549 550 551 552 553 554 555
 		}
 	}
 	
+	$ENV{PATH} = $oldpath;
 
 	foreach my $dep (@{$self->{CONFIG}->{dependencies}->[0]->{clib}}) {
 		my $version;
556
diff --git a/sql/Makefile b/sql/Makefile
557
index 07b26f5..3d79b1b 100644
558 559
--- a/sql/Makefile
+++ b/sql/Makefile
560
@@ -15,19 +15,21 @@ install:
561 562 563 564
 	cp upgradeMiogletDesc.pl $(DESTDIR)$(INSTALL_DIR)/conf/Config.hook.d
 	chmod a+x $(DESTDIR)$(INSTALL_DIR)/conf/Config.hook.d/upgradeMiogletDesc.pl
 
-	if [ $(INIT_SQL) = 'yes' ] ; \
565 566
+	DB_STATE=`perl -w testdb.pl`; \
+	if [ "$$DB_STATE" = "nodb" -o "$$DB_STATE" = "empty" ] ; \
567 568
 	then \
 		echo "Initialize database"; \
569 570 571
-		su - $(POSTGRES_USER) -c "dropdb $(DB_NAME)" ; \
-		su - $(POSTGRES_USER) -c "createdb --encoding UTF8 $(DB_NAME)" && \
-		su $(POSTGRES_USER) -c "psql $(DB_NAME) < create_lang.sql" && \
572 573
-		perl -w -I../lib initdb.pl ; \
-	elif [ $(INIT_SQL) != 'noupdate' ]; then \
574 575 576
+        dropdb -h $(DB_HOST) -p $(DB_PORT) -U $(DBI_LOGIN) $(DB_NAME) ; \
+		createdb --encoding UTF8 -h $(DB_HOST) -p $(DB_PORT) -U $(DBI_LOGIN) $(DB_NAME) && \
+		psql -h $(DB_HOST) -p $(DB_PORT) -U $(DBI_LOGIN) $(DB_NAME) < create_lang.sql && \
577
+		perl -w -I../lib initdb.pl force_init_sql=1; \
578
+	elif [ "$$DB_STATE" = "present" ]; then \
579
 		echo "Update database"; \
580
 		perl -w -I../lib updatedb.pl configxml=$(DESTDIR)$(INSTALL_DIR)/conf/Config.xml; \
581
+	elif [ "$$DB_STATE" = "noserver" ]; then \
582 583 584 585 586 587 588 589 590 591 592 593
+		echo "ERROR: Cannot connect to the database server!"; \
 	fi
 
-
 clean:
 	rm -f *~
 
diff --git a/sql/schema_base.sql b/sql/schema_base.sql
index b7d8cc2..88d5e2d 100644
--- a/sql/schema_base.sql
+++ b/sql/schema_base.sql
@@ -429,10 +429,6 @@ CREATE OR REPLACE FUNCTION check_group_base_default_profile_id () RETURNS trigge
Viktor Horvath's avatar
Viktor Horvath committed
594 595 596 597 598 599 600 601 602 603
     END;
 ' LANGUAGE 'plpgsql';
 
-CREATE TRIGGER m_group_base_default_profile_id_check
-     BEFORE DELETE ON m_profile FOR EACH ROW
-     EXECUTE PROCEDURE check_group_base_default_profile_id ();
-
 
 CREATE OR REPLACE FUNCTION check_group_base_mioga_id () RETURNS trigger AS '
     DECLARE
604
@@ -839,6 +835,10 @@ create table m_profile (
Viktor Horvath's avatar
Viktor Horvath committed
605 606 607 608 609 610 611 612 613 614
 );
 create unique index m_profile_ident_group_index on m_profile (ident, group_id);
 
+CREATE TRIGGER m_group_base_default_profile_id_check
+     BEFORE DELETE ON m_profile FOR EACH ROW
+     EXECUTE PROCEDURE check_group_base_default_profile_id ();
+
 
 --
 -- Add referencial integrity on default_profile_id in m_group_base
615 616
diff --git a/sql/testdb.pl b/sql/testdb.pl
new file mode 100755
617
index 0000000..1952891
618 619
--- /dev/null
+++ b/sql/testdb.pl
620
@@ -0,0 +1,64 @@
621 622 623 624
+#!/usr/bin/perl -w
+
+# Tests the availability of the Mioga2 database.
+# Returns on stdout one of:
625 626
+# 'present'  - The Mioga2 database has been found and contains data.
+# 'empty'    - The Mioga2 database exists but the table "m_mioga" is empty or nonexistent.
627 628 629 630 631 632 633 634 635 636 637
+# 'nodb'     - There is no Mioga2 database but the database server is working fine
+#              (i.e. one can try to create the database)
+# 'noserver' - Connection to the database server failed.
+
+# This has been written for Mioga2/SlapOS, to avoid overwriting the database
+# when re-instantiating the Apache/mod_perl partition.
+
+use strict;
+use lib "../lib";
+
+use Data::Dumper;
638
+use DBI;
639 640 641 642 643 644 645 646
+use Error qw(:try);
+use Mioga2::Exception::DB;
+use Mioga2::MiogaConf;
+
+# TODO: get this through a parameter?
+# my $configxml = "../conf/Config.xml";
+my $miogaconf = "../web/conf/Mioga.conf";
+
647
+my $result = 'undefined';
648 649
+try {
+    my $config = new Mioga2::MiogaConf($miogaconf);
650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668
+    my $dbh = $config->GetDBH();
+    my $sql = 'SELECT COUNT(*) FROM m_mioga';
+    my $sth = $dbh->prepare($sql);
+    my $exec_result = $sth->execute();
+    if (not defined($exec_result)) {
+        throw Mioga2::Exception::DB("testdb.pl 0", $sth->err, $sth->errstr, $sql);
+    }
+    my $res = $sth->fetchrow_arrayref();
+    if (not defined($res)) {
+        throw Mioga2::Exception::DB("testdb.pl 1", $sth->err, $sth->errstr, $sql);
+    }
+    my $count = $res->[0];
+    if (not defined($count)) {
+        throw Mioga2::Exception::DB("testdb.pl 2", $sth->err, $sth->errstr, $sql);
+    } elsif ($count == 0) {
+        $result = 'empty';
+    } else {
+        $result = 'present';
+    }   
669 670
+} catch Mioga2::Exception::DB with {
+    my $err = shift;
671 672 673 674 675
+    my $errstr = $err->getDBerrstr();
+    if ($errstr =~ m#database "mioga2" does not exist#) {
+        $result = 'nodb';
+    } elsif ($errstr =~ m#relation "m_mioga" does not exist#) {
+        $result = 'empty';
676
+    } else {
677
+        $result = 'noserver';
678 679
+    }
+} otherwise {
680 681 682 683 684
+    my $err = shift;
+    $result = 'noserver';
+};
+
+print $result;
685 686 687 688 689 690 691 692 693 694 695 696 697
diff --git a/sql/updatedb.pl b/sql/updatedb.pl
index 67921e7..bb4db1a 100644
--- a/sql/updatedb.pl
+++ b/sql/updatedb.pl
@@ -25,7 +25,7 @@ foreach my $var qw(configxml miogaconf timezonexml dir) {
 
 my $config = new Mioga2::MiogaConf($miogaconf);
 
-my $conf = new MiogaConf( dir => $dir, config => $configxml);
+my $conf = new MiogaConf( dir => $dir, config => $configxml, force_init_sql => 0);
 $conf->Install($config);
 
 
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718
diff --git a/web/Makefile b/web/Makefile
index 66af45f..9649a02 100644
--- a/web/Makefile
+++ b/web/Makefile
@@ -16,11 +16,11 @@ all ::
 
 
 install ::
-	if [ $(INIT_SQL) = 'yes' -a -d $(INSTALL_DIR) ] ; \
-	then \
-	     su - $(POSTGRES_USER) -c "pg_dump -b -Ft --column-inserts $(DB_NAME) | gzip" > ${INSTALL_DIR}/db_dump.tar.gz ; \
-	     mv $(INSTALL_DIR) $(BACKUP_DIR) ; \
-        fi
+#	if [ $(INIT_SQL) = 'yes' -a -d $(INSTALL_DIR) ] ; \
+#	then \
+#	     su - $(POSTGRES_USER) -c "pg_dump -b -Ft --column-inserts $(DB_NAME) | gzip" > ${INSTALL_DIR}/db_dump.tar.gz ; \
+#	     mv $(INSTALL_DIR) $(BACKUP_DIR) ; \
+#       fi
 
 	mkdir -p $(TMP_DIR)
 	mkdir -p $(DESTDIR)$(INSTALL_DIR)/$(INSTANCE_IDENT)/$(MIOGA_FILES)
719 720 721 722 723 724 725 726 727 728 729
diff --git a/web/conf/Makefile b/web/conf/Makefile
index 1573e5c..189f2fd 100644
--- a/web/conf/Makefile
+++ b/web/conf/Makefile
@@ -14,5 +14,6 @@ install:
 # is done in ../Makefile
 
 clean:
+	echo "VHH DEBUG: web/conf make clean, deleting apache/ !"
 	rm -Rf apache Mioga.conf .memdump
 
730 731 732 733 734
diff --git a/web/conf/startup.pl b/web/conf/startup.pl
index a9dc968..6558061 100644
--- a/web/conf/startup.pl
+++ b/web/conf/startup.pl
@@ -29,6 +29,7 @@ use MIME::Entity ();
735 736 737 738 739 740 741
 use MIME::Parser ();
 use MIME::QuotedPrint ();
 use MiogaConf ();
+use Net::INET6Glue::INET_is_INET6;
 use Net::LDAP ();
 use Parse::Yapp::Driver ();
 use Storable ();
742 743 744 745 746 747 748 749 750 751 752 753 754
diff --git a/web/skel/Makefile b/web/skel/Makefile
index e604e7d..fbaad2d 100644
--- a/web/skel/Makefile
+++ b/web/skel/Makefile
@@ -33,7 +33,7 @@ fr_FR : $(SRC_FR_FILES)
 install:
 	rsync $(RSYNC_OPTS) $(SUBDIRS) $(DESTDIR)$(INSTALL_DIR)/conf/skel/
 	# Update instance default skeletons
-	for i in `mioga2_info.pl --conf=$(DESTDIR)$(INSTALL_DIR)/conf/Mioga.conf instances`; do if [ ! -d /var/lib/Mioga2/$$i/MiogaFiles/skel/ ]; then mkdir $(DESTDIR)$(INSTALL_DIR)/$$i/MiogaFiles/skel/; fi; cp -R $(DESTDIR)$(INSTALL_DIR)/conf/skel/* $(DESTDIR)$(INSTALL_DIR)/$$i/MiogaFiles/skel/; done
+#	for i in `mioga2_info.pl --conf=$(DESTDIR)$(INSTALL_DIR)/conf/Mioga.conf instances`; do if [ ! -d /var/lib/Mioga2/$$i/MiogaFiles/skel/ ]; then mkdir $(DESTDIR)$(INSTALL_DIR)/$$i/MiogaFiles/skel/; fi; cp -R $(DESTDIR)$(INSTALL_DIR)/conf/skel/* $(DESTDIR)$(INSTALL_DIR)/$$i/MiogaFiles/skel/; done
 
 clean:
 	rm -rf $(SUBDIRS)
755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022
diff --git a/web/skel/src/en_US/group/50-standard.xml b/web/skel/src/en_US/group/50-standard.xml
index 6cf89e5..e1ef140 100644
--- a/web/skel/src/en_US/group/50-standard.xml
+++ b/web/skel/src/en_US/group/50-standard.xml
@@ -12,7 +12,6 @@
 	<applications>
 		<application ident="AnimGroup" active="1"/>
 		<application ident="Magellan" active="1"/>
-		<application ident="Mermoz" active="1"/>
 		<application ident="Organizer"/>
 		<application ident="Contact"/>
 		<application ident="Tasks"/>
@@ -38,9 +37,6 @@
 			<application ident="Magellan">
 				<all_functions/>
 			</application>
-			<application ident="Mermoz">
-				<all_functions/>
-			</application>
 			<application ident="Portal">
 				<all_functions/>
 			</application>
@@ -53,10 +49,6 @@
 			<application ident="Magellan">	
 				<function>Read</function>
 			</application>
-			<application ident="Mermoz">	
-				<function>Base</function>
-				<function>Standard</function>
-			</application>
 			<application ident="Portal">
 				<function>Portal</function>
 			</application>
@@ -69,9 +61,6 @@
 			<application ident="Magellan">	
 				<function>Read</function>
 			</application>
-			<application ident="Mermoz">	
-				<function>Base</function>
-			</application>
 			<application ident="Portal">
 				<function>Portal</function>
 			</application>
diff --git a/web/skel/src/en_US/group/60-admin.xml b/web/skel/src/en_US/group/60-admin.xml
index c73b700..d3f368b 100644
--- a/web/skel/src/en_US/group/60-admin.xml
+++ b/web/skel/src/en_US/group/60-admin.xml
@@ -12,7 +12,6 @@
 	<applications>
 		<application ident="AnimGroup" active="1"/>
 		<application ident="Magellan" active="1"/>
-		<application ident="Mermoz" active="1"/>
 		<application ident="Colbert" active="1"/>
 		<application ident="Organizer"/>
 		<application ident="Contact"/>
@@ -39,9 +38,6 @@
 			<application ident="Magellan">
 				<all_functions/>
 			</application>
-			<application ident="Mermoz">
-				<all_functions/>
-			</application>
 			<application ident="Colbert">
 				<all_functions/>
 			</application>
@@ -57,10 +53,6 @@
 			<application ident="Magellan">	
 				<function>Read</function>
 			</application>
-			<application ident="Mermoz">	
-				<function>Base</function>
-				<function>Standard</function>
-			</application>
 			<application ident="Colbert">
 				<function>UsersWrite</function>
 				<function>GroupsWrite</function>
@@ -79,9 +71,6 @@
 			<application ident="Magellan">	
 				<function>Read</function>
 			</application>
-			<application ident="Mermoz">	
-				<function>Base</function>
-			</application>
 			<application ident="Colbert">
 				<function>UsersRead</function>
 				<function>GroupsRead</function>
diff --git a/web/skel/src/en_US/instance/50-standard.xml b/web/skel/src/en_US/instance/50-standard.xml
index cdb1e88..82a125b 100644
--- a/web/skel/src/en_US/instance/50-standard.xml
+++ b/web/skel/src/en_US/instance/50-standard.xml
@@ -102,10 +102,6 @@
 		</application>
 		<application ident="MailingList">
 		</application>
-		<application ident="Mermoz">
-			<all_users/>
-			<all_groups/>
-		</application>
 		<application ident="Narkissos">
 			<all_users/>
 		</application>
diff --git a/web/skel/src/en_US/user/50-standard.xml b/web/skel/src/en_US/user/50-standard.xml
index c8983bb..256400d 100644
--- a/web/skel/src/en_US/user/50-standard.xml
+++ b/web/skel/src/en_US/user/50-standard.xml
@@ -92,7 +92,6 @@
 		<application ident="FileBrowser"/>
 		<application ident="Portal"/>
 		<application ident="Search" active="1"/>
-		<application ident="Mermoz"/>
 		<application ident="RSS" active="1"/>
 	</applications>
 
diff --git a/web/skel/src/en_US/user/60-admin.xml b/web/skel/src/en_US/user/60-admin.xml
index 9083b6f..e246d19 100644
--- a/web/skel/src/en_US/user/60-admin.xml
+++ b/web/skel/src/en_US/user/60-admin.xml
@@ -101,7 +101,6 @@
 		<application ident="FileBrowser"/>
 		<application ident="Portal"/>
 		<application ident="Search" active="1"/>
-		<application ident="Mermoz"/>
 		<application ident="RSS" active="1"/>
 	</applications>
 
diff --git a/web/skel/src/fr_FR/group/50-standard.xml b/web/skel/src/fr_FR/group/50-standard.xml
index 954f71d..dfc79b1 100644
--- a/web/skel/src/fr_FR/group/50-standard.xml
+++ b/web/skel/src/fr_FR/group/50-standard.xml
@@ -35,9 +35,6 @@
 		<!-- Le navigateur de fichiers est accessible et actif. -->
 		<application ident="Magellan" active="1"/>
 
-		<!-- L'application de rédaction d'e-mails est accessible et active. -->
-		<application ident="Mermoz" active="1"/>
-
 		<!-- Le portail est accessible et actif. -->
 		<application ident="Portal" active="1"/>
 
@@ -77,11 +74,6 @@
 				<all_functions/>
 			</application>
 
-			<!-- Le profil "Animation" donne accès à toutes les fonctions de l'application Mermoz d'envoi d'e-mail. -->
-			<application ident="Mermoz">
-				<all_functions/>
-			</application>
-
 			<!-- Le profil "Animation" donne accès à toutes les fonctions du portail de groupe. -->
 			<application ident="Portal">
 				<all_functions/>
@@ -102,12 +94,6 @@
 				<function>Read</function>
 			</application>
 
-			<!-- Le profil "Membre" donne accès uniquement à l'envoi d'e-mail au groupe ou indépendamment aux différentes équipes du groupe via l'application d'envoi d'e-mail Mermoz. -->
-			<application ident="Mermoz">	
-				<function>Base</function>
-				<function>Standard</function>
-			</application>
-
 			<!-- Le profil "Membre" donne accès uniquement à la consultation du portail de groupe. -->
 			<application ident="Portal">
 				<function>Portal</function>
@@ -128,11 +114,6 @@
 				<function>Read</function>
 			</application>
 
-			<!-- Le profil "Invité" donne accès uniquement à l'envoi d'e-mail au groupe via l'application d'envoi d'e-mail Mermoz. -->
-			<application ident="Mermoz">	
-				<function>Base</function>
-			</application>
-
 			<!-- Le profil "Invité" donne accès uniquement à la consultation du portail de groupe. -->
 			<application ident="Portal">
 				<function>Portal</function>
@@ -151,6 +132,7 @@
 		<space type="private">
 			
 			<!-- La balise "acls" contient les définitions de droits d'accès à la racine de l'espace privé du groupe. -->
+
 			<acls>
 
 				<!-- Les profils "Animation" et "Membre" ont accès en lecture et écriture. -->
diff --git a/web/skel/src/fr_FR/group/60-admin.xml b/web/skel/src/fr_FR/group/60-admin.xml
index d9bd724..1c97ca5 100644
--- a/web/skel/src/fr_FR/group/60-admin.xml
+++ b/web/skel/src/fr_FR/group/60-admin.xml
@@ -12,7 +12,6 @@
 	<applications>
 		<application ident="AnimGroup" active="1"/>
 		<application ident="Magellan" active="1"/>
-		<application ident="Mermoz" active="1"/>
 		<application ident="Colbert" active="1"/>
 		<application ident="Organizer"/>
 		<application ident="Contact"/>
@@ -39,9 +38,6 @@
 			<application ident="Magellan">
 				<all_functions/>
 			</application>
-			<application ident="Mermoz">
-				<all_functions/>
-			</application>
 			<application ident="Colbert">
 				<all_functions/>
 			</application>
@@ -57,10 +53,6 @@
 			<application ident="Magellan">	
 				<function>Read</function>
 			</application>
-			<application ident="Mermoz">	
-				<function>Base</function>
-				<function>Standard</function>
-			</application>
 			<application ident="Colbert">
 				<function>UsersWrite</function>
 				<function>GroupsWrite</function>
@@ -79,9 +71,6 @@
 			<application ident="Magellan">	
 				<function>Read</function>
 			</application>
-			<application ident="Mermoz">	
-				<function>Base</function>
-			</application>
 			<application ident="Colbert">
 				<function>UsersRead</function>
 				<function>GroupsRead</function>
diff --git a/web/skel/src/fr_FR/instance/50-standard.xml b/web/skel/src/fr_FR/instance/50-standard.xml
index 34a8536..f7d1eb1 100644
--- a/web/skel/src/fr_FR/instance/50-standard.xml
+++ b/web/skel/src/fr_FR/instance/50-standard.xml
@@ -215,12 +215,6 @@
 		<application ident="MailingList">
 		</application>
 
-		<!-- L'application d'envoi d'e-mail est accessible à tous les utilisateurs et à tous les groupes. -->
-		<application ident="Mermoz">
-			<all_users/>
-			<all_groups/>
-		</application>
-
 		<!-- L'application de gestion des données personnelles est accessible à tous les utilisateurs. -->
 		<application ident="Narkissos">
 			<all_users/>
diff --git a/web/skel/src/fr_FR/user/50-standard.xml b/web/skel/src/fr_FR/user/50-standard.xml
index c7da5e8..d07b180 100644
--- a/web/skel/src/fr_FR/user/50-standard.xml
+++ b/web/skel/src/fr_FR/user/50-standard.xml
@@ -138,7 +138,6 @@
 		<!-- L'afficheur de fichiers, le portail utilisateur et l'application d'envoi d'e-mails Mermoz sont accessible mais ne sont pas actives. L'utilisateur pourra les activer s'il le souhaite. -->
 		<application ident="FileBrowser"/>
 		<application ident="Portal"/>
-		<application ident="Mermoz"/>
 
 	</applications>
 
diff --git a/web/skel/src/fr_FR/user/60-admin.xml b/web/skel/src/fr_FR/user/60-admin.xml
index afff18d..4d4df04 100644
--- a/web/skel/src/fr_FR/user/60-admin.xml
+++ b/web/skel/src/fr_FR/user/60-admin.xml
@@ -101,7 +101,6 @@
 		<application ident="FileBrowser"/>
 		<application ident="Portal"/>
 		<application ident="Search" active="1"/>
-		<application ident="Mermoz"/>
 		<application ident="RSS" active="1"/>
 	</applications>