Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / modules / base [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
04 Aug 2002 05:07:19 | postnuke_official/html/modules/base | pninit.php,1.7,1.8 | Paul Rosania |
permissions set up - all steps after table creation will check perms |
Update of /home/cvsroot/postnuke_official/html/modules/base In directory ns7.hostnuke.net:/tmp/cvs-serv27330/base Modified Files: pninit.php Log Message: permissions set up - all steps after table creation will check perms Index: pninit.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/base/pninit.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pninit.php 4 Aug 2002 04:36:07 -0000 1.7 --- pninit.php 4 Aug 2002 05:07:16 -0000 1.8 *************** *** 762,770 **** } // Install basic permissions // Set up default user properties, etc. ! // Fill language list // Fill admin menu --- 762,825 ---- } + // Set up groups + $query = "INSERT INTO {$prefix}_groups (pn_gid, pn_name) VALUES (1, 'Users');"; + $dbconn->Execute($query); + + // Check for db errors + if ($dbconn->ErrorNo() != 0) { + $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); + pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', + new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); + return NULL; + } + + $query = "INSERT INTO {$prefix}_groups (pn_gid, pn_name) VALUES (2, 'Admins');"; + $dbconn->Execute($query); + + // Check for db errors + if ($dbconn->ErrorNo() != 0) { + $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); + pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', + new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); + return NULL; + } + + $query = "INSERT INTO {$prefix}_group_membership (pn_gid, pn_uid) VALUES (1, 1);"; + $dbconn->Execute($query); + + // Check for db errors + if ($dbconn->ErrorNo() != 0) { + $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); + pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', + new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); + return NULL; + } + + $query = "INSERT INTO {$prefix}_group_membership (pn_gid, pn_uid) VALUES (2, 2);"; + $dbconn->Execute($query); + + // Check for db errors + if ($dbconn->ErrorNo() != 0) { + $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); + pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', + new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); + return NULL; + } + // Install basic permissions + $query = "INSERT INTO {$prefix}_group_perms (pn_pid, pn_gid, pn_sequence, pn_realm, pn_component, pn_instance, pn_level, pn_bond) VALUES (1, 2, 1, 0, '.*', '.*', 800, 0);"; + $dbconn->Execute($query); + + // Check for db errors + if ($dbconn->ErrorNo() != 0) { + $msg = pnMLByKey('DATABASE_ERROR', $dbconn->ErrorMsg(), $query); + pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', + new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); + return NULL; + } // Set up default user properties, etc. ! // Fill language list(?) // Fill admin menu
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |