Merge branch 'saas-dev' into saas-landing-page
This commit is contained in:
commit
0796f58878
|
@ -102,7 +102,6 @@ class UserController extends Zend_Controller_Action
|
||||||
public function getHostsAction()
|
public function getHostsAction()
|
||||||
{
|
{
|
||||||
$search = $this->_getParam('term');
|
$search = $this->_getParam('term');
|
||||||
$res = Application_Model_User::getHosts($search);
|
|
||||||
$this->view->hosts = Application_Model_User::getHosts($search);
|
$this->view->hosts = Application_Model_User::getHosts($search);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -268,6 +268,7 @@ SQL;
|
||||||
$nextMedia = CcScheduleQuery::create()
|
$nextMedia = CcScheduleQuery::create()
|
||||||
->filterByDbStarts($currentMedia["starts"], Criteria::GREATER_THAN)
|
->filterByDbStarts($currentMedia["starts"], Criteria::GREATER_THAN)
|
||||||
->filterByDbId($currentMedia["id"], Criteria::NOT_EQUAL)
|
->filterByDbId($currentMedia["id"], Criteria::NOT_EQUAL)
|
||||||
|
->filterByDbPlayoutStatus(0, Criteria::GREATER_THAN)
|
||||||
->orderByDbStarts(Criteria::ASC)
|
->orderByDbStarts(Criteria::ASC)
|
||||||
->findOne();
|
->findOne();
|
||||||
if (isset($nextMedia)) {
|
if (isset($nextMedia)) {
|
||||||
|
|
|
@ -75,8 +75,13 @@ class Application_Model_StreamSetting
|
||||||
$host = $streamData[$prefix."host"];
|
$host = $streamData[$prefix."host"];
|
||||||
$port = $streamData[$prefix."port"];
|
$port = $streamData[$prefix."port"];
|
||||||
$mount = $streamData[$prefix."mount"];
|
$mount = $streamData[$prefix."mount"];
|
||||||
|
if ($streamData[$prefix."output"] == "shoutcast") {
|
||||||
|
$url = "http://$host:$port/";
|
||||||
|
} else { //Icecast
|
||||||
|
$url = "http://$host:$port/$mount";
|
||||||
|
}
|
||||||
$streams[$id] = Array(
|
$streams[$id] = Array(
|
||||||
"url" => "http://$host:$port/$mount",
|
"url" => $url,
|
||||||
"codec" => $streamData[$prefix."type"],
|
"codec" => $streamData[$prefix."type"],
|
||||||
"bitrate" => $streamData[$prefix."bitrate"],
|
"bitrate" => $streamData[$prefix."bitrate"],
|
||||||
"mobile" => $streamData[$prefix."mobile"]
|
"mobile" => $streamData[$prefix."mobile"]
|
||||||
|
|
|
@ -282,7 +282,6 @@ class Application_Model_User
|
||||||
$con = Propel::getConnection();
|
$con = Propel::getConnection();
|
||||||
|
|
||||||
$sql_gen = "SELECT login AS value, login AS label, id as index FROM cc_subjs ";
|
$sql_gen = "SELECT login AS value, login AS label, id as index FROM cc_subjs ";
|
||||||
$sql = $sql_gen;
|
|
||||||
|
|
||||||
$types = array();
|
$types = array();
|
||||||
$params = array();
|
$params = array();
|
||||||
|
@ -296,13 +295,8 @@ class Application_Model_User
|
||||||
|
|
||||||
$sql = $sql_gen ." WHERE (". $sql_type.") ";
|
$sql = $sql_gen ." WHERE (". $sql_type.") ";
|
||||||
|
|
||||||
if (!is_null($search)) {
|
$sql .= " AND login ILIKE :search";
|
||||||
//need to use addslashes for 'LIKE' values
|
$params[":search"] = "%$search%";
|
||||||
$search = addslashes($search);
|
|
||||||
$like = "login ILIKE '%{$search}%'";
|
|
||||||
|
|
||||||
$sql = $sql . " AND ".$like;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = $sql ." ORDER BY login";
|
$sql = $sql ." ORDER BY login";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue