[Arsperl-devel] ARSperl/example Dump_Users.pl, 1.6, 1.7 Dump_Users_OO.pl, 1.2, 1.3
Brought to you by:
jeffmurphy
From: jeff m. <jef...@us...> - 2007-03-13 13:20:38
|
Update of /cvsroot/arsperl/ARSperl/example In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv3163/example Modified Files: Dump_Users.pl Dump_Users_OO.pl Log Message: minor update to example scripts Index: Dump_Users_OO.pl =================================================================== RCS file: /cvsroot/arsperl/ARSperl/example/Dump_Users_OO.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Dump_Users_OO.pl 26 May 1999 03:42:46 -0000 1.2 --- Dump_Users_OO.pl 13 Mar 2007 13:20:32 -0000 1.3 *************** *** 13,16 **** --- 13,19 ---- # # $Log$ + # Revision 1.3 2007/03/13 13:20:32 jeffmurphy + # minor update to example scripts + # # Revision 1.2 1999/05/26 03:42:46 jcmurphy # minor change to exception handler *************** *** 33,36 **** --- 36,41 ---- } + my $LoginNameField = "Login name"; # earlier versions of ars used "Login Name" + my $connection = new ARS (-server => shift, -username => shift, *************** *** 38,42 **** -catch => { ARS::AR_RETURN_ERROR => "main::mycatch" }, -ctrl => undef, ! -debug => 1); print "Opening \"User\" form ..\n"; --- 43,47 ---- -catch => { ARS::AR_RETURN_ERROR => "main::mycatch" }, -ctrl => undef, ! -debug => undef); print "Opening \"User\" form ..\n"; *************** *** 44,54 **** my ($u) = $connection->openForm(-form => "User"); ! $u->setSort("Login Name", &ARS::AR_SORT_ASCENDING); my @entries = $u->query(); # empty query means "get everything" ! printf("%-30s %-45s\n", "Login Name", "Full name"); foreach my $id (@entries) { ! my($fullname, $loginname) = $u->get($id, ['Full Name', 'Login Name'] ); printf("%-30s %-45s\n", $loginname, $fullname); } --- 49,59 ---- my ($u) = $connection->openForm(-form => "User"); ! $u->setSort($LoginNameField, &ARS::AR_SORT_ASCENDING); my @entries = $u->query(); # empty query means "get everything" ! printf("%-30s %-45s\n", $LoginNameField, "Full name"); foreach my $id (@entries) { ! my($fullname, $loginname) = $u->get($id, ['Full Name', $LoginNameField] ); printf("%-30s %-45s\n", $loginname, $fullname); } Index: Dump_Users.pl =================================================================== RCS file: /cvsroot/arsperl/ARSperl/example/Dump_Users.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Dump_Users.pl 27 Mar 2003 17:58:42 -0000 1.6 --- Dump_Users.pl 13 Mar 2007 13:20:32 -0000 1.7 *************** *** 20,23 **** --- 20,26 ---- # # $Log$ + # Revision 1.7 2007/03/13 13:20:32 jeffmurphy + # minor update to example scripts + # # Revision 1.6 2003/03/27 17:58:42 jcmurphy # 5.0 changes, bug fixes *************** *** 77,81 **** # Retrieve all of the entry-id's for the schema. ! @entries = ars_GetListEntry($ctrl, $SCHEMA, $qual, 0, [], $loginname_fid, &ARS::AR_SORT_ASCENDING); --- 80,84 ---- # Retrieve all of the entry-id's for the schema. ! @entries = ars_GetListEntry($ctrl, $SCHEMA, $qual, 0, 0, [], $loginname_fid, &ARS::AR_SORT_ASCENDING); |