コード例 #1
0
def po_question_new(user_id, name, txt, state, zsite_id):
    if not name and not txt:
        return
    name = name or time_title()
    if not is_same_post(user_id, name, txt, zsite_id):
        m = po_new(CID_QUESTION, user_id, name, state, zsite_id=zsite_id)
        if m:
            txt_new(m.id, txt)
            if state > STATE_SECRET:
                m.feed_new()
            return m
コード例 #2
0
ファイル: po.py プロジェクト: xqk/42qu_github_mirror
def po_note_new(user_id, name, txt, state=STATE_ACTIVE, zsite_id=0):
    if not name and not txt:
        return
    name = name or time_title()
    if not is_same_post(user_id, name, txt, zsite_id):
        m = po_new(CID_NOTE, user_id, name, state, zsite_id=zsite_id)
        if m:
            m.txt_set(txt)
            if state > STATE_SECRET:
                m.feed_new()
            return m
コード例 #3
0
ファイル: po_question.py プロジェクト: xqk/42qu_github_mirror
def po_question_new(user_id, name, txt, state, zsite_id):
    if not name and not txt:
        return
    name = name or time_title()
    if not is_same_post(user_id, name, txt, zsite_id):
        m = po_new(CID_QUESTION, user_id, name, state, zsite_id=zsite_id)
        if m:
            txt_new(m.id, txt)
            if state > STATE_SECRET:
                m.feed_new()
            return m