remove validation code
darcs-hash:20080521110253-84dde-e8d6f62225bb56f5e08b28b35d23ccfbe56984fd.gz
This commit is contained in:
parent
82c05d389a
commit
46b3f1c3a7
@ -25,16 +25,4 @@ class Avatar extends DB_DataObject
|
|||||||
|
|
||||||
/* the code above is auto generated do not remove the tag below */
|
/* the code above is auto generated do not remove the tag below */
|
||||||
###END_AUTOCODE
|
###END_AUTOCODE
|
||||||
|
|
||||||
function validateMediatype() {
|
|
||||||
return Validate::string($this->mediatype, array('min_length' => 1, 'max_length' => 32));
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateFilename() {
|
|
||||||
return Validate::string($this->filename, array('min_length' => 1, 'max_length' => 255));
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateUrl() {
|
|
||||||
return Validate::uri($this->url, array('allowed_schemes' => array('http', 'https')));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -46,8 +46,4 @@ class Notice extends DB_DataObject
|
|||||||
function getProfile() {
|
function getProfile() {
|
||||||
return Profile::staticGet($this->profile_id);
|
return Profile::staticGet($this->profile_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateContent() {
|
|
||||||
return Validate::string($this->content, array('min_length' => 1, 'max_length' => 140));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -72,30 +72,4 @@ class Profile extends DB_DataObject
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateNickname() {
|
|
||||||
return Validate::string($this->nickname, array('min_length' => 1, 'max_length' => 64,
|
|
||||||
'format' => VALIDATE_ALPHA_LOWER . VALIDATE_NUM));
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateProfileurl() {
|
|
||||||
return Validate::uri($this->profileurl, array('allowed_schemes' => array('http', 'https')));
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateHomepage() {
|
|
||||||
return (strlen($this->homepage) == 0) ||
|
|
||||||
Validate::uri($this->homepage, array('allowed_schemes' => array('http', 'https')));
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateBio() {
|
|
||||||
return Validate::string($this->bio, array('min_length' => 0, 'max_length' => 140));
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateLocation() {
|
|
||||||
return Validate::string($this->location, array('min_length' => 0, 'max_length' => 255));
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateFullname() {
|
|
||||||
return Validate::string($this->fullname, array('min_length' => 0, 'max_length' => 255));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -40,9 +40,4 @@ class Remote_profile extends DB_DataObject
|
|||||||
|
|
||||||
/* the code above is auto generated do not remove the tag below */
|
/* the code above is auto generated do not remove the tag below */
|
||||||
###END_AUTOCODE
|
###END_AUTOCODE
|
||||||
|
|
||||||
function validateUrl() {
|
|
||||||
return is_null($this->url) ||
|
|
||||||
Validate::uri($this->url, array('allowed_schemes' => array('http', 'https')));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -60,13 +60,4 @@ class User extends DB_DataObject
|
|||||||
$sub->subscribed = $other->id;
|
$sub->subscribed = $other->id;
|
||||||
return $sub->find();
|
return $sub->find();
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateEmail() {
|
|
||||||
return Validate::email($this->email, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateNickname() {
|
|
||||||
return Validate::string($this->nickname, array('min_length' => 1, 'max_length' => 64,
|
|
||||||
'format' => VALIDATE_ALPHA_LOWER . VALIDATE_NUM));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
18
doc/TODO
18
doc/TODO
@ -38,19 +38,21 @@
|
|||||||
+ save profile URL on registration
|
+ save profile URL on registration
|
||||||
+ require valid nicknames
|
+ require valid nicknames
|
||||||
+ reject empty notices
|
+ reject empty notices
|
||||||
- store canonical username for comparison and fetch
|
- validate registration form results
|
||||||
- use only canonical usernames
|
- validate profilesettings form results
|
||||||
|
- validate newnotice form results
|
||||||
|
- remove validation code from classes
|
||||||
|
+ use only canonical usernames
|
||||||
- use only canonical email addresses
|
- use only canonical email addresses
|
||||||
- RSS 1.0 feeds of a user's notices
|
- RSS 1.0 feeds of a user's notices
|
||||||
- RSS 1.0 dump of a user's notices
|
- RSS 1.0 dump of a user's notices
|
||||||
- RSS 1.0 feed of all public notices
|
- RSS 1.0 feed of all public notices
|
||||||
- RDF dump of entire site
|
- RDF dump of entire site
|
||||||
- FOAF dump for user
|
- FOAF dump for user
|
||||||
+ license on showstream
|
- license on showstream
|
||||||
+ license on shownotice
|
- license on shownotice
|
||||||
- TOS checkbox on register
|
- TOS checkbox on register
|
||||||
- pretty URLs
|
- pretty URLs
|
||||||
- site logo
|
|
||||||
- instructions
|
- instructions
|
||||||
- deal with PHP quotes escaping
|
- deal with PHP quotes escaping
|
||||||
- fix layout of textarea
|
- fix layout of textarea
|
||||||
@ -61,6 +63,11 @@
|
|||||||
- add a next page link to public
|
- add a next page link to public
|
||||||
- add a next page link to all
|
- add a next page link to all
|
||||||
- release 0.2
|
- release 0.2
|
||||||
|
- license per notice
|
||||||
|
- allow mixed-case usernames
|
||||||
|
- allow non-latin usernames
|
||||||
|
- store canonical username for comparison and fetch
|
||||||
|
- site logo
|
||||||
- set Last-Modified
|
- set Last-Modified
|
||||||
- XML sitemap generation
|
- XML sitemap generation
|
||||||
- theme per site
|
- theme per site
|
||||||
@ -98,6 +105,7 @@
|
|||||||
- image notices
|
- image notices
|
||||||
- video notices
|
- video notices
|
||||||
- audio notices
|
- audio notices
|
||||||
|
- license per attachment
|
||||||
- release 0.4
|
- release 0.4
|
||||||
- forward notices to Jabber
|
- forward notices to Jabber
|
||||||
- forward notices to other IM
|
- forward notices to other IM
|
||||||
|
Loading…
Reference in New Issue
Block a user