本文整理汇总了PHP中myDbHelper类的典型用法代码示例。如果您正苦于以下问题:PHP myDbHelper类的具体用法?PHP myDbHelper怎么用?PHP myDbHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了myDbHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute()
{
$this->forceSystemAuthentication();
myDbHelper::$use_alternative_con = null;
$go = $this->getP("go");
$filter = new ConversionProfileFilter();
$this->list = array();
$fields_set = $filter->fillObjectFromRequest($_REQUEST, "filter_", null);
if ($go) {
$c = new Criteria();
// filter
$filter->attachToCriteria($c);
//if ($order_by != -1) kshowPeer::setOrder( $c , $order_by );
$this->list = ConversionProfilePeer::doSelect($c);
}
$the_conv = myConversionProfileUtils::getConversionProfile($filter->get("_eq_partner_id"), $filter->get("_eq_profile_type"));
$selected = false;
if ($the_conv) {
foreach ($this->list as &$conv) {
if ($conv->getId() == $the_conv->getId()) {
$selected = true;
$conv->selected = true;
}
}
}
// is none was selected - need to add the_conv to the list
if (!$selected && $the_conv) {
$the_conv->selected = true;
$this->list[] = $the_conv;
}
$this->filter = $filter;
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:32,代码来源:conversionProfileMgrAction.class.php
示例2: listAction
/**
* List media info objects by filter and pager
*
* @action list
* @param KalturaMediaInfoFilter $filter
* @param KalturaFilterPager $pager
* @return KalturaMediaInfoListResponse
*/
function listAction(KalturaMediaInfoFilter $filter = null, KalturaFilterPager $pager = null)
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
if (!$filter) {
$filter = new KalturaMediaInfoFilter();
}
if (!$pager) {
$pager = new KalturaFilterPager();
}
$mediaInfoFilter = new MediaInfoFilter();
$filter->toObject($mediaInfoFilter);
if ($filter->flavorAssetIdEqual) {
// Since media_info table does not have partner_id column, enforce partner by getting the asset
if (!assetPeer::retrieveById($filter->flavorAssetIdEqual)) {
throw new KalturaAPIException(KalturaErrors::FLAVOR_ASSET_ID_NOT_FOUND, $filter->flavorAssetIdEqual);
}
}
$c = new Criteria();
$mediaInfoFilter->attachToCriteria($c);
$totalCount = mediaInfoPeer::doCount($c);
$pager->attachToCriteria($c);
$dbList = mediaInfoPeer::doSelect($c);
$list = KalturaMediaInfoArray::fromDbArray($dbList, $this->getResponseProfile());
$response = new KalturaMediaInfoListResponse();
$response->objects = $list;
$response->totalCount = $totalCount;
return $response;
}
开发者ID:DBezemer,项目名称:server,代码行数:36,代码来源:MediaInfoService.php
示例3: execute
public function execute()
{
$this->forceSystemAuthentication();
myDbHelper::$use_alternative_con = null;
//myDbHelper::DB_HELPER_CONN_PROPEL2
$uiConfId = $this->getRequestParameter("id");
$uiConf = uiConfPeer::retrieveByPK($uiConfId);
$subTypes = array(uiconf::FILE_SYNC_UICONF_SUB_TYPE_DATA, uiconf::FILE_SYNC_UICONF_SUB_TYPE_FEATURES);
foreach ($subTypes as $subType) {
if ($subType == uiconf::FILE_SYNC_UICONF_SUB_TYPE_DATA) {
echo "Data:" . PHP_EOL;
} else {
if ($subType == uiconf::FILE_SYNC_UICONF_SUB_TYPE_FEATURES) {
echo "Features:" . PHP_EOL;
}
}
$syncKey = $uiConf->getSyncKey($subType);
if (kFileSyncUtils::file_exists($syncKey)) {
echo "File sync already exists." . PHP_EOL;
} else {
list($rootPath, $filePath) = $uiConf->generateFilePathArr($subType);
$fullPath = $rootPath . $filePath;
if (file_exists($fullPath)) {
kFileSyncUtils::createSyncFileForKey($syncKey);
echo "Created successfully." . PHP_EOL;
} else {
echo "File not found:" . PHP_EOL;
echo $fullPath . PHP_EOL;
echo "Not creating file sync." . PHP_EOL;
}
}
echo PHP_EOL;
}
die;
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:fixUiConfFileSyncAction.class.php
示例4: fetchPage
public function fetchPage($action, $filter, $my_pager, $base_criteria = null)
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
$keywords = @$_REQUEST["keywords"];
// $sort_alias is what is sent from the browser
$sort_alias = $this->sort_alias != null ? $this->sort_alias : @$_REQUEST["sort"];
// $keywords_array = mySearchUtils::getKeywordsFromStr ( $keywords );
if ($base_criteria != null) {
$c = $base_criteria;
} else {
$c = KalturaCriteria::create(entryPeer::OM_CLASS);
}
$filter->addSearchMatchToCriteria($c, $keywords, $this->getSearchableColumnName());
// each entity can do specific modifications to the criteria
$this->modifyCriteria($c);
if ($this->skip_count) {
$my_pager->attachCriteria($c, $this->getPeerMethod(), $this->getPeerCountMethod());
//$res = $my_pager->fetchPage(null , true , 0);
$res = $my_pager->fetchPage(null);
// , true , 0);
} else {
$my_pager->attachCriteria($c, $this->getPeerMethod(), $this->getPeerCountMethod());
$res = $my_pager->fetchPage();
}
return $res;
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:26,代码来源:AJAX_getObjectsAction.class.php
示例5: execute
public function execute()
{
$this->forceSystemAuthentication();
myDbHelper::$use_alternative_con = null;
$partnerId = $this->getRequestParameter("partnerId", null);
$uiConfId = $this->getRequestParameter("uiConfId", null);
$page = $this->getRequestParameter("page", 1);
if ($partnerId !== null && $partnerId !== "") {
$pageSize = 50;
$c = new Criteria();
$c->add(widgetPeer::PARTNER_ID, $partnerId);
if ($uiConfId) {
$c->add(widgetPeer::UI_CONF_ID, $uiConfId);
}
$c->addDescendingOrderByColumn(widgetPeer::CREATED_AT);
$total = widgetPeer::doCount($c);
$lastPage = ceil($total / $pageSize);
$c->setOffset(($page - 1) * $pageSize);
$c->setLimit($pageSize);
$widgets = widgetPeer::doSelect($c);
} else {
$total = 0;
$lastPage = 0;
$widgets = array();
}
$this->uiConfId = $uiConfId;
$this->page = $page;
$this->lastPage = $lastPage;
$this->widgets = $widgets;
$this->partner = PartnerPeer::retrieveByPK($partnerId);
$this->partnerId = $partnerId;
}
开发者ID:DBezemer,项目名称:server,代码行数:32,代码来源:viewUiconfWidgetsAction.class.php
示例6: execute
/**
* Will anipulate a single entry
*/
public function execute()
{
$this->forceSystemAuthentication();
myDbHelper::$use_alternative_con = null;
$command = $this->getP("command");
if ($command == "updateEntry") {
$id = $this->getP("id");
$entry = entryPeer::retrieveByPK($id);
if ($entry) {
$name = $this->getP("name");
$value = $this->getP("value");
$obj_wrapper = objectWrapperBase::getWrapperClass($entry, 0);
$updateable_fields = $obj_wrapper->getUpdateableFields("2");
if (!in_array($name, $updateable_fields)) {
die;
}
if ($name) {
$setter = "set" . $name;
call_user_func(array($entry, $setter), $value);
$entry->save();
}
}
}
die;
}
开发者ID:DBezemer,项目名称:server,代码行数:28,代码来源:executeCommandAction.class.php
示例7: execute
/**
* Will investigate a single entry
*/
public function execute()
{
$this->forceSystemAuthentication();
myDbHelper::$use_alternative_con = null;
//myDbHelper::DB_HELPER_CONN_PROPEL2;
$status_list = $this->getP("status");
$mode = $this->getP("mode");
if ($mode == "old") {
$preconvert = glob(myContentStorage::getFSContentRootPath() . "/content/preconvert/data/*");
$preconvert_indicators = glob(myContentStorage::getFSContentRootPath() . "/content/preconvert/files/*");
// indicators or inproc
} else {
$preconvert = glob(myContentStorage::getFSContentRootPath() . "/content/new_preconvert/*");
$preconvert_indicators = glob(myContentStorage::getFSContentRootPath() . "/new_content/preconvert/*.in*");
// indicators or inproc
}
$indicators = array();
foreach ($preconvert_indicators as $file) {
$file = pathinfo($file, PATHINFO_BASENAME);
$name = substr($file, 0, strpos($file, "."));
$indicators[$name] = $name;
}
$entry_ids = array();
foreach ($preconvert as $file) {
$file = pathinfo($file, PATHINFO_BASENAME);
$name = substr($file, 0, strpos($file, "."));
if (!isset($indicators[$name])) {
$entry_ids[] = $name;
// only those that don't have indicators
}
}
$ids_str = "'" . implode("','", $entry_ids) . "'";
echo "<html><body style='font-family:arial; font-size:12px;'>";
echo "preconvert files: [" . count($preconvert) . "]<br>";
echo "preconvert indicators : [" . count($preconvert_indicators) . "] [" . count($indicators) . "]<br>";
echo "entry_ids: [" . count($entry_ids) . "]<br>";
if (count($entry_ids)) {
if (!$status_list) {
$status_list = "1";
}
$connection = Propel::getConnection();
$query = "SELECT id,partner_id,status,created_at FROM entry WHERE status IN ({$status_list}) AND id IN ({$ids_str}) ORDER BY created_at ASC ";
echo "query: {$query}<br>";
$statement = $connection->prepareStatement($query);
$resultset = $statement->executeQuery();
echo "<table cellpadding=2 cellspacing=0 border=1 style='font-family:arial; font-size:12px;'>";
echo "<tr><td>partner_id</td><td>id</td><td>status</td><td>created_at</td></tr>";
$real_count = 0;
while ($resultset->next()) {
echo "<tr>" . "<td>" . $resultset->getInt('partner_id') . "</td>" . "<td>" . $resultset->getString('id') . "</td>" . "<td>" . $resultset->getInt('status') . "</td>" . "<td>" . $resultset->get('created_at') . "</td>" . "</tr>";
$real_count++;
}
echo "</table>";
echo "count [{$real_count}]";
$resultset->close();
}
echo "</body></html>";
die;
}
开发者ID:DBezemer,项目名称:server,代码行数:62,代码来源:preconvertAction.class.php
示例8: execute
/**
* Will investigate a single entry
*/
public function execute()
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
$this->forceSystemAuthentication();
entryPeer::setUseCriteriaFilter(false);
$this->result = NULL;
$kshow_ids = @$_REQUEST["kshow_ids"];
$this->kshow_ids = $kshow_ids;
$this->kshow = NULL;
$entry_ids = @$_REQUEST["entry_ids"];
$this->entry_ids = $entry_ids;
$this->entry = NULL;
$this->show_entry = null;
$show_entry_list = array();
if (!empty($kshow_ids)) {
$ids_arr = explode(",", $kshow_ids);
$kshows = kshowPeer::retrieveByPKs($ids_arr);
if (!$kshows) {
$this->result = "No kshows [{$kshow_ids}] in DB";
return;
}
foreach ($kshows as $kshow) {
$show_entry = $kshow->getShowEntry();
$show_entry_list[] = $show_entry;
}
} else {
if (empty($entry_ids)) {
$this->result = "Submit an entry_id of a kshow_id to fix";
return;
}
$ids_arr = explode(",", $entry_ids);
$entries = entryPeer::retrieveByPKs($ids_arr);
if (!$entries) {
$this->result = "No entries [{$entry_ids}] in DB";
return;
}
foreach ($entries as $entry) {
if ($entry->getType() != entryType::MIX) {
continue;
}
$show_entry_list[] = $entry;
}
}
$fixed_data_list = array();
foreach ($show_entry_list as $show_entry) {
$fix_data = new fixData();
$fix_data->show_entry = $show_entry;
if ($show_entry->getType() != entryType::MIX) {
$fix_data->error = "Entry is not a roughcut";
} else {
$fix_data->old_content = $show_entry->getMetadata();
$fix_data->old_duration = $show_entry->getLengthInMsecs();
$fix_data->fixed_content = $show_entry->fixMetadata(false);
$fix_data->fixed_duration = $show_entry->getLengthInMsecs();
}
$fixed_data_list[] = $fix_data;
}
$this->fixed_data_list = $fixed_data_list;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:62,代码来源:fixMetadataAction.class.php
示例9: writeSolrLog
public function writeSolrLog($entry)
{
KalturaLog::debug("writeSolrLog " . $entry->getId());
$solrLog = new SphinxLog();
$solrLog->setEntryId($entry->getId());
$solrLog->setPartnerId($entry->getPartnerId());
$solrLog->save(myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_SOLR_LOG));
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:8,代码来源:kSolrSearchManager.php
示例10: alternativeCon
public static function alternativeCon($con, $queryDB = kQueryCache::QUERY_DB_UNDEFINED)
{
if ($con === null) {
$con = myDbHelper::alternativeCon($con);
}
if ($con === null) {
$con = myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_PROPEL3);
}
return $con;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:10,代码来源:DynamicEnumPeer.php
示例11: alternativeCon
public static function alternativeCon($con)
{
if ($con === null) {
$con = myDbHelper::alternativeCon($con);
}
if ($con === null) {
$con = myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_PROPEL3);
}
return $con;
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:10,代码来源:PriorityGroupPeer.php
示例12: __construct
public function __construct($feedId)
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
$microTimeStart = microtime(true);
KalturaLog::info("syndicationFeedRenderer- initialize ");
// initialize the database for all services
DbManager::setConfig(kConf::getDB());
DbManager::initialize();
$this->syndicationFeedDB = $syndicationFeedDB = syndicationFeedPeer::retrieveByPK($feedId);
if (!$syndicationFeedDB) {
throw new Exception("Feed Id not found");
}
kEntitlementUtils::initEntitlementEnforcement($syndicationFeedDB->getPartnerId(), $syndicationFeedDB->getEnforceEntitlement());
if (!is_null($syndicationFeedDB->getPrivacyContext()) && $syndicationFeedDB->getPrivacyContext() != '') {
kEntitlementUtils::setPrivacyContextSearch($syndicationFeedDB->getPrivacyContext());
}
$tmpSyndicationFeed = KalturaSyndicationFeedFactory::getInstanceByType($syndicationFeedDB->getType());
$tmpSyndicationFeed->fromObject($syndicationFeedDB);
$this->syndicationFeed = $tmpSyndicationFeed;
// add partner to default criteria
categoryPeer::addPartnerToCriteria($this->syndicationFeed->partnerId, true);
assetPeer::addPartnerToCriteria($this->syndicationFeed->partnerId, true);
entryPeer::setDefaultCriteriaFilter();
$this->baseCriteria = entryPeer::getDefaultCriteriaFilter();
$startDateCriterion = $this->baseCriteria->getNewCriterion(entryPeer::START_DATE, time(), Criteria::LESS_EQUAL);
$startDateCriterion->addOr($this->baseCriteria->getNewCriterion(entryPeer::START_DATE, null));
$this->baseCriteria->addAnd($startDateCriterion);
$endDateCriterion = $this->baseCriteria->getNewCriterion(entryPeer::END_DATE, time(), Criteria::GREATER_EQUAL);
$endDateCriterion->addOr($this->baseCriteria->getNewCriterion(entryPeer::END_DATE, null));
$this->baseCriteria->addAnd($endDateCriterion);
$entryFilter = new entryFilter();
$entryFilter->setPartnerSearchScope($this->syndicationFeed->partnerId);
$entryFilter->setStatusEquel(entryStatus::READY);
$entryFilter->setTypeIn(array(entryType::MEDIA_CLIP, entryType::MIX));
$entryFilter->setModerationStatusNotIn(array(entry::ENTRY_MODERATION_STATUS_REJECTED, entry::ENTRY_MODERATION_STATUS_PENDING_MODERATION));
$entryFilter->attachToCriteria($this->baseCriteria);
if ($this->syndicationFeed->playlistId) {
$this->entryFilters = myPlaylistUtils::getPlaylistFiltersById($this->syndicationFeed->playlistId);
foreach ($this->entryFilters as $entryFilter) {
$entryFilter->setPartnerSearchScope(baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
// partner scope already attached
}
$playlist = entryPeer::retrieveByPK($this->syndicationFeed->playlistId);
if ($playlist) {
if ($playlist->getMediaType() != entry::ENTRY_MEDIA_TYPE_XML) {
$this->staticPlaylist = true;
$this->staticPlaylistEntriesIdsOrder = explode(',', $playlist->getDataContent());
}
}
} else {
$this->entryFilters = array();
}
$microTimeEnd = microtime(true);
KalturaLog::info("syndicationFeedRenderer- initialization done [" . ($microTimeEnd - $microTimeStart) . "]");
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:55,代码来源:KalturaSyndicationFeedRenderer.php
示例13: execute
public function execute()
{
$this->forceSystemAuthentication();
myDbHelper::$use_alternative_con = null;
$this->ok_to_save = $this->getP("oktosave");
$conv_profile_id = $this->getP("convprofile_id");
if ($conv_profile_id < 0) {
$conv_profile_id = "";
}
$this->message = "";
$this->display_disabled = $this->getP("display_disabled");
$command = $this->getP("command");
if ($command == "removeCache") {
} elseif ($command == "save") {
$conv_profile = new ConversionProfile();
$wrapper = objectWrapperBase::getWrapperClass($conv_profile, 0);
$extra_fields = array("partnerId", "enabled");
// add fields that cannot be updated using the API
$allowed_params = array_merge($wrapper->getUpdateableFields(), $extra_fields);
$fields_modified = baseObjectUtils::fillObjectFromMap($_REQUEST, $conv_profile, "convprofile_", $allowed_params, BasePeer::TYPE_PHPNAME, true);
if ($conv_profile_id) {
$conv_profile_from_db = ConversionProfilePeer::retrieveByPK($conv_profile_id);
if ($conv_profile_from_db) {
baseObjectUtils::fillObjectFromObject($allowed_params, $conv_profile, $conv_profile_from_db, baseObjectUtils::CLONE_POLICY_PREFER_NEW, null, BasePeer::TYPE_PHPNAME, true);
}
$conv_profile_from_db->save();
} else {
$conv_profile->save();
$conv_profile_id = $conv_profile->getId();
}
}
$this->conv_profile = ConversionProfilePeer::retrieveByPK($conv_profile_id);
$this->conv_profile_id = $conv_profile_id;
if ($this->conv_profile) {
$this->conv_profile_type = $this->conv_profile->getProfileType();
$this->fallback_mode = array();
$this->conv_params_list = ConversionParamsPeer::retrieveByConversionProfile($this->conv_profile, $this->fallback_mode, false);
// to see if there are any disabled params - call again with true
$tmp_fallback = array();
$tmp_conv_params_list = ConversionParamsPeer::retrieveByConversionProfile($this->conv_profile, $tmp_fallback, true);
if ($tmp_fallback["mode"] == $this->fallback_mode["mode"]) {
$this->fallback_mode = $tmp_fallback;
$this->conv_params_list = $tmp_conv_params_list;
} else {
if ($this->display_disabled) {
$this->fallback_mode = $tmp_fallback;
$this->conv_params_list = $tmp_conv_params_list;
$this->message = "This display is missleading due to [dispaly disabled=true]<br>It shows params that are disabled for this profile and WOULD NOT be used at run-time";
}
}
} else {
$this->conv_profile_type = null;
$this->conv_params_list = null;
}
}
开发者ID:DBezemer,项目名称:server,代码行数:55,代码来源:conversionProfileAction.class.php
示例14: forceSystemAuthentication
protected function forceSystemAuthentication()
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
$kal_sys_auth = @$_COOKIE[self::COOKIE_NAME];
if ($kal_sys_auth == $this->authKey()) {
return true;
}
$this->setFlash('sign_in_referer', $_SERVER["REQUEST_URI"]);
//echo "forceSystemAuthentication - false";
return $this->forward('system', 'login');
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:11,代码来源:kalturaSystemAction.class.php
示例15: execute
public function execute()
{
$this->forceSystemAuthentication();
myDbHelper::$use_alternative_con = null;
//myDbHelper::DB_HELPER_CONN_PROPEL3;
$entry_id = $this->getP("entry_id");
echo "Creating new conversion profile for entry [{$entry_id}]<br>";
$new_conversion_profile = myPartnerUtils::getConversionProfile2ForEntry($entry_id);
echo "result:\n" . print_r($new_conversion_profile, true . "<br>");
die;
}
开发者ID:DBezemer,项目名称:server,代码行数:11,代码来源:testConvProfMigrationAction.class.php
示例16: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser, $create_cachekey = false)
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
// TODO - verify permissions for viewing lists
$detailed = $this->getP("detailed", false);
$limit = $this->getP("page_size", 10);
$limit = $this->maxPageSize($limit);
$page = $this->getP("page", 1);
$user_filter_prefix = $this->getP("fp", "filter");
$offset = ($page - 1) * $limit;
// TODO - should limit search to partner ??
// kuserPeer::setUseCriteriaFilter( false );
// entryPeer::setUseCriteriaFilter( false );
$playlist_id = $this->getPM("playlist_id");
$input_params = $this->getInputParams();
$extra_filters = array();
for ($i = 1; $i < self::MAX_FILTER_COUNT; $i++) {
// filter
$extra_filter = new entryFilter();
$fields_set = $extra_filter->fillObjectFromRequest($input_params, "{$user_filter_prefix}{$i}_", null);
if ($fields_set) {
$extra_filters[$i] = $extra_filter;
}
}
// this service is executed twice! (first time for the cache key, second time for the execution)
if (is_null($this->playlist)) {
$playlist = entryPeer::retrieveByPK($playlist_id);
if (!$playlist) {
throw new APIException(APIErrors::INVALID_ENTRY_ID, "Playlist", $playlist_id);
}
myPartnerUtils::addPartnerToCriteria(new accessControlPeer(), $playlist->getPartnerId(), $this->getPrivatePartnerData(), $this->partnerGroup2(), null);
$this->playlist = $playlist;
}
if ($create_cachekey) {
if ($this->isAdmin()) {
return null;
}
$cache_key_arr = array("playlist_id" => $playlist_id, "filters" => $extra_filters);
$cahce_key = new executionCacheKey();
$cahce_key->expiry = 600;
$cahce_key->key = md5(print_r($cache_key_arr, true));
return $cahce_key;
}
if ($this->isAdmin()) {
myPlaylistUtils::setIsAdminKs(true);
}
$entry_list = myPlaylistUtils::executePlaylistById($partner_id, $playlist_id, $extra_filters, $detailed);
myEntryUtils::updatePuserIdsForEntries($entry_list);
$level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
$wrapper = objectWrapperBase::getWrapperClass($entry_list, $level);
$this->addMsg("count", count($entry_list));
$this->addMsg($this->getObjectPrefix(), $wrapper);
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:53,代码来源:executeplaylistAction.class.php
示例17: getConfigs
public function getConfigs()
{
$c = new Criteria();
$c->clearSelectColumns();
$c->addSelectColumn('MAX(' . SchedulerConfigPeer::ID . ')');
$c->addGroupByColumn(SchedulerConfigPeer::VARIABLE);
$c->addGroupByColumn(SchedulerConfigPeer::VARIABLE_PART);
$c->addAscendingOrderByColumn(SchedulerConfigPeer::VARIABLE);
$c->add(SchedulerConfigPeer::SCHEDULER_ID, $this->id);
$c->add(SchedulerConfigPeer::WORKER_ID, null);
$rs = SchedulerConfigPeer::doSelectStmt($c, myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_PROPEL2));
$configIds = $rs->fetchAll(PDO::FETCH_COLUMN, 0);
return SchedulerConfigPeer::retrieveByPKs($configIds, myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_PROPEL2));
}
开发者ID:DBezemer,项目名称:server,代码行数:14,代码来源:Scheduler.php
示例18: doGetListResponse
protected function doGetListResponse(KalturaFilterPager $pager, array $types = null)
{
$this->validateEntryIdFiltered();
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
// verify access to the relevant entries - either same partner as the KS or kaltura network
if ($this->entryIdEqual) {
$entryIds = array($this->entryIdEqual);
} else {
if ($this->entryIdIn) {
$entryIds = explode(',', $this->entryIdIn);
} else {
throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL, 'KalturaAssetFilter::entryIdEqual/KalturaAssetFilter::entryIdIn');
}
}
$entryIds = array_slice($entryIds, 0, baseObjectFilter::getMaxInValues());
$c = KalturaCriteria::create(entryPeer::OM_CLASS);
$c->addAnd(entryPeer::ID, $entryIds, Criteria::IN);
$criterionPartnerOrKn = $c->getNewCriterion(entryPeer::PARTNER_ID, kCurrentContext::getCurrentPartnerId());
$criterionPartnerOrKn->addOr($c->getNewCriterion(entryPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_KALTURA_NETWORK));
$c->addAnd($criterionPartnerOrKn);
$dbEntries = entryPeer::doSelect($c);
if (!$dbEntries) {
return array(array(), 0);
}
$entryIds = array();
foreach ($dbEntries as $dbEntry) {
$entryIds[] = $dbEntry->getId();
}
$this->entryIdEqual = null;
$this->entryIdIn = implode(',', $entryIds);
// get the flavors
$flavorAssetFilter = new AssetFilter();
$this->toObject($flavorAssetFilter);
$c = new Criteria();
$flavorAssetFilter->attachToCriteria($c);
if ($types) {
$c->add(assetPeer::TYPE, $types, Criteria::IN);
}
$pager->attachToCriteria($c);
$list = assetPeer::doSelect($c);
$resultCount = count($list);
if ($resultCount && $resultCount < $pager->pageSize) {
$totalCount = ($pager->pageIndex - 1) * $pager->pageSize + $resultCount;
} else {
KalturaFilterPager::detachFromCriteria($c);
$totalCount = assetPeer::doCount($c);
}
myDbHelper::$use_alternative_con = null;
return array($list, $totalCount);
}
开发者ID:visomar,项目名称:server,代码行数:50,代码来源:KalturaAssetFilter.php
示例19: execute
public function execute()
{
$this->forceSystemAuthentication();
myDbHelper::$use_alternative_con = null;
$partnerId = $this->getRequestParameter("partnerId", null);
if ($partnerId !== null) {
$partnerId = (int) $partnerId;
}
$c = new Criteria();
$c->add(uiConfPeer::PARTNER_ID, $partnerId);
$c->addDescendingOrderByColumn(uiConfPeer::CREATED_AT);
$this->uiconfs = uiConfPeer::doSelect($c);
$partner = PartnerPeer::retrieveByPK($partnerId);
$this->partner = $partner;
$this->partnerId = $partnerId;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:16,代码来源:viewUiconfAction.class.php
示例20: doQueueStatus
public static function doQueueStatus(PDO $con = null)
{
if (is_null($con)) {
$con = myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_PROPEL2);
}
// $con = Propel::getConnection(BatchJobPeer::DATABASE_NAME);
$stmt = null;
try {
$now = time();
$sql = "SELECT\t\tAVG(TIMEDIFF(NOW(), CREATED_AT)) AS CREATED_AT_AVG,\n\t\t\t\t\t\t\t\tCOUNT(JOB_TYPE) AS JOB_TYPE_COUNT, \n\t\t\t\t\t\t\t\tJOB_TYPE \n\t\t\t\t\tFROM\t\tbatch_job \n\t\t\t\t\tFORCE INDEX (created_at_job_type_status_index)\n\t\t\t\t\tWHERE\t\tSTATUS IN (" . BatchJob::BATCHJOB_STATUS_PENDING . ',' . BatchJob::BATCHJOB_STATUS_RETRY . ")\n\t\t\t\t\tAND\t\t\t(\n\t\t\t\t\t\t\t\t\tCHECK_AGAIN_TIMEOUT < {$now}\n\t\t\t\t\t\t\t\t\tOR\n\t\t\t\t\t\t\t\t\tCHECK_AGAIN_TIMEOUT IS NULL\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\tAND\t\t\tJOB_TYPE IS NOT NULL\n\t\t\t\t\tAND\t\t\tCREATED_AT > DATE_ADD(NOW(), INTERVAL -1 HOUR)\n\t\t\t\t\tGROUP BY\tJOB_TYPE";
$stmt = $con->query($sql);
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException($e);
}
return $stmt->fetchAll();
}
开发者ID:DBezemer,项目名称:server,代码行数:17,代码来源:BatchJobPeer.php
注:本文中的myDbHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论