function serviceAcceptFileInfo() { global $sModule; $iAuthorId = $this->_getAuthorId(); $sJSVideoId = (int) $_POST['file_id']; switch ($_POST['type']) { case 'embed': $iVideoID = (int) embedVideo($iAuthorId, $_POST['video'], $_POST['duration'], $this->oModule->_oConfig->aFilesConfig); $bUpdateCounter = getSettingValue($sModule, "autoApprove") == TRUE_VAL ? true : false; $this->addObjectToAlbum($this->oModule->oAlbums, $_POST['extra_param_album'], $iVideoID, $bUpdateCounter); break; case 'record': $iVideoID = (int) recordVideo($iAuthorId); $this->addObjectToAlbum($this->oModule->oAlbums, $_POST['extra_param_album'], $iVideoID, false); break; case 'upload': default: $iVideoID = $sJSVideoId; break; } if ($iVideoID && $iAuthorId) { $sTitle = $_POST['title']; $sTags = $_POST['tags']; $sDescription = $_POST['description']; $aCategories = array(); foreach ($_POST['Categories'] as $sKey => $sVal) { if ($sVal != '') { $aCategories[] = $sVal; } } $sCategories = implode(CATEGORIES_DIVIDER, $aCategories); if ($this->initFile($iVideoID, $sTitle, $sCategories, $sTags, $sDescription)) { $this->alertAdd($iVideoID); return '<script type="text/javascript">parent.' . $this->_sJsPostObject . '.onSuccessSendingFileInfo("' . $sJSVideoId . '");</script>'; } } return '<script type="text/javascript">parent.' . $this->_sJsPostObject . '.showErrorMsg("video_failed_message");</script>'; }
function serviceAcceptFileInfo() { $iAuthorId = $this->_getAuthorId(); $sJSVideoId = (int) $_POST['file_id']; switch ($_POST['type']) { case 'embed': $iVideoID = (int) embedVideo($iAuthorId, $_POST['video'], $_POST['duration']); $this->addObjectToAlbum($this->oModule->oAlbums, $_POST['extra_param_album'], $iVideoID); break; case 'record': $iVideoID = (int) recordVideo($iAuthorId); $this->addObjectToAlbum($this->oModule->oAlbums, $_POST['extra_param_album'], $iVideoID, false); break; case 'upload': default: $iVideoID = $sJSVideoId; break; } if ($iVideoID && $iAuthorId) { $sTitle = $_POST['title']; $sTags = $_POST['tags']; $sDescription = $_POST['description']; $aCategories = array(); foreach ($_POST['Categories'] as $sKey => $sVal) { if ($sVal != '') { $aCategories[] = $sVal; } } $sCategories = implode(CATEGORIES_DIVIDER, $aCategories); if ($this->initVideoFile($iVideoID, $sTitle, $sCategories, $sTags, $sDescription)) { //--- BxVideos -> Upload unit for Alerts Engine ---// require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php'; $oZ = new BxDolAlerts('bx_videos', 'add', $iVideoID, $iAuthorId, $this->_getExtraParams($_POST)); $oZ->alert(); //--- BxVideos -> Upload unit for Alerts Engine ---// return '<script type="text/javascript">parent.' . $this->_sJsPostObject . '.onSuccessSendingFileInfo("' . $sJSVideoId . '");</script>'; } } return '<script type="text/javascript">parent.' . $this->_sJsPostObject . '.showErrorMsg("video_failed_message");</script>'; }