Skip to content

Commit

Permalink
[#483 state:resolved] Renamed all entry point CGIs (mt.cgi, mt-check.…
Browse files Browse the repository at this point in the history
…cgi, etc) new Melody standard (index.cgi, check.cgi, etc).

 There were a lot of places (WAY too many) where that was hard coded.
  • Loading branch information
jayallen committed Nov 1, 2010
1 parent f1131fd commit e1b1fc2
Show file tree
Hide file tree
Showing 62 changed files with 248 additions and 248 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mt-static/js/mt_core_compact.js
#####################################################
## Usage related files ##
#####################################################
mt-config.cgi
config.cgi
mt-static/support/dashboard
mt-static/support/logs
mt-static/support/themes
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# MT::App::Viewer
lib/MT/App/Viewer.pm
mt-view.cgi
view.cgi

# Experimental FileMgr Drivers from MTOS code
lib/MT/FileMgr/FTP.pm
Expand Down Expand Up @@ -48,7 +48,7 @@ Makefile.PL
^MT-
^MT.*\.zip
^MT.*\.gz
^mt-config.cgi$
^config.cgi$

# Plugins that aren't to be in the general release
plugins/mixiComment
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion addons/Markdown.plugin/Readme.text
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ MT 3.0 or later).

1. Copy the "Markdown.pl" file into your Movable Type "plugins"
directory. The "plugins" directory should be in the same directory
as "mt.cgi"; if the "plugins" directory doesn't already exist, use
as "index.cgi"; if the "plugins" directory doesn't already exist, use
your FTP program to create it. Your installation should look like
this:

Expand Down
2 changes: 1 addition & 1 deletion addons/Markdown.plugin/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ SmartyPants works with Movable Type version 2.5 or later.

1. Copy the "SmartyPants.pl" file into your Movable Type "plugins"
directory. The "plugins" directory should be in the same directory
as "mt.cgi"; if it doesn't already exist, use your FTP program to
as "index.cgi"; if it doesn't already exist, use your FTP program to
create it. Your installation should look like this:

(mt home)/plugins/SmartyPants.pl
Expand Down
4 changes: 2 additions & 2 deletions addons/MultiBlog.plugin/lib/MultiBlog/Melody.pm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ intent of the setting.
Users should be warned that Six Apart advises the following with regards to
this capability:
1) The prospective behavior (having mt-search respect Multiblog privacy
1) The prospective behavior (having search.cgi respect Multiblog privacy
settings) was never an intended function of the Multiblog plugin.
2) Movable Type already provides the IncludeBlogs and ExcludeBlogs
Expand All @@ -76,7 +76,7 @@ with the inclusion / exclusion of blogs in searches much more difficult.
There would be no clear way for Movable Type to show that Multiblog
privacy settings influence the search results, or that Multiblog privacy
settings may be overriding explicit IncludeBlogs / ExcludeBlogs settings
in the mt-config.cgi configuration file.
in the config.cgi configuration file.
=item
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions build/Build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,9 @@ sub create_distro_list {
if( $self->{'stage'} ) {
# Magically use the internal production folder if it exists.
my $loc = $self->{'prod'} && $self->{'prod-dir=s'} && $dist =~ /$self->{'prod-dir=s'}/
? sprintf( "%s/%s/%s/mt.cgi",
? sprintf( "%s/%s/%s/index.cgi",
$self->{'stage-uri=s'}, $self->{'prod-dir=s'}, $self->{'export-dir=s'} )
: sprintf( "%s/%s/mt.cgi", $self->{'stage-uri=s'}, $self->{'export-dir=s'} );
: sprintf( "%s/%s/index.cgi", $self->{'stage-uri=s'}, $self->{'export-dir=s'} );
push @{ $distros->{url} }, $loc unless $seen{$loc}++;
}
elsif( $self->{'deploy:s'} =~ /:/ ) {
Expand Down Expand Up @@ -458,7 +458,7 @@ sub stage_distro {
);

# Give unto us a shiny, new config file.
my $config = 'mt-config.cgi';
my $config = 'config.cgi';
unless( $self->{'debug'} ) {
my $fh = IO::File->new( ">$config" );
print $fh <<CONFIG;
Expand Down Expand Up @@ -521,7 +521,7 @@ CONFIG

unless( $self->{'debug'} or $self->{'symlink!'} ) {
# Make sure we can get to our symlink.
$url = sprintf "%s/%s/mt.cgi",
$url = sprintf "%s/%s/index.cgi",
$self->{'stage-uri=s'}, $link;
die( "ERROR: Staging $url can't be resolved." )
unless $self->{'agent=s'}->head( $url );
Expand Down
12 changes: 6 additions & 6 deletions mt-check.cgi → check.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ sub BEGIN {
my $cfg_exist;
my $mt_static_path = q();
my $mt_cgi_path;
if ((-f File::Spec->catfile($ENV{MT_HOME}, 'mt-config.cgi')) ||
if ((-f File::Spec->catfile($ENV{MT_HOME}, 'config.cgi')) ||
(-f File::Spec->catfile($ENV{MT_HOME}, 'mt.cfg'))) {
$cfg_exist = 1;
my $file_handle = open(CFG, $ENV{MT_HOME}.'/mt.cfg') || open(CFG, $ENV{MT_HOME}.'/mt-config.cgi');
my $file_handle = open(CFG, $ENV{MT_HOME}.'/mt.cfg') || open(CFG, $ENV{MT_HOME}.'/config.cgi');
my $line;
while ($line = <CFG>) {
next if $line !~ /\S/ || $line =~ /^#/;
Expand Down Expand Up @@ -140,7 +140,7 @@ if (!$view) {
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="$lang" />
<title><MT_TRANS phrase="Melody System Check"> [mt-check.cgi]</title>
<title><MT_TRANS phrase="Melody System Check"> [check.cgi]</title>
<style type=\"text/css\">
<!--
Expand Down Expand Up @@ -274,10 +274,10 @@ HTML
print "<body>\n";
}
print trans_templ(<<HTML);
<div id="header"><h1><MT_TRANS phrase="Melody System Check"> [mt-check.cgi]</h1></div>
<div id="header"><h1><MT_TRANS phrase="Melody System Check"> [check.cgi]</h1></div>
<div id="content">
<p class="msg msg-info"><MT_TRANS phrase="The mt-check.cgi script provides you with information on your system's configuration and determines whether you have all of the components you need to run Melody."></p>
<p class="msg msg-info"><MT_TRANS phrase="The check.cgi script provides you with information on your system's configuration and determines whether you have all of the components you need to run Melody."></p>
HTML
}
Expand Down Expand Up @@ -353,7 +353,7 @@ my @CORE_OPT = (
[ 'Mail::Sendmail', 0, 0, translate('Mail::Sendmail is required for sending mail via SMTP Server.')],
[ 'Safe', 0, 0, translate('This module is used in test attribute of MTIf conditional tag.')],
[ 'Digest::MD5', 0, 0, translate('This module is used by the Markdown text filter.')],
[ 'Text::Balanced', 0, 0, translate('This module is required in mt-search.cgi if you are running Melody on Perl older than Perl 5.8.') ],
[ 'Text::Balanced', 0, 0, translate('This module is required in search.cgi if you are running Melody on Perl older than Perl 5.8.') ],
[ 'XML::Parser', 0, 0, translate('This module required for action streams.')],
);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 14 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@
if(timeoutID)
window.clearTimeout(timeoutID);

// FIXME mt.cgi hardcoded here an elsewhere below!
// FIXME index.cgi hardcoded here an elsewhere below!
// Will fail under FastCGI or with a non-standard AdminScript setting
timeoutID = window.setTimeout('window.location = \'mt.cgi\'', 8000);
timeoutID = window.setTimeout('window.location = \'index.cgi\'', 8000);
}

// Attempt to detect the language
Expand Down Expand Up @@ -129,60 +129,60 @@ <h1><span>Melody</span></h1>
<div id="en-us"><!-- Start English -->
<p class="info">Welcome to Melody, <em>the</em> community-powered publishing platform.</p>

<p class="login"><a rel="nofollow" href="mt.cgi?__lang=en_US">Log in</a></p>
<p class="login"><a rel="nofollow" href="index.cgi?__lang=en_US">Log in</a></p>

<h2>Installing?</h2>

<p>If you are just starting with Melody, you may want to review the installation/upgrade guide posted on the <a href="http://openmelody.org/docs/">Melody documentation site</a> and view the <a rel="nofollow" href="mt-check.cgi?__lang=en_US">Melody System Check</a> to make sure that your system has what it needs.</p>
<p>If you are just starting with Melody, you may want to review the installation/upgrade guide posted on the <a href="http://openmelody.org/docs/">Melody documentation site</a> and view the <a rel="nofollow" href="check.cgi?__lang=en_US">Melody System Check</a> to make sure that your system has what it needs.</p>
</div><!-- End English -->

<div id="de" style="display: none;"><!-- Start German -->
<p class="info">Herzlich willkommen zu Melody, der Premium-Weblogging-Plattform.</p>

<p class="login"><a rel="nofollow" href="mt.cgi?__lang=de">Bei Melody anmelden</a></p>
<p class="login"><a rel="nofollow" href="index.cgi?__lang=de">Bei Melody anmelden</a></p>

<h2>Melody installieren?</h2>

<p>Wenn Sie Melody jetzt installieren möchten, lesen Sie bitte die Installationshinweise in der <a href="http://openmelody.org/docs/">Melody-Dokumentation</a> und nutzen Sie die <a rel="nofollow" href="mt-check.cgi?__lang=de">Melody-Systemüberprüfung</a>, die Ihren Server automatisch auf die erforderliche Software hin überprüft.</p>
<p>Wenn Sie Melody jetzt installieren möchten, lesen Sie bitte die Installationshinweise in der <a href="http://openmelody.org/docs/">Melody-Dokumentation</a> und nutzen Sie die <a rel="nofollow" href="check.cgi?__lang=de">Melody-Systemüberprüfung</a>, die Ihren Server automatisch auf die erforderliche Software hin überprüft.</p>
</div><!-- End German -->

<div id="es" style="display: none;"><!-- Start Spanish -->
<p class="info">¡Bienvenido a Melody, la mejor plataforma de publicación de blogs.</p>

<p class="login"><a rel="nofollow" href="mt.cgi?__lang=es">Iniciar sesión en Melody</a></p>
<p class="login"><a rel="nofollow" href="index.cgi?__lang=es">Iniciar sesión en Melody</a></p>

<h2>¿Instalando?</h2>

<p>Si acaba de empezar con Melody, quizás desee consultar la sección de instalación/actualización de la <a href="http://openmelody.org/docs/">documentación de Melody</a> y ver la <a rel="nofollow" href="mt-check.cgi?__lang=es">comprobación del sistema de Melody</a> para segurarse de que su sistema tiene todo lo necesario.</p>
<p>Si acaba de empezar con Melody, quizás desee consultar la sección de instalación/actualización de la <a href="http://openmelody.org/docs/">documentación de Melody</a> y ver la <a rel="nofollow" href="check.cgi?__lang=es">comprobación del sistema de Melody</a> para segurarse de que su sistema tiene todo lo necesario.</p>
</div><!-- End Spanish -->

<div id="fr" style="display: none;"><!-- Start French -->
<p class="info">Bienvenue sur Melody, la première plateforme de blogging.</p>

<p class="login"><a rel="nofollow" href="mt.cgi?__lang=fr">S'enregistrer dans Melody</a></p>
<p class="login"><a rel="nofollow" href="index.cgi?__lang=fr">S'enregistrer dans Melody</a></p>

<h2>Installation?</h2>

<p>Si vous découvrez Melody, vous apprécierez certainement de trouver des conseils utiles dans le chapitre "Installation" dans notre <a href="http://openmelody.org/docs/">documentation Melody</a>. Vous pouvez aussi visiter la Page <a rel="nofollow" href="mt-check.cgi?__lang=fr">"Vérification Système"</a> pour vérifier que votre système comporte tous les éléments nécessaires à l'installation de Melody.</p>
<p>Si vous découvrez Melody, vous apprécierez certainement de trouver des conseils utiles dans le chapitre "Installation" dans notre <a href="http://openmelody.org/docs/">documentation Melody</a>. Vous pouvez aussi visiter la Page <a rel="nofollow" href="check.cgi?__lang=fr">"Vérification Système"</a> pour vérifier que votre système comporte tous les éléments nécessaires à l'installation de Melody.</p>
</div><!-- End French -->

<div id="ja" style="display: none;"><!-- Start Japanese -->
<p class="info">表現力豊かなブログをすべての人に。Melodyへようこそ。</p>
<p class="login"><a rel="nofollow" href="mt.cgi?__lang=ja">ログイン</a></p>
<p class="login"><a rel="nofollow" href="index.cgi?__lang=ja">ログイン</a></p>

<h2>はじめてお使いになる方へ</h2>
<p>Melodyをご利用いただくためには、セットアップを完了しておく必要があります。<a href="http://openmelody.org/docs/">オンライン・マニュアル</a>のインストール・セットアップの章を読み、稼働に必要な環境を準備してください。また、<a rel="nofollow" href="mt-check.cgi?__lang=ja">Melody システム・チェック (mt-check.cgi)</a> を実行し、環境が整ったことを確認してください。</p>
<p>Melodyをご利用いただくためには、セットアップを完了しておく必要があります。<a href="http://openmelody.org/docs/">オンライン・マニュアル</a>のインストール・セットアップの章を読み、稼働に必要な環境を準備してください。また、<a rel="nofollow" href="check.cgi?__lang=ja">Melody システム・チェック (check.cgi)</a> を実行し、環境が整ったことを確認してください。</p>
<p>必要な環境が整っていることを確認した後に、上の「ログイン」をクリックしてください。</p>
</div><!-- End Japanese -->

<div id="nl" style="display: none;"><!-- Start Dutch -->
<p class="info">Welkom op Melody, het beste publicatieplatform voor weblogs.</p>

<p class="login"><a rel="nofollow" href="mt.cgi?__lang=nl">Aanmelden op Melody</a></p>
<p class="login"><a rel="nofollow" href="index.cgi?__lang=nl">Aanmelden op Melody</a></p>

<h2>Installatie?</h2>

<p>Als u Melody aan het installeren bent, is het nuttig om de <a href="http://openmelody.org/docs/">installatie-instructies</a> te bekijken en om de <a rel="nofollow" href="mt-check.cgi?__lang=nl">Melody systeemcontrole</a> uit te voeren om zeker te zijn dat u systeem alles heeft wat nodig is.</p>
<p>Als u Melody aan het installeren bent, is het nuttig om de <a href="http://openmelody.org/docs/">installatie-instructies</a> te bekijken en om de <a rel="nofollow" href="check.cgi?__lang=nl">Melody systeemcontrole</a> uit te voeren om zeker te zijn dat u systeem alles heeft wat nodig is.</p>
</div><!-- End Dutch -->
</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions lib/MT.pm
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ sub run_app {
$cgipath .= $uri;

print "Status: 302 Moved\n";
print "Location: " . $cgipath . "mt-wizard.cgi\n\n";
print "Location: " . $cgipath . "wizard.cgi\n\n";
}
else {
print "Content-Type: text/plain; charset=$charset\n\n";
Expand Down Expand Up @@ -809,12 +809,12 @@ sub find_config {
# the directory is the more important parameter between it and
# the config parameter. if config is unreadable, then scan for
# a config file using the directory as a base. we support
# either mt.cfg or mt-config.cgi for the config file name. the
# either mt.cfg or config.cgi for the config file name. the
# latter being a more secure choice since it is unreadable from
# a browser.
for my $cfg_file ( $param->{Config},
File::Spec->catfile( $param->{Directory}, 'mt-config.cgi' ),
'mt-config.cgi' )
File::Spec->catfile( $param->{Directory}, 'config.cgi' ),
'config.cgi' )
{
return $cfg_file if $cfg_file && -r $cfg_file && -f $cfg_file;
}
Expand All @@ -839,7 +839,7 @@ sub init_config {
my $cfg_file = $mt->find_config($param);

return $mt->error(
"Missing configuration file. Maybe you forgot to move mt-config.cgi-original to mt-config.cgi?"
"Missing configuration file. Maybe you forgot to move config.cgi-original to config.cgi?"
) unless $cfg_file;
$cfg_file = File::Spec->rel2abs($cfg_file);
$mt->{cfg_file} = $cfg_file;
Expand Down Expand Up @@ -1117,7 +1117,7 @@ sub init_paths {
}
else {
return $mt->trans_error(
"Missing configuration file. Maybe you forgot to move mt-config.cgi-original to mt-config.cgi?"
"Missing configuration file. Maybe you forgot to move config.cgi-original to config.cgi?"
) if ref($mt);
}

Expand Down Expand Up @@ -3305,7 +3305,7 @@ the plugin bootstrap code can discover the MT configuration file (and thus
the MT root directory) by traversing the filesystem; the absolute path
to that file can be passed as the C<Config> parameter to
MT::App::new. Working code to do this can be found in the
examples/plugins/mirror/mt-mirror.cgi file.
examples/plugins/mirror/mirror.cgi file.
The I<app_dir>, on the other hand, always derives from the location of
the currently-running program, so it typically does not need to be
Expand Down Expand Up @@ -3410,7 +3410,7 @@ method is a self-contained version found in L<MT::Bootstrap> and will
eventually be the manner in which MT applications are run (eliminating
the need for the bootstrap module). The MT::import module calls this
method when the MT module is used with an 'App' parameter. So, you can
write a mt.cgi script that looks like this:
write an index.cgi script that looks like this:
#!/usr/bin/perl
use strict;
Expand Down
28 changes: 14 additions & 14 deletions lib/MT/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4226,7 +4226,7 @@ scripts.
=head2 $app->mt_uri
Returns the full URI of the MT "admin" script (typically a reference to
mt.cgi).
index.cgi).
=head2 $app->blog
Expand Down Expand Up @@ -4606,27 +4606,27 @@ cookies as part of a 302 Redirect response.
=head2 $app->base
The protocol and domain of the application. For example, with the full URI
F<http://www.foo.com/mt/mt.cgi>, this method will return F<http://www.foo.com>.
F<http://www.foo.com/m/index.cgi>, this method will return F<http://www.foo.com>.
=head2 $app->path
The path component of the URL of the application directory. For
example, with the full URL F<http://www.foo.com/mt/mt.cgi>, this
example, with the full URL F<http://www.foo.com/m/index.cgi>, this
method will return F</mt/>.
=head2 $app->script
In CGI mode, the filename of the active CGI script. For example, with
the full URL F<http://www.foo.com/mt/mt.cgi>, this method will return
F<mt.cgi>.
the full URL F<http://www.foo.com/m/index.cgi>, this method will return
F<index.cgi>.
In mod_perl mode, the Request-URI without any query string.
=head2 $app->uri([%params])
The concatenation of C<$app-E<gt>path> and C<$app-E<gt>script>. For example,
with the full URI F<http://www.foo.com/mt/mt.cgi>, this method will return
F</mt/mt.cgi>. If C<%params> exist, they are passed to the
with the full URI F<http://www.foo.com/m/index.cgi>, this method will return
F</m/index.cgi>. If C<%params> exist, they are passed to the
C<$app-E<gt>uri_params> method for processing.
Example:
Expand Down Expand Up @@ -4800,10 +4800,10 @@ maps to the "PublishCharset" MT configuration setting.
=item * STATIC_URI
This provides the mt-config.cgi setting for "StaticWebPath" or "AdminCGIPath",
This provides the config.cgi setting for "StaticWebPath" or "AdminCGIPath",
depending on whether the active CGI is an admin CGI script or not (most
likely it is, if it's meant to be used by an administrator (mt.cgi) and not
an end user such as mt-comments.cgi).
likely it is, if it's meant to be used by an administrator (index.cgi) and not
an end user such as comments.cgi).
Sample usage:
Expand Down Expand Up @@ -4833,27 +4833,27 @@ which may output:
=item * MT_URI
Yields the relative URL to the primary Movable Type application script
(mt.cgi or the configured 'AdminScript').
(index.cgi or the configured 'AdminScript').
Sample usage:
<TMPL_VAR NAME=MT_URI>?__mode=view&_type=entry&id=1&blog_id=1
producing:
/mt/mt.cgi?__mode=view&_type=entry&id=1&blog_id=1
/m/index.cgi?__mode=view&_type=entry&id=1&blog_id=1
=item * SCRIPT_PATH
The path portion of URL for script
Sample usage:
<TMPL_VAR NAME=SCRIPT_PATH>mt-check.cgi
<TMPL_VAR NAME=SCRIPT_PATH>check.cgi
producing:
/mt/mt-check.cgi
/m/check.cgi
=item * SCRIPT_FULL_URL
Expand Down
2 changes: 1 addition & 1 deletion lib/MT/App/NotifyList.pm
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ sub subscribe {
$cgipath .= '/' unless $cgipath =~ m!/$!;
my $body = MT->build_email(
'verify-subscribe.tmpl',
{ script_path => $cgipath . 'mt-add-notify.cgi',
{ script_path => $cgipath . 'add-notify.cgi',
blog => $blog,
entry => $entry,
redirect_url => $redirect_url,
Expand Down
Loading

0 comments on commit e1b1fc2

Please sign in to comment.