Merge branch 'v4.x.x'
This commit is contained in:
commit
23257532ef
7 changed files with 17 additions and 9 deletions
|
|
@ -1,2 +1,2 @@
|
|||
from __future__ import unicode_literals
|
||||
__version__ = "4.13.5"
|
||||
__version__ = "4.13.6"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ app_title = "Frappe Framework"
|
|||
app_publisher = "Web Notes Technologies Pvt. Ltd."
|
||||
app_description = "Full Stack Web Application Framework in Python"
|
||||
app_icon = "assets/frappe/images/frappe.svg"
|
||||
app_version = "4.13.5"
|
||||
app_version = "4.13.6"
|
||||
app_color = "#3498db"
|
||||
app_email = "support@frappe.io"
|
||||
|
||||
|
|
|
|||
|
|
@ -63,8 +63,13 @@ def extract_email_id(email):
|
|||
|
||||
def validate_email_add(email_str):
|
||||
"""Validates the email string"""
|
||||
if email_str and " " in email_str and "<" not in email_str:
|
||||
# example: "test@example.com test2@example.com" will return "test@example.comtest2" after parseaddr!!!
|
||||
return False
|
||||
|
||||
email = extract_email_id(email_str)
|
||||
match = re.match("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", email.lower())
|
||||
|
||||
if not match:
|
||||
return False
|
||||
|
||||
|
|
|
|||
|
|
@ -228,10 +228,14 @@ def delete_file_data_content(doc):
|
|||
|
||||
def delete_file_from_filesystem(doc):
|
||||
path = doc.file_name
|
||||
|
||||
if path.startswith("files/"):
|
||||
path = frappe.utils.get_site_path("public", doc.file_name)
|
||||
else:
|
||||
path = frappe.utils.get_site_path("public", "files", doc.file_name)
|
||||
|
||||
path = encode(path)
|
||||
|
||||
if os.path.exists(path):
|
||||
os.remove(path)
|
||||
|
||||
|
|
|
|||
|
|
@ -96,16 +96,15 @@ class WebsiteGenerator(Document):
|
|||
|
||||
if old_route and old_route != self.get_route():
|
||||
# clear cache of old routes
|
||||
old_routes = frappe.get_all(self.doctype, fields=["parent_website_route", "page_name"],
|
||||
filters={"parent_website_route": ("like", old_route + "%")})
|
||||
old_routes = frappe.get_all(self.doctype, filters={"parent_website_route": ("like", old_route + "%")})
|
||||
|
||||
if old_routes:
|
||||
for old_route in old_routes:
|
||||
clear_cache(make_route(old_route))
|
||||
for like_old_route in old_routes:
|
||||
clear_cache(frappe.get_doc(self.doctype, like_old_route.name).get_route())
|
||||
|
||||
frappe.db.sql("""update `tab{0}` set
|
||||
parent_website_route = replace(parent_website_route, %s, %s),
|
||||
modified = %s
|
||||
modified = %s,
|
||||
modified_by = %s
|
||||
where parent_website_route like %s""".format(self.doctype),
|
||||
(old_route, self.get_route(), now(), frappe.session.user, old_route + "%"))
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ markupsafe
|
|||
mysql-python==1.2.5
|
||||
pygeoip
|
||||
python-dateutil
|
||||
python-memcached
|
||||
python-memcached==1.53
|
||||
pytz
|
||||
six
|
||||
slugify
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -1,7 +1,7 @@
|
|||
from setuptools import setup, find_packages
|
||||
import os
|
||||
|
||||
version = "4.13.5"
|
||||
version = "4.13.6"
|
||||
|
||||
with open("requirements.txt", "r") as f:
|
||||
install_requires = f.readlines()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue