• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP MbqError类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中MbqError的典型用法代码示例。如果您正苦于以下问题:PHP MbqError类的具体用法?PHP MbqError怎么用?PHP MbqError使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了MbqError类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: actionImplement

 /**
  * action implement
  */
 protected function actionImplement($in)
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $oMbqEtThank = MbqMain::$oClk->newObj('MbqEtThank');
     $oMbqEtThank->key->setOriValue($in->postId);
     $oMbqRdEtForumPost = MbqMain::$oClk->newObj('MbqRdEtForumPost');
     if ($oMbqEtForumPost = $oMbqRdEtForumPost->initOMbqEtForumPost($oMbqEtThank->key->oriValue, array('case' => 'byPostId'))) {
         $oMbqAclEtForumPost = MbqMain::$oClk->newObj('MbqAclEtForumPost');
         $aclResult = $oMbqAclEtForumPost->canAclThankPost($oMbqEtForumPost);
         if ($aclResult === true) {
             //acl judge
             $oMbqWrEtForumPost = MbqMain::$oClk->newObj('MbqWrEtForumPost');
             $oMbqEtThank->userId->setOriValue(MbqMain::$oCurMbqEtUser->userId->oriValue);
             $oMbqWrEtForumPost->thankPost($oMbqEtForumPost, $oMbqEtThank);
             $this->data['result'] = true;
             $oTapatalkPush = new TapatalkPush();
             $oTapatalkPush->callMethod('doInternalPushThank', array('oMbqEtForumPost' => $oMbqEtForumPost, 'oMbqEtThank' => $oMbqEtThank));
         } else {
             MbqError::alert('', $aclResult, '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid post id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:29,代码来源:MbqBaseActThankPost.php


示例2: actionImplement

 /**
  * action implement
  */
 protected function actionImplement($in)
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $oMbqRdEtForumPost = MbqMain::$oClk->newObj('MbqRdEtForumPost');
     if ($oMbqEtForumPost = $oMbqRdEtForumPost->initOMbqEtForumPost($in->postId, array('case' => 'byPostId'))) {
         $oMbqAclEtForumPost = MbqMain::$oClk->newObj('MbqAclEtForumPost');
         $aclResult = $oMbqAclEtForumPost->canAclReportPost($oMbqEtForumPost);
         if ($aclResult === true) {
             //acl judge
             $oMbqWrEtForumPost = MbqMain::$oClk->newObj('MbqWrEtForumPost');
             $result = $oMbqWrEtForumPost->reportPost($oMbqEtForumPost, $in->reason);
             if ($result === true) {
                 $this->data['result'] = true;
                 $this->data['result_text'] = 'Post reported';
             } else {
                 $this->data['result'] = false;
                 $this->data['result_text'] = $result;
             }
         } else {
             MbqError::alert('', $aclResult, '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid post id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:30,代码来源:MbqBaseActReportPost.php


示例3: actionImplement

 /**
  * action implement
  */
 protected function actionImplement($in)
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $oMbqRdEtForumTopic = MbqMain::$oClk->newObj('MbqRdEtForumTopic');
     if ($oMbqEtForumTopic = $oMbqRdEtForumTopic->initOMbqEtForumTopic($in->topicId, array('case' => 'byTopicId'))) {
         $oMbqAclEtForumTopic = MbqMain::$oClk->newObj('MbqAclEtForumTopic');
         $aclResult = $oMbqAclEtForumTopic->canAclMRenameTopic($oMbqEtForumTopic);
         if ($aclResult === true) {
             //acl judge
             $oMbqWrEtForumTopic = MbqMain::$oClk->newObj('MbqWrEtForumTopic');
             $result = $oMbqWrEtForumTopic->mRenameTopic($oMbqEtForumTopic, $in->title);
             if ($result === true) {
                 $this->data['result'] = true;
             } else {
                 if ($result === false) {
                     $this->data['result'] = false;
                     $this->data['is_login_mod'] = true;
                     $this->data['result_text'] = 'You need to authenticate again to do the action';
                 } else {
                     $this->data['result'] = false;
                     $this->data['result_text'] = $result;
                 }
             }
         } else {
             MbqError::alert('', $aclResult, '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid topic id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:35,代码来源:MbqBaseActMRenameTopic.php


示例4: actionImplement

 /**
  * action implement
  */
 protected function actionImplement()
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $forumId = MbqMain::$input['get']['fid'];
     $content = MbqMain::$input['get']['content'] ? MbqMain::$input['get']['content'] : 'both';
     $page = (int) MbqMain::$input['get']['page'];
     $perpage = (int) MbqMain::$input['get']['perpage'];
     $type = MbqMain::$input['get']['type'] ? MbqMain::$input['get']['type'] : 'normal';
     $prefix = MbqMain::$input['get']['prefix'];
     $oMbqDataPage = MbqMain::$oClk->newObj('MbqDataPage');
     $oMbqDataPage->initByPageAndPerPage($page, $perpage);
     $oMbqRdEtForum = MbqMain::$oClk->newObj('MbqRdEtForum');
     $objsMbqEtForum = $oMbqRdEtForum->getObjsMbqEtForum(array($forumId), array('case' => 'byForumIds'));
     if ($objsMbqEtForum && ($oMbqEtForum = $objsMbqEtForum[0])) {
         if ($content == 'sub' || $content == 'both') {
             MbqError::alert('', "Not support content type {$content}!", '', MBQ_ERR_APP);
         } elseif ($content == 'topic') {
             $oMbqAclEtForumTopic = MbqMain::$oClk->newObj('MbqAclEtForumTopic');
             if ($oMbqAclEtForumTopic->canAclGetTopic($oMbqEtForum)) {
                 //acl judge
                 switch ($type) {
                     case 'sticky':
                         /* returns sticky topics. */
                         $oMbqRdEtForumTopic = MbqMain::$oClk->newObj('MbqRdEtForumTopic');
                         $oMbqDataPage = $oMbqRdEtForumTopic->getObjsMbqEtForumTopic($oMbqEtForum, array('case' => 'byForum', 'oMbqDataPage' => $oMbqDataPage, 'top' => true));
                         $this->data['total'] = (int) $oMbqDataPage->totalNum;
                         //!!! must
                         $this->data['forum'] = $oMbqRdEtForum->returnApiDataForum($oMbqEtForum);
                         $this->data['forums'] = array();
                         $this->data['topics'] = $oMbqRdEtForumTopic->returnApiArrDataForumTopic($oMbqDataPage->datas);
                         break;
                     case 'normal':
                         /* returns standard topics */
                         $oMbqRdEtForumTopic = MbqMain::$oClk->newObj('MbqRdEtForumTopic');
                         $oMbqDataPage = $oMbqRdEtForumTopic->getObjsMbqEtForumTopic($oMbqEtForum, array('case' => 'byForum', 'oMbqDataPage' => $oMbqDataPage, 'notIncludeTop' => true));
                         $this->data['total'] = (int) $oMbqDataPage->totalNum;
                         //!!! must
                         $this->data['forum'] = $oMbqRdEtForum->returnApiDataForum($oMbqEtForum);
                         $this->data['forums'] = array();
                         $this->data['topics'] = $oMbqRdEtForumTopic->returnApiArrDataForumTopic($oMbqDataPage->datas);
                         break;
                     case 'all':
                         MbqError::alert('', "Not supported topic type filter:{$type}.", '', MBQ_ERR_APP);
                         break;
                     default:
                         MbqError::alert('', "Unknown topic type filter:{$type}.", '', MBQ_ERR_APP);
                         break;
                 }
             } else {
                 MbqError::alert('', '', '', MBQ_ERR_APP);
             }
         } else {
             MbqError::alert('', "Need valid content type!", '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid forum id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:63,代码来源:MbqBaseActForum.php


示例5: actionImplement

 /**
  * action implement
  */
 protected function actionImplement()
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $startNum = (int) MbqMain::$input[0];
     $lastNum = (int) MbqMain::$input[1];
     $oMbqDataPage = MbqMain::$oClk->newObj('MbqDataPage');
     $oMbqDataPage->initByStartAndLast($startNum, $lastNum);
     $filter = array('searchid' => MbqMain::$input[2], 'page' => $oMbqDataPage->curPage, 'perpage' => $oMbqDataPage->numPerPage);
     if (MbqMain::$input[3] && is_array(MbqMain::$input[3])) {
         $filter = array_merge($filter, MbqMain::$input[3]);
     }
     $filter['showposts'] = 0;
     $oMbqAclEtForumTopic = MbqMain::$oClk->newObj('MbqAclEtForumTopic');
     if ($oMbqAclEtForumTopic->canAclGetUnreadTopic()) {
         //acl judge
         $oMbqRdForumSearch = MbqMain::$oClk->newObj('MbqRdForumSearch');
         $oMbqDataPage = $oMbqRdForumSearch->forumAdvancedSearch($filter, $oMbqDataPage, array('case' => 'getUnreadTopic', 'unread' => true));
         $oMbqRdEtForumTopic = MbqMain::$oClk->newObj('MbqRdEtForumTopic');
         $this->data['result'] = true;
         $this->data['total_topic_num'] = (int) $oMbqDataPage->totalNum;
         $this->data['topics'] = $oMbqRdEtForumTopic->returnApiArrDataForumTopic($oMbqDataPage->datas);
     } else {
         MbqError::alert('', '', '', MBQ_ERR_APP);
     }
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:30,代码来源:MbqBaseActGetUnreadTopic.php


示例6: actionImplement

 /**
  * action implement
  */
 protected function actionImplement()
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $topicId = MbqMain::$input[0];
     $forumId = MbqMain::$input[1];
     $oMbqRdEtForumTopic = MbqMain::$oClk->newObj('MbqRdEtForumTopic');
     $oMbqRdEtForum = MbqMain::$oClk->newObj('MbqRdEtForum');
     $oMbqEtForumTopic = $oMbqRdEtForumTopic->initOMbqEtForumTopic($topicId, array('case' => 'byTopicId'));
     $objsMbqEtForum = $oMbqRdEtForum->getObjsMbqEtForum(array($forumId), array('case' => 'byForumIds'));
     if ($oMbqEtForumTopic && $objsMbqEtForum && ($oMbqEtForum = $objsMbqEtForum[0])) {
         $oMbqAclEtForumTopic = MbqMain::$oClk->newObj('MbqAclEtForumTopic');
         if ($oMbqAclEtForumTopic->canAclMMoveTopic($oMbqEtForumTopic, $oMbqEtForum)) {
             //acl judge
             $oMbqWrEtForumTopic = MbqMain::$oClk->newObj('MbqWrEtForumTopic');
             $oMbqWrEtForumTopic->mMoveTopic($oMbqEtForumTopic, $oMbqEtForum);
             $this->data['result'] = true;
         } else {
             MbqError::alert('', '', '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid topic id or forum id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:28,代码来源:MbqBaseActMMoveTopic.php


示例7: actionImplement

 /**
  * action implement
  */
 protected function actionImplement()
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $postId = MbqMain::$input[0];
     $mode = (int) MbqMain::$input[1];
     if ($mode != 1 && $mode != 2) {
         MbqError::alert('', "Need valid mode!", '', MBQ_ERR_APP);
     }
     if ($mode == 2) {
         MbqError::alert('', "Sorry!Not support hard-delete a post!", '', MBQ_ERR_APP);
     }
     $oMbqRdEtForumPost = MbqMain::$oClk->newObj('MbqRdEtForumPost');
     if ($oMbqEtForumPost = $oMbqRdEtForumPost->initOMbqEtForumPost($postId, array('case' => 'byPostId'))) {
         $oMbqAclEtForumPost = MbqMain::$oClk->newObj('MbqAclEtForumPost');
         if ($oMbqAclEtForumPost->canAclMDeletePost($oMbqEtForumPost, $mode)) {
             //acl judge
             $oMbqWrEtForumPost = MbqMain::$oClk->newObj('MbqWrEtForumPost');
             $oMbqWrEtForumPost->mDeletePost($oMbqEtForumPost, $mode);
             $this->data['result'] = true;
         } else {
             MbqError::alert('', '', '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid post id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:31,代码来源:MbqBaseActMDeletePost.php


示例8: actionImplement

 /**
  * action implement
  */
 protected function actionImplement($in)
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('subscribe')) {
         MbqError::alert('', "Not support module subscribe!", '', MBQ_ERR_NOT_SUPPORT);
     }
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $oMbqRdEtForum = MbqMain::$oClk->newObj('MbqRdEtForum');
     if ($oMbqEtForum = $oMbqRdEtForum->initOMbqEtForum($in->forumId, array('case' => 'byForumId'))) {
         $oMbqAclEtForum = MbqMain::$oClk->newObj('MbqAclEtForum');
         $aclResult = $oMbqAclEtForum->canAclUnsubscribeForum($oMbqEtForum);
         if ($aclResult === true) {
             //acl judge
             $oMbqWrEtForum = MbqMain::$oClk->newObj('MbqWrEtForum');
             $result = $oMbqWrEtForum->unsubscribeForum($oMbqEtForum);
             if ($result === true) {
                 $this->data['result'] = true;
             } else {
                 $this->data['result'] = false;
                 $this->data['result_text'] = $result;
             }
         } else {
             MbqError::alert('', $aclResult, '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid forum id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:32,代码来源:MbqBaseActUnsubscribeForum.php


示例9: uploadAttachment

 /**
  * upload an attachment
  *
  * @param  Integer  $forumId
  * @param  String  $groupId
  * @return  Object  $oMbqEtAtt
  */
 public function uploadAttachment($oMbqEtForum, $groupId = null)
 {
     //ref wcf\action\AJAXUploadAction,wcf\action\AJAXProxyAction,wcf\data\attachment\AttachmentAction
     $parameters['objectType'] = 'com.woltlab.wbb.post';
     $parameters['objectID'] = 0;
     $parameters['tmpHash'] = $groupId ? $groupId : StringUtil::getRandomID();
     $parameters['parentObjectID'] = $oMbqEtForum->forumId->oriValue;
     $parameters['__files'] = UploadHandler::getUploadHandler('attachment');
     //ref AJAXUploadAction::readParameters()
     $oAttachmentAction = new AttachmentAction(array(), 'upload', $parameters);
     //ref AJAXProxyAction::invoke()
     $oAttachmentAction->validateAction();
     //todo:catch exception
     $ret = $oAttachmentAction->executeAction();
     //todo:catch exception
     if ($ret['returnValues']['attachments']) {
         $r = array_shift($ret['returnValues']['attachments']);
         $oMbqEtAtt = MbqMain::$oClk->newObj('MbqEtAtt');
         $oMbqEtAtt->attId->setOriValue($r['attachmentID']);
         $oMbqEtAtt->groupId->setOriValue($parameters['tmpHash']);
         $oMbqEtAtt->filtersSize->setOriValue($r['filesize']);
         $oMbqEtAtt->uploadFileName->setOriValue($r['filename']);
         return $oMbqEtAtt;
     } else {
         MbqError::alert('', "Upload attachment failed!", '', MBQ_ERR_APP);
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:34,代码来源:MbqWrEtAtt.php


示例10: actionImplement

 /**
  * action implement
  */
 protected function actionImplement($in)
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('user')) {
         MbqError::alert('', "Not support module user!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $oMbqRdEtUser = MbqMain::$oClk->newObj('MbqRdEtUser');
     if ($oMbqEtUser = $oMbqRdEtUser->initOMbqEtUser($in->userId, array('case' => 'byUserId'))) {
         $oMbqAclEtUser = MbqMain::$oClk->newObj('MbqAclEtUser');
         $aclResult = $oMbqAclEtUser->canAclIgnoreUser($oMbqEtUser, $in->mode);
         if ($aclResult === true) {
             //acl judge
             $oMbqWrEtUser = MbqMain::$oClk->newObj('MbqWrEtUser');
             $result = $oMbqWrEtUser->ignoreUser($oMbqEtUser, $in->mode);
             if ($result === true) {
                 $this->data['result'] = true;
             } else {
                 $this->data['result'] = false;
                 $this->data['result_text'] = $result;
             }
         } else {
             MbqError::alert('', $aclResult, '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "User not found!", '', MBQ_ERR_APP);
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:29,代码来源:MbqBaseActIgnoreUser.php


示例11: actionImplement

 /**
  * action implement
  */
 protected function actionImplement($in)
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('user')) {
         MbqError::alert('', "Not support module user!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $oMbqRdEtUser = MbqMain::$oClk->newObj('MbqRdEtUser');
     if ($oMbqEtUser = $oMbqRdEtUser->initOMbqEtUser($in->username, array('case' => 'byLoginName'))) {
         $oMbqAclEtUser = MbqMain::$oClk->newObj('MbqAclEtUser');
         $aclResult = $oMbqAclEtUser->canAclMBanUser($oMbqEtUser, $in->mode);
         if ($aclResult === true) {
             //acl judge
             $oMbqWrEtUser = MbqMain::$oClk->newObj('MbqWrEtUser');
             $result = $oMbqWrEtUser->mBanUser($oMbqEtUser, $in->mode, $in->reason, $in->expires);
             if ($result === true) {
                 $this->data['result'] = true;
             } else {
                 if ($result === false) {
                     $this->data['result'] = false;
                     $this->data['is_login_mod'] = true;
                     $this->data['result_text'] = 'You need to authenticate again to do the action';
                 } else {
                     $this->data['result'] = false;
                     $this->data['result_text'] = $result;
                 }
             }
         } else {
             MbqError::alert('', $aclResult, '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "User not found!", '', MBQ_ERR_APP);
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:35,代码来源:MbqBaseActMBanUser.php


示例12: actionImplement

 /**
  * action implement
  */
 protected function actionImplement($in)
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('subscribe')) {
         MbqError::alert('', "Not support module subscribe!", '', MBQ_ERR_NOT_SUPPORT);
     }
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $oMbqRdEtForumTopic = MbqMain::$oClk->newObj('MbqRdEtForumTopic');
     if ($oMbqEtForumTopic = $oMbqRdEtForumTopic->initOMbqEtForumTopic($in->topicId, array('case' => 'byTopicId'))) {
         $oMbqAclEtForumTopic = MbqMain::$oClk->newObj('MbqAclEtForumTopic');
         if ($oMbqEtForumTopic->isSubscribed->oriValue) {
             $this->data['result'] = true;
             return;
         }
         $aclResult = $oMbqAclEtForumTopic->canAclSubscribeTopic($oMbqEtForumTopic);
         if ($aclResult === true) {
             //acl judge
             $oMbqWrEtForumTopic = MbqMain::$oClk->newObj('MbqWrEtForumTopic');
             $result = $oMbqWrEtForumTopic->subscribeTopic($oMbqEtForumTopic);
             if ($result === true) {
                 $this->data['result'] = true;
                 $oTapatalkPush = new TapatalkPush();
                 $oTapatalkPush->callMethod('doInternalPushNewSubscription', array('oMbqEtForumTopic' => $oMbqEtForumTopic));
             } else {
                 $this->data['result'] = false;
                 $this->data['result_text'] = $result;
             }
         } else {
             MbqError::alert('', $aclResult, '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid topic id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:38,代码来源:MbqBaseActSubscribeTopic.php


示例13: actionImplement

 /**
  * action implement
  */
 protected function actionImplement($in)
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $oMbqRdEtForumTopic = MbqMain::$oClk->newObj('MbqRdEtForumTopic');
     if ($oMbqEtForumTopic = $oMbqRdEtForumTopic->initOMbqEtForumTopic($in->topicId, array('case' => 'byTopicId'))) {
         $oMbqAclEtForumTopic = MbqMain::$oClk->newObj('MbqAclEtForumTopic');
         $aclResult = $oMbqAclEtForumTopic->canAclGetThread($oMbqEtForumTopic);
         if ($aclResult === true) {
             //acl judge
             $oMbqRdEtForumPost = MbqMain::$oClk->newObj('MbqRdEtForumPost');
             $in->oMbqDataPage = $oMbqRdEtForumPost->getObjsMbqEtForumPost($oMbqEtForumTopic, array('case' => 'byTopic', 'oMbqDataPage' => $in->oMbqDataPage));
             $this->data = $oMbqRdEtForumTopic->returnApiDataForumTopic($oMbqEtForumTopic);
             $this->data['forum_name'] = (string) $oMbqEtForumTopic->oMbqEtForum->forumName->oriValue;
             $this->data['can_upload'] = (bool) $oMbqEtForumTopic->oMbqEtForum->canUpload->oriValue;
             $this->data['posts'] = $oMbqRdEtForumPost->returnApiArrDataForumPost($in->oMbqDataPage->datas, $in->returnHtml);
             $oMbqWrEtForumTopic = MbqMain::$oClk->newObj('MbqWrEtForumTopic');
             /* add forum topic view num */
             $oMbqWrEtForumTopic->addForumTopicViewNum($oMbqEtForumTopic);
             /* mark forum topic read */
             $oMbqWrEtForumTopic->markForumTopicRead($oMbqEtForumTopic);
             /* reset forum topic subscription */
             $oMbqWrEtForumTopic->resetForumTopicSubscription($oMbqEtForumTopic);
         } else {
             MbqError::alert('', $aclResult, '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid topic id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:34,代码来源:MbqBaseActGetThread.php


示例14: actionImplement

 /**
  * action implement
  */
 protected function actionImplement($in)
 {
     if (MbqMain::$oMbqConfig->moduleIsEnable('pm')) {
         $oMbqEtPm = MbqMain::$oClk->newObj('MbqEtPm');
         $oMbqEtPm->userNames->setOriValue($in->usernames);
         $oMbqEtPm->msgTitle->setOriValue($in->subject);
         $oMbqEtPm->msgContent->setOriValue($in->body);
         if ($in->action == 1) {
             $oMbqEtPm->isReply->setOriValue(true);
             $oMbqEtPm->toMsgId->setOriValue($in->messageId);
         } else {
             if ($in->action == 2) {
                 $oMbqEtPm->isForward->setOriValue(true);
                 $oMbqEtPm->toMsgId->setOriValue($in->messageId);
             }
         }
         $oMbqAclEtPm = MbqMain::$oClk->newObj('MbqAclEtPm');
         $aclResult = $oMbqAclEtPm->canAclCreateMessage();
         if ($aclResult === true) {
             $oMbqWrEtPm = MbqMain::$oClk->newObj('MbqWrEtPm');
             $oMbqWrEtPm->addMbqEtPm($oMbqEtPm);
             $this->data['result'] = true;
             $this->data['msg_id'] = (string) $oMbqEtPm->msgId->oriValue;
             $oTapatalkPush = new TapatalkPush();
             $oTapatalkPush->callMethod('doInternalPushNewMessage', array('oMbqEtPm' => $oMbqEtPm));
         } else {
             MbqError::alert('', $aclResult, '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Not support module private message!", '', MBQ_ERR_NOT_SUPPORT);
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:35,代码来源:MbqBaseActCreateMessage.php


示例15: actionImplement

 /**
  * action implement
  */
 protected function actionImplement()
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $startNum = (int) MbqMain::$input[1];
     $lastNum = (int) MbqMain::$input[2];
     $oMbqDataPage = MbqMain::$oClk->newObj('MbqDataPage');
     $oMbqDataPage->initByStartAndLast($startNum, $lastNum);
     $filter = array('keywords' => MbqMain::$input[0], 'searchid' => MbqMain::$input[3], 'page' => $oMbqDataPage->curPage, 'perpage' => $oMbqDataPage->numPerPage);
     $filter['showposts'] = 1;
     if (strlen(MbqMain::$input[0]) < MbqBaseFdt::getFdt('MbqFdtConfig.forum.min_search_length.default')) {
         MbqError::alert('', "Search words too short!", '', MBQ_ERR_APP);
     }
     $oMbqAclEtForumPost = MbqMain::$oClk->newObj('MbqAclEtForumPost');
     if ($oMbqAclEtForumPost->canAclSearchPost()) {
         //acl judge
         $oMbqRdForumSearch = MbqMain::$oClk->newObj('MbqRdForumSearch');
         $oMbqDataPage = $oMbqRdForumSearch->forumAdvancedSearch($filter, $oMbqDataPage, array('case' => 'searchPost'));
         $oMbqRdEtForumPost = MbqMain::$oClk->newObj('MbqRdEtForumPost');
         $this->data['total_post_num'] = (int) $oMbqDataPage->totalNum;
         $this->data['posts'] = $oMbqRdEtForumPost->returnApiArrDataForumPost($oMbqDataPage->datas);
     } else {
         MbqError::alert('', '', '', MBQ_ERR_APP);
     }
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:29,代码来源:MbqBaseActSearchPost.php


示例16: actionImplement

 /**
  * action implement
  */
 protected function actionImplement()
 {
     $cfg = MbqMain::$oMbqConfig->getAllCfg();
     foreach ($cfg as $moduleName => $module) {
         foreach ($module as $k => $v) {
             if ($k !== 'module_name' && $k != 'module_version' && $k != 'module_enable') {
                 if (isset($this->data[$k])) {
                     MbqError::alert('', "Find repeat config {$k}!");
                 } else {
                     if (!$v->isAdvCfgValueType()) {
                         if ($v->hasSetOriValue()) {
                             if ($k == 'is_open' || $k == 'guest_okay' || $k == 'min_search_length') {
                                 $this->data[$k] = $v->oriValue;
                             } else {
                                 $this->data[$k] = (string) $v->oriValue;
                             }
                         } else {
                             MbqError::alert('', "Need set config {$k}!");
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:28,代码来源:MbqBaseActGetConfig.php


示例17: actionImplement

 /**
  * action implement
  */
 protected function actionImplement()
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('forum')) {
         MbqError::alert('', "Not support module forum!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $forumId = MbqMain::$input['forum_id'];
     $groupId = MbqMain::$input['group_id'] ? MbqMain::$input['group_id'] : mt_rand(2000000000, 2100000000);
     $oMbqRdEtForum = MbqMain::$oClk->newObj('MbqRdEtForum');
     $objsMbqEtForum = $oMbqRdEtForum->getObjsMbqEtForum(array($forumId), array('case' => 'byForumIds'));
     if ($objsMbqEtForum && ($oMbqEtForum = $objsMbqEtForum[0])) {
         $oMbqAclEtAtt = MbqMain::$oClk->newObj('MbqAclEtAtt');
         if ($oMbqAclEtAtt->canAclUploadAttach($oMbqEtForum)) {
             //acl judge
             $oMbqWrEtAtt = MbqMain::$oClk->newObj('MbqWrEtAtt');
             $oMbqEtAtt = $oMbqWrEtAtt->uploadAttachment($forumId, $groupId);
             $oMbqRdEtAtt = MbqMain::$oClk->newObj('MbqRdEtAtt');
             $this->data['result'] = true;
             $data1 = $oMbqRdEtAtt->returnApiDataAttachment($oMbqEtAtt);
             MbqMain::$oMbqCm->mergeApiData($this->data, $data1);
         } else {
             MbqError::alert('', '', '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid forum id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:29,代码来源:MbqBaseActUploadAttach.php


示例18: init

 /**
  * Get request protocol based on Content-Type
  *
  * @return string default as xmlrpc
  */
 protected function init()
 {
     if (defined('MBQ_PROTOCOL')) {
         $protocol = MBQ_PROTOCOL;
     } else {
         //would be removed
         $contentType = MbqMain::$oMbqCm->getRequestHeader('Content-Type');
         switch ($contentType) {
             case 'text/xml':
                 $protocol = 'xmlrpc';
                 break;
             case 'application/json':
                 $protocol = 'json';
                 break;
             default:
                 $protocol = 'xmlrpc';
         }
     }
     //$ioHandleClass = 'MbqIoHandle'.ucfirst($protocol);
     if ($protocol == 'xmlrpc') {
         $ioHandleClass = 'MbqIoHandleXmlrpc';
     } elseif ($protocol == 'json') {
         $ioHandleClass = 'MbqIoHandleAdvJson';
     } else {
         MbqError::alert('', __METHOD__ . ',line:' . __LINE__ . '.Unknown protocol.', '', MBQ_ERR_TOP_NOIO);
     }
     $this->protocol = $protocol;
     $this->oHandle = MbqMain::$oClk->newObj($ioHandleClass);
     $this->cmd = $this->oHandle->getCmd();
     $this->input = $this->oHandle->getInput();
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:36,代码来源:MbqIo.php


示例19: actionImplement

 /**
  * action implement
  */
 public function actionImplement()
 {
     if (MbqMain::$oMbqConfig->moduleIsEnable('pc') && MbqMain::$oMbqConfig->getCfg('pc.conversation')->oriValue == MbqBaseFdt::getFdt('MbqFdtConfig.pc.conversation.range.support')) {
     } else {
         MbqError::alert('', "Not support module private conversation!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $convId = MbqMain::$input[0];
     $msgId = MbqMain::$input[1];
     $oMbqRdEtPc = MbqMain::$oClk->newObj('MbqRdEtPc');
     if ($objsMbqEtPc = $oMbqRdEtPc->getObjsMbqEtPc(array($convId), array('case' => 'byConvIds'))) {
         $oMbqEtPc = array_shift($objsMbqEtPc);
         $oMbqRdEtPcMsg = MbqMain::$oClk->newObj('MbqRdEtPcMsg');
         if ($objsMbqEtPcMsg = $oMbqRdEtPcMsg->getObjsMbqEtPcMsg(array($msgId), array('case' => 'byMsgIds'))) {
             $oMbqEtPcMsg = array_shift($objsMbqEtPcMsg);
             $oMbqAclEtPcMsg = MbqMain::$oClk->newObj('MbqAclEtPcMsg');
             if ($oMbqAclEtPcMsg->canAclGetQuoteConversation($oMbqEtPcMsg, $oMbqEtPc)) {
                 $this->data['text_body'] = (string) $oMbqRdEtPcMsg->getQuoteConversation($oMbqEtPcMsg);
             } else {
                 MbqError::alert('', '', '', MBQ_ERR_APP);
             }
         } else {
             MbqError::alert('', "Need valid conversation message id!", '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "Need valid conversation id!", '', MBQ_ERR_APP);
     }
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:30,代码来源:MbqActGetQuoteConversation.php


示例20: actionImplement

 /**
  * action implement
  */
 protected function actionImplement()
 {
     if (!MbqMain::$oMbqConfig->moduleIsEnable('user')) {
         MbqError::alert('', "Not support module user!", '', MBQ_ERR_NOT_SUPPORT);
     }
     $userName = MbqMain::$input[0];
     $mode = MbqMain::$input[1];
     $reasonText = MbqMain::$input[2];
     $oMbqRdEtUser = MbqMain::$oClk->newObj('MbqRdEtUser');
     if ($mode != 1 && $mode != 2) {
         MbqError::alert('', "Need valid mode!", '', MBQ_ERR_APP);
     }
     if ($oMbqEtUser = $oMbqRdEtUser->initOMbqEtUser($userName, array('case' => 'byLoginName'))) {
         $oMbqAclEtUser = MbqMain::$oClk->newObj('MbqAclEtUser');
         if ($oMbqAclEtUser->canAclMBanUser($oMbqEtUser, $mode)) {
             //acl judge
             $oMbqWrEtUser = MbqMain::$oClk->newObj('MbqWrEtUser');
             $oMbqWrEtUser->mBanUser($oMbqEtUser, $mode, $reasonText);
             $this->data['result'] = true;
         } else {
             MbqError::alert('', '', '', MBQ_ERR_APP);
         }
     } else {
         MbqError::alert('', "User not found!", '', MBQ_ERR_APP);
     }
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:29,代码来源:MbqBaseActMBanUser.php



注:本文中的MbqError类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP MbqMain类代码示例发布时间:2022-05-23
下一篇:
PHP MbqBaseAct类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap