summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php5
-rw-r--r--classes/Profile.php13
2 files changed, 5 insertions, 13 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index f742d4326..eb08dde52 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -50,9 +50,4 @@ class Notice extends DB_DataObject
function validateContent() {
return Validate::string($this->content, array('min_length' => 1, 'max_length' => 140));
}
-
- function validateUrl() {
- return is_null($this->url) || (strlen($this->url) == 0) ||
- Validate::uri($this->url, array('allowed_schemes' => array('http', 'https')));
- }
}
diff --git a/classes/Profile.php b/classes/Profile.php
index 650b44244..d91bcf3ed 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -83,22 +83,19 @@ class Profile extends DB_DataObject
}
function validateHomepage() {
- return (is_null($this->homepage) ||
- Validate::uri($this->homepage, array('allowed_schemes' => array('http', 'https'))));
+ return (strlen($this->homepage) == 0) ||
+ Validate::uri($this->homepage, array('allowed_schemes' => array('http', 'https'))));
}
function validateBio() {
- return is_null($this->bio) ||
- Validate::string($this->bio, array('min_length' => 1, 'max_length' => 140));
+ return Validate::string($this->bio, array('min_length' => 0, 'max_length' => 140));
}
function validateLocation() {
- return is_null($this->location) ||
- Validate::string($this->location, array('min_length' => 1, 'max_length' => 255));
+ return Validate::string($this->location, array('min_length' => 0, 'max_length' => 255));
}
function validateFullname() {
- return is_null($this->fullname) ||
- Validate::string($this->fullname, array('min_length' => 1, 'max_length' => 255));
+ return Validate::string($this->fullname, array('min_length' => 0, 'max_length' => 255));
}
}