move sendReferrer into site, fixes #2505

This commit is contained in:
j 2014-10-02 19:57:30 +02:00
parent 5a57af8dd1
commit dd2fca85a4
6 changed files with 7 additions and 5 deletions

View File

@ -62,6 +62,8 @@ def load_config():
config['site']['dontValidateUser'] = not settings.AUTH_CHECK_USERNAME
if not 'folderdepth' in config['site']:
config['site']['folderdepth'] = settings.USE_IMDB and 4 or 3
if 'sendReferrer' in config and not 'sendReferrer' in config['site']:
config['site']['sendReferrer'] = config.pop('sendReferrer')
# enable default filters if needed
default_filters = [f['id'] for f in config['user']['ui']['filters']]

View File

@ -55,7 +55,7 @@ def redirect_url(request, url):
if request.META['QUERY_STRING']:
url += "?" + request.META['QUERY_STRING']
if settings.CONFIG.get('sendReferrer', False):
if settings.CONFIG['site'].get('sendReferrer', False):
return redirect(url)
else:
return HttpResponse('<script>document.location.href=%s;</script>'%json.dumps(url))

View File

@ -704,7 +704,6 @@
{"name": "Restricted", "color": [255, 192, 128]},
{"name": "Private", "color": [255, 128, 128]}
],
"sendReferrer": false,
"site": {
"description": "0xDB is an experimental - and to some degree imaginary - movie database. It is intended to help us rethink the future of cinema on the Internet, just as it tries to push the boundaries of what we understand as \"web applications\". What 0xDB proposes is an entirely new approach to visualizing and navigating moving images, and we hope that it can serve as a point of reference for individuals and institutions who are dealing with large collections of films.",
// FIXME: "from" and "to" would be more intuitive as keys here
@ -719,6 +718,7 @@
"https": true,
"id": "0xdb",
"name": "0xDB",
"sendReferrer": false,
"url": "0xDB.org",
"videoprefix": ""
},

View File

@ -717,7 +717,6 @@
{"name": "Under Copyright", "color": [255, 212, 128]},
{"name": "Private", "color": [255, 128, 128]}
],
"sendReferrer": true,
"site": {
"description": "Indiancine.ma is an annotated online archive of Indian film. It is intended to serve as a shared resource for film scholars and enthusiasts in India and beyond.",
// FIXME: "from" and "to" would be more intuitive as keys here
@ -733,6 +732,7 @@
"https": true,
"id": "indiancinema",
"name": "Indiancine.ma",
"sendReferrer": true,
"url": "indiancine.ma",
"videoprefix": ""
},

View File

@ -601,7 +601,6 @@
{"name": "Restricted", "color": [255, 192, 128]},
{"name": "Private", "color": [255, 128, 128]}
],
"sendReferrer": true,
"site": {
"description": "Pad.ma is an online archive of densely text-annotated video material, primarily footage and not finished films. The entire collection is searchable and viewable online, and is free to download for non-commercial use.",
"email": {
@ -615,6 +614,7 @@
"https": true,
"id": "padma",
"name": "Pad.ma",
"sendReferrer": true,
"url": "pad.ma",
"videoprefix": ""
},

View File

@ -516,7 +516,6 @@
{"name": "Restricted", "color": [255, 192, 128]},
{"name": "Private", "color": [255, 128, 128]}
],
"sendReferrer": true,
"site": {
"description": "This is a demo of pan.do/ra - a free, open source media archive. It allows you to manage large, decentralized collections of video, to collaboratively create metadata and time-based annotations, and to serve your archive as a cutting-edge web application.",
"email": {
@ -530,6 +529,7 @@
"https": false,
"id": "pandora",
"name": "Demo",
"sendReferrer": true,
"url": "pandora.local",
"videoprefix": ""
},