[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup setup_demo.php,1.30.2.2,1.30.2.3
From: |
Dave Hall <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup setup_demo.php,1.30.2.2,1.30.2.3 |
Date: |
Mon, 05 May 2003 00:24:23 -0400 |
Update of /cvsroot/phpgroupware/setup
In directory subversions:/tmp/cvs-serv7664
Modified Files:
Tag: Version-0_9_16-branch
setup_demo.php
Log Message:
code clean up
Index: setup_demo.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/setup_demo.php,v
retrieving revision 1.30.2.2
retrieving revision 1.30.2.3
diff -C2 -r1.30.2.2 -r1.30.2.3
*** setup_demo.php 5 May 2003 04:03:42 -0000 1.30.2.2
--- setup_demo.php 5 May 2003 04:24:20 -0000 1.30.2.3
***************
*** 162,226 ****
$GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('manual','run'," . $defaultgroupid . ", 1)");
/* Creation of the demo accounts is optional - the checkbox is
on by default. */
if(get_var('create_demo',Array('POST')))
{
! /* Create records for demo accounts */
! $accountid =
add_account('demo','Demo','Account','guest');
!
! /* User permissions based on group membership with
additional user perms for the messenger and infolog apps */
! foreach($defaultprefs as $app => $vals)
! {
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_preferences(preference_owner,preference_app, preference_value)
VALUES($accountid, '$app', '$vals')", __LINE__, __FILE__);
! }
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('preferences','changepassword', " . $accountid . ",0)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('phpgw_group', '" . $defaultgroupid."'," . $accountid . ",1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('messenger','run'," . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('infolog','run'," . $accountid . ", 1)");
!
! $accountid =
add_account('demo2','Demo2','Account','guest');
!
! /* User permissions based solely on group membership */
! foreach($defaultprefs as $app => $vals)
! {
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_preferences(preference_owner,preference_app, preference_value)
VALUES($accountid, '$app', '$vals')", __LINE__, __FILE__);
! }
!
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('preferences','changepassword', ".$accountid.", 0)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('phpgw_group','" . $defaultgroupid . "'," . $accountid . ",1)");
!
! $accountid =
add_account('demo3','Demo3','Account','guest');
!
! /* User-specific perms, no group membership */
! foreach($defaultprefs as $app => $vals)
{
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_preferences(preference_owner,preference_app, preference_value)
VALUES($accountid, '$app', '$vals')", __LINE__, __FILE__);
}
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('preferences','changepassword', " . $accountid . ",0)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('addressbook','run', " . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('calendar','run', " . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('notes','run', " . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights) VALUES('todo','run',
" . $accountid . ", 1)");
! }
!
! /* Create records for administrator account */
! $accountid = add_account($username,$fname,$lname,$passwd);
!
! foreach($defaultprefs as $app => $vals)
! {
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_preferences(preference_owner,preference_app, preference_value)
VALUES($accountid, '$app', '$vals')", __LINE__, __FILE__);
! }
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('phpgw_group','" . $defaultgroupid."'," . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('phpgw_group','" . $admingroupid."'," . $accountid . ",1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('preferences','changepassword', " . $accountid . ",1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('admin','run'," . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('addressbook','run'," . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('filemanager','run'," . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('calendar','run'," . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('email','run'," . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('notes','run'," . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('nntp','run'," . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('todo','run'," . $accountid . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('manual','run'," . $accountid . ", 1)");
$GLOBALS['phpgw_setup']->db->transaction_commit();
--- 162,198 ----
$GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('manual','run'," . $defaultgroupid . ", 1)");
+ $accountid[0] = add_account($username,$fname,$lname,$passwd);
/* Creation of the demo accounts is optional - the checkbox is
on by default. */
if(get_var('create_demo',Array('POST')))
{
! /* Create demo accounts */
! $accountid[1] =
add_account('demo','Demo','Account','guest');
! $accountid[2] =
add_account('demo2','Demo2','Account','guest');
! $accountid[3] =
add_account('demo3','Demo3','Account','guest');
! }
! for ($i = 0; $i < count($accountid); $i++)
{
! /* User permissions based on group membership with
additional user perms for the messenger and infolog apps */
! foreach($defaultprefs as $app => $vals)
! {
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_preferences(preference_owner,preference_app, preference_value) VALUES(" .
$accountid[$i] .", '$app', '$vals')", __LINE__, __FILE__);
! }
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('phpgw_group',$defaultgroupid," . $accountid[$i] . ", 1)");
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('preferences','changepassword', " . $accountid[$i] . ",0)",__LINE__,
__FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('messenger','run'," . $accountid[$i] . ", 1)",__LINE__, __FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('infolog','run'," . $accountid[$i] . ", 1)",__LINE__, __FILE__);
}
! /* Add extra values for administrator account */
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('phpgw_group',$admingroupid," . $accountid[0] . ",1)",__LINE__,
__FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('admin','run',$admingroupid, 1)",__LINE__, __FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('addressbook','run'," . $accountid[0] . ", 1)",__LINE__, __FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('filemanager','run'," . $accountid[0] . ", 1)",__LINE__, __FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('calendar','run'," . $accountid[0] . ", 1)",__LINE__, __FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('email','run'," . $accountid[0] . ", 1)",__LINE__, __FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('notes','run'," . $accountid . ", 1)",__LINE__, __FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('nntp','run'," . $accountid[0] . ", 1)",__LINE__, __FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('todo','run'," . $accountid[0] . ", 1)",__LINE__, __FILE__);
! $GLOBALS['phpgw_setup']->db->query("INSERT INTO
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights)
VALUES('manual','run'," . $accountid[0] . ", 1)",__LINE__, __FILE__);
$GLOBALS['phpgw_setup']->db->transaction_commit();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: setup setup_demo.php,1.30.2.2,1.30.2.3,
Dave Hall <address@hidden> <=