Xaraya / Postnuke CVS Notices - Message

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 Notice

Directory filter : [ all ] / postnuke_official / html / modules / users [ view in CVS ]


Deprecated: Function gmstrftime() is deprecated in /home/mikespub/www/list.php on line 509
Date Directory [filter] File(s) [view] Author [filter]
06 Aug 2002 15:47:36postnuke_official/html/modules/userspninit.php,1.7,1.8Paul Rosania
 decentralized table creation, split into relevant modules (somewhat)

Update of /home/cvsroot/postnuke_official/html/modules/users
In directory ns7.hostnuke.net:/tmp/cvs-serv15336/users

Modified Files:
	pninit.php 
Log Message:
decentralized table creation, split into relevant modules (somewhat)


Index: pninit.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/users/pninit.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** pninit.php	6 Jul 2002 15:45:39 -0000	1.7
--- pninit.php	6 Aug 2002 15:47:33 -0000	1.8
***************
*** 34,51 ****
      $pntable = pnDBGetTables();
  
!     $userstable = $pntable['users'];
  
      // Create the table
!     $sql = "CREATE TABLE $userstable (
!             pn_uid int(10) NOT NULL auto_increment,
!             pn_uname varchar(32) NOT NULL default '',
!             pn_name varchar(32) NOT NULL default '',
!             pn_number int(5) NOT NULL default 0,
!             PRIMARY KEY(pn_uid))";
!     $dbconn->Execute($sql);
! 
      if ($dbconn->ErrorNo() != 0) {
!         pnSessionSetVar('errormsg', 'Creation of user table failed');
!         return false;
      }
  
--- 34,163 ----
      $pntable = pnDBGetTables();
  
!     $prefix = pnConfigGetVar('prefix');
  
      // Create the table
!     // *_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
!     $query = pnDBCreateTable($prefix . '_user_data',
!                              array('pn_uda_id'     => array('type'        => 'integer',
!                                                             'null'        => false,
!                                                             'default'     => '0',
!                                                             'increment'   => true,
!                                                             'primary_key' => true),
!                                    'pn_uda_propid' => array('type'        => 'integer',
!                                                             'null'        => false,
!                                                             'default'     => '0'),
!                                    'pn_uda_uid'    => array('type'        => 'integer',
!                                                             'null'        => false,
!                                                             'default'     => '0'),
!                                    'pn_uda_value'  => array('type'        => 'blob',
!                                                             'size'        => 'medium',
!                                                             'null'        => 'false')));
!     $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
!     $query = pnDBCreateTable($prefix . '_user_property',
!                              array('pn_prop_id'         => array('type'        => 'integer',
!                                                                  'null'        => false,
!                                                                  'default'     => '0',
!                                                                  'increment'   => true,
!                                                                  'primary_key' => true),
!                                    'pn_prop_label'      => array('type'        => 'varchar',
!                                                                  'size'        => 255,
!                                                                  'null'        => false,
!                                                                  'default'     => ''),
!                                    'pn_prop_dtype'      => array('type'        => 'integer',
!                                                                  'null'        => false,
!                                                                  'default'     => NULL),
!                                    'pn_prop_default'    => array('type'        => 'varchar',
!                                                                  'size'        => 255,
!                                                                  'default'     => NULL),
!                                    'pn_prop_validation' => array('type'        => 'varchar',
!                                                                  'size'        => 255,
!                                                                  'default'     => NULL)));
!     $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 . '_user_property',
!                              array('name'   => 'pn_prop_label_index',
!                                    'fields' => array('pn_prop_label'),
!                                    '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;
      }
  
***************
*** 55,58 ****
--- 167,175 ----
      pnModSetVar('users', 'tacs', 0);
  
+     // Register blocks
+     pnBlockTypeRegister('users', 'login');
+     pnBlockTypeRegister('users', 'online');
+     pnBlockTypeRegister('users', 'user');
+     
      // Initialisation successful
      return true;


Directory filter : [ all ] / postnuke_official / html / modules / users [ view in CVS ]

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