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

Date Directory [filter] File(s) [view] Author [filter]
28 Jul 2002 01:06:08postnuke_modules/modinfopntables.php,NONE,1.1 pninit.php,1.1,1.2Gary Mitchell
 Creation on registrations table complete

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

Modified Files:
	pninit.php 
Added Files:
	pntables.php 
Log Message:
Creation on registrations table complete


--- NEW FILE: pntables.php ---
<?php // $Id: pntables.php,v 1.1 2002/07/28 01:06:05 wb9tpg Exp $
// ----------------------------------------------------------------------
// PostNuke Content Management System
// Copyright (C) 2002 by the PostNuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Gary Mitchell
// Purpose of file:  Table information for modinfo module
// ----------------------------------------------------------------------

function modinfo_pntables()
{
    // Initialise table array
    $pntable = array();

    $registrations = pnConfigGetVar('prefix') . '_modinfo_registrations';

    // Set the table name
    $pntable['registrations'] = $registrations;

    // Return the table information
    return $pntable;
}

?>

Index: pninit.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/modinfo/pninit.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pninit.php	26 Jul 2002 23:04:04 -0000	1.1
--- pninit.php	28 Jul 2002 01:06:05 -0000	1.2
***************
*** 103,106 ****
--- 103,145 ----
      }
  
+     // +--------------------------------------------------------------------+
+     // | Create the tables for this module                                  +
+     // +--------------------------------------------------------------------+
+ 
+     /**
+      *  prepare to create the tables
+      */
+     list($dbconn) = pnDBGetConn();
+     $pntable = pnDBGetTables();
+     include ('pnadodb/pnTableDDL.php');
+ 
+     /**
+      *  the registrations table contains module registrations
+      */
+     $registrations_table = $pntable['registrations'];
+     $fields = array(
+         'pn_registration'      => array('type'=>'integer','null'=>FALSE,'increment'=>TRUE,'primary_key'=>TRUE),
+         'pn_module_name'       => array('type'=>'varchar','null'=>FALSE,'size'=>64),
+         'pn_contact_uid'       => array('type'=>'integer','null'=>FALSE),
+         'pn_contact_name'      => array('type'=>'varchar','null'=>FALSE,'size'=>254),
+         'pn_contact_email'     => array('type'=>'varchar','null'=>FALSE,'size'=>254),
+         'pn_flag_core'         => array('type'=>'integer','null'=>FALSE,'size'=>'tiny'),
+         'pn_descrition_short'  => array('type'=>'varchar','null'=>FALSE,'size'=>254),
+         'pn_descrition_long'   => array('type'=>'text',   'null'=>TRUE),
+         'pn_registration_uid'  => array('type'=>'integer','null'=>FALSE),
+         'pn_registration_date' => array('type'=>'integer','null'=>FALSE)
+     );
+     $sql = pnDBCreateTable($registrations_table ,$fields);
+     if ($sql == FALSE) {
+         pnSessionSetVar('errormsg', _CREATETABLEFAILED);
+         return false;
+     }
+     $dbconn->Execute($sql);
+     if ($dbconn->ErrorNo() != 0) {
+         pnSessionSetVar('errormsg', _CREATETABLEFAILED);
+         return false;
+     }
+ 
+ 
      return TRUE;
  }


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