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)
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)
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)
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)
def zsite_fav_get(zsite, owner_id): return zsite_list_get(zsite.id, owner_id, zsite.cid)
def zsite_fav_get(zsite, owner_id): return zsite_list_get( zsite.id, owner_id, zsite.cid )