From: Sean M. P. <peg...@us...> - 2008-04-07 18:43:42
|
Update of /cvsroot/helpmeict/Helpdesk/system In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26200/system Modified Files: Tag: v1_r1 upgrade.1.0.inc.php Log Message: Adds DB record for dateformat Index: upgrade.1.0.inc.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/upgrade.1.0.inc.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** upgrade.1.0.inc.php 10 Apr 2006 22:31:23 -0000 1.1.2.1 --- upgrade.1.0.inc.php 7 Apr 2008 18:43:36 -0000 1.1.2.2 *************** *** 7,10 **** --- 7,11 ---- Changelog: + 2008-04-02 pegasus: Added SQL code to add 'date format' global parameter 2005-07-15 arne_sf: Buffers output in array instead of displaying it immediately 2005-07-15 arne_sf: Initial version, including database schema changes by Stephan Kaufhold *************** *** 46,48 **** --- 47,64 ---- } else $output[] = "ERROR: DBMS " . $db->phptype . " not yet supported by the upgrade routine!<BR />\n"; + + // Re-initialize array (important!) + $qry = array(); + // Add 'date format' parameter with default European date format DD/MM/YY + $output[] = "Adding 'date format' parameter... "; + $qry['pgsql'] = " + INSERT INTO tbl_system_preferences VALUES (nextval(('\"tbl_system_preferences_id_seq\"'::text)::regclass), 'dateformat', '%d/%m/%y', 'The date format in PHP strftime notation', 0);"; + $qry['mysql'] = ""; + $qry['mssql'] = ""; + if ($qry[$db->phptype] != "") + { + $res = $db->query($qry[$db->phptype]); + $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; + } else $output[] = "ERROR: DBMS " . $db->phptype . " not yet supported by the upgrade routine!<BR />\n"; + ?> |