本文整理汇总了PHP中CModule类的典型用法代码示例。如果您正苦于以下问题:PHP CModule类的具体用法?PHP CModule怎么用?PHP CModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CModule类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: setComponent
/**
* Sets a component, while taking care to restore it in the tear down.
*
* @param \CModule $obj
* @param string $name
* @param mixed $val
*
* @return null
*/
protected function setComponent(\CModule $obj, $name, $val)
{
// Save the original value for tearDown()
$this->_originalComponentValues[] = array($obj, $name, $obj->getComponent($name));
// Set the new one
$obj->setComponent($name, $val);
}
开发者ID:kentonquatman,项目名称:portfolio,代码行数:16,代码来源:BaseTest.php
示例2: ClearCheckCache
public static function ClearCheckCache()
{
// init module cache
$CModule = new CModule();
$CModule->IsInstalled();
CAgent::RemoveAgent("CPullOptions::ClearAgent();", "pull");
CAgent::AddAgent("CPullOptions::ClearAgent();", "pull", "N", 30, "", "Y", ConvertTimeStamp(time()+CTimeZone::GetOffset()+30, "FULL"));
}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:9,代码来源:pull_options.php
示例3: Execute
public function Execute()
{
if (!CModule::IncludeModule("intranet")) {
return CBPActivityExecutionStatus::Closed;
}
$absenceIblockId = COption::GetOptionInt("intranet", 'iblock_absence', 0);
if ($absenceIblockId <= 0) {
return CBPActivityExecutionStatus::Closed;
}
$rootActivity = $this->GetRootActivity();
$documentId = $rootActivity->GetDocumentId();
$documentService = $this->workflow->GetService("DocumentService");
$arAbsenceUserTmp = $this->AbsenceUser;
$arAbsenceUser = CBPHelper::ExtractUsers($arAbsenceUserTmp, $documentId, false);
$arAbsenceTypes = array();
$dbTypeRes = CIBlockPropertyEnum::GetList(array("SORT" => "ASC", "VALUE" => "ASC"), array('IBLOCK_ID' => $absenceIblockId, 'PROPERTY_ID' => 'ABSENCE_TYPE'));
while ($arTypeValue = $dbTypeRes->GetNext()) {
$arAbsenceTypes[$arTypeValue['XML_ID']] = $arTypeValue['ID'];
}
foreach ($arAbsenceUser as $absenceUser) {
$arFields = array("ACTIVE" => "Y", "IBLOCK_ID" => $absenceIblockId, 'ACTIVE_FROM' => $this->AbsenceFrom, 'ACTIVE_TO' => $this->AbsenceTo, "NAME" => $this->AbsenceName, "PREVIEW_TEXT" => $this->AbsenceDesrc, "PREVIEW_TEXT_TYPE" => "text", "PROPERTY_VALUES" => array("USER" => $absenceUser, "STATE" => $this->AbsenceState, "FINISH_STATE" => $this->AbsenceFinishState, "ABSENCE_TYPE" => $arAbsenceTypes[$this->AbsenceType]));
$el = new CIBlockElement();
$el->Add($arFields);
}
return CBPActivityExecutionStatus::Closed;
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:26,代码来源:absenceactivity.php
示例4: toEdit
/**
* @return array
*/
protected function toEdit()
{
/** @global CUser $USER */
global $USER;
if (!$USER->IsAuthorized()) {
return array('status' => 'error', 'error' => 'auth_error');
}
if (!check_bitrix_sessid()) {
return array('status' => 'error', 'error' => 'sessid_check_failed');
}
if ($this->request['action'] !== 'otp_check_activate') {
return array('status' => 'error', 'error' => 'unknown_action');
}
if (!CModule::includeModule('security')) {
return array('status' => 'error', 'error' => 'security_not_installed');
}
try {
$otp = Otp::getByUser($USER->getid());
$binarySecret = pack('H*', $this->request->getPost('secret'));
$otp->regenerate($binarySecret)->syncParameters($this->request->getPost('sync1'), $this->request->getPost('sync2'))->save();
return array('status' => 'ok');
} catch (\Bitrix\Security\Mfa\OtpException $e) {
return array('status' => 'error', 'error' => $e->getMessage());
}
}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:28,代码来源:class.php
示例5: CSeoPageChecker
function CSeoPageChecker($site, $url, $get = true, $check_errors = true)
{
global $APPLICATION;
if (CModule::IncludeModule('search')) {
$this->bSearch = true;
} else {
$APPLICATION->ThrowException(GetMessage('SEO_ERROR_NO_SEARCH'));
}
// don't return false or set bError!
$this->__bCheckErrors = $check_errors;
$this->__site = $site;
$dbRes = CSite::GetByID($this->__site);
if ($arRes = $dbRes->Fetch()) {
$this->__lang = $arRes['LANGUAGE_ID'];
$this->__server_name = $arRes['SERVER_NAME'];
if (strlen($this->__server_name) <= 0) {
$this->__server_name = COption::GetOptionString('main', 'server_name', '');
}
if (strlen($this->__server_name) > 0) {
$this->__url = 'http://' . $this->__server_name . $url;
return $get ? $this->GetHTTPData() : true;
} else {
$this->bError = true;
$APPLICATION->ThrowException(str_replace('#SITE_ID#', $this->__site, GetMessage('SEO_ERROR_NO_SERVER_NAME')));
return false;
}
}
return false;
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:29,代码来源:seo_page_checker.php
示例6: GetList
public static function GetList($arSort=array(), $arFilter=array(), $arNavParams=false, $arUserField)
{
$rs = false;
if(\CModule::IncludeModule("statistic"))
{
$arAliases = array("ID" => "CITY_ID", "NAME" => "CITY_NAME");
$ob = new \CCity();
$rs = new CUserTypeLocationEnum($ob->GetList(
static::__makeArrayFromAlias($arSort, $arAliases),
static::__makeArrayFromAlias($arFilter, $arAliases)
));
// getlist is not supported pagenavigation yet
if(is_array($arNavParams) && is_set($arNavParams, "nTopCount"))
{
$arr = array();
while($ar = $rs->Fetch())
{
if(count($arr) >= intval($arNavParams["nTopCount"]))
break;
$arr[] = $ar;
}
$rs = new CUserTypeLocationEnum();
$rs->InitFromArray($arr);
}
}
return $rs;
}
开发者ID:alexshipil,项目名称:bitrix.simple.module,代码行数:31,代码来源:location.php
示例7: afterUpdateTrigger
/**
* Method will be invoked after an database record updated.
*
* @param array $oldRecord All fields before update.
* @param array $newRecord All fields after update.
*
* @return void
*/
public static function afterUpdateTrigger(array $oldRecord, array $newRecord)
{
if ($oldRecord['TITLE'] !== $newRecord['TITLE']) {
if (\CModule::IncludeModule("pull")) {
$ar = \CIMChat::GetRelationById($newRecord['CHAT_ID']);
foreach ($ar as $rel) {
\CIMContactList::CleanChatCache($rel['USER_ID']);
\CPullStack::AddByUser($rel['USER_ID'], array('module_id' => 'im', 'command' => 'chatRename', 'params' => array('chatId' => $newRecord['CHAT_ID'], 'chatTitle' => htmlspecialcharsbx($newRecord['TITLE']))));
}
}
}
if ($oldRecord['AVATAR'] !== $newRecord['AVATAR']) {
if (\CModule::IncludeModule('pull')) {
$avatarImage = \CIMChat::GetAvatarImage($newRecord['AVATAR']);
$ar = \CIMChat::GetRelationById($newRecord['CHAT_ID']);
foreach ($ar as $relation) {
\CIMContactList::CleanChatCache($relation['USER_ID']);
\CPullStack::AddByUser($relation['USER_ID'], array('module_id' => 'im', 'command' => 'chatAvatar', 'params' => array('chatId' => $newRecord['CHAT_ID'], 'chatAvatar' => $avatarImage)));
}
}
}
if ($oldRecord['COLOR'] !== $newRecord['COLOR']) {
if (\CModule::IncludeModule('pull')) {
$ar = \CIMChat::GetRelationById($newRecord['CHAT_ID']);
foreach ($ar as $relation) {
\CIMContactList::CleanChatCache($relation['USER_ID']);
\CPullStack::AddByUser($relation['USER_ID'], array('module_id' => 'im', 'command' => 'chatChangeColor', 'params' => array('chatId' => $newRecord['CHAT_ID'], 'chatColor' => \Bitrix\Im\Color::getColor($newRecord['COLOR']))));
}
}
}
}
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:39,代码来源:chathandler.php
示例8: InstallDB
function InstallDB($arParams = array())
{
global $DB, $DBType, $APPLICATION;
$this->errors = false;
// Database tables creation
$bDBInstall = !$DB->Query("SELECT 'x' FROM b_workflow_document WHERE 1=0", true);
if ($bDBInstall) {
$this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/workflow/install/db/" . $DBType . "/install.sql");
}
if ($this->errors !== false) {
$APPLICATION->ThrowException(implode("<br>", $this->errors));
return false;
} else {
RegisterModule("workflow");
CModule::IncludeModule("workflow");
if ($bDBInstall) {
$obWorkflowStatus = new CWorkflowStatus();
$obWorkflowStatus->Add(array("~TIMESTAMP_X" => $DB->GetNowFunction(), "C_SORT" => 300, "ACTIVE" => "Y", "TITLE" => GetMessage("FLOW_INSTALL_PUBLISHED"), "IS_FINAL" => "Y", "NOTIFY" => "N"));
$obWorkflowStatus->Add(array("~TIMESTAMP_X" => $DB->GetNowFunction(), "C_SORT" => 100, "ACTIVE" => "Y", "TITLE" => GetMessage("FLOW_INSTALL_DRAFT"), "IS_FINAL" => "N", "NOTIFY" => "N"));
$obWorkflowStatus->Add(array("~TIMESTAMP_X" => $DB->GetNowFunction(), "C_SORT" => 200, "ACTIVE" => "Y", "TITLE" => GetMessage("FLOW_INSTALL_READY"), "IS_FINAL" => "N", "NOTIFY" => "Y"));
}
RegisterModuleDependences("main", "OnPanelCreate", "workflow", "CWorkflow", "OnPanelCreate", "200");
RegisterModuleDependences("main", "OnChangeFile", "workflow", "CWorkflow", "OnChangeFile");
//agents
CAgent::RemoveAgent("CWorkflow::CleanUp();", "workflow");
CAgent::AddAgent("CWorkflow::CleanUp();", "workflow", "N");
return true;
}
}
开发者ID:Satariall,项目名称:izurit,代码行数:29,代码来源:index.php
示例9: GetPropertiesDialog
public static function GetPropertiesDialog($documentType, $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues = null, $formName = '')
{
if (!CModule::IncludeModule('crm')) {
return false;
}
$runtime = CBPRuntime::GetRuntime();
$arMap = array('EventType' => 'event_type', 'EventText' => 'event_text');
if (!is_array($arWorkflowParameters)) {
$arWorkflowParameters = array();
}
if (!is_array($arWorkflowVariables)) {
$arWorkflowVariables = array();
}
if (!is_array($arCurrentValues)) {
$arCurrentActivity =& CBPWorkflowTemplateLoader::FindActivityByName($arWorkflowTemplate, $activityName);
if (is_array($arCurrentActivity['Properties'])) {
foreach ($arMap as $k => $v) {
if (array_key_exists($k, $arCurrentActivity['Properties'])) {
$arCurrentValues[$arMap[$k]] = $arCurrentActivity['Properties'][$k];
} else {
$arCurrentValues[$arMap[$k]] = '';
}
}
} else {
foreach ($arMap as $k => $v) {
$arCurrentValues[$arMap[$k]] = '';
}
}
}
return $runtime->ExecuteResourceFile(__FILE__, 'properties_dialog.php', array('arCurrentValues' => $arCurrentValues, 'arTypes' => CCrmStatus::GetStatusList('EVENT_TYPE'), 'formName' => $formName));
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:crmeventaddactivity.php
示例10: getCradoBaners
/**
* ’эндлер, отслеживающий изменени¤ в инфоблоках
* @param $arFields
* @return bool
*/
static function getCradoBaners()
{
//$arResult = array();
CModule::IncludeModule('iblock');
global $DB;
$result = $DB->Query('SELECT * FROM b_cradobaners');
$arResult = array();
$i = 0;
while ($res = $result->fetch()) {
$arResult[$i]['ID'] = $res['ID'];
$arResult[$i]['COUNT_CLICK'] = $res['UF_COUNTCLICK'];
$arResult[$i]['COUNT_VIEW'] = $res['UF_COUNTVIEW'];
$arResult[$i]['DATE_LAST_CLICK'] = $res['UF_DATECLICK'];
$obElement = CIBlockElement::GetByID($res['UF_IDBANERS']);
if ($arEl = $obElement->GetNext()) {
//$arResult[$i]['BANNER'] = $arEl;
$arResult[$i]['BANNER']['ID'] = $arEl['ID'];
$arResult[$i]['BANNER']['NAME'] = $arEl['NAME'];
//Баннер в категории
if ($arEl['PREVIEW_PICTURE'] != '') {
$arResult[$i]['BANNER']['BANNER_CATEGORY'] = CFile::ResizeImageGet($arEl['PREVIEW_PICTURE'], array('width' => 140, 'height' => 95), BX_RESIZE_IMAGE_PROPORTIONAL, true);
}
if ($arEl['DETAIL_PICTURE'] != '') {
$arResult[$i]['BANNER']['BANNER_ELEMENT'] = CFile::ResizeImageGet($arEl['DETAIL_PICTURE'], array('width' => 82, 'height' => 140), BX_RESIZE_IMAGE_PROPORTIONAL, true);
}
}
$i++;
}
return $arResult;
}
开发者ID:CheBurashka334,项目名称:crado,代码行数:35,代码来源:cCradoBaners.php
示例11: sendMes
/**
* @param int $idUserFrom
* @param int $idUserTo
* @param string $title
* @param string $type
* @param string $idQuestion
* @param string $textMessage
* @return int
*/
public static function sendMes($idUserFrom = 1, $idUserTo = 1, $title, $idQuestion, $textMessage = "", $type = "P")
{
$res = false;
$senderUserID = $idUserFrom;
$targetUserID = $idUserTo;
$arFieldsMes = array("FROM_USER_ID" => $senderUserID, "TO_USER_ID" => $targetUserID, "TITLE" => $title, "MESSAGE" => $idQuestion, "DATE_CREATE" => date("d.m.Y H:i:s", time() - DIFFERENT_WITH_MOSCOW_TIME), "DATE_VIEW" => false, "MESSAGE_TYPE" => $type, "FROM_DELETED" => "N", "TO_DELETED" => "N", "SEND_MAIL" => "Y");
if (CModule::IncludeModule("socialnetwork")) {
$res = CSocNetMessages::Add($arFieldsMes);
if ($res) {
if (CModule::IncludeModule("iblock")) {
if (CModule::IncludeModule('payments')) {
$userInfo = new CLawPayment();
$InfoUserFrom = $userInfo->userInfo($idUserFrom);
$InfoUserTo = $userInfo->userInfo($idUserTo);
$emailFrom = $InfoUserFrom["EMAIL"];
$emailUser = $InfoUserTo["EMAIL"];
SendMessage::sendMessOnEmail($emailFrom, $emailUser, $title, $textMessage);
}
}
} else {
$errorMessage = "";
if ($err = $GLOBALS["APPLICATION"]->GetException()) {
$errorMessage = $err->GetString();
}
if (StrLen($errorMessage) <= 0) {
$errorMessage = GetMessage("SONET_UR_ERROR_CREATE_MESSAGE");
}
$GLOBALS["APPLICATION"]->ThrowException($errorMessage, "ERROR_CREATE_MESSAGE");
}
}
return $res;
}
开发者ID:TzepART,项目名称:functionsAndClasses,代码行数:41,代码来源:send_messege.php
示例12: GetUserWorkflowTaskCount
public static function GetUserWorkflowTaskCount($workflowIDs, $userID = 0)
{
if (!is_array($workflowIDs)) {
return 0;
}
if (!(IsModuleInstalled('bizproc') && CModule::IncludeModule('bizproc'))) {
return 0;
}
$userID = intval($userID);
if ($userID <= 0) {
$userID = CCrmSecurityHelper::GetCurrentUserID();
}
$filter = array('USER_ID' => $userID);
$workflowQty = count($workflowIDs);
if ($workflowQty > 1) {
//IMPORTANT: will produce SQL error due to CBPTaskService::GetList bug
//$filter['@WORKFLOW_ID'] = $workflowIDs;
$filter['WORKFLOW_ID'] = $workflowIDs[0];
}
/*elseif($workflowQty === 1)
{
$filter['WORKFLOW_ID'] = $workflowIDs[0];
}*/
$result = CBPTaskService::GetList(array(), $filter, array(), false, array());
return is_int($result) ? $result : 0;
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:26,代码来源:crm_bizproc_helper.php
示例13: createSmartFilterSeoXML
function createSmartFilterSeoXML()
{
if (CModule::IncludeModule("iblock")) {
$resElDB = CIBlockElement::GetList(array("SORT" => "ASC"), array('IBLOCK_ID' => SEO_IBLOCK), false, false, array('PROPERTY_TARGET_ON', 'PROPERTY_INDEX', 'PROPERTY_FOLLOW', 'IBLOCK_ID', 'ID', 'NAME'));
$protocol = CMain::IsHTTPS() ? "https" : "http";
$host = $_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443 && $_SERVER['SERVER_PORT'] > 0 && strpos($_SERVER['HTTP_HOST'], ":") === false) {
$host .= ":" . $_SERVER['SERVER_PORT'];
}
$curDate = date("Y-m-d\\TH:i:s P");
$strBeginSmartFilter = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
$index = 0;
while ($res = $resElDB->fetch()) {
$exp = explode('*', $res['PROPERTY_TARGET_ON_VALUE']['TEXT']);
$urlFilter = trim($exp[0]);
//clean url of smart filter
if ($index == 0) {
$strBeginSmartFilter .= "\t<url>\n\t\t";
$index++;
} else {
$strBeginSmartFilter .= "<url>\n\t\t";
}
$strBeginSmartFilter .= "<loc>" . $protocol . "://" . $host . $urlFilter . "</loc>\n\t\t";
$strBeginSmartFilter .= "<lastmod>" . $curDate . "</lastmod>\n\t";
$strBeginSmartFilter .= "</url>";
}
$strBeginSmartFilter .= "</urlset\n>";
$smartXmlFileName = 'sitemap_iblock_' . SEO_IBLOCK . '.xml';
$el = fopen($_SERVER['DOCUMENT_ROOT'] . '/' . $smartXmlFileName, "w");
fwrite($el, $strBeginSmartFilter);
fclose($el);
return "createSmartFilterSeoXML();";
}
}
开发者ID:VitaliiSestrenskyi,项目名称:sest,代码行数:34,代码来源:createSmartFilterSeoXML.php
示例14: toView
/**
* @return array
*/
protected function toView()
{
/* @global CUser $USER */
global $USER;
if (!CModule::includeModule('security')) {
return array('MESSAGE' => Loc::getMessage('SECURITY_AUTH_OTP_MANDATORY_MODULE_ERROR'));
}
if (!Otp::isOtpRequiredByMandatory()) {
return array('MESSAGE' => Loc::getMessage('SECURITY_AUTH_OTP_MANDATORY_NOT_REQUIRED'));
}
if ($USER->IsAuthorized()) {
return array('MESSAGE' => Loc::getMessage('SECURITY_AUTH_OTP_MANDATORY_AUTH_ERROR'));
}
$deferredParams = Otp::getDeferredParams();
if (!$deferredParams['USER_ID']) {
return array('MESSAGE' => Loc::getMessage('SECURITY_AUTH_OTP_MANDATORY_UNKNOWN_ERROR'));
}
$result = array();
$otp = Otp::getByUser($deferredParams['USER_ID']);
$otp->regenerate();
$result['SECRET'] = $otp->getHexSecret();
$result['TYPE'] = $otp->getType();
$result['APP_SECRET'] = $otp->getAppSecret();
$result['APP_SECRET_SPACED'] = chunk_split($result['APP_SECRET'], 4, ' ');
$result['PROVISION_URI'] = $otp->getProvisioningUri();
$result['SUCCESSFUL_URL'] = $this->arParams['SUCCESSFUL_URL'];
$result['TWO_CODE_REQUIRED'] = $otp->getAlgorithm()->isTwoCodeRequired();
$result['OTP'] = $otp;
return $result;
}
开发者ID:rasuldev,项目名称:torino,代码行数:33,代码来源:class.php
示例15: Request
function Request($server, $page, $port, $method, $namespace, $login, $password, $arParams)
{
if (!CModule::IncludeModule("webservice")) {
return false;
}
global $APPLICATION;
$client = new CSOAPClient($server, $page, $port);
$client->setLogin($login);
$client->setPassword($password);
$request = new CSOAPRequest($method, $namespace, $arParams);
$response = $client->send($request);
if (is_object($response) && $response->isFault()) {
if (XDI_XML_ERROR_DEBUG) {
CXDImport::WriteToLog("ERROR: Incorrect webservice response. Raw response: " . $client->getRawResponse(), "RXML");
}
return false;
} else {
if (XDI_XML_DEBUG) {
CXDImport::WriteToLog("Successfull webservice response. Raw response: " . $client->getRawResponse(), "RXML");
}
if (is_object($response)) {
return $response->Value;
} else {
return false;
}
}
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:27,代码来源:lf_scheme_xml.php
示例16: Execute
public function Execute()
{
if (!CModule::IncludeModule("socialnetwork")) {
return CBPActivityExecutionStatus::Closed;
}
$rootActivity = $this->GetRootActivity();
$documentId = $rootActivity->GetDocumentId();
$ownerId = CBPHelper::ExtractUsers($this->OwnerId, $documentId, true);
$users = array_unique(CBPHelper::ExtractUsers($this->Users, $documentId, false));
$dbSubjects = CSocNetGroupSubject::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("SITE_ID" => SITE_ID), false, false, array("ID"));
$row = $dbSubjects->fetch();
if (!$row) {
$this->WriteToTrackingService(GetMessage("BPCWG_ERROR_SUBJECT_ID"));
return CBPActivityExecutionStatus::Closed;
}
$subjectId = $row['ID'];
unset($dbSubjects, $row);
$options = array("SITE_ID" => SITE_ID, "NAME" => $this->GroupName, "VISIBLE" => "Y", "OPENED" => "N", "CLOSED" => "N", "SUBJECT_ID" => $subjectId, "INITIATE_PERMS" => SONET_ROLES_OWNER, "SPAM_PERMS" => SONET_ROLES_USER);
$groupId = CSocNetGroup::CreateGroup($ownerId, $options);
if (!$groupId) {
$this->WriteToTrackingService(GetMessage("BPCWG_ERROR_CREATE_GROUP"));
return CBPActivityExecutionStatus::Closed;
}
$this->GroupId = $groupId;
foreach ($users as $user) {
if ($user == $ownerId) {
continue;
}
CSocNetUserToGroup::Add(array("USER_ID" => $user, "GROUP_ID" => $groupId, "ROLE" => SONET_ROLES_USER, "=DATE_CREATE" => $GLOBALS["DB"]->CurrentTimeFunction(), "=DATE_UPDATE" => $GLOBALS["DB"]->CurrentTimeFunction(), "INITIATED_BY_TYPE" => SONET_INITIATED_BY_GROUP, "INITIATED_BY_USER_ID" => $ownerId, "MESSAGE" => false));
}
return CBPActivityExecutionStatus::Closed;
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:32,代码来源:createworkgroup.php
示例17: __construct
public function __construct()
{
$diskEnabled = \Bitrix\Main\Config\Option::get('disk', 'successfully_converted', false) && CModule::includeModule('disk');
if (!$diskEnabled) {
$this->validUrls = array_merge($this->validUrls, array("/company/personal.php", "/extranet/contacts/personal.php", "/docs/index.php", "/docs/shared/index.php", "/workgroups/index.php"));
}
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:7,代码来源:mobile_event.php
示例18: InstallDB
function InstallDB($arParams = array())
{
global $DB, $DBType, $APPLICATION;
$this->errors = false;
// Database tables creation
if (!$DB->Query("SELECT 'x' FROM b_list_rubric WHERE 1=0", true)) {
$this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/subscribe/install/db/" . $DBType . "/install.sql");
}
if ($this->errors !== false) {
$APPLICATION->ThrowException(implode("<br>", $this->errors));
return false;
} else {
RegisterModule("subscribe");
CModule::IncludeModule("subscribe");
RegisterModuleDependences("main", "OnBeforeLangDelete", "subscribe", "CRubric", "OnBeforeLangDelete");
RegisterModuleDependences("main", "OnUserDelete", "subscribe", "CSubscription", "OnUserDelete");
RegisterModuleDependences("main", "OnUserLogout", "subscribe", "CSubscription", "OnUserLogout");
RegisterModuleDependences("main", "OnGroupDelete", "subscribe", "CPosting", "OnGroupDelete");
//agents
CAgent::RemoveAgent("CSubscription::CleanUp();", "subscribe");
CTimeZone::Disable();
CAgent::Add(array("NAME" => "CSubscription::CleanUp();", "MODULE_ID" => "subscribe", "ACTIVE" => "Y", "NEXT_EXEC" => date("d.m.Y H:i:s", mktime(3, 0, 0, date("m"), date("j") + 1, date("Y"))), "AGENT_INTERVAL" => 86400, "IS_PERIOD" => "Y"));
CTimeZone::Enable();
return true;
}
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:26,代码来源:index.php
示例19: execute
public static function execute()
{
global $USER;
$result = array();
$error = false;
if (!CModule::IncludeModule('voximplant')) {
$error = 'Module voximplant is not installed.';
} else {
if (!is_object($USER) || !$USER->IsAuthorized()) {
$error = GetMessage('ACCESS_DENIED');
} else {
if (!CVoxImplantMain::CheckAccess()) {
$error = GetMessage('ACCESS_DENIED');
} else {
if (!check_bitrix_sessid()) {
$error = GetMessage('ACCESS_DENIED');
} else {
if ($_REQUEST["act"] == "edit") {
$result = self::executeEditPhones($error);
} else {
if ($_REQUEST["act"] == "getInfo") {
$result = self::executeGetInfo($error);
} else {
if ($_REQUEST["act"] == "option") {
$result = self::executeSaveOption($error);
}
}
}
}
}
}
}
self::returnJson(array_merge(array('result' => $error === false ? 'ok' : 'error', 'error' => CharsetConverter::ConvertCharset($error, SITE_CHARSET, 'UTF-8')), $result));
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:34,代码来源:ajax.php
示例20: InitStep
function InitStep()
{
global $DB;
$wizard =& $this->GetWizard();
$node_id = intval($wizard->GetVar('node_id'));
if (!CModule::IncludeModule('cluster')) {
$this->SetError(GetMessage('CLUWIZ_NO_MODULE_ERROR'));
} elseif ($DB->type != "MYSQL") {
$this->SetError(GetMessage('CLUWIZ_DATABASE_NOT_SUPPORTED'));
} elseif ($node_id <= 1) {
$this->SetError(GetMessage('CLUWIZ_NO_NODE_ERROR'));
} else {
$this->arNode = CClusterDBNode::GetByID($node_id);
if (!is_array($this->arNode)) {
$this->SetError(GetMessage('CLUWIZ_NO_NODE_ERROR'));
} else {
// $arNode["ROLE_ID"] == "SLAVE"
// $arNode["STATUS"] == "READY"
$this->nodeDB = CDatabase::GetDBNodeConnection($this->arNode["ID"], true, false);
if (!is_object($this->nodeDB)) {
$this->SetError(GetMessage('CLUWIZ_NO_CONN_ERROR'));
}
}
}
}
开发者ID:webgksupport,项目名称:alpina,代码行数:25,代码来源:wizard.php
注:本文中的CModule类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论