Сохранение ID точки в источниках картинок
This commit is contained in:
parent
ec8ffbd82a
commit
4eae03462f
|
|
@ -16,7 +16,9 @@ class PhotoLinks extends Model
|
|||
static function addLink($photo, $url)
|
||||
{
|
||||
$parsedUrl = parse_url($url);
|
||||
App::DB()->query('INSERT INTO photoLinks VALUES ("'.$photo.'","'.$url.'","'.$parsedUrl['host'].'") ON DUPLICATE KEY UPDATE url=url;');
|
||||
$photoDetails = explode('_', $photo);
|
||||
$pointId = (int)$photoDetails[0];
|
||||
App::DB()->query('INSERT INTO photoLinks VALUES ("'.$photo.'", "'.$pointId.'","'.$url.'","'.$parsedUrl['host'].'") ON DUPLICATE KEY UPDATE url=url;');
|
||||
}
|
||||
|
||||
static function getCaption($photo)
|
||||
|
|
|
|||
Loading…
Reference in New Issue