Closed timomeh closed 10 years ago
I've changed the beforeSave() hook of the Combination model. If no http:// is found in the loginurl it should be prepended. Looks like this:
beforeSave()
http://
loginurl
public function beforeSave($options = null) { parent::beforeSave(); if(isset($this->data['Combination']['loginurl']) && (strpos($this->data['Combination']['loginurl'], "http://") !== false)) { $this->data['Combination']['loginurl'] = 'http://' . $this->data['Combination']['loginurl']; } return true; }
If I create a combination with a loginurl without http:// it should be there, but it isn't. wat
I've changed the
beforeSave()
hook of the Combination model. If nohttp://
is found in theloginurl
it should be prepended. Looks like this:If I create a combination with a loginurl without
http://
it should be there, but it isn't. wat