/**
  * 评论回推设置:设置和开启评论回推选项
  */
 function doCfg4pushback()
 {
     if (!defined('XWB_S_IS_ADMIN') || !XWB_S_IS_ADMIN || !XWB_plugin::isRequestBy('POST')) {
         XWB_plugin::deny('');
     } elseif (!xwb_token::checkInput('p', 'pushback', true)) {
         XWB_plugin::showError('令牌验证失败,请返回重试');
     }
     $is_pushback_open = 1;
     $pushback_to_thread = intval(XWB_plugin::V('p:pushback_to_thread'));
     $pushback_to_blog = intval(XWB_plugin::V('p:pushback_to_blog'));
     $pushback_to_doing = intval(XWB_plugin::V('p:pushback_to_doing'));
     $pushback_to_share = intval(XWB_plugin::V('p:pushback_to_share'));
     if (!$pushback_to_thread && !$pushback_to_blog && !$pushback_to_doing && !$pushback_to_share) {
         $is_pushback_open = 0;
     }
     $res = XWB_Plugin::setPCfg(array('is_pushback_open' => $is_pushback_open, 'pushback_to_thread' => $pushback_to_thread, 'pushback_to_blog' => $pushback_to_blog, 'pushback_to_doing' => $pushback_to_doing, 'pushback_to_share' => $pushback_to_share));
     if (true == $res) {
         $ret = array(1, '设置保存成功。');
     } else {
         $ret = array(0, '设置保存失败,请检查配置文件app.cfg.php是否具有可写权限?');
     }
     $this->_oScript('xwbSetTips', $ret);
     $pushInstance = XWB_Plugin::O('pushbackCommunicator');
     if (1 == $is_pushback_open) {
         $pushInstance->setPushback('comment');
     } else {
         $pushInstance->cancelPushback();
     }
 }