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] |
03 Aug 2002 05:05:03 | postnuke_official/html/modules/base | pninit.php,1.2,1.3 | Paul Rosania |
more table definitions |
Update of /home/cvsroot/postnuke_official/html/modules/base In directory ns7.hostnuke.net:/tmp/cvs-serv3782 Modified Files: pninit.php Log Message: more table definitions Index: pninit.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/base/pninit.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pninit.php 3 Aug 2002 03:21:28 -0000 1.2 --- pninit.php 3 Aug 2002 05:05:01 -0000 1.3 *************** *** 78,82 **** // Check for db errors if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); --- 78,82 ---- // 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)); *************** *** 105,109 **** // Check for db errors if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); --- 105,109 ---- // 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)); *************** *** 136,140 **** // Check for db errors if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); --- 136,140 ---- // 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)); *************** *** 165,169 **** // Check for db errors if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); --- 165,169 ---- // 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)); *************** *** 221,225 **** // Check for db errors if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); --- 221,225 ---- // 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)); *************** *** 242,246 **** // Check for db errors if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); --- 242,246 ---- // 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)); *************** *** 260,264 **** // Check for db errors if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); --- 260,264 ---- // 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)); *************** *** 274,278 **** // Check for db errors if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); --- 274,278 ---- // 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)); *************** *** 316,320 **** // Check for db errors if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); --- 316,320 ---- // 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)); *************** *** 337,341 **** // Check for db errors if ($dbconn->ErrorNo() != 0) { ! $msg = pnMLByKey('DATABASE_ERROR', $query); pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR', new SystemException(__FILE__.'('.__LINE__.'): '.$msg)); --- 337,341 ---- // 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)); *************** *** 349,358 **** --- 349,500 ---- // *_block_group_instances // *_users + $query = pnDBCreateTable($prefix . '_users', + array('pn_uid' => array('type' => 'integer', + 'null' => false, + 'default' => '0', + 'increment' => true, + 'primary_key' => true), + 'pn_name' => array('type' => 'varchar', + 'size' => 60, + 'null' => false, + 'default' => ''), + 'pn_uname' => array('type' => 'varchar', + 'size' => 25, + 'null' => false, + 'default' => ''), + 'pn_email' => array('type' => 'varchar', + 'size' => 100, + 'null' => false, + 'default' => ''), + 'pn_pass' => array('type' => 'varchar', + 'size' => 40, + 'null' => false, + 'default' => ''), + 'pn_url' => array('type' => 'varchar', + 'size' => 100, + 'null' => false, + 'default' => ''), + 'pn_auth_module' => array('type' => 'varchar', + 'size' => 64, + 'null' => false, + 'default' => ''),)); + $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 = pnDBCreateIndex($prefix . '_users', + array('name' => 'pn_uname_index', + 'fields' => array('pn_uid'), + 'unique' => 'true')); + $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; + } + // *_user_data // *_user_perms + $query = pnDBCreateTable($prefix . '_user_perms', + array('pn_pid' => array('type' => 'integer', + 'null' => false, + 'default' => '0', + 'increment' => true, + 'primary_key' => true), + 'pn_uid' => array('type' => 'integer', + 'null' => false, + 'default' => '0'), + 'pn_sequence' => array('type' => 'integer', + 'null' => false, + 'default' => '0'), + 'pn_realm' => array('type' => 'integer', + 'null' => false, + 'default' => '0'), + 'pn_component' => array('type' => 'varchar', + 'size' => 255, + 'null' => false, + 'default' => ''), + 'pn_instance' => array('type' => 'varchar', + 'size' => 255, + 'null' => false, + 'default' => ''), + 'pn_level' => array('type' => 'integer', + 'null' => false, + 'default' => '0'), + 'pn_bond' => array('type' => 'integer', + 'null' => false, + 'default' => '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; + } + // *_user_property // *_languages (?) // Set config vars + pnConfigSetVar('sitename', 'Your Site Name'); + pnConfigSetVar('slogan', 'Your slogan here'); + + pnConfigSetVar('startpage', 'base'); + pnConfigSetVar('seclevel', 'Medium'); + pnConfigSetVar('secmeddays', 7); + pnConfigSetVar('secinactivemins', 90); + + pnConfigSetVar('Version_Num', '0.80-pre'); + pnConfigSetVar('Version_ID', 'PostNuke'); + pnConfigSetVar('Version_Sub', 'adam_baum'); + + pnConfigSetVar('Default_Theme', 'SeaBreeze'); + + // Install Base, Modules and Installer modules + $query = "INSERT INTO {$prefix}_modules (pn_name, pn_type, pn_displayname, pn_description, pn_regid, pn_directory, pn_version, pn_admin_capable, pn_user_capable, pn_state) VALUES ('modules', 2, 'Modules', 'Module configuration', 1, 'modules', '2.02', 1, 0, 3);"; + $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}_modules (pn_name, pn_type, pn_displayname, pn_description, pn_regid, pn_directory, pn_version, pn_admin_capable, pn_user_capable, pn_state) VALUES ('installer', 2, 'Installer', 'PostNuke Installer', 222, 'modules', '1.0', 1, 0, 3);"; + $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}_modules (pn_name, pn_type, pn_displayname, pn_description, pn_regid, pn_directory, pn_version, pn_admin_capable, pn_user_capable, pn_state) VALUES ('base', 2, 'base', 'Base Module', 68, 'base', '0.1', 1, 1, 3);"; + $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 // Set up default user properties, etc. *************** *** 362,366 **** // Set up blocks ! // Create admin user (l/p: admin/[current day of year(?)]) --- 504,529 ---- // Set up blocks ! // Create admin user (l/p: admin/password) and Anonymous ! $query = "INSERT INTO {$prefix}_users (pn_uid, pn_name, pn_uname, pn_email, pn_pass, pn_url, pn_auth_module) VALUES (1, '', 'Anonymous', '', '', '', '');"; ! $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}_users (pn_uid, pn_name, pn_uname, pn_email, pn_pass, pn_url, pn_auth_module) VALUES (2, 'Admin', 'Admin', 'none@none.com', '5f4dcc3b5aa765d61d8327deb882cf99', 'http://www.postnuke.com', 'authsystem');"; ! $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; ! }
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 |