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
|
||||
"""
|
||||
try:
|
||||
from urllib import urlopen
|
||||
from urllib import urlopen
|
||||
version = urlopen(version_URL).read()
|
||||
pversion = parse_version(version)
|
||||
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
|
||||
database version 1.1.
|
||||
|
||||
Deviations from official standards:
|
||||
Deviations from official standards:
|
||||
- '.md': 'application/x-genesis-rom' --> 'text/x-markdown'
|
||||
- '.png': 'image/x-apple-ios-png' --> 'image/png'
|
||||
Additions:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
|
||||
@@ -662,4 +662,3 @@ def ldap_auth(server='ldap', port=None,
|
||||
if filterstr[0] == '(' and filterstr[-1] == ')': # rfc4515 syntax
|
||||
filterstr = filterstr[1:-1] # parens added again where used
|
||||
return ldap_auth_aux
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
#!/usr/bin/env python
|
||||
# -*- 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
|
||||
if expires == 0 or expires > time.time():
|
||||
return current.session.token['access_token']
|
||||
|
||||
|
||||
code = current.request.vars.code
|
||||
|
||||
if code:
|
||||
|
||||
@@ -135,7 +135,7 @@ class OpenIDAuth(object):
|
||||
Otherwise it's always 'openid' and you
|
||||
may not need it. This should be easy to changed.
|
||||
(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)
|
||||
"""
|
||||
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):
|
||||
self._close(response)
|
||||
self._forget = True
|
||||
self._forget = True
|
||||
|
||||
def _try_store_in_cookie(self, request, response):
|
||||
if response.session_storage_type != 'cookie':
|
||||
|
||||
+1
-1
@@ -238,7 +238,7 @@ def read_possible_languages_aux(langdir):
|
||||
|
||||
plurals = {}
|
||||
flist = oslistdir(langdir) if isdir(langdir) else []
|
||||
|
||||
|
||||
# scan languages directory for plural dict files:
|
||||
for pname in flist:
|
||||
if regex_plural_file.match(pname):
|
||||
|
||||
@@ -226,4 +226,3 @@ def sanitize(text, permitted_tags=[
|
||||
return str(text)
|
||||
return XssCleaner(permitted_tags=permitted_tags,
|
||||
allowed_attributes=allowed_attributes).strip(text, escape)
|
||||
|
||||
|
||||
@@ -181,4 +181,3 @@ def loads_yaml(data):
|
||||
if have_yaml:
|
||||
return yamlib.load(data)
|
||||
else: raise ImportError("No YAML serializer available")
|
||||
|
||||
|
||||
+2
-2
@@ -2573,7 +2573,7 @@ class SQLFORM(FORM):
|
||||
header = table._plural
|
||||
next = grid.create_form or grid.update_form or grid.view_form
|
||||
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 '',
|
||||
_class='active w2p_grid_breadcrumb_elem'))
|
||||
if grid.create_form:
|
||||
@@ -2584,7 +2584,7 @@ class SQLFORM(FORM):
|
||||
header = T('View %s' % format(table,grid.view_form.record))
|
||||
if next:
|
||||
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'))
|
||||
grid.insert(
|
||||
0, DIV(UL(*breadcrumbs, **{'_class': breadcrumbs_class}),
|
||||
|
||||
+18
-18
@@ -347,10 +347,10 @@ class Mail(object):
|
||||
mail.send_mail() method
|
||||
self.error: Exception message or None if above was successful
|
||||
"""
|
||||
|
||||
|
||||
# We don't want to use base64 encoding for unicode mail
|
||||
Charset.add_charset('utf-8', Charset.QP, Charset.QP, 'utf-8')
|
||||
|
||||
|
||||
def encode_header(key):
|
||||
if [c for c in key if 32 > ord(c) or ord(c) > 127]:
|
||||
return Header.Header(key.encode('utf-8'), 'utf-8')
|
||||
@@ -1429,7 +1429,7 @@ class Auth(object):
|
||||
def represent(id, record=None, s=settings):
|
||||
try:
|
||||
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", ''))
|
||||
except:
|
||||
return id
|
||||
@@ -1769,14 +1769,14 @@ class Auth(object):
|
||||
|
||||
reads current.request.env.http_authorization
|
||||
and returns basic_allowed,basic_accepted,user.
|
||||
|
||||
|
||||
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
|
||||
its content is used instead. Otherwise basic authentication realm
|
||||
is set to the application name.
|
||||
If basic_auth_realm is None or False (the default) the behavior
|
||||
is to skip sending any challenge.
|
||||
|
||||
|
||||
"""
|
||||
if not self.settings.allow_basic_login:
|
||||
return (False, False, False)
|
||||
@@ -1788,7 +1788,7 @@ class Auth(object):
|
||||
basic_realm = unicode(basic_auth_realm)
|
||||
elif basic_auth_realm is True:
|
||||
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 + '"'})
|
||||
if not basic or not basic[:6].lower() == 'basic ':
|
||||
if basic_auth_realm:
|
||||
@@ -4330,7 +4330,7 @@ class Service(object):
|
||||
|
||||
# jsonrpc 2.0 error types. records the following structure {code: (message,meaning)}
|
||||
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."),
|
||||
-32601: ("Method not found", "The method does not exist / is not available."),
|
||||
-32602: ("Invalid params", "Invalid method parameter(s)."),
|
||||
@@ -4385,7 +4385,7 @@ class Service(object):
|
||||
return return_error(id, 100, 'Exception %s: %s' % (etype, eval))
|
||||
|
||||
def serve_jsonrpc2(self, data=None, batch_element=False):
|
||||
|
||||
|
||||
def return_response(id, result):
|
||||
if not must_respond:
|
||||
return None
|
||||
@@ -4416,9 +4416,9 @@ class Service(object):
|
||||
:returns:
|
||||
- True -- if successful
|
||||
- False -- if no error should be reported (i.e. data is missing 'id' member)
|
||||
|
||||
|
||||
:raises: JsonRPCException
|
||||
|
||||
|
||||
"""
|
||||
|
||||
iparms = set(data.keys())
|
||||
@@ -4434,8 +4434,8 @@ class Service(object):
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
request = current.request
|
||||
response = current.response
|
||||
if not data:
|
||||
@@ -4444,7 +4444,7 @@ class Service(object):
|
||||
data = json_parser.loads(request.body.read())
|
||||
except ValueError: # decoding error in json lib
|
||||
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)
|
||||
|
||||
# Batch handling
|
||||
@@ -4460,12 +4460,12 @@ class Service(object):
|
||||
return "[" + ','.join(retlist) + "]"
|
||||
methods = self.jsonrpc2_procedures
|
||||
methods.update(self.jsonrpc_procedures)
|
||||
|
||||
|
||||
try:
|
||||
must_respond = validate(data)
|
||||
except Service.JsonRpcException, e:
|
||||
return return_error(None, e.code, e.info)
|
||||
|
||||
|
||||
id, method, params = data.get('id'), data['method'], data.get('params', '')
|
||||
if not method in methods:
|
||||
return return_error(id, -32601, data='Method "%s" does not exist' % method)
|
||||
@@ -4492,7 +4492,7 @@ class Service(object):
|
||||
except:
|
||||
etype, eval, etb = sys.exc_info()
|
||||
return return_error(id, -32099, data='Exception %s: %s' % (etype, eval))
|
||||
|
||||
|
||||
|
||||
def serve_xmlrpc(self):
|
||||
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)
|
||||
options=[OPTION(row.slug,_value=row.id) for row in slugs]
|
||||
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,
|
||||
requires=(IS_SLUG(), IS_NOT_IN_DB(db,db.wiki_page.slug))),]
|
||||
if self.settings.templates:
|
||||
@@ -5342,7 +5342,7 @@ class Wiki(object):
|
||||
content = SQLFORM.grid(
|
||||
wiki_table,
|
||||
fields = [wiki_table.slug,
|
||||
wiki_table.title, wiki_table.tags,
|
||||
wiki_table.title, wiki_table.tags,
|
||||
wiki_table.can_read, wiki_table.can_edit],
|
||||
links=[
|
||||
lambda row:
|
||||
|
||||
Reference in New Issue
Block a user