* fix a bug for create webapp with https.
This commit is contained in:
@@ -260,7 +260,7 @@ class webappModel extends model
|
||||
if(isset($data->url))
|
||||
{
|
||||
$data->url = trim($data->url);
|
||||
if(strpos($data->url, 'http://') !== 0) $data->url = 'http://' . $data->url;
|
||||
if(!preg_match('/^https?:\/\//', $data->url)) $data->url = 'http://' . $data->url;
|
||||
}
|
||||
|
||||
if($data->size == 'custom') $data->size = (float)$this->post->customWidth . 'x' . (float)$this->post->customHeight;
|
||||
@@ -301,7 +301,7 @@ class webappModel extends model
|
||||
->remove('files,customWidth,customHeight')->get();
|
||||
|
||||
$data->url = trim($data->url);
|
||||
if(strpos($data->url, 'http://') !== 0) $data->url = 'http://' . $data->url;
|
||||
if(!preg_match('/^https?:\/\//', $data->url)) $data->url = 'http://' . $data->url;
|
||||
if($data->size == 'custom') $data->size = (float)$this->post->customWidth . 'x' . (float)$this->post->customHeight;
|
||||
|
||||
$this->dao->insert(TABLE_WEBAPP)->data($data)
|
||||
|
||||
Reference in New Issue
Block a user