diff --git a/frappe/__init__.py b/frappe/__init__.py index 26058ce943..20efa7b002 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -13,7 +13,7 @@ import os, importlib, inspect, json from .exceptions import * from .utils.jinja import get_jenv, get_template, render_template -__version__ = "7.0.1" +__version__ = "7.0.2" local = Local() diff --git a/frappe/desk/doctype/desktop_icon/desktop_icon.py b/frappe/desk/doctype/desktop_icon/desktop_icon.py index 37f697dba8..32ce5275e9 100644 --- a/frappe/desk/doctype/desktop_icon/desktop_icon.py +++ b/frappe/desk/doctype/desktop_icon/desktop_icon.py @@ -66,12 +66,10 @@ def get_desktop_icons(user=None): for standard_icon in standard_icons: if standard_icon.module_name not in user_icon_names: - # flag for modules_setup page - standard_icon.hidden_in_standard = standard_icon.hidden - # if blocked, hidden too! if standard_icon.blocked: standard_icon.hidden = 1 + standard_icon.hidden_in_standard = 1 user_icons.append(standard_icon) diff --git a/frappe/email/doctype/email_account/email_account.py b/frappe/email/doctype/email_account/email_account.py index 4c71c31dcf..845e82c315 100755 --- a/frappe/email/doctype/email_account/email_account.py +++ b/frappe/email/doctype/email_account/email_account.py @@ -93,6 +93,8 @@ class EmailAccount(Document): if self.enable_outgoing: if not self.smtp_server: frappe.throw(_("{0} is required").format("SMTP Server")) + if not self.password: + frappe.throw(_("{0} is required").format("Password")) server = SMTPServer(login = getattr(self, "login_id", None) \ or self.email_id, @@ -105,6 +107,9 @@ class EmailAccount(Document): def get_server(self, in_receive=False): """Returns logged in POP3 connection object.""" + if not self.password: + frappe.throw(_("{0} is required").format("Password")) + args = { "host": self.email_server, "use_ssl": self.use_ssl, diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 742e7e9b48..ca6a689584 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -568,8 +568,20 @@ def get_url(uri=None, full_address=False): if hasattr(frappe.local, "request") and frappe.local.request and frappe.local.request.host: protocol = 'https' == frappe.get_request_header('X-Forwarded-Proto', "") and 'https://' or 'http://' host_name = protocol + frappe.local.request.host + elif frappe.local.site: - host_name = "http://{}".format(frappe.local.site) + protocol = 'http://' + + if frappe.local.conf.ssl_certificate: + protocol = 'https://' + + elif frappe.local.conf.wildcard: + domain = frappe.local.conf.wildcard.get('domain') + if domain and frappe.local.site.endswith(domain) and frappe.local.conf.wildcard.get('ssl_certificate'): + protocol = 'https://' + + host_name = protocol + frappe.local.site + else: host_name = frappe.db.get_value("Website Settings", "Website Settings", "subdomain")