Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
51f174b9
Commit
51f174b9
authored
Jul 03, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix port issue
parent
00ef16a6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
app/mailers/notify.rb
app/mailers/notify.rb
+1
-1
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+11
-3
No files found.
app/mailers/notify.rb
View file @
51f174b9
...
@@ -4,7 +4,7 @@ class Notify < ActionMailer::Base
...
@@ -4,7 +4,7 @@ class Notify < ActionMailer::Base
default_url_options
[
:host
]
=
Gitlab
.
config
.
web_host
default_url_options
[
:host
]
=
Gitlab
.
config
.
web_host
default_url_options
[
:protocol
]
=
Gitlab
.
config
.
web_protocol
default_url_options
[
:protocol
]
=
Gitlab
.
config
.
web_protocol
default_url_options
[
:port
]
=
Gitlab
.
config
.
web_port
default_url_options
[
:port
]
=
Gitlab
.
config
.
web_port
if
Gitlab
.
config
.
web_custom_port?
default
from:
Gitlab
.
config
.
email_from
default
from:
Gitlab
.
config
.
email_from
...
...
config/initializers/1_settings.rb
View file @
51f174b9
...
@@ -20,17 +20,25 @@ class Settings < Settingslogic
...
@@ -20,17 +20,25 @@ class Settings < Settingslogic
def
web_port
def
web_port
if
web
.
https
if
web
.
https
nil
web
[
'port'
]
=
443
else
else
web
[
'port'
]
||=
80
web
[
'port'
]
||=
80
end
.
to_i
end
end
def
web_custom_port?
!
[
443
,
80
].
include?
(
web_port
)
end
end
def
build_url
def
build_url
raw_url
=
self
.
web_protocol
raw_url
=
self
.
web_protocol
raw_url
<<
"://"
raw_url
<<
"://"
raw_url
<<
web_host
raw_url
<<
web_host
raw_url
<<
":
#{
web_port
}
"
if
web_port
.
to_i
!=
80
if
web_custom_port?
raw_url
<<
":
#{
web_port
}
"
end
raw_url
raw_url
end
end
...
...
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