* fix a bug for create webapp with https.

This commit is contained in:
wyd621
2013-10-29 05:16:32 +00:00
parent bba370916d
commit 1fa079bec5
+2 -2
View File
@@ -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)