示例#1
0
def zsite_admin_rm(zsite_id, admin_id):
    cid = CID_SITE
    zsite = zsite_list_get(zsite_id, admin_id, cid)
    if zsite and zsite.state > STATE_ACTIVE:
        zsite.state = STATE_ACTIVE
        zsite.save()
        mc_flush(zsite_id, admin_id)
示例#2
0
def zsite_admin_new(zsite_id, admin_id, state=STATE_OWNER):
    if zsite_id and admin_id:
        cid = CID_SITE
        zsite = zsite_list_get(zsite_id, admin_id, cid)
        if not zsite:
            zsite = zsite_list_new(zsite_id, admin_id, cid, 1, state)
        else:
            zsite.state = state
            zsite.save()
        mc_flush(zsite_id, admin_id)
示例#3
0
def zsite_admin_rm(zsite_id, admin_id):
    cid = CID_SITE
    zsite = zsite_list_get(
        zsite_id,
        admin_id,
        cid
    )
    if zsite and zsite.state > STATE_ACTIVE:
        zsite.state = STATE_ACTIVE
        zsite.save()
        mc_flush(zsite_id, admin_id)
示例#4
0
def zsite_admin_new(zsite_id, admin_id, state=STATE_OWNER):
    if zsite_id and admin_id:
        cid = CID_SITE
        zsite = zsite_list_get(
            zsite_id,
            admin_id,
            cid
        )
        if not zsite:
            zsite = zsite_list_new(
                zsite_id,
                admin_id,
                cid,
                1,
                state
            )
        else:
            zsite.state = state
            zsite.save()
        mc_flush(zsite_id, admin_id)
示例#5
0
def zsite_fav_get(zsite, owner_id):
    return zsite_list_get(zsite.id, owner_id, zsite.cid)
示例#6
0
def zsite_fav_get(zsite, owner_id):
    return zsite_list_get(
        zsite.id,
        owner_id,
        zsite.cid
    )