コード例 #1
0
    public function saveThreadTitle($request, $response)
    {/*{{{*/
        $threadTitle = XString::convertToGbk($request->threadtitle);
        if(trim($threadTitle) == "")
        {
            throw new BizException("标题不能为空");
        }
        if(XString::getLengthOfGBKString($_REQUEST['threadtitle'])>25)
        {
            throw new BizException('标题不能超过25字');
        }
        if(XString::getLengthOfGBKString($_REQUEST['threadtitle'])<5)
        {
            throw new BizException('标题不能少于5字');
        }
        

        AskSessionInfo::modifyThreadTitle($threadTitle);
        $response->threadTitle =  AskSessionInfo::getThreadTitle();
    }/*}}}*/