use_ssl is just confusing, it means use_https , fix name of setting

This commit is contained in:
Sam 2014-01-09 10:51:38 +11:00
parent 5a036fc17e
commit 1533a1163c
25 changed files with 15 additions and 32 deletions

View file

@ -85,7 +85,7 @@ class SiteSetting < ActiveRecord::Base
end
def self.scheme
use_ssl? ? "https" : "http"
use_https? ? "https" : "http"
end
end

View file

@ -513,7 +513,6 @@ cs:
notification_email: "Návratová emailová adresa, která se použije u systémových emailů, jako jsou notifikace o zapomenutém heslu, nových účtech, atd."
email_custom_headers: "Seznam vlastních hlaviček emailů, oddělený svislítkem"
use_ssl: "Má být web přístupný přes SSL? (NEPODPOROVÁNO, EXPERIMENTÁLNÍ FUNKCE)"
summary_score_threshold: "Minimální skóre příspěvku, aby byl zařazen mezi 'nejlepší'"
summary_posts_required: "Minimální počet příspěvků v tématu, aby byl povolen mód 'nejlepší příspěvky'"
summary_likes_required: "Minimální počet 'líbí se' v tématu, aby byl povolen mód 'nejlepší příspěvky'"

View file

@ -567,7 +567,6 @@ da:
notification_email: "Afsenderadressen som bruges til afsendelse af system-e-mails, som f.eks. beskeder til brugere om mistede adgangskoder, nye konti, etc."
email_custom_headers: "En liste af brugerdefinerede e-mail-headers adskilt af |-tegn."
use_ssl: "Skal sitet være tilgængeligt via SSL? (IKKE IMPLEMENTERET, EKSPERIMENTELT)"
summary_score_threshold: "Den mindste score for at et indlæg medtages i 'resuméet'."
summary_posts_required: "Mindste antal indlæg i et emne før 'resumé'-tilstand aktiveres."
summary_likes_required: "Mindste antal likes i et emne før 'resumé'-tilstand aktiveres."

View file

@ -486,7 +486,6 @@ de:
notification_email: "Die Antwortadresse, die in Systemmails (zum Beispiel zur Passwortwiederherstellung, neuen Konten, etc.) eingetragen wird."
email_custom_headers: "Eine Pipe-getrennte (|) Liste von eigenen Mail Headern"
use_ssl: "Soll die Seite via SSL nutzbar sein?"
summary_score_threshold: "Der Minimalscore eines Beitrags, um zu den Top Beiträgen zu zählen."
summary_posts_required: "Minimale Zahl der Beiträge zu einem Thema bevor der Modus 'Top Beiträge' aktiviert wird."
summary_likes_required: "Minimale Zahl der „Gefällt mir“ in einem Thema, bevor der Modus 'Top Beiträge' aktiviert wird."

View file

@ -564,7 +564,7 @@ en:
notification_email: "The return email address used when sending system emails such as notifying users of lost passwords, new accounts etc"
email_custom_headers: "A pipe-delimited list of custom email headers"
use_ssl: "Should the full url for the site (Discourse.base_url) be http or https?"
use_https: "Should the full url for the site (Discourse.base_url) be http or https?"
summary_score_threshold: "The minimum score of a post to be included in the 'summary'"
summary_posts_required: "Minimum posts in a topic before 'summary' mode is enabled"
summary_likes_required: "Minimum likes in a topic before the 'summary' mode will be enabled"

View file

@ -311,7 +311,6 @@ es:
logo_small_url: "El pequeño logo para tu sitio utilizado cuando se hace scroll en un topic ej: http://example.com/logo-small.png"
favicon_url: "Un favicon para tu sitio, ve http://en.wikipedia.org/wiki/Favicon"
notification_email: "La dirección de emaul de respuesta utilizada cuando se envían emails del sistema tales como notificar a los usuarios de recuperación de contraseña, nuevas cuentas etc"
use_ssl: "¿Debería ser el sitio accesible por SSL? (NO IMPLEMENTADO, EXPERIMENTAL)"
summary_score_threshold: "La mínima puntuación de un post para ser incluido en los 'summary'"
summary_posts_required: "Mínimo número de posts en un topic antes de que el modo 'summary' sea activado "
summary_likes_required: "Mínimo número de me gustas en un topic antes de que el modo 'summary' sea activado"

View file

@ -500,7 +500,6 @@ fr:
apple_touch_icon_url: "Icône utilisée pour les appareils d'Apple. Taille recommandée 144 px par 144 px."
notification_email: "L'adresse email utilisée pour notifier les utilisateurs de mots de passe perdus, d'activation de compte, etc."
email_custom_headers: "Une liste délimité par des (|) pipes d'entêtes d'email"
use_ssl: "Le site doit-il être accessible via SSL? (NON IMPLEMENTE, EXPERIMENTAL)"
summary_score_threshold: "Le score minimum d'un message pour être inclus dans le «résumé»"
summary_posts_required: "Nombre minimum de messages dans une discussion avant que le mode «résumé» soit activé"
summary_likes_required: "Nombre de J'aime minimum dans une discussion avant que le mode «Résumé» soit activé"

View file

@ -321,7 +321,6 @@ id:
logo_small_url: "The small logo for your site used when scrolling down on topics eg: http://example.com/logo-small.png"
favicon_url: "A favicon for your site, see http://en.wikipedia.org/wiki/Favicon"
notification_email: "The return email address used when sending system emails such as notifying users of lost passwords, new accounts etc"
use_ssl: "Should the site be accessible via SSL? (NOT IMPLEMENTED, EXPERIMENTAL)"
summary_score_threshold: "The minimum score of a post to be included in the 'summary'"
summary_posts_required: "Minimum posts in a topic before 'summary' mode is enabled"
summary_likes_required: "Minimum likes in a topic before the 'summary' mode will be enabled"

View file

@ -440,7 +440,6 @@ it:
logo_small_url: "La versione piccola del logo del tuo sito (usata durante lo scroll) es: http://example.com/logo-small.png"
favicon_url: "La favicon del tuo sito, per informazioni http://en.wikipedia.org/wiki/Favicon"
notification_email: "L'indirizzo email usato quando vengono inviate email di sistema come la notifica agli utenti di recupero password o nuovo account"
use_ssl: "Il sito è accessibile tramite SSL?"
summary_score_threshold: "Il punteggio minimo di un post per essere inserito nei 'summary'"
summary_posts_required: "Numero di post in un topic prima che la modalità 'summary' venga attivata"
summary_likes_required: "Numero minimo di likes in un topic prima che la modalità 'summary' venga attivata"

View file

@ -506,7 +506,6 @@ ja:
notification_email: "パスワードリセットや新規アカウント作成等をユーザに通知するシステムメールを送信するメールアドレス"
email_custom_headers: "カスタムメールヘッダのリスト (パイプ(バーティカルバー) 区切り)"
use_ssl: "SSL でのアクセスを有効にするか? (未実装、試験的)"
best_of_score_threshold: "'best of' にポストが含まれるための最終スコア"
best_of_posts_required: "'best of' モードが有効になる、トピック内の最小ポスト数"
best_of_likes_required: "'best of' モードが有効になる、トピック内の最小「いいね!」数"

View file

@ -520,7 +520,6 @@ ko:
notification_email: "The return email address used when sending system emails such as notifying users of lost passwords, new accounts etc"
email_custom_headers: "커스텀 이메일 해더의 pipe-delimited"
use_ssl: "Should the site be accessible via SSL? (NOT IMPLEMENTED, EXPERIMENTAL)"
best_of_score_threshold: "The minimum score of a post to be included in the 'best of'"
best_of_posts_required: "Minimum posts in a topic before 'best of' mode is enabled"
best_of_likes_required: "Minimum likes in a topic before the 'best of' mode will be enabled"

View file

@ -532,7 +532,6 @@ nl:
notification_email: "Het afzenderadres dat wordt gebruikt voor mails waarmee leden op de hoogte worden gesteld van verloren wachtwoorden, nieuwe accounts etc."
email_custom_headers: "Een lijst van custom email headers, gescheiden door een pipe (|)"
use_ssl: "Moet de site toegankelijk zijn via SSL? (NOG NIET GEIMPLEMENTEERD, EXPERIMENTEEL)"
summary_score_threshold: "De minimumscore van bericht om inbegrepen te worden in de samenvatting"
summary_posts_required: "Minimum aantal berichten nodig in een topic voordat de samenvattingsmodus mogelijk wordt."
summary_likes_required: "Minimum aantal 'vind ik leuk' nodig voordat de samenvattingsmodus mogelijk wordt."

View file

@ -657,8 +657,6 @@ pseudo:
notification_email: '[[ Ťĥé řéťůřɳ éɱáíł áďďřéšš ůšéď ŵĥéɳ šéɳďíɳǧ šýšťéɱ éɱáíłš
šůčĥ áš ɳóťíƒýíɳǧ ůšéřš óƒ łóšť ƿáššŵóřďš, ɳéŵ áččóůɳťš éťč ]]'
email_custom_headers: '[[ Á ƿíƿé-ďéłíɱíťéď łíšť óƒ čůšťóɱ éɱáíł ĥéáďéřš ]]'
use_ssl: '[[ Šĥóůłď ťĥé šíťé ƀé áččéššíƀłé νíá ŠŠŁ? (ЍÓŤ ÍϺРŁÉϺÉЍŤÉĎ, ÉХРÉŘÍϺÉЍŤÁŁ)
]]'
summary_score_threshold: '[[ Ťĥé ɱíɳíɱůɱ ščóřé óƒ á ƿóšť ťó ƀé íɳčłůďéď íɳ ťĥé
''šůɱɱářý'' ]]'
summary_posts_required: '[[ Ϻíɳíɱůɱ ƿóšťš íɳ á ťóƿíč ƀéƒóřé ''šůɱɱářý'' ɱóďé íš

View file

@ -262,7 +262,6 @@ pt:
logo_small_url: "O logo em pequeno para o teu site (aparece nas páginas dos tópicos) eg: http://example.com/logo-small.png"
favicon_url: "Um favicon para o teu site"
notification_email: "O endereço de email a ser usado para notificar os utilizadores de password esquecida, novas contas, etc."
use_ssl: "Deverá o site estár acessivel via SSL?"
summary_score_threshold: "A pontuação mínima de um post para ser incluído no 'melhor de'"
summary_posts_required: "Um tópico precisa deste número de posts antes de ser ativado o modo 'melhor de'."
summary_likes_required: "Um tópico precisa deste número de gostos antes de ser ativado o mode 'melhor de'."

View file

@ -512,7 +512,6 @@ pt_BR:
notification_email: "O endereço de email a ser usado para notificar os utilizadores de password esquecida, novas contas, etc."
email_custom_headers: "A lista delimitada por barras verticais de cabeçalhos de e-mail personalizados"
use_ssl: "O site deve ser acessível via SSL?"
summary_score_threshold: "A pontuação mínima de uma postagem para ser incluído no 'melhor de'"
summary_posts_required: "Um tópico precisa deste número de posts antes de ser ativado o modo 'melhor de'."
summary_likes_required: "Um tópico precisa deste número de curtidas antes de ser ativado o modo 'melhor de'."

View file

@ -526,7 +526,6 @@ ru:
apple_touch_icon_url: 'Иконка используемая для тач-устройств Apple. Рекомендуемый размер 144 x 144 px.'
notification_email: 'Обратный электронный адрес, используемый для отправки системных электронных писем пользователям, таких как оповещение пользователей о потерянном пароле, новой учетной записи и т.д.'
email_custom_headers: 'Разделенный чертой список дополнительных заголовков в почтовых сообщениях'
use_ssl: 'Будет ли сайт доступен по SSL? (НЕ РЕАЛИЗОВАНО, ЭКСПЕРИМЕНТАЛЬНАЯ ФУНКЦИЯ)'
summary_score_threshold: 'Минимальная оценка сообщения, чтобы оно было включено в список «лучших сообщений»'
summary_posts_required: 'Минимальное количество сообщений в теме для активации режима «лучшие»'
summary_likes_required: 'Минимальное количество симпатий в теме для активации режима «лучшие»'

View file

@ -363,7 +363,6 @@ sv:
logo_small_url: "Den lilla logotypen för din webbplats som används när man bläddrar ner i trådar t.ex.: http://xyz.com/x-small.png"
favicon_url: "En favicon för till webbplats, se http://en.wikipedia.org/wiki/Favicon"
notification_email: "Avsändaradressen som används vid utskick av systemmail som t.ex. glömt lösenord, nya konton etc"
use_ssl: "Ska denna webbplats vara åtkomlig via SSL?"
summary_score_threshold: "The minimum score of a post to be included in the 'summary'"
summary_posts_required: "Minimum posts in a topic before 'summary' mode is enabled"
summary_likes_required: "Minimum likes in a topic before the 'summary' mode will be enabled"

View file

@ -459,7 +459,7 @@ zh_CN:
logo_small_url: "你的站点的小号标志图片例如http://example.com/logo-small.png用于卷起主题列表时显示"
favicon_url: "你的站点图标favicon参考 http://zh.wikipedia.org/wiki/Favicon"
notification_email: "邮件回复地址,当发送系统邮件,例如通知用户找回密码、新用户注册等等时,所使用的发信人地址"
use_ssl: "使用 SSL 安全套接层来访问本站吗?"
use_https: "使用 SSL 安全套接层来访问本站吗?"
summary_score_threshold: "将一个帖子包含到“优秀”帖子中所需的最小分值"
summary_posts_required: "在一个主题中启用“优秀”模式所要求的最小帖子数量"
summary_likes_required: "在一个主题中启用“优秀”模式所要求的最小赞数量"

View file

@ -440,7 +440,6 @@ zh_TW:
logo_small_url: "你的站點的小號標志圖片例如http://example.com/logo-small.png用于卷起主題列表時顯示"
favicon_url: "你的站點圖標favicon參考 http://zh.wikipedia.org/wiki/Favicon"
notification_email: "郵件回複地址,當發送系統郵件,例如通知用戶找回密碼、新用戶注冊等等時,所使用的發信人地址"
use_ssl: "使用 SSL 安全套接層來訪問本站嗎?"
summary_score_threshold: "將一個帖子包含到“優秀”帖子中所需的最小分值"
summary_posts_required: "在一個主題中啓用“優秀”模式所要求的最小帖子數量"
summary_likes_required: "在一個主題中啓用“優秀”模式所要求的最小贊數量"

View file

@ -292,7 +292,7 @@ trust:
security:
enable_flash_video_onebox: false
use_ssl: false
use_https: false
enable_escaped_fragments:
client: true
default: false

View file

@ -107,7 +107,7 @@ module Discourse
default_port = 80
protocol = "http"
if SiteSetting.use_ssl?
if SiteSetting.use_https?
protocol = "https"
default_port = 443
end

View file

@ -115,7 +115,7 @@ module FileStore
aws_secret_access_key: SiteSetting.s3_secret_access_key,
scheme: SiteSetting.scheme,
# cf. https://github.com/fog/fog/issues/2381
path_style: dns_compatible?(s3_bucket, SiteSetting.use_ssl?),
path_style: dns_compatible?(s3_bucket, SiteSetting.use_https?),
}
options[:region] = SiteSetting.s3_region unless SiteSetting.s3_region.empty?
options

View file

@ -6,13 +6,13 @@ task 'assets:prestage' => :environment do |t|
require "uri"
def get_assets(path)
a = Dir.glob("#{Rails.root}/public/assets/#{path}*").map do |f|
Dir.glob("#{Rails.root}/public/assets/#{path}*").map do |f|
if f =~ /[a-f0-9]{16}\.(css|js)$/
"/assets/#{path}#{f.split('/')[-1]}"
end
end.compact
end
# pre-stage css/js only for now
assets = get_assets("locales/") + get_assets("")
puts "pre staging: #{assets.join(' ')}"

View file

@ -16,19 +16,19 @@ describe Discourse do
end
context 'base_url' do
context 'when ssl is off' do
context 'when https is off' do
before do
SiteSetting.expects(:use_ssl?).returns(false)
SiteSetting.expects(:use_https?).returns(false)
end
it 'has a non-ssl base url' do
it 'has a non https base url' do
Discourse.base_url.should == "http://foo.com"
end
end
context 'when ssl is on' do
context 'when https is on' do
before do
SiteSetting.expects(:use_ssl?).returns(true)
SiteSetting.expects(:use_https?).returns(true)
end
it 'has a non-ssl base url' do

View file

@ -113,12 +113,12 @@ describe SiteSetting do
describe "scheme" do
it "returns http when ssl is disabled" do
SiteSetting.expects(:use_ssl).returns(false)
SiteSetting.expects(:use_https).returns(false)
SiteSetting.scheme.should == "http"
end
it "returns https when using ssl" do
SiteSetting.expects(:use_ssl).returns(true)
SiteSetting.expects(:use_https).returns(true)
SiteSetting.scheme.should == "https"
end