Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 935 lines (842 sloc) 27.585 kb
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
1 #!/usr/bin/perl -w
2
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
3 # Movable Type (r) Open Source (C) 2001-2012 Six Apart, Ltd.
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
4 # This program is distributed under the terms of the
5 # GNU General Public License, version 2.
6 #
6427f4a @yuji * Set svn keywords
yuji authored
7 # $Id$
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
8
9 use strict;
10 use Encode;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
11
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
12 sub BEGIN {
13 my $dir;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
14 if ( eval { require File::Spec; 1; } ) {
15 if ( !( $dir = $ENV{MT_HOME} ) ) {
16 if ( $0 =~ m!(.*[/\\])! ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
17 $dir = $1;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
18 }
19 else {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
20 $dir = './';
21 }
22 $ENV{MT_HOME} = $dir;
23 }
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
24 unshift @INC, File::Spec->catdir( $dir, 'lib' );
25 unshift @INC, File::Spec->catdir( $dir, 'extlib' );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
26 }
27 }
28
29 my $cfg_exist;
30 my $mt_static_path = q();
31 my $mt_cgi_path;
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
32 my @cfg_candidates = (
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
33 File::Spec->catfile( $ENV{MT_HOME}, 'mt-config.cgi' ),
34 File::Spec->catfile( $ENV{MT_HOME}, 'mt.cfg' ),
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
35 );
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
36 unshift( @cfg_candidates,
37 File::Spec->catfile( $ENV{MT_HOME}, $ENV{MT_CONFIG} ) )
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
38 if $ENV{MT_CONFIG};
39
40 my $cfg_path;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
41 for my $cfg_candidate (@cfg_candidates) {
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
42 if ( -f $cfg_candidate ) {
43 $cfg_path = $cfg_candidate;
44 last;
45 }
46 }
47
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
48 if ($cfg_path) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
49 $cfg_exist = 1;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
50 my $file_handle = open( CFG, $cfg_path );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
51 my $line;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
52 while ( $line = <CFG> ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
53 next if $line !~ /\S/ || $line =~ /^#/;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
54 if ( $line =~ s/StaticWebPath[\s]*([^\n]*)/$1/ ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
55 $mt_static_path = $line;
56 chomp($mt_static_path);
57 }
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
58 elsif ( $line =~ s/CGIPath[\s]*([^\n]*)/$1/ ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
59 $mt_cgi_path = $line;
60 chomp($mt_cgi_path);
61 }
62 }
63 if ( !$mt_static_path && $mt_cgi_path ) {
64 $mt_cgi_path .= '/' if $mt_cgi_path !~ m|/$|;
65 $mt_static_path = $mt_cgi_path . 'mt-static/';
66 }
67 }
68
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
69 use File::Basename;
70 my $script_name = basename($0);
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
71 my $unsafe = ( $script_name =~ /^mt-check-unsafe.*$/ ) ? 1 : 0;
72 if ($unsafe) {
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
73 my @stats = stat($0);
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
74 $unsafe = 0 if 60 * 10 < time() - $stats[10]; # ctime
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
75 }
76
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
77 local $| = 1;
78
79 use CGI;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
80 my $cgi = new CGI;
81 my $view = $cgi->param("view");
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
82 my $version = $cgi->param("version");
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
83 my $sess_id = $cgi->param('session_id');
09e5203 @yuji Changed to use PRODUCT_VERSION_ID instead of fixed number. bugid:107489
yuji authored
84 $version ||= '__PRODUCT_VERSION_ID__';
85 if ( $version eq '__PRODUCT_VERSION' . '_ID__' ) {
86 $version = '5.13';
87 }
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
88
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
89 my ( $mt, $LH );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
90 my $lang = $cgi->param("language") || $cgi->param("__lang");
5dd2509 @fumiakiy Merged Beta 4 changes to "trunk".
fumiakiy authored
91
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
92 eval {
93 require MT::App::Wizard;
94 $mt = MT::App::Wizard->new();
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
95
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
96 require MT::Util;
97 $lang ||= MT::Util::browser_language();
98 my $cfg = $mt->config;
99 $cfg->PublishCharset('utf-8');
100 $cfg->DefaultLanguage($lang);
101 require MT::L10N;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
102 if ($mt) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
103 $LH = $mt->language_handle;
104 $mt->set_language($lang);
105 }
106 else {
107 MT::L10N->get_handle($lang);
108 }
109 };
62e7c6b @yuji * Applied patch which suggested by David Phillips. Thanks! bugid: 103552
yuji authored
110 $lang ||= 'en_US';
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
111
112 sub trans_templ {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
113 my ($text) = @_;
ab465a6 @fumiakiy HTTP headers should be written by ourselves under perlis.dll. BugId:102...
fumiakiy authored
114 return $mt->translate_templatized($text) if $mt;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
115 $text
116 =~ s!(<__trans(?:\s+((?:\w+)\s*=\s*(["'])(?:<[^>]+?>|[^\3]+?)+?\3))+?\s*/?>)!
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
117 my($msg, %args) = ($1);
118 #print $msg;
119 while ($msg =~ /\b(\w+)\s*=\s*(["'])((?:<[^>]+?>|[^\2])*?)\2/g) { #"
120 $args{$1} = $3;
121 }
122 $args{params} = '' unless defined $args{params};
123 my @p = map decode_html($_),
124 split /\s*%%\s*/, $args{params};
125 @p = ('') unless @p;
126 my $translation = translate($args{phrase}, @p);
127 $translation =~ s/([\\'])/\\$1/sg if $args{escape};
128 $translation;
129 !ge;
ab465a6 @fumiakiy HTTP headers should be written by ourselves under perlis.dll. BugId:102...
fumiakiy authored
130 return $text;
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
131 }
132
133 sub translate {
134 return (
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
135 $mt ? $mt->translate(@_)
136 : $LH ? $LH->maketext(@_)
137 : merge_params(@_)
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
138 );
139 }
140
141 sub decode_html {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
142 my ($html) = @_;
143 if ( $cfg_exist && ( eval 'use MT::Util; 1' ) ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
144 return MT::Util::decode_html($html);
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
145 }
146 else {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
147 $html =~ s#&quot;#"#g;
148 $html =~ s#&lt;#<#g;
149 $html =~ s#&gt;#>#g;
150 $html =~ s#&amp;#&#g;
151 }
152 $html;
153 }
154
155 sub merge_params {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
156 my ( $msg, @param ) = @_;
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
157 my $cnt = 1;
158 foreach my $p (@param) {
159 $msg =~ s/\[_$cnt\]/$p/g;
160 $cnt++;
161 }
162 $msg;
163 }
164
ab465a6 @fumiakiy HTTP headers should be written by ourselves under perlis.dll. BugId:102...
fumiakiy authored
165 sub print_encode {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
166 my ($text) = @_;
167 if ($mt) {
ab465a6 @fumiakiy HTTP headers should be written by ourselves under perlis.dll. BugId:102...
fumiakiy authored
168 print Encode::encode( $mt->config->PublishCharset, $text );
169 }
170 else {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
171 print Encode::encode_utf8($text);
ab465a6 @fumiakiy HTTP headers should be written by ourselves under perlis.dll. BugId:102...
fumiakiy authored
172 }
173 }
174
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
175 sub print_http_header {
176 if ( exists( $ENV{PERLXS} ) && ( $ENV{PERLXS} eq 'PerlIS' ) ) {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
177 print_encode("HTTP/1.0 200 OK\n");
178 print_encode("Connection: close\n");
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
179 }
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
180 print_encode("Content-Type: text/html; charset=utf-8\r\n\r\n");
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
181 }
182
79302ec @aklaswad Revised messages and styles of mt-check script's irregular run. bugzid:1...
aklaswad authored
183 my $invalid = 0;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
184
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
185 sub invalid_request {
79302ec @aklaswad Revised messages and styles of mt-check script's irregular run. bugzid:1...
aklaswad authored
186 $invalid = 1;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
187 $view = 0;
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
188 }
189
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
190 if ($view) {
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
191 require MT::Author;
192 require MT::Session;
193 require MT::Serialize;
194 my $mt = MT->new;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
195 PERMCHECK: {
196 my $sess = MT->model('session')->load( { id => $sess_id } )
79302ec @aklaswad Revised messages and styles of mt-check script's irregular run. bugzid:1...
aklaswad authored
197 or invalid_request(), last PERMCHECK;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
198 my $data_ref = MT::Serialize->unserialize( $sess->data )
79302ec @aklaswad Revised messages and styles of mt-check script's irregular run. bugzid:1...
aklaswad authored
199 or invalid_request(), last PERMCHECK;
200 my $data = $$data_ref
201 or invalid_request(), last PERMCHECK;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
202 my $author = MT->model('author')->load( { id => $data->{author_id} } )
79302ec @aklaswad Revised messages and styles of mt-check script's irregular run. bugzid:1...
aklaswad authored
203 or invalid_request(), last PERMCHECK;
204 $author->can_do('open_system_check_screen')
205 or invalid_request(), last PERMCHECK;
206 }
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
207 }
208
79302ec @aklaswad Revised messages and styles of mt-check script's irregular run. bugzid:1...
aklaswad authored
209 print_http_header();
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
210 if ( !$view ) {
5dd2509 @fumiakiy Merged Beta 4 changes to "trunk".
fumiakiy authored
211 $lang = $cgi->escapeHTML($lang);
ab465a6 @fumiakiy HTTP headers should be written by ourselves under perlis.dll. BugId:102...
fumiakiy authored
212 print_encode( trans_templ(<<HTML) );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
213
214 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
215 <html xmlns="http://www.w3.org/1999/xhtml">
216
217 <head>
218 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
219 <meta http-equiv="content-language" content="$lang" />
ca17635 @yuji Append meta tag for robots in head section. bugid:107451
yuji authored
220 <meta name='robots' content='noindex,nofollow' />
62e7c6b @yuji * Applied patch which suggested by David Phillips. Thanks! bugid: 103552
yuji authored
221 <title><__trans phrase="Movable Type System Check"> [mt-check.cgi]</title>
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
222 <style type=\"text/css\">
223 <!--
224 body {
225 position: relative;
226 min-height: 100%;
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
227 line-height: 1.2;
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
228 margin: 0;
229 padding: 0;
230 color: #2b2b2b;
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
231 background-color: #fffffc;
232 font-size: 13px;
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
233 font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
234 }
235
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
236 a {
237 color: #507ea4;
238 outline: 0;
239 }
240 a:hover,
241 a:active {
242 color: #839b5c;
243 text-decoration: none;
244 }
ee2b5ec @kaminogoya styling toggle detail link for message block. bugid:105898
kaminogoya authored
245 .toggle-link {
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
246 display: inline-block;
9fafe98 @kaminogoya Styling System Information screen. bugid:105898
kaminogoya authored
247 margin-left: 5px;
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
248 background: transparent;
249 color: #7b7c7d;
250 }
251
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
252 #header {
253 position: relative;
254 height: 45px;
255 padding: 1px;
256 background-color: #2b2b2b;
257 }
258 body.has-static #header h1 span {
259 display: none;
260 }
261
262 body.has-static h1#brand {
263 display: block;
264 position: absolute;
265 top: 5px;
266 left: 15px;
267 width: 180px;
268 height: 35px;
269 margin: 0;
270 text-decoration: none;
271 background: #2b2b2b url($mt_static_path/images/logo/movable-type-brand-logo.png) center 3px no-repeat;
272 outline: 0;
273 }
274
275 h1 {
276 margin: 8px 0 0 10px;
277 color: #F8FBF8;
278
279 }
280 h2 {
281 margin-top: 2em;
282 margin-bottom: .5em;
283 font-size: 24px;
284 font-weight: normal;
285 }
286 h2#system-info {
287 margin-top: 1em;
288 }
289 h3 {
290 font-size: 16px;
291 margin-bottom: 0px;
292 }
293
294 #content {
295 margin: 20px 20px 100px;
296 }
297
298 .dependence-module {
299 margin-left: 45px;
300 }
301
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
302 .msg {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
303 position: relative;
304 margin: 10px 0;
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
305 padding: 0.5em 0.75em;
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
306 background-repeat: no-repeat;
307 background-position: 8px center;
308 }
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
309 .msg-warning {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
310 background-color: #fef263;
311 }
312 .msg-info {
313 background-color: #e6eae3;
314 }
315 .msg-success {
316 margin-top: 50px;
317 padding-left: 20px;
318 background-color: #cee4ae;
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
319 background-position: 12px 0.75em;
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
320 }
321 .msg-success h2 {
322 margin-top: 5px;
323 font-size: 24px;
324 }
325 .msg-success p {
326 font-size: 13px;
327 }
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
328 .msg-text {
329 margin: 0;
330 }
331 .msg textarea {
332 display: none;
333 width: 100%;
334 max-width: 100%;
9fafe98 @kaminogoya Styling System Information screen. bugid:105898
kaminogoya authored
335 height: 100px;
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
336 padding: 0.2em 0.25em;
337 margin: 10px 0 0;
338 border: 1px solid #c0c6c9;
339 overflow: auto;
340 font-family: monospace;
341 font-size: 95%;
342 background-color: #f3f3f3;
343 color: #7b7c7d;
344 box-sizing: border-box;
345 -webkit-box-sizing: border-box;
346 -moz-box-sizing: border-box;
347 }
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
348
349 .installed {
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
350 color: #9ea1a3;
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
351 padding-top: 0px;
352 margin-top: 0px;
353 }
354
355 ul.version {
356 margin-bottom: 0;
357 }
358 //-->
359 </style>
68c7689 @aklaswad Show error detail in mt-check script. bugzid:104323.
aklaswad authored
360 <script type="text/javascript">
361 function showException(i) {
362 var exception = document.getElementById("exception-" + i);
363 exception.setAttribute("style", "display: block;");
364 var toggler = document.getElementById("exception-toggle-" + i);
365 toggler.setAttribute("style", "display: none;");
366 }
367 </script>
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
368 </head>
369
370 HTML
371 if ($mt_static_path) {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
372 print_encode("<body class=\"has-static\">\n");
373 }
374 else {
375 print_encode("<body>\n");
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
376 }
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
377
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
378 if ($invalid) {
79302ec @aklaswad Revised messages and styles of mt-check script's irregular run. bugzid:1...
aklaswad authored
379 print_encode( trans_templ(<<HTML) );
380 <div id="header"><h1 id="brand"><span><__trans phrase="Movable Type System Check"> [mt-check.cgi]</span></h1></div>
381 <div id="content">
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
382 <div class="msg msg-info">
383 <p class="msg-text"><__trans phrase="You attempted to use a feature that you do not have permission to access. If you believe you are seeing this message in error contact your system administrator."></p>
384 </div>
79302ec @aklaswad Revised messages and styles of mt-check script's irregular run. bugzid:1...
aklaswad authored
385 </div>
386 </body></html>
387 HTML
388 exit;
389 }
390
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
391 if ( $cfg_path && !$unsafe ) {
79302ec @aklaswad Revised messages and styles of mt-check script's irregular run. bugzid:1...
aklaswad authored
392 print_encode( trans_templ(<<HTML) );
393 <div id="header"><h1 id="brand"><span><__trans phrase="Movable Type System Check"> [mt-check.cgi]</span></h1></div>
394 <div id="content">
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
395 <div class="msg msg-info">
396 <p class="meg-text"><__trans phrase="The MT-Check report is disabled when Movable Type has a valid configuration file (mt-config.cgi)"></p>
397 </div>
79302ec @aklaswad Revised messages and styles of mt-check script's irregular run. bugzid:1...
aklaswad authored
398 </div>
6b30d8e @aklaswad Added permission check and unsafe mode for mt-check.cgi.
aklaswad authored
399 </body></html>
400 HTML
401 exit;
402 }
403
ab465a6 @fumiakiy HTTP headers should be written by ourselves under perlis.dll. BugId:102...
fumiakiy authored
404 print_encode( trans_templ(<<HTML) );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
405 <div id="header"><h1 id="brand"><span><__trans phrase="Movable Type System Check"> [mt-check.cgi]</span></h1></div>
406
407 <div id="content">
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
408 <div class="msg msg-info">
409 <p class="msg-text"><__trans phrase="The mt-check.cgi script provides you with information about your system's configuration and determines whether you have all of the components you need to run Movable Type."></p>
410 </div>
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
411 HTML
412 }
413
414 my $is_good = 1;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
415 my ( @REQ, @DATA, @OPT );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
416
417 my @CORE_REQ = (
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
418 [ 'CGI', 0, 1,
419 translate(
420 'CGI is required for all Movable Type application functionality.')
421 ],
422
423 [ 'Image::Size',
424 0, 1,
425 translate(
426 'Image::Size is required for file uploads (to determine the size of uploaded images in many different formats).'
427 )
428 ],
429
430 [ 'File::Spec',
431 0.8, 1,
432 translate(
433 'File::Spec is required for path manipulation across operating systems.'
434 )
435 ],
436
437 [ 'CGI::Cookie', 0, 1,
438 translate('CGI::Cookie is required for cookie authentication.')
439 ],
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
440 );
441
442 my @CORE_DATA = (
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
443 [ 'DBI', 1.21, 0,
444 translate('DBI is required to store data in database.')
445 ],
446
447 [ 'DBD::mysql',
448 0, 0,
449 translate(
450 'DBI and DBD::mysql are required if you want to use the MySQL database backend.'
451 )
452 ],
453
454 [ 'DBD::Pg',
455 1.32, 0,
456 translate(
457 'DBI and DBD::Pg are required if you want to use the PostgreSQL database backend.'
458 )
459 ],
460
461 [ 'DBD::SQLite',
462 0, 0,
463 translate(
464 'DBI and DBD::SQLite are required if you want to use the SQLite database backend.'
465 )
466 ],
467
468 [ 'DBD::SQLite2',
469 0, 0,
470 translate(
471 'DBI and DBD::SQLite2 are required if you want to use the SQLite 2.x database backend.'
472 )
473 ],
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
474
475 );
476
477 my @CORE_OPT = (
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
478 [ 'HTML::Entities',
479 0, 0,
480 translate(
481 'HTML::Entities is needed to encode some characters, but this feature can be turned off using the NoHTMLEntities option in the configuration file.'
482 )
483 ],
484
485 [ 'LWP::UserAgent',
486 0, 0,
487 translate(
488 'LWP::UserAgent is optional; It is needed if you want to use the TrackBack system, the weblogs.com ping, or the MT Recently Updated ping.'
489 )
490 ],
491
492 [ 'HTML::Parser',
493 0, 0,
494 translate(
495 'HTML::Parser is optional; It is needed if you want to use the TrackBack system, the weblogs.com ping, or the MT Recently Updated ping.'
496 )
497 ],
498
499 [ 'SOAP::Lite',
500 0.50, 0,
501 translate(
502 'SOAP::Lite is optional; It is needed if you want to use the MT XML-RPC server implementation.'
503 )
504 ],
505
506 [ 'File::Temp',
507 0, 0,
508 translate(
509 'File::Temp is optional; It is needed if you would like to be able to overwrite existing files when you upload.'
510 )
511 ],
512
513 [ 'Scalar::Util',
514 0, 1,
515 translate(
516 'Scalar::Util is optional; It is needed if you want to use the Publish Queue feature.'
517 )
518 ],
519
520 [ 'List::Util',
521 0, 1,
522 translate(
523 'List::Util is optional; It is needed if you want to use the Publish Queue feature.'
524 )
525 ],
526
527 [ 'Image::Magick',
528 0, 0,
529 translate(
530 'Image::Magick is optional; It is needed if you would like to be able to create thumbnails of uploaded images.'
531 )
532 ],
533
534 [ 'GD', 0, 0,
535 translate(
536 'This module is needed if you would like to be able to create thumbnails of uploaded images.'
537 )
538 ],
539
540 [ 'Imager', 0, 0,
541 translate(
542 'This module is needed if you would like to be able to create thumbnails of uploaded images.'
543 )
544 ],
545
546 [ 'IPC::Run',
547 0, 0,
548 translate(
549 'This module is needed if you would like to be able to use NetPBM as the image driver for MT.'
550 )
551 ],
552
553 [ 'Storable',
554 0, 0,
555 translate(
556 'Storable is optional; It is required by certain MT plugins available from third parties.'
557 )
558 ],
559
560 [ 'Crypt::DSA',
561 0, 0,
562 translate(
563 'Crypt::DSA is optional; If it is installed, comment registration sign-ins will be accelerated.'
564 )
565 ],
566
567 [ 'Crypt::SSLeay',
568 0, 0,
569 translate(
570 'This module and its dependencies are required to permit commenters to authenticate via OpenID providers such as AOL and Yahoo! that require SSL support.'
571 )
572 ],
573
574 [ 'Cache::File',
575 0, 0,
576 translate(
577 'Cache::File is required if you would like to be able to allow commenters to be authenticated by Yahoo! Japan as OpenID.'
578 )
579 ],
580
581 [ 'MIME::Base64',
582 0, 0,
583 translate(
584 'MIME::Base64 is required in order to enable comment registration.'
585 )
586 ],
587
588 [ 'XML::Atom', 0, 0,
589 translate('XML::Atom is required in order to use the Atom API.')
590 ],
591
592 [ 'Cache::Memcached',
593 0, 0,
594 translate(
595 'Cache::Memcached and memcached server/daemon is required in order to use memcached as caching mechanism used by Movable Type.'
596 )
597 ],
598
599 [ 'Archive::Tar',
600 0, 0,
601 translate(
602 'Archive::Tar is required in order to archive files in backup/restore operation.'
603 )
604 ],
605
606 [ 'IO::Compress::Gzip',
607 0, 0,
608 translate(
609 'IO::Compress::Gzip is required in order to compress files in backup/restore operation.'
610 )
611 ],
612
613 [ 'IO::Uncompress::Gunzip',
614 0, 0,
615 translate(
616 'IO::Uncompress::Gunzip is required in order to decompress files in backup/restore operation.'
617 )
618 ],
619
620 [ 'Archive::Zip',
621 0, 0,
622 translate(
623 'Archive::Zip is required in order to archive files in backup/restore operation.'
624 )
625 ],
626
627 [ 'XML::SAX',
628 0, 0,
629 translate(
630 'XML::SAX and its dependencies are required in order to restore a backup created in a backup/restore operation.'
631 )
632 ],
633
634 [ 'Digest::SHA1',
635 0, 0,
636 translate(
637 'Digest::SHA1 and its dependencies are required in order to allow commenters to be authenticated by OpenID providers including LiveJournal.'
638 )
639 ],
640 [ 'Mail::Sendmail',
641 0, 0,
642 translate(
643 'Mail::Sendmail is required in order to send mail via an SMTP Server.'
644 )
645 ],
646 [ 'Safe', 0, 0,
647 translate(
648 'This module is used in a test attribute for the MTIf conditional tag.'
649 )
650 ],
651 [ 'Digest::MD5', 0, 0,
652 translate('This module is used by the Markdown text filter.')
653 ],
654 [ 'Text::Balanced',
655 0, 0,
656 translate(
657 'This module is required by mt-search.cgi if you are running Movable Type using a version of Perl older than Perl 5.8.'
658 )
659 ],
660 [ 'XML::Parser', 0, 0,
661 translate('This module required for action streams.')
662 ],
78fba54 @yuji Merging the latest changes made to MT 5.02 from internal repository.
yuji authored
663
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
664 );
665
666 use Cwd;
667 my $cwd = '';
668 {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
669 my ($bad);
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
670 local $SIG{__WARN__} = sub { $bad++ };
671 eval { $cwd = Cwd::getcwd() };
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
672 if ( $bad || $@ ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
673 eval { $cwd = Cwd::cwd() };
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
674 if ( $@ && $@ !~ /Insecure \$ENV{PATH}/ ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
675 die $@;
676 }
677 }
678 }
679
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
680 my $ver
681 = ref($^V) eq 'version'
682 ? $^V->normal
683 : ( $^V ? join( '.', unpack 'C*', $^V ) : $] );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
684 my $perl_ver_check = '';
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
685 if ( $] < 5.008001 ) { # our minimal requirement for support
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
686 $perl_ver_check = <<EOT;
a4ca5dc @kaminogoya styling error detail. bugid:104323
kaminogoya authored
687 <div class="msg msg-warning"><p class="msg-text"><__trans phrase="The version of Perl installed on your server ([_1]) is lower than the minimum supported version ([_2]). Please upgrade to at least Perl [_2]." params="$ver%%5.8.1"></p></div>
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
688 EOT
689 }
e2d9c06 @aklaswad Removed checking existing mt-config.cgi file from success of mt-check. n...
aklaswad authored
690
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
691 my $server = $ENV{SERVER_SOFTWARE};
692 my $inc_path = join "<br />\n", @INC;
ab465a6 @fumiakiy HTTP headers should be written by ourselves under perlis.dll. BugId:102...
fumiakiy authored
693 print_encode( trans_templ(<<INFO) );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
694 <h2 id="system-info"><__trans phrase="System Information"></h2>
695 $perl_ver_check
696 INFO
697 if ($version) {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
698
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
699 # sanitize down to letters numbers dashes and period
700 $version =~ s/[^a-zA-Z0-9\-\.]//g;
5dd2509 @fumiakiy Merged Beta 4 changes to "trunk".
fumiakiy authored
701 $version = $cgi->escapeHTML($version);
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
702 print_encode( trans_templ(<<INFO) );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
703 <ul class="version">
704 <li><strong><__trans phrase="Movable Type version:"></strong> <code>$version</code></li>
705 </ul>
706 INFO
707 }
ab465a6 @fumiakiy HTTP headers should be written by ourselves under perlis.dll. BugId:102...
fumiakiy authored
708 print_encode( trans_templ(<<INFO) );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
709 <ul>
710 <li><strong><__trans phrase="Current working directory:"></strong> <code>$cwd</code></li>
711 <li><strong><__trans phrase="MT home directory:"></strong> <code>$ENV{MT_HOME}</code></li>
712 <li><strong><__trans phrase="Operating system:"></strong> $^O</li>
713 <li><strong><__trans phrase="Perl version:"></strong> <code>$ver</code></li>
714 <li><strong><__trans phrase="Perl include path:"></strong><br /> <code>$inc_path</code></li>
715 INFO
716 if ($server) {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
717 print_encode( trans_templ(<<INFO) );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
718 <li><strong><__trans phrase="Web server:"></strong> <code>$server</code></li>
719 INFO
720 }
721
722 ## Try to create a new file in the current working directory. This
723 ## isn't a perfect test for running under cgiwrap/suexec, but it
724 ## is a pretty good test.
725 my $TMP = "test$$.tmp";
726 local *FH;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
727 if ( open( FH, ">$TMP" ) ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
728 close FH;
729 unlink($TMP);
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
730 print_encode(
731 trans_templ(
732 ' <li><__trans phrase="(Probably) running under cgiwrap or suexec"></li>'
733 . "\n"
734 )
735 );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
736 }
737
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
738 print_encode("\n\n</ul>\n");
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
739
740 exit if $ENV{QUERY_STRING} && $ENV{QUERY_STRING} eq 'sys-check';
741
742 if ($mt) {
743 my $req = $mt->registry("required_packages");
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
744 foreach my $key ( keys %$req ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
745 next if $key eq 'DBI';
746 my $pkg = $req->{$key};
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
747 push @REQ,
748 [
749 $key, $pkg->{version} || 0, 1, $pkg->{label},
750 $key, $pkg->{link}
751 ];
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
752 }
753 my $drivers = $mt->object_drivers;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
754 foreach my $key ( keys %$drivers ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
755 my $driver = $drivers->{$key};
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
756 my $label = $driver->{label};
757 my $link = 'http://search.cpan.org/dist/' . $driver->{dbd_package};
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
758 $link =~ s/::/-/g;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
759 push @DATA,
760 [
761 $driver->{dbd_package},
762 $driver->{dbd_version},
763 0,
764 $mt->translate(
765 "The [_1] database driver is required to use [_2].",
766 $driver->{dbd_package}, $label
767 ),
768 $label, $link
769 ];
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
770 }
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
771 unshift @DATA,
772 [
773 'DBI', 1.21, 0,
774 translate('DBI is required to store data in database.')
775 ]
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
776 if @DATA;
777 my $opt = $mt->registry("optional_packages");
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
778 foreach my $key ( keys %$opt ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
779 my $pkg = $opt->{$key};
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
780 push @OPT,
781 [
782 $key, $pkg->{version} || 0, 0, $pkg->{label},
783 $key, $pkg->{link}
784 ];
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
785 }
786 }
787 @REQ = @CORE_REQ unless @REQ;
788 @DATA = @CORE_DATA unless @DATA;
789 @OPT = @CORE_OPT unless @OPT;
790
68c7689 @aklaswad Show error detail in mt-check script. bugzid:104323.
aklaswad authored
791 my $i = 0;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
792 for my $list ( \@REQ, \@DATA, \@OPT ) {
793 my $data = ( $list == \@DATA );
794 my $req = ( $list == \@REQ );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
795 my $type;
796 my $phrase;
797
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
798 if ( !$view ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
799 $phrase = translate("Checking for");
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
800 }
801 else {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
802 $phrase = translate("Installed");
803 }
804
805 if ($data) {
806 $type = translate("Data Storage");
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
807 }
808 elsif ($req) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
809 $type = translate("Required");
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
810 }
811 else {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
812 $type = translate("Optional");
813 }
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
814 print_encode(
815 trans_templ(
816 qq{<h2><__trans phrase="[_1] [_2] Modules" params="$phrase%%$type"></h2>\n\t<div>\n}
817 )
818 );
819 if ( !$req && !$data ) {
820 if ( !$view ) {
821 print_encode( trans_templ(<<MSG) );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
822 <p class="msg msg-info"><__trans phrase="The following modules are <strong>optional</strong>. If your server does not have these modules installed, you only need to install them if you require the functionality that the module provides."></p>
823
824 MSG
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
825 }
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
826 }
827 if ($data) {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
828 if ( !$view ) {
829 print_encode( trans_templ(<<MSG) );
7ddc5d7 @daveaiello Rephrased a number of on-screen messages in mt-check.cgi, the CMS dashbo...
daveaiello authored
830 <p class="msg msg-info"><__trans phrase="Some of the following modules are required by databases supported by Movable Type. Your server must have DBI and at least one of these related modules installed for proper operation of Movable Type."></p>
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
831
832 MSG
833 }
834 }
835 my $got_one_data = 0;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
836 my $dbi_is_okay = 0;
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
837 for my $ref (@$list) {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
838 my ( $mod, $ver, $req, $desc ) = @$ref;
8d71d1f Do translate properly. BugzID#102898
Atsushi Uno authored
839 if ( 'CODE' eq ref($desc) ) {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
840 $desc = $desc->();
841 }
8d71d1f Do translate properly. BugzID#102898
Atsushi Uno authored
842 else {
62e7c6b @yuji * Applied patch which suggested by David Phillips. Thanks! bugid: 103552
yuji authored
843 $desc = translate($desc);
8d71d1f Do translate properly. BugzID#102898
Atsushi Uno authored
844 }
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
845 print_encode("<div class=\"dependence-module\">\n")
846 if $mod =~ m/^DBD::/;
847 print_encode( " <h3>$mod"
848 . ( $ver ? " (version &gt;= $ver)" : "" )
849 . "</h3>" );
850 eval( "use $mod" . ( $ver ? " $ver;" : ";" ) );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
851 if ($@) {
68c7689 @aklaswad Show error detail in mt-check script. bugzid:104323.
aklaswad authored
852 my $exception = $@;
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
853 $is_good = 0 if $req;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
854 my $msg
855 = $ver
856 ? trans_templ(
857 qq{<div class="msg msg-warning"><p class="msg-text"><__trans phrase="Either your server does not have [_1] installed, the version that is installed is too old, or [_1] requires another module that is not installed." params="$mod"> }
858 )
859 : trans_templ(
860 qq{<div class="msg msg-warning"><p class="msg-text"><__trans phrase="Your server does not have [_1] installed, or [_1] requires another module that is not installed." params="$mod"> }
861 );
862 print_encode($desc);
863 print_encode($msg);
864 print_encode(
865 trans_templ(
866 qq{ <__trans phrase="Please consult the installation instructions for help in installing [_1]." params="$mod">}
867 )
868 );
869 if ($exception) {
870 print_encode(
871 qq{ <span class="toggle-link detail-link"><a id="exception-toggle-$i" href="#" onclick="showException($i); return false;">}
872 );
68c7689 @aklaswad Show error detail in mt-check script. bugzid:104323.
aklaswad authored
873 print_encode( translate('Details') );
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
874 print_encode(qq{</a></span>});
68c7689 @aklaswad Show error detail in mt-check script. bugzid:104323.
aklaswad authored
875 }
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
876 print_encode(qq{</p>});
877 print_encode(
878 qq{<textarea id="exception-$i" class="exception text full" readonly="readonly">$exception</textarea>}
879 ) if $exception;
880 print_encode(qq{</div>});
881 }
882 else {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
883 if ($data) {
884 $dbi_is_okay = 1 if $mod eq 'DBI';
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
885 if ( $mod eq 'DBD::mysql' ) {
886 if ( $DBD::mysql::VERSION == 3.0000 ) {
887 print_encode(
888 trans_templ(
889 qq{<div class="msg msg-warning"><p class="msg-text"><__trans phrase="The DBD::mysql version you have installed is known to be incompatible with Movable Type. Please install the current release available from CPAN."></p></div>}
890 )
891 );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
892 }
893 }
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
894 if ( !$dbi_is_okay ) {
895 print_encode(
896 trans_templ(
897 qq{<div class="msg msg-warning"><p class="msg-text"><__trans phrase="The $mod is installed properly, but requires an updated DBI module. Please see note above regarding the DBI module requirements."></p></div>}
898 )
899 );
900 }
901 else {
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
902 $got_one_data = 1 if $mod ne 'DBI';
903 }
904 }
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
905 print_encode(
906 trans_templ(
907 qq{<p class="installed"><__trans phrase="Your server has [_1] installed (version [_2])." params="$mod%%}
908 . $mod->VERSION
909 . qq{"></p>\n\n}
910 )
911 );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
912 }
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
913 print_encode("</div>\n") if $mod =~ m/^DBD::/;
68c7689 @aklaswad Show error detail in mt-check script. bugzid:104323.
aklaswad authored
914 $i++;
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
915 }
916 $is_good &= $got_one_data if $data;
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
917 print_encode("\n\t</div>\n\n");
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
918 }
919
e2d9c06 @aklaswad Removed checking existing mt-config.cgi file from success of mt-check. n...
aklaswad authored
920 if ($is_good) {
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
921 if ( !$view ) {
922 print_encode( trans_templ(<<HTML) );
f38475e @fumiakiy Importing greyhound to public repository.
fumiakiy authored
923 <div class="msg msg-success">
924 <h2><__trans phrase="Movable Type System Check Successful"></h2>
925 <p><strong><__trans phrase="You're ready to go!"></strong> <__trans phrase="Your server has all of the required modules installed; you do not need to perform any additional module installations. Continue with the installation instructions."></p>
926 </div>
927
928 </div>
929
930 HTML
931 }
932 }
933
427c100 @yuji Updated copyright year to 2012. Also, run perltidy.
yuji authored
934 print_encode("</body>\n\n</html>\n");
Something went wrong with that request. Please try again.