fixed newlines
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.4.5-stable+timestamp.2013.03.29.02.07.58
|
Version 2.4.5-stable+timestamp.2013.03.29.02.12.57
|
||||||
|
|||||||
+1
-1
@@ -373,7 +373,7 @@ def check_new_version(myversion, version_URL):
|
|||||||
the most up-to-version available
|
the most up-to-version available
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
from urllib import urlopen
|
from urllib import urlopen
|
||||||
version = urlopen(version_URL).read()
|
version = urlopen(version_URL).read()
|
||||||
pversion = parse_version(version)
|
pversion = parse_version(version)
|
||||||
pmyversion = parse_version(myversion)
|
pmyversion = parse_version(myversion)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
|
|||||||
CONTENT_TYPE dictionary created against freedesktop.org' shared mime info
|
CONTENT_TYPE dictionary created against freedesktop.org' shared mime info
|
||||||
database version 1.1.
|
database version 1.1.
|
||||||
|
|
||||||
Deviations from official standards:
|
Deviations from official standards:
|
||||||
- '.md': 'application/x-genesis-rom' --> 'text/x-markdown'
|
- '.md': 'application/x-genesis-rom' --> 'text/x-markdown'
|
||||||
- '.png': 'image/x-apple-ios-png' --> 'image/png'
|
- '.png': 'image/x-apple-ios-png' --> 'image/png'
|
||||||
Additions:
|
Additions:
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
|
|||||||
@@ -662,4 +662,3 @@ def ldap_auth(server='ldap', port=None,
|
|||||||
if filterstr[0] == '(' and filterstr[-1] == ')': # rfc4515 syntax
|
if filterstr[0] == '(' and filterstr[-1] == ')': # rfc4515 syntax
|
||||||
filterstr = filterstr[1:-1] # parens added again where used
|
filterstr = filterstr[1:-1] # parens added again where used
|
||||||
return ldap_auth_aux
|
return ldap_auth_aux
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ server for requests. It can be used for the optional"scope" parameters for Face
|
|||||||
# reuse token until expiration
|
# reuse token until expiration
|
||||||
if expires == 0 or expires > time.time():
|
if expires == 0 or expires > time.time():
|
||||||
return current.session.token['access_token']
|
return current.session.token['access_token']
|
||||||
|
|
||||||
code = current.request.vars.code
|
code = current.request.vars.code
|
||||||
|
|
||||||
if code:
|
if code:
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ class OpenIDAuth(object):
|
|||||||
Otherwise it's always 'openid' and you
|
Otherwise it's always 'openid' and you
|
||||||
may not need it. This should be easy to changed.
|
may not need it. This should be easy to changed.
|
||||||
(Just remove the field of "type" and remove the
|
(Just remove the field of "type" and remove the
|
||||||
"and db.alt_logins.oidtype == type_"
|
"and db.alt_logins.oidtype == type_"
|
||||||
in _find_matched_openid function)
|
in _find_matched_openid function)
|
||||||
"""
|
"""
|
||||||
db = self.db
|
db = self.db
|
||||||
|
|||||||
+2364
-2364
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -695,7 +695,7 @@ class Session(Storage):
|
|||||||
|
|
||||||
def forget(self, response=None):
|
def forget(self, response=None):
|
||||||
self._close(response)
|
self._close(response)
|
||||||
self._forget = True
|
self._forget = True
|
||||||
|
|
||||||
def _try_store_in_cookie(self, request, response):
|
def _try_store_in_cookie(self, request, response):
|
||||||
if response.session_storage_type != 'cookie':
|
if response.session_storage_type != 'cookie':
|
||||||
|
|||||||
+1
-1
@@ -238,7 +238,7 @@ def read_possible_languages_aux(langdir):
|
|||||||
|
|
||||||
plurals = {}
|
plurals = {}
|
||||||
flist = oslistdir(langdir) if isdir(langdir) else []
|
flist = oslistdir(langdir) if isdir(langdir) else []
|
||||||
|
|
||||||
# scan languages directory for plural dict files:
|
# scan languages directory for plural dict files:
|
||||||
for pname in flist:
|
for pname in flist:
|
||||||
if regex_plural_file.match(pname):
|
if regex_plural_file.match(pname):
|
||||||
|
|||||||
@@ -226,4 +226,3 @@ def sanitize(text, permitted_tags=[
|
|||||||
return str(text)
|
return str(text)
|
||||||
return XssCleaner(permitted_tags=permitted_tags,
|
return XssCleaner(permitted_tags=permitted_tags,
|
||||||
allowed_attributes=allowed_attributes).strip(text, escape)
|
allowed_attributes=allowed_attributes).strip(text, escape)
|
||||||
|
|
||||||
|
|||||||
@@ -181,4 +181,3 @@ def loads_yaml(data):
|
|||||||
if have_yaml:
|
if have_yaml:
|
||||||
return yamlib.load(data)
|
return yamlib.load(data)
|
||||||
else: raise ImportError("No YAML serializer available")
|
else: raise ImportError("No YAML serializer available")
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -2573,7 +2573,7 @@ class SQLFORM(FORM):
|
|||||||
header = table._plural
|
header = table._plural
|
||||||
next = grid.create_form or grid.update_form or grid.view_form
|
next = grid.create_form or grid.update_form or grid.view_form
|
||||||
breadcrumbs.append(LI(
|
breadcrumbs.append(LI(
|
||||||
A(T(header), _class=trap_class(),_href=url()),
|
A(T(header), _class=trap_class(),_href=url()),
|
||||||
SPAN(divider, _class='divider') if next else '',
|
SPAN(divider, _class='divider') if next else '',
|
||||||
_class='active w2p_grid_breadcrumb_elem'))
|
_class='active w2p_grid_breadcrumb_elem'))
|
||||||
if grid.create_form:
|
if grid.create_form:
|
||||||
@@ -2584,7 +2584,7 @@ class SQLFORM(FORM):
|
|||||||
header = T('View %s' % format(table,grid.view_form.record))
|
header = T('View %s' % format(table,grid.view_form.record))
|
||||||
if next:
|
if next:
|
||||||
breadcrumbs.append(LI(
|
breadcrumbs.append(LI(
|
||||||
A(T(header), _class=trap_class(),_href=url()),
|
A(T(header), _class=trap_class(),_href=url()),
|
||||||
_class='active w2p_grid_breadcrumb_elem'))
|
_class='active w2p_grid_breadcrumb_elem'))
|
||||||
grid.insert(
|
grid.insert(
|
||||||
0, DIV(UL(*breadcrumbs, **{'_class': breadcrumbs_class}),
|
0, DIV(UL(*breadcrumbs, **{'_class': breadcrumbs_class}),
|
||||||
|
|||||||
+18
-18
@@ -347,10 +347,10 @@ class Mail(object):
|
|||||||
mail.send_mail() method
|
mail.send_mail() method
|
||||||
self.error: Exception message or None if above was successful
|
self.error: Exception message or None if above was successful
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# We don't want to use base64 encoding for unicode mail
|
# We don't want to use base64 encoding for unicode mail
|
||||||
Charset.add_charset('utf-8', Charset.QP, Charset.QP, 'utf-8')
|
Charset.add_charset('utf-8', Charset.QP, Charset.QP, 'utf-8')
|
||||||
|
|
||||||
def encode_header(key):
|
def encode_header(key):
|
||||||
if [c for c in key if 32 > ord(c) or ord(c) > 127]:
|
if [c for c in key if 32 > ord(c) or ord(c) > 127]:
|
||||||
return Header.Header(key.encode('utf-8'), 'utf-8')
|
return Header.Header(key.encode('utf-8'), 'utf-8')
|
||||||
@@ -1429,7 +1429,7 @@ class Auth(object):
|
|||||||
def represent(id, record=None, s=settings):
|
def represent(id, record=None, s=settings):
|
||||||
try:
|
try:
|
||||||
user = s.table_user(id)
|
user = s.table_user(id)
|
||||||
return '%s %s' % (user.get("first_name", user.get("email")),
|
return '%s %s' % (user.get("first_name", user.get("email")),
|
||||||
user.get("last_name", ''))
|
user.get("last_name", ''))
|
||||||
except:
|
except:
|
||||||
return id
|
return id
|
||||||
@@ -1769,14 +1769,14 @@ class Auth(object):
|
|||||||
|
|
||||||
reads current.request.env.http_authorization
|
reads current.request.env.http_authorization
|
||||||
and returns basic_allowed,basic_accepted,user.
|
and returns basic_allowed,basic_accepted,user.
|
||||||
|
|
||||||
if basic_auth_realm is defined is a callable it's return value
|
if basic_auth_realm is defined is a callable it's return value
|
||||||
is used to set the basic authentication realm, if it's a string
|
is used to set the basic authentication realm, if it's a string
|
||||||
its content is used instead. Otherwise basic authentication realm
|
its content is used instead. Otherwise basic authentication realm
|
||||||
is set to the application name.
|
is set to the application name.
|
||||||
If basic_auth_realm is None or False (the default) the behavior
|
If basic_auth_realm is None or False (the default) the behavior
|
||||||
is to skip sending any challenge.
|
is to skip sending any challenge.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if not self.settings.allow_basic_login:
|
if not self.settings.allow_basic_login:
|
||||||
return (False, False, False)
|
return (False, False, False)
|
||||||
@@ -1788,7 +1788,7 @@ class Auth(object):
|
|||||||
basic_realm = unicode(basic_auth_realm)
|
basic_realm = unicode(basic_auth_realm)
|
||||||
elif basic_auth_realm is True:
|
elif basic_auth_realm is True:
|
||||||
basic_realm = u'' + current.request.application
|
basic_realm = u'' + current.request.application
|
||||||
http_401 = HTTP(401, u'Not Authorized',
|
http_401 = HTTP(401, u'Not Authorized',
|
||||||
**{'WWW-Authenticate': u'Basic realm="' + basic_realm + '"'})
|
**{'WWW-Authenticate': u'Basic realm="' + basic_realm + '"'})
|
||||||
if not basic or not basic[:6].lower() == 'basic ':
|
if not basic or not basic[:6].lower() == 'basic ':
|
||||||
if basic_auth_realm:
|
if basic_auth_realm:
|
||||||
@@ -4330,7 +4330,7 @@ class Service(object):
|
|||||||
|
|
||||||
# jsonrpc 2.0 error types. records the following structure {code: (message,meaning)}
|
# jsonrpc 2.0 error types. records the following structure {code: (message,meaning)}
|
||||||
jsonrpc_errors = {
|
jsonrpc_errors = {
|
||||||
-32700: ("Parse error. Invalid JSON was received by the server.", "An error occurred on the server while parsing the JSON text."),
|
-32700: ("Parse error. Invalid JSON was received by the server.", "An error occurred on the server while parsing the JSON text."),
|
||||||
-32600: ("Invalid Request", "The JSON sent is not a valid Request object."),
|
-32600: ("Invalid Request", "The JSON sent is not a valid Request object."),
|
||||||
-32601: ("Method not found", "The method does not exist / is not available."),
|
-32601: ("Method not found", "The method does not exist / is not available."),
|
||||||
-32602: ("Invalid params", "Invalid method parameter(s)."),
|
-32602: ("Invalid params", "Invalid method parameter(s)."),
|
||||||
@@ -4385,7 +4385,7 @@ class Service(object):
|
|||||||
return return_error(id, 100, 'Exception %s: %s' % (etype, eval))
|
return return_error(id, 100, 'Exception %s: %s' % (etype, eval))
|
||||||
|
|
||||||
def serve_jsonrpc2(self, data=None, batch_element=False):
|
def serve_jsonrpc2(self, data=None, batch_element=False):
|
||||||
|
|
||||||
def return_response(id, result):
|
def return_response(id, result):
|
||||||
if not must_respond:
|
if not must_respond:
|
||||||
return None
|
return None
|
||||||
@@ -4416,9 +4416,9 @@ class Service(object):
|
|||||||
:returns:
|
:returns:
|
||||||
- True -- if successful
|
- True -- if successful
|
||||||
- False -- if no error should be reported (i.e. data is missing 'id' member)
|
- False -- if no error should be reported (i.e. data is missing 'id' member)
|
||||||
|
|
||||||
:raises: JsonRPCException
|
:raises: JsonRPCException
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
iparms = set(data.keys())
|
iparms = set(data.keys())
|
||||||
@@ -4434,8 +4434,8 @@ class Service(object):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
request = current.request
|
request = current.request
|
||||||
response = current.response
|
response = current.response
|
||||||
if not data:
|
if not data:
|
||||||
@@ -4444,7 +4444,7 @@ class Service(object):
|
|||||||
data = json_parser.loads(request.body.read())
|
data = json_parser.loads(request.body.read())
|
||||||
except ValueError: # decoding error in json lib
|
except ValueError: # decoding error in json lib
|
||||||
return return_error(None, -32700)
|
return return_error(None, -32700)
|
||||||
except json_parser.JSONDecodeError: # decoding error in simplejson lib
|
except json_parser.JSONDecodeError: # decoding error in simplejson lib
|
||||||
return return_error(None, -32700)
|
return return_error(None, -32700)
|
||||||
|
|
||||||
# Batch handling
|
# Batch handling
|
||||||
@@ -4460,12 +4460,12 @@ class Service(object):
|
|||||||
return "[" + ','.join(retlist) + "]"
|
return "[" + ','.join(retlist) + "]"
|
||||||
methods = self.jsonrpc2_procedures
|
methods = self.jsonrpc2_procedures
|
||||||
methods.update(self.jsonrpc_procedures)
|
methods.update(self.jsonrpc_procedures)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
must_respond = validate(data)
|
must_respond = validate(data)
|
||||||
except Service.JsonRpcException, e:
|
except Service.JsonRpcException, e:
|
||||||
return return_error(None, e.code, e.info)
|
return return_error(None, e.code, e.info)
|
||||||
|
|
||||||
id, method, params = data.get('id'), data['method'], data.get('params', '')
|
id, method, params = data.get('id'), data['method'], data.get('params', '')
|
||||||
if not method in methods:
|
if not method in methods:
|
||||||
return return_error(id, -32601, data='Method "%s" does not exist' % method)
|
return return_error(id, -32601, data='Method "%s" does not exist' % method)
|
||||||
@@ -4492,7 +4492,7 @@ class Service(object):
|
|||||||
except:
|
except:
|
||||||
etype, eval, etb = sys.exc_info()
|
etype, eval, etb = sys.exc_info()
|
||||||
return return_error(id, -32099, data='Exception %s: %s' % (etype, eval))
|
return return_error(id, -32099, data='Exception %s: %s' % (etype, eval))
|
||||||
|
|
||||||
|
|
||||||
def serve_xmlrpc(self):
|
def serve_xmlrpc(self):
|
||||||
request = current.request
|
request = current.request
|
||||||
@@ -5309,7 +5309,7 @@ class Wiki(object):
|
|||||||
slugs=db(db.wiki_page.id>0).select(db.wiki_page.id,db.wiki_page.slug)
|
slugs=db(db.wiki_page.id>0).select(db.wiki_page.id,db.wiki_page.slug)
|
||||||
options=[OPTION(row.slug,_value=row.id) for row in slugs]
|
options=[OPTION(row.slug,_value=row.id) for row in slugs]
|
||||||
options.insert(0, OPTION('',_value=''))
|
options.insert(0, OPTION('',_value=''))
|
||||||
fields = [Field("slug", default=current.request.args(1) or
|
fields = [Field("slug", default=current.request.args(1) or
|
||||||
self.settings.force_prefix,
|
self.settings.force_prefix,
|
||||||
requires=(IS_SLUG(), IS_NOT_IN_DB(db,db.wiki_page.slug))),]
|
requires=(IS_SLUG(), IS_NOT_IN_DB(db,db.wiki_page.slug))),]
|
||||||
if self.settings.templates:
|
if self.settings.templates:
|
||||||
@@ -5342,7 +5342,7 @@ class Wiki(object):
|
|||||||
content = SQLFORM.grid(
|
content = SQLFORM.grid(
|
||||||
wiki_table,
|
wiki_table,
|
||||||
fields = [wiki_table.slug,
|
fields = [wiki_table.slug,
|
||||||
wiki_table.title, wiki_table.tags,
|
wiki_table.title, wiki_table.tags,
|
||||||
wiki_table.can_read, wiki_table.can_edit],
|
wiki_table.can_read, wiki_table.can_edit],
|
||||||
links=[
|
links=[
|
||||||
lambda row:
|
lambda row:
|
||||||
|
|||||||
Reference in New Issue
Block a user