Umstellung der Benutzerverwaltung von Dateien im Verzeichnis "users" auf die Verwendu...
[kivitendo-erp.git] / bin / mozilla / installationcheck.pl
1 use SL::InstallationCheck;
2
3 sub verify_installation {
4   my $script = $0;
5   $script =~ s|.*/||;
6
7   return unless ($form{"action"} && ($script eq "login.pl"));
8
9   SL::InstallationCheck::check_for_conditional_dependencies();
10
11   my @missing_modules = SL::InstallationCheck::test_all_modules();
12   return if (scalar(@missing_modules) == 0);
13
14   use SL::Locale;
15   my $locale = new Locale($language, "installationcheck");
16
17   print(qq|content-type: text/html
18
19 <html>
20  <head>
21   <link rel="stylesheet" href="css/lx-office-erp.css" type="text/css"
22         title="Lx-Office stylesheet">
23   <title>| . $locale->text("One or more Perl modules missing") . qq|</title>
24  </head>
25  <body>
26
27   <h1>| . $locale->text("One or more Perl modules missing") . qq|</h1>
28
29   <p>| . $locale->text("At least one Perl module that Lx-Office ERP " .
30                        "requires for running is not installed on your " .
31                        "system.") .
32         " " .
33         $locale->text("Please install the below listed modules or ask your " .
34                       "system administrator to.") .
35         " " .
36         $locale->text("You cannot continue before all required modules are " .
37                       "installed.") . qq|</p>
38
39   <p>
40    <table>
41     <tr>
42      <th class="listheading">| . $locale->text("Module name") . qq|</th>
43      <th class="listheading">| . $locale->text("Module home page") . qq|</th>
44     </tr>
45
46 |);
47
48   my $odd = 1;
49   foreach my $module (@missing_modules) {
50     print(qq|
51      <tr class="listrow${odd}">
52       <td><code>$module->{name}</code></td>
53       <td><a href="$module->{url}">$module->{url}</a></td>
54      </tr>|);
55     $odd = 1 - $odd;
56   }
57
58   print(qq|
59    </table>
60   </p>
61
62   <p>| . $locale->text("There are usually three ways to install " .
63                        "Perl modules.") .
64         " " .
65         $locale->text("The preferred one is to install packages provided by " .
66                       "your operating system distribution (e.g. Debian or " .
67                       "RPM packages).") . qq|</p>
68
69   <p>| . $locale->text("The second way is to use Perl's CPAN module and let " .
70                        "it download and install the module for you.") .
71         " " .
72         $locale->text("Here's an example command line:") . qq|</p>
73
74   <p><code>perl -MCPAN -e &quot;install CGI::Ajax&quot;</code></p>
75
76   <p>| . $locale->text("The third way is to download the module from the " .
77                        "above mentioned URL and to install the module " .
78                        "manually following the installations instructions " .
79                        "contained in the source archive.") . qq|</p>
80
81  </body>
82 </html>
83 |);
84   exit(0);
85 }
86
87 1;