From 46b3f1c3a746044ae868c06bf3027e0a3ea27433 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 21 May 2008 07:02:53 -0400 Subject: remove validation code darcs-hash:20080521110253-84dde-e8d6f62225bb56f5e08b28b35d23ccfbe56984fd.gz --- classes/Avatar.php | 12 ------------ classes/Notice.php | 4 ---- classes/Profile.php | 26 -------------------------- classes/Remote_profile.php | 5 ----- classes/User.php | 9 --------- 5 files changed, 56 deletions(-) (limited to 'classes') diff --git a/classes/Avatar.php b/classes/Avatar.php index 7af42c617..bf428edac 100644 --- a/classes/Avatar.php +++ b/classes/Avatar.php @@ -25,16 +25,4 @@ class Avatar extends DB_DataObject /* the code above is auto generated do not remove the tag below */ ###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'))); - } } diff --git a/classes/Notice.php b/classes/Notice.php index eb08dde52..de3477c76 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -46,8 +46,4 @@ class Notice extends DB_DataObject function getProfile() { return Profile::staticGet($this->profile_id); } - - function validateContent() { - return Validate::string($this->content, array('min_length' => 1, 'max_length' => 140)); - } } diff --git a/classes/Profile.php b/classes/Profile.php index 9cb486a48..5a678eb54 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -72,30 +72,4 @@ class Profile extends DB_DataObject 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)); - } } diff --git a/classes/Remote_profile.php b/classes/Remote_profile.php index 960372405..ea2f6d859 100644 --- a/classes/Remote_profile.php +++ b/classes/Remote_profile.php @@ -40,9 +40,4 @@ class Remote_profile extends DB_DataObject /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE - - function validateUrl() { - return is_null($this->url) || - Validate::uri($this->url, array('allowed_schemes' => array('http', 'https'))); - } } diff --git a/classes/User.php b/classes/User.php index 16cafa635..41441a21d 100644 --- a/classes/User.php +++ b/classes/User.php @@ -60,13 +60,4 @@ class User extends DB_DataObject $sub->subscribed = $other->id; 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)); - } } -- cgit v1.2.3-54-g00ecf