Exemplo n.º 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
Exemplo n.º 2
0
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
Exemplo n.º 3
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