We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 5137eb20 authored by Evan Prodromou's avatar Evan Prodromou

fix validation of url

parent 52600ce0
......@@ -43,14 +43,8 @@ class Notice extends DB_DataObject
/* the code above is auto generated do not remove the tag below */
// XXX: if profile_id changes, this goes invalid. To be fair, that's a very edge case
static $profile;
function getProfile() {
if (!$this->profile) {
$this->profile = Profile::staticGet($this->profile_id);
return $this->profile;
return Profile::staticGet($this->profile_id);
function validateContent() {
......@@ -58,7 +52,7 @@ class Notice extends DB_DataObject
function validateUrl() {
return is_null($this->url) ||
return is_null($this->url) || (strlen($this->url) == 0) ||
Validate::uri($this->url, array('allowed_schemes' => array('http', 'https')));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment