Better error messages in planet2 PNS and a fix to the sync script

This commit is contained in:
Jay McCarthy 2012-11-08 12:34:07 -07:00
parent 74c9871dbe
commit 7ed39caa93
2 changed files with 14 additions and 4 deletions

View File

@ -278,6 +278,15 @@
`(p "Email addresses may not contain / on Planet2:"
(tt ,email)))))
(when (string=? "" email)
(send/back
(template
log-req
#:breadcrumb
(list "Login" "Account Registration Error")
`(p "Email addresses must not be empty::"
(tt ,email)))))
(define password-path (build-path users-path email))
(cond
@ -301,7 +310,10 @@
`(p "An email has been sent to "
(tt ,email)
", please click the link it contains to register and log in."))))
(display-to-file (salty passwd) password-path)
(when (not (file-exists? password-path))
(display-to-file (salty passwd) password-path))
(authenticated!)]
[(not (bytes=? (string->bytes/utf-8 (salty passwd))
(file->bytes password-path)))

View File

@ -1,11 +1,9 @@
#!/bin/sh
for i in planet2 tests/planet2 meta/planet2-index ; do
rsync -n -a --progress -h --delete --exclude root --exclude compiled --exclude doc ../../$i/ plt-etc:local/galaxy/$i/
rsync -a --progress -h --delete --exclude root --exclude compiled --exclude doc ../../$i/ plt-etc:local/galaxy/$i/
done
exit 1
for i in official planet-compat ; do
rsync -a --progress -h --delete plt-etc:local/galaxy/meta/planet2-index/$i/root/ $i/root/
done