Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XMUDCHR

XMUDCHR.m

Go to the documentation of this file.
  1. XMUDCHR ;ISC-SF/GMB-Christen Site ;04/17/2002 11:48
  1. ;;8.0;MailMan;;Jun 28, 2002
  1. ; Entry points used by MailMan options (not covered by DBIA):
  1. ; CHRISTEN XMCHRIS - Edit MailMan Site Parameters
  1. CHRISTEN ;Set up/Change MailMan Site Parameters
  1. N XMREC,XMABORT
  1. S XMABORT=0
  1. S XMREC=$G(^XMB(1,1,0)) I '+XMREC,$O(^XMB(1,0)) G E
  1. I XMREC="" D
  1. . D INIT
  1. E D
  1. . D CHANGE
  1. Q:XMABORT
  1. D PARENT
  1. D SCRIPT
  1. G Q
  1. INIT ; Initial Christening
  1. N DIC,DIE,Y,DA,XMFDA
  1. S DIC=4.2,DIC(0)="AEMQ"
  1. D ^DIC I Y<1 S XMABORT=1 D E1 Q
  1. S XMFDA(4.3,"+1,",.01)=+Y
  1. D UPDATE^DIE("","XMFDA")
  1. K DIC,Y
  1. S DR="3//FORUM.VA.GOV;1//EST"
  1. S DIE=4.3,DA=1
  1. D ^DIE I $D(Y) S XMABORT=1 D E1
  1. Q
  1. CHANGE ;
  1. N XMSITE,DIE,DA,DR,DIC,X,Y
  1. S XMSITE=$S($D(^XMB("NETNAME")):^XMB("NETNAME"),$D(^XMB("NAME")):^XMB("NAME"),$D(^DIC(4.2,+XMREC,0)):$P(^(0),U),1:XMREC)
  1. I '$$SURE(XMSITE) S XMABORT=1 Q ; Are you sure?
  1. S DIC=4.2,DIC(0)="AEMQ",DIC("B")=$S($D(^DIC(4.2,+XMREC,0)):$P(^(0),U),1:XMSITE)
  1. D ^DIC I Y=-1 S XMABORT=1 Q
  1. I XMSITE'=$P(Y,U,2) D
  1. . I +Y=^XMB("NUM") D
  1. . . ; The domain name in file 4.2 has been changed.
  1. . . ; The pointer to file 4.2 has stayed the same.
  1. . . ; The filer won't fire the xrefs, so we need to do it manually
  1. . . S (^XMB("NETNAME"),^XMB("NAME"))=$P(Y,U,2)
  1. . E D
  1. . . N XMFDA
  1. . . S XMFDA(4.3,"1,",.01)=+Y
  1. . . D FILE^DIE("","XMFDA")
  1. . W !!,"The domain name for this facility is now: ",^XMB("NETNAME")
  1. E D
  1. . W !!,"The domain name for this facility remains: ",^XMB("NETNAME")
  1. K DIC,Y
  1. S DR="3//FORUM.VA.GOV;1//EST"
  1. S DIE=4.3,DA=1
  1. D ^DIE
  1. Q
  1. SURE(XMSITE) ; Function returns 1 if sure; 0 if not
  1. N DIR,X,Y
  1. W !!!," * * * * WARNING * * * *"
  1. W !!,"You are about to change the domain name of this facility"
  1. W !,"in the MailMan Site Parameters file."
  1. W !!,"Currently, this facility is named: ",XMSITE
  1. W !!,"You must be extremely sure before you proceed!",!
  1. S DIR("A")="Are you sure you want to change the name of this facility"
  1. S DIR("B")="NO"
  1. S DIR(0)="Y"
  1. D ^DIR Q:Y 1 ; Sure do!
  1. Q 0 ; Nope, I'm not sure!
  1. PARENT ;
  1. N XMPARENT
  1. S XMPARENT=+$G(^XMB("PARENT"))
  1. I XMPARENT S XMPARENT=$S($D(^DIC(4.2,XMPARENT,0)):$P(^(0),U),1:0)
  1. I XMPARENT'=0 D
  1. . W !!,XMPARENT," has been initialized as your 'parent' domain."
  1. . W !,"(Forum is usually the parent domain, unless this is a subordinate domain.)"
  1. . W !!,"You may edit the MailMan Site Parameter file to change your parent domain."
  1. E D
  1. . W !!,$C(7),"*** YOUR PARENT DOMAIN HAS NOT BEEN INITIALIZED !!! ***"
  1. . W !!,"You MUST edit the MailMan Site Parameter file to ENTER your parent domain."
  1. Q
  1. SCRIPT ;RESET AUSTIN SCRIPT
  1. ;G SCRIPT^XMYPDOM
  1. W !!,"We will not initialize your transmission scripts."
  1. Q
  1. Q W !!,"Use the 'Subroutine editor' option under network management menu to add your"
  1. W !,"site passwords to the MINIENGINE script, and the 'Edit a script' option"
  1. W !,"to edit any domain scripts that you choose to."
  1. ;D ^XMYPDOM
  1. Q
  1. PMB S Y=Y+1000,^XMB(3.7,.5,2,+Y,1,0)=^TMP("XM",I,1,0),^XMB(3.7,.5,2,"B",$E($P(Y(0),U,1),1,30),+Y)="",^XMB(3.7,.5,2,+Y,0)=$P(Y(0),U)
  1. F J=0:0 S J=$O(^TMP("XM",I,1,J)) Q:J'>0 S ^XMB(3.7,.5,2,+Y,1,J,0)=J W "."
  1. Q
  1. E W $C(7),!!,"There is a FILE INTEGRITY problem in your MailMan Site Parameters file",!,"There should only be one entry and that entry should be entry number 1.",!
  1. E1 W $C(7),!,"Your MailMan site parameters MUST be reviewed."
  1. EQ W !!,"Then you can finish the INIT by executing POST^XMYPOST.",! Q
  1. E2 W $C(7),!,"You do not yet have an entry in your MailMan Site Parameters File",!,"Use FileMan to make an entry." G EQ