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_modules / nascar [ view in CVS ]

Date Directory [filter] File(s) [view] Author [filter]
08 Aug 2002 10:18:44postnuke_modules/nascarpninit.php,1.7,1.8 pntables.php,1.3,1.4George Neill
 + added nascar_season table to keep track of seasons within leagues.

Update of /home/cvsroot/postnuke_modules/nascar
In directory ns7.hostnuke.net:/tmp/cvs-serv9439

Modified Files:
	pninit.php pntables.php 
Log Message:

+ added nascar_season table to keep track of seasons within leagues.

GNeill 2002.08.08 




Index: pninit.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/nascar/pninit.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** pninit.php	27 Jul 2002 20:53:04 -0000	1.7
--- pninit.php	8 Aug 2002 10:18:42 -0000	1.8
***************
*** 41,45 ****
      // tables array together for easy reference later on
      list($dbconn) = pnDBGetConn();
!     $pntable = pnDBGetTables();
  
      // adodb does not provide the functionality to abstract table creates
--- 41,45 ----
      // tables array together for easy reference later on
      list($dbconn) = pnDBGetConn();
!     $pntable      = pnDBGetTables();
  
      // adodb does not provide the functionality to abstract table creates
***************
*** 68,72 ****
      );
  
!     //-------------------------------------------------------------------------    
      // create the EVENTS table contains attributes on each scheduled event
      //-------------------------------------------------------------------------
--- 68,72 ----
      );
  
!     //-------------------------------------------------------------------------
      // create the EVENTS table contains attributes on each scheduled event
      //-------------------------------------------------------------------------
***************
*** 76,79 ****
--- 76,80 ----
              'pn_event_id'   => array('type'=>'integer','null'=>FALSE,'increment'=>TRUE,'primary_key'=>TRUE),
              'pn_event_name' => array('type'=>'varchar','null'=>TRUE,'size'=>255),
+             'pn_season_id'  => array('type'=>'integer','null'=>FALSE),
              'pn_league_id'  => array('type'=>'integer','null'=>FALSE),
              'pn_track_id'   => array('type'=>'integer','null'=>FALSE),
***************
*** 102,105 ****
--- 103,115 ----
          )
      );
+     $sql[] = pnDBCreateIndex(
+         $pntable['nascar_events'],
+         array(
+             'name' => 'nascar_events_3',
+             'unique' => FALSE,
+             'fields' => array('pn_season_id')
+         )
+     );
+  
     
      //-------------------------------------------------------------------------    
***************
*** 209,213 ****
      );
  
!     //-------------------------------------------------------------------------    
      // create the race RESULTS table
      //-------------------------------------------------------------------------
--- 219,223 ----
      );
  
!     //-------------------------------------------------------------------------
      // create the race RESULTS table
      //-------------------------------------------------------------------------
***************
*** 263,267 ****
      );
  
!     //-------------------------------------------------------------------------    
      // create the ROSTER table which tells us who's enrolled in each league
      //-------------------------------------------------------------------------
--- 273,277 ----
      );
  
!     //-------------------------------------------------------------------------
      // create the ROSTER table which tells us who's enrolled in each league
      //-------------------------------------------------------------------------
***************
*** 294,298 ****
      );
  
!     //-------------------------------------------------------------------------    
      // create the TRACKS table contains attributes on each track
      //-------------------------------------------------------------------------
--- 304,352 ----
      );
  
!     //-------------------------------------------------------------------------
!     // create the SEASON table contains attributes on each season 
!     // within a league
!     //-------------------------------------------------------------------------
!     $sql[] = pnDBCreateTable(
!         $pntable['nascar_season'],
!         array(
!             'pn_season_id'     => array('type'=>'integer',
!                                         'null'=>FALSE,
!                                         'primary_key'=>TRUE,
!                                         'increment'=>TRUE),
! 
!             'pn_league_id'     => array('type'=>'integer',
!                                         'null'=>FALSE),
! 
!             'pn_season_name'   => array('type'=>'varchar',
!                                         'null'=>FALSE,
!                                         'size'=>255),
! 
!             'pn_season_start'  => array('type'=>'date',
!                                         'null'=>FALSE),
! 
!             'pn_season_end'    => array('type'=>'date',
!                                         'null'=>FALSE),
! 
!             'pn_season_active' => array('type'=>'boolean'),
! 
!             'pn_created'       => array('type'=>'datetime',
!                                         'null'=>FALSE),
! 
!             'pn_updated'       => array('type'=>'timestamp',
!                                         'null'=>TRUE)
!         )
!     );
! 
!     $sql[] = pnDBCreateIndex(
!         $pntable['nascar_season'],
!         array(
!             'name' => 'nascar_season_1',
!             'unique' => TRUE,
!             'fields' => array('pn_season_name', 'pn_league_id')
!         )
!     );
! 
!     //-------------------------------------------------------------------------
      // create the TRACKS table contains attributes on each track
      //-------------------------------------------------------------------------
***************
*** 320,334 ****
      );
  
!     //-------------------------------------------------------------------------    
      // Process all the SQL Statements
      //-------------------------------------------------------------------------
      while (list($key,$sql_statement) = each($sql)) {
          if ($sql_statement == FALSE) {
!             pnSessionSetVar('errormsg', _CREATETABLEFAILED);
              return false;
          }
          $dbconn->Execute($sql_statement);
          if ($dbconn->ErrorNo() != 0) {
!             pnSessionSetVar('errormsg', _CREATETABLEFAILED);
              return false;
          }
--- 374,389 ----
      );
  
!     //-------------------------------------------------------------------------
      // Process all the SQL Statements
      //-------------------------------------------------------------------------
      while (list($key,$sql_statement) = each($sql)) {
          if ($sql_statement == FALSE) {
!             // does no good to set 'errormsg' or 'statusmsg' it will
!             // get overwritten by the 'modules' module.
              return false;
          }
          $dbconn->Execute($sql_statement);
          if ($dbconn->ErrorNo() != 0) {
!             pnSessionSetVar('statusmsg', _CREATETABLEFAILED);
              return false;
          }
***************
*** 423,427 ****
              // appropriate error message and return
              if ($dbconn->ErrorNo() != 0) {
!                 pnSessionSetVar('errormsg', _UPDATETABLEFAILED);
                  return false;
              }
--- 478,482 ----
              // appropriate error message and return
              if ($dbconn->ErrorNo() != 0) {
!                 pnSessionSetVar('statusmsg', _UPDATETABLEFAILED);
                  return false;
              }
***************
*** 472,478 ****
      $sql[] = pnDBDropTable($pntable['nascar_results']);
      $sql[] = pnDBDropTable($pntable['nascar_roster']);
      $sql[] = pnDBDropTable($pntable['nascar_tracks']);
      
!     //-------------------------------------------------------------------------    
      // Process all the SQL Statements
      //-------------------------------------------------------------------------
--- 527,534 ----
      $sql[] = pnDBDropTable($pntable['nascar_results']);
      $sql[] = pnDBDropTable($pntable['nascar_roster']);
+     $sql[] = pnDBDropTable($pntable['nascar_season']);
      $sql[] = pnDBDropTable($pntable['nascar_tracks']);
      
!     //-------------------------------------------------------------------------
      // Process all the SQL Statements
      //-------------------------------------------------------------------------
***************
*** 496,500 ****
          
      while (list($key,$var) = each($nascar_user_vars)) {
!         nascar_adminapi_unregister_user_var(array('label'     => 'nascar_'.$var));
      }
         
--- 552,556 ----
          
      while (list($key,$var) = each($nascar_user_vars)) {
!         nascar_adminapi_unregister_user_var(array('label' => 'nascar_'.$var));
      }
         
***************
*** 525,529 ****
          ($dtype != _UDCONST_STRING && $dtype != _UDCONST_TEXT &&
          $dtype != _UDCONST_FLOAT && $dtype != _UDCONST_INTEGER) ) {
!         pnSessionSetVar('errormsg', _MODARGSERROR);
          return false;
      }
--- 581,585 ----
          ($dtype != _UDCONST_STRING && $dtype != _UDCONST_TEXT &&
          $dtype != _UDCONST_FLOAT && $dtype != _UDCONST_INTEGER) ) {
!         pnSessionSetVar('statusmsg', _MODARGSERROR);
          return false;
      }
***************
*** 535,539 ****
      if (isset($validation)) {
          if (validation_parse($validation) === false) {
!             pnSessionSetVar('errormsg', _MODARGSERROR);
              return false;
          }
--- 591,595 ----
      if (isset($validation)) {
          if (validation_parse($validation) === false) {
!             pnSessionSetVar('statusmsg', _MODARGSERROR);
              return false;
          }
***************
*** 596,600 ****
      // Argument check
      if (!isset($label)) {
!         pnSessionSetVar('errormsg', _MODARGSERROR);
          return false;
      }
--- 652,656 ----
      // Argument check
      if (!isset($label)) {
!         pnSessionSetVar('statusmsg', _MODARGSERROR);
          return false;
      }
***************
*** 640,645 ****
      return true;
  }
- 
- 
  
  ?>
--- 696,699 ----

Index: pntables.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/nascar/pntables.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pntables.php	28 Jun 2002 17:33:14 -0000	1.3
--- pntables.php	8 Aug 2002 10:18:42 -0000	1.4
***************
*** 47,56 ****
      $pntable['nascar_results']      = $prefix . '_nascar_results';
      $pntable['nascar_roster']       = $prefix . '_nascar_roster';	
      $pntable['nascar_tracks']       = $prefix . '_nascar_tracks';
  
- 	
      // Return the table information
      return $pntable;
  }
  
! ?>
\ No newline at end of file
--- 47,56 ----
      $pntable['nascar_results']      = $prefix . '_nascar_results';
      $pntable['nascar_roster']       = $prefix . '_nascar_roster';	
+     $pntable['nascar_season']       = $prefix . '_nascar_season';
      $pntable['nascar_tracks']       = $prefix . '_nascar_tracks';
  
      // Return the table information
      return $pntable;
  }
  
! ?>


Directory filter : [ all ] / postnuke_modules / nascar [ 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