mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
trying to fix the damn validations
This commit is contained in:
parent
2659e2850d
commit
4e1bf0f73d
2 changed files with 6 additions and 8 deletions
|
@ -74,11 +74,9 @@ class Site < Sequel::Model
|
||||||
|
|
||||||
# Check for existing user
|
# Check for existing user
|
||||||
|
|
||||||
if new?
|
user = self.class.select(:username).filter(username: values[:username]).first
|
||||||
user = self.class.select(:username).filter(username: values[:username]).first
|
if !user.nil? && (user.id != values[:id])
|
||||||
if !user.nil? && (user.id != values[:id])
|
errors.add :username, 'This username is already taken. Try using another one.'
|
||||||
errors.add :username, 'This username is already taken. Try using another one.'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if values[:password].nil? || (@password_length && @password_length < MINIMUM_PASSWORD_LENGTH)
|
if values[:password].nil? || (@password_length && @password_length < MINIMUM_PASSWORD_LENGTH)
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
td Anything you want! It's just HTML. It's your site, your vision. You can make it as normal or crazy as you want. You're the artist, you're in control. Make a site about you, or make it about cats that play Dungeons and Dragons, or make a Daft Punk Fan Site, or a Daft Punk Sucks Site.
|
td Anything you want! It's just HTML. It's your site, your vision. You can make it as normal or crazy as you want. You're the artist, you're in control. Make a site about you, or make it about cats that play Dungeons and Dragons, or make a Daft Punk Fan Site, or a Daft Punk Sucks Site.
|
||||||
tr
|
tr
|
||||||
td: b What information can I put on it?
|
td: b What information can I put on it?
|
||||||
td Anything you wan't, as long as it's not illegal to host it in the United States (note to government: stuff that is <i>actually illegal</i>, not just stuff that embarrasses you or reveals your unconstitutional (and hence illegal) spying programs). We don't care if it offends somebody, or you remain anonymous.
|
td Anything you want, as long as it's not illegal to host it in the United States (note to government: stuff that is <i>actually illegal</i>, not just stuff that embarrasses you or reveals your unconstitutional (and hence illegal) spying programs). We don't care if it offends somebody, or you remain anonymous.
|
||||||
tr
|
tr
|
||||||
td: b Do I own my content?
|
td: b Do I own my content?
|
||||||
td Yes, you do. It's yours. We're just giving you a place to host it.
|
td Yes, you do. It's yours. We're just giving you a place to host it.
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
td 10 Megabytes. You can have HTML, Images, Text, CSS, Markdown, and JavaScript. That's it.
|
td 10 Megabytes. You can have HTML, Images, Text, CSS, Markdown, and JavaScript. That's it.
|
||||||
tr
|
tr
|
||||||
td: b How are you paying for this?
|
td: b How are you paying for this?
|
||||||
td Hopefully with donations. If you feel this is a useful service, help us pay the bills to run it. <a href="/about">Click here to contribute!</a>
|
td With donations. It's not that expensive. If you feel this is a useful service, <a href="/about">click here to contribute!</a>
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.span5.offset1
|
.span5.offset1
|
||||||
|
@ -33,4 +33,4 @@
|
||||||
h5 Returning users: <a href="/signin">Sign In</a>
|
h5 Returning users: <a href="/signin">Sign In</a>
|
||||||
.row
|
.row
|
||||||
.span6.offset3
|
.span6.offset3
|
||||||
h4 style="line-height: 22pt" There are <b>#{Server.first.slots_available}</b> web site spaces remaining.<br>After that, we need your help to get another server.<br><a href="/about">HELP NEOCITIES PROSPER</a>
|
h4 style="line-height: 22pt" There are <b>#{Server.first.slots_available}</b> web site spaces remaining.<br>After that, we need your help to get another server.<br><a href="/about">HELP NEOCITIES PROSPER</a>
|
||||||
|
|
Loading…
Add table
Reference in a new issue