diff --git a/plugin/Live/Live.php b/plugin/Live/Live.php index ac5beb6f90..d4250a5241 100644 --- a/plugin/Live/Live.php +++ b/plugin/Live/Live.php @@ -1906,17 +1906,17 @@ Click here to join our live."; if (!empty($row['finished'])) { LiveTransmitionHistory::unfinishFromTransmitionHistoryId($row['id']); }else{ - /* - $lth = new LiveTransmitionHistory(); - $lth->setTitle($obj->row['title']); - $lth->setDescription($obj->row['description']); - $lth->setKey($_POST['name']); - $lth->setDomain(@$_REQUEST['domain']); - $lth->setUsers_id($user->getBdId()); - $lth->setLive_servers_id($live_servers_id); - _error_log("NGINX ON Publish saving LiveTransmitionHistory"); - $obj->liveTransmitionHistory_id = $lth->save(); - */ + $row = LiveTransmition::keyExists($_POST['name']); + if(!empty($row)){ + $lth = new LiveTransmitionHistory(); + $lth->setTitle($row['title']); + $lth->setDescription($row['description']); + $lth->setKey($live['key']); + $lth->setUsers_id($row['users_id']); + $lth->setLive_servers_id($live['live_servers_id']); + $id = $lth->save(); + _error_log("unfinishAllFromStats saving LiveTransmitionHistory [{$id}]"); + } } } }