summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2008-04-29 03:08:54 +0200
committereliott <eliott@cactuswax.net>2008-04-29 03:08:54 +0200
commit889d15406cb989d35b39560751f1d8373a11a5c0 (patch)
treeb104a27cca8a691b5dbbdf56599dfbee6cebec49 /packages
parent7e62d7f4ba9def136962e0d1cae57b2d49b19b54 (diff)
downloadarchweb-889d15406cb989d35b39560751f1d8373a11a5c0.tar.gz
archweb-889d15406cb989d35b39560751f1d8373a11a5c0.tar.xz
removed flag out of date from backend.
Flagging a package out of date is not needed in the backend. Backend only needs to unflag.
Diffstat (limited to 'packages')
-rw-r--r--packages/views.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/packages/views.py b/packages/views.py
index 87d61f9..2ac3474 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -135,44 +135,6 @@ def files(request, pkgid):
files = PackageFile.objects.filter(pkg=pkgid)
return render_response(request, 'packages/files.html', {'pkg':pkg,'files':files})
-def flaghelp(request):
- return render_response(request, 'packages/flaghelp.html')
-
-def flag(request, pkgid):
- pkg = get_object_or_404(Package, id=pkgid)
- context = {'pkg': pkg}
- if request.POST.has_key('confirmemail'):
- email = request.POST['confirmemail']
- if request.POST.has_key('usermessage'):
- message = request.POST['usermessage']
- else:
- message = None
- # validate
- errors = {}
- validate(errors, 'Email Address', email, validators.isValidEmail, False, request)
- if errors:
- context['errors'] = errors
- return render_response(request, 'packages/flag.html', context)
-
- context['confirmemail'] = email
- pkg.needupdate = 1
- pkg.save()
- if pkg.maintainer_id > 0:
- # send notification email to the maintainer
- t = loader.get_template('packages/outofdate.txt')
- c = Context({
- 'email': request.POST['confirmemail'],
- 'message': message,
- 'pkgname': pkg.pkgname,
- 'weburl': 'http://www.archlinux.org/packages/' + str(pkg.id) + '/'
- })
- send_mail('arch: Package [%s] marked out-of-date' % pkg.pkgname,
- t.render(c),
- 'Arch Website Notification <nobody@archlinux.org>',
- [pkg.maintainer.email],
- fail_silently=True)
- return render_response(request, 'packages/flag.html', context)
-
def unflag(request, pkgid):
pkg = get_object_or_404(Package, id=pkgid)
pkg.needupdate = 0