Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
a54149e0
Commit
a54149e0
authored
Aug 08, 2007
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 389845: Remove setup.cgi from Bugzilla (no web-based installation)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
parent
3ee9b0a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
43 deletions
+4
-43
Requirements.pm
Bugzilla/Install/Requirements.pm
+4
-17
Util.pm
Bugzilla/Install/Util.pm
+0
-26
No files found.
Bugzilla/Install/Requirements.pm
View file @
a54149e0
...
...
@@ -25,7 +25,7 @@ package Bugzilla::Install::Requirements;
use
strict
;
use
Bugzilla::Install::
Util
qw(vers_cmp install_string
is_web
)
;
use
Bugzilla::Install::
Util
qw(vers_cmp install_string)
;
use
List::
Util
qw(max)
;
use
Safe
;
...
...
@@ -513,22 +513,9 @@ sub have_vers {
my
$black_string
=
$blacklisted
?
install_string
(
'blacklisted'
)
:
''
;
my
$want_string
=
$wanted
?
"v$wanted"
:
install_string
(
'any'
);
# It's impossible to do the printf formatting in the install_string
# system, so we do it manually below.
if
(
is_web
())
{
print
install_string
(
'module_details'
,
{
package
=>
$package
,
wanted
=>
$want_string
,
found
=>
$vstr
,
ok
=>
$ok
,
blacklisted
=>
$black_string
,
row_class
=>
$vok
?
'mod_ok'
:
'mod_not_ok'
});
}
else
{
$ok
=
"$ok:"
if
$ok
;
printf
"%s %19s %-9s $ok $vstr $black_string\n"
,
install_string
(
'checking_for'
),
$package
,
"($want_string)"
;
}
$ok
=
"$ok:"
if
$ok
;
printf
"%s %19s %-9s $ok $vstr $black_string\n"
,
install_string
(
'checking_for'
),
$package
,
"($want_string)"
;
}
return
$vok
?
1
:
0
;
...
...
Bugzilla/Install/Util.pm
View file @
a54149e0
...
...
@@ -37,7 +37,6 @@ our @EXPORT_OK = qw(
get_version_and_os
indicate_progress
install_string
is_web
template_include_path
vers_cmp
)
;
...
...
@@ -79,8 +78,6 @@ sub install_string {
# Find the first template that defines this string.
foreach
my
$dir
(
@$path
)
{
my
$base
=
"$dir/setup/strings"
;
$string_template
=
_get_string_from_file
(
$string_id
,
"$base.html.pl"
)
if
is_web
();
$string_template
=
_get_string_from_file
(
$string_id
,
"$base.txt.pl"
)
if
!
defined
$string_template
;
last
if
defined
$string_template
;
...
...
@@ -237,23 +234,6 @@ sub vers_cmp {
# Helper Subroutines #
######################
# Tells us if we're running in a web interface (Usually, this means
# we're running in setup.cgi as opposed to checksetup.pl, but sometimes
# this function *might* get called from within normal Bugzilla code.)
sub
is_web
{
# When this is called, we may or may not have all of our required
# perl modules installed.
#
# The way this is written works for all of these circumstances:
# * We're in checksetup.pl, before and after requirements-checking
# * We're in setup.cgi, before and after requirements-checking
# * We're in email_in.pl, the WebService interface, or something else
# (That's primarily what the "return 0" check below is for.)
my
$usage_mode
=
eval
{
Bugzilla
->
usage_mode
};
return
0
if
(
defined
$usage_mode
&&
$usage_mode
!=
USAGE_MODE_BROWSER
);
return
i_am_cgi
();
}
# Used by install_string
sub
_get_string_from_file
{
my
(
$string_id
,
$file
)
=
@_
;
...
...
@@ -336,12 +316,6 @@ sub is_tainted {
return
not
eval
{
my
$foo
=
join
(
''
,
@_
),
kill
0
;
1
;
};
}
sub
i_am_cgi
{
# I use SERVER_SOFTWARE because it's required to be
# defined for all requests in the CGI spec.
return
exists
$ENV
{
'SERVER_SOFTWARE'
}
?
1
:
0
;
}
__END__
=head1 NAME
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment