You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(103) |
Aug
(43) |
Sep
(2) |
Oct
(8) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(32) |
Feb
|
Mar
|
Apr
(10) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(30) |
Nov
(7) |
Dec
|
2007 |
Jan
|
Feb
(39) |
Mar
(12) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(6) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
(2) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Sean M. P. <peg...@us...> - 2008-07-05 16:40:49
|
Update of /cvsroot/helpmeict/Helpdesk/config In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv23508/config Added Files: Tag: v1_r1 addslashes-hack.php Log Message: The addslashes-hack script. --- NEW FILE: addslashes-hack.php --- <?php // Add slashes to gpc data for systems that don't have magic_quotes enabled. // THIS IS A HACK. It should be fixed by using database-specific escape string functions in the SQL generation code. function addslashes_deep(&$value) { $value = is_array($value) ? array_map('addslashes_deep', $value) : addslashes($value); return $value; } if (function_exists("get_magic_quotes_gpc") && !get_magic_quotes_gpc()) { addslashes_deep($_GET); addslashes_deep($_POST); addslashes_deep($_COOKIE); } ?> |
From: Sean M. P. <peg...@us...> - 2008-07-05 16:40:00
|
Update of /cvsroot/helpmeict/Helpdesk/config In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv23061/config Modified Files: Tag: v1_r1 global.conf.php Log Message: Added hack to allow HelpMeICT to work on systems with magic_quotes disabled. The correct fix for this is to add database-specific (via PEAR?) escape functions in the SQL code. Index: global.conf.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/config/global.conf.php,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** global.conf.php 18 Oct 2006 00:09:34 -0000 1.1.2.5 --- global.conf.php 5 Jul 2008 16:39:56 -0000 1.1.2.6 *************** *** 1,4 **** --- 1,6 ---- <?php + require_once("addslashes-hack.php"); + $conf = array( |
From: Sean M. P. <peg...@us...> - 2008-06-10 14:15:25
|
Update of /cvsroot/helpmeict/Helpdesk/system In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv16707/system Added Files: Tag: v1_r1 fixRemarks.php Log Message: Adding fixRemarks.php. --- NEW FILE: fixRemarks.php --- <?php /* fixRemarks.php Corrects time field in database records by adding minutes from the comments. NOTE: db.php assumes the script is in one level above system, so this script needs to be called from one level above using the provided symlink, even though it belongs in here. What's the best way to fix this? ## PAGE CONTAINS HANDYANDY MYSQL MODS ## ## Copyright (C) 2005 Andy Deakin (handyandy.org.uk) ## ---- Copyright (C) 2003 Central Manchester CLC Copyright (C) 2003 David Thorne (dav...@gm...) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2. 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. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Call this script from the root of the helpdesk system! require_once 'system/db.php'; echo "<pre>"; echo "Correcting minutes in time logs in remarks table...\n\n"; $record = db_recordset("SELECT id FROM tbl_remarks ORDER BY id DESC LIMIT 1"); $highest = $record[0][id]; $record = db_recordset("SELECT id FROM tbl_remarks ORDER BY id ASC LIMIT 1"); $lowest = $record[0][id]; echo "Remark ID range: $lowest - $highest\n\n"; for ($id=$lowest;$id<=$highest;$id++) { $record = db_recordset("SELECT remark,time FROM tbl_remarks WHERE id=$id"); $remark=split(" ",$record[0][remark]); $whereMinutes=0; foreach($remark as $key => $value) { if(eregi("minut.",$value)) { $whereMinutes=$key; break; } } if ($whereMinutes) { // If minutes were reported $minutes=intval($remark[$whereMinutes-1]); if ($minutes>0) { echo "Remark ID: $id, Minutes gleaned: $minutes, Old record: ".$record[0][time]; //echo "Remark text: ".$record[0][remark]."\n"; // For testing $time=split(":",$record[0][time]); if ($time[1]=="00") { if ($minutes<10) $time[1]="0$minutes"; else $time[1]=$minutes; $newTime=implode(":",$time); echo ", New record: $newTime\n"; $sql = "UPDATE tbl_remarks SET time = '$newTime' WHERE id=$id"; db_send($sql); } else echo ", WARNING: Record already has minutes entered. Leaving unchanged.\n"; } } } echo "\nTime record correction complete.\n"; echo "</pre>"; ?> |
From: Sean M. P. <peg...@us...> - 2008-06-10 14:14:24
|
Update of /cvsroot/helpmeict/Helpdesk In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv16181 Modified Files: Tag: v1_r1 issue.php reports.php Log Message: Corrected time display bug in reports (not showing minutes,) logging bug in remarks (not logging minutes,) and includes script fixRemarks.php which adds minutes to remarks table. Index: reports.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/reports.php,v retrieving revision 1.8.4.5.2.6 retrieving revision 1.8.4.5.2.7 diff -C2 -d -r1.8.4.5.2.6 -r1.8.4.5.2.7 *** reports.php 2 Apr 2008 16:45:36 -0000 1.8.4.5.2.6 --- reports.php 10 Jun 2008 14:14:14 -0000 1.8.4.5.2.7 *************** *** 8,11 **** --- 8,12 ---- Changelog: + 2008-06-10 pegasus: Fixed Time Spent display issue 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release *************** *** 445,449 **** $timeRS = db_recordset("SELECT SUM(time) AS ts FROM tbl_Times WHERE issue={$record['id']}"); ! $timespent = maketime($timeRS[0]['ts']); if ($timespent == '' || $timespent == '0::' || $timespent == '::') { ## $timespent = $timeRS[0]['ts']; --- 446,451 ---- $timeRS = db_recordset("SELECT SUM(time) AS ts FROM tbl_Times WHERE issue={$record['id']}"); ! //$timespent = maketime($timeRS[0]['ts']); ! $timespent = $timeRS[0]['ts']; // timeRS[0]['ts'] is already in the correct format if ($timespent == '' || $timespent == '0::' || $timespent == '::') { ## $timespent = $timeRS[0]['ts']; Index: issue.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/issue.php,v retrieving revision 1.33.4.11.2.9 retrieving revision 1.33.4.11.2.10 diff -C2 -d -r1.33.4.11.2.9 -r1.33.4.11.2.10 *** issue.php 2 Apr 2008 16:45:36 -0000 1.33.4.11.2.9 --- issue.php 10 Jun 2008 14:14:14 -0000 1.33.4.11.2.10 *************** *** 8,13 **** Changelog: ! 2008-04-02 pegasus: Added attachment ability check. (See "Deal with adding an attachment" below.) ! 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release 2005-07-02 arne_sf: Replaced all instances of column name 'user' --- 8,14 ---- Changelog: ! 2008-06-10 pegasus: Fixed bug preventing logging minutes in remarks ! 2008-04-02 pegasus: Added attachment ability check. (See "Deal with adding an attachment" below.) ! 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release 2005-07-02 arne_sf: Replaced all instances of column name 'user' *************** *** 259,263 **** if (count($time)>0) $an_additional = " an additional"; $timetrack = "Spent$an_additional $timestring on the problem."; ! $time = "$timehours:$timeminute:00"; } } --- 260,264 ---- if (count($time)>0) $an_additional = " an additional"; $timetrack = "Spent$an_additional $timestring on the problem."; ! $time = "$timehours:$timeminutes:00"; } } |
From: Sean M. P. <peg...@us...> - 2008-04-14 21:12:45
|
Update of /cvsroot/helpmeict/Helpdesk In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv3054 Modified Files: Tag: v1_r1 header.php Log Message: Uses "system_name" from global configuration in page headers. Index: header.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/header.php,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** header.php 7 Feb 2007 00:47:04 -0000 1.1.2.3 --- header.php 14 Apr 2008 21:12:26 -0000 1.1.2.4 *************** *** 38,42 **** <div class="title"> ! <h1>HelpMeICT</h1> </div> --- 38,42 ---- <div class="title"> ! <h1><?php echo $conf["system_name"];?></h1> </div> |
From: Sean M. P. <peg...@us...> - 2008-04-07 18:44:25
|
Update of /cvsroot/helpmeict/Helpdesk/system In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26604/system Modified Files: Tag: v1_r1 mail.php Log Message: Index: mail.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/mail.php,v retrieving revision 1.1.2.5.2.3 retrieving revision 1.1.2.5.2.4 diff -C2 -d -r1.1.2.5.2.3 -r1.1.2.5.2.4 *** mail.php 7 Feb 2007 00:44:14 -0000 1.1.2.5.2.3 --- mail.php 7 Apr 2008 18:44:15 -0000 1.1.2.5.2.4 *************** *** 6,9 **** --- 6,12 ---- Set of mail functions. + Changelog: + 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. + ---- *************** *** 28,31 **** --- 31,35 ---- require_once 'system/db.php'; require_once 'system/lang.php'; + require_once 'system/global_preferences.php'; // For the date format fromt the DB $mailtemplate['verify'] = "mail_verifyemail.tpl"; *************** *** 192,196 **** foreach ($remarks as $mark) { $issuetxt .= "\n------------------------\n"; ! $issuetxt .= strftime('%d/%m/%y %H:%M',$mark[reportedon]). " : ". $mark[reportedbyname]. "\n"; if ($repl) { --- 196,200 ---- foreach ($remarks as $mark) { $issuetxt .= "\n------------------------\n"; ! $issuetxt .= strftime($global_prefs['dateformat'].' %H:%M',$mark[reportedon]). " : ". $mark[reportedbyname]. "\n"; if ($repl) { |
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"; + ?> |
From: Sean M. P. <peg...@us...> - 2008-04-02 16:45:45
|
Update of /cvsroot/helpmeict/Helpdesk In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv23354 Modified Files: Tag: v1_r1 find.php issue.php myissues.php mysitesissues.php newissue.php recent.php reports.php search.php unassignedissues.php Log Message: Added 'dateformat' global parameter in the DB. Added check for ability to attach files to avoid unnecessary remark entries. Index: search.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/search.php,v retrieving revision 1.7.4.5.2.4 retrieving revision 1.7.4.5.2.5 diff -C2 -d -r1.7.4.5.2.4 -r1.7.4.5.2.5 *** search.php 18 Oct 2006 00:09:34 -0000 1.7.4.5.2.4 --- search.php 2 Apr 2008 16:45:36 -0000 1.7.4.5.2.5 *************** *** 9,12 **** --- 9,13 ---- Changelog: + 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release 2005-07-03 arne_sf: Replaced all instances of column name 'user' for table tbl_UserSites with 'userid' *************** *** 450,457 **** print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime('%d/%m/%y',$record[publishedon]) == strftime('%d/%m/%y')) { print strftime('%H:%M',$record[publishedon]); } else { ! print strftime('%d/%m/%y',$record[publishedon]); } print "</td>\n"; --- 451,458 ---- print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime($global_prefs['dateformat'],$record[publishedon]) == strftime($global_prefs['dateformat'])) { print strftime('%H:%M',$record[publishedon]); } else { ! print strftime($global_prefs['dateformat'],$record[publishedon]); } print "</td>\n"; Index: recent.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/recent.php,v retrieving revision 1.4.4.5.2.5 retrieving revision 1.4.4.5.2.6 diff -C2 -d -r1.4.4.5.2.5 -r1.4.4.5.2.6 *** recent.php 23 Oct 2006 12:37:15 -0000 1.4.4.5.2.5 --- recent.php 2 Apr 2008 16:45:36 -0000 1.4.4.5.2.6 *************** *** 8,11 **** --- 8,12 ---- Changelog: + 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release *************** *** 120,127 **** print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime('%d/%m/%y',$record[publishedon]) == strftime('%d/%m/%y')) { print strftime('%H:%M',$record[publishedon]); } else { ! print strftime('%d/%m/%y',$record[publishedon]); } print "</td>\n"; --- 121,128 ---- print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime($global_prefs['dateformat'],$record[publishedon]) == strftime($global_prefs['dateformat'])) { print strftime('%H:%M',$record[publishedon]); } else { ! print strftime($global_prefs['dateformat'],$record[publishedon]); } print "</td>\n"; Index: issue.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/issue.php,v retrieving revision 1.33.4.11.2.8 retrieving revision 1.33.4.11.2.9 diff -C2 -d -r1.33.4.11.2.8 -r1.33.4.11.2.9 *** issue.php 7 Feb 2007 00:44:13 -0000 1.33.4.11.2.8 --- issue.php 2 Apr 2008 16:45:36 -0000 1.33.4.11.2.9 *************** *** 8,11 **** --- 8,13 ---- Changelog: + 2008-04-02 pegasus: Added attachment ability check. (See "Deal with adding an attachment" below.) + 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release 2005-07-02 arne_sf: Replaced all instances of column name 'user' *************** *** 301,308 **** // Deal with adding an attachment ! if ($_FILES['attachment']['error'] == UPLOAD_ERR_OK) { ! $attachment_dir = get_attachment_dir($id, true); ! move_uploaded_file($_FILES['attachment']['tmp_name'], $attachment_dir."/".$_FILES['attachment']['name']); ! $track .= "File \'".$_FILES['attachment']['name']."\' attached to issue.\n"; } --- 303,313 ---- // Deal with adding an attachment ! if (function_exists('finfo_open')) { ! // Need some kind of check to see if an attempt to attach has occurred otherwise every remark adds "file '' added to issue". ! if ($_FILES['attachment']['error'] == UPLOAD_ERR_OK) { ! $attachment_dir = get_attachment_dir($id, true); ! move_uploaded_file($_FILES['attachment']['tmp_name'], $attachment_dir."/".$_FILES['attachment']['name']); ! $track .= "File \'".$_FILES['attachment']['name']."\' attached to issue.\n"; ! } } *************** *** 456,460 **** <div class="name"><?php echo gettext("Published On")?>:</div> <div class="value"> ! <?php echo strftime('%d/%m/%y %H:%M')?> </div> </div> --- 461,465 ---- <div class="name"><?php echo gettext("Published On")?>:</div> <div class="value"> ! <?php echo strftime($global_prefs['dateformat'].' %H:%M')?> </div> </div> *************** *** 908,912 **** <div class="labelfieldpair"> <div class="name"><?php echo gettext("Created On")?>:</div> ! <div class="value"><?php echo strftime('%d/%m/%y %H:%M',$issue[0][createdon])?></div> </div> <?php if ($acl['view_reportedby']) { ?> --- 913,917 ---- <div class="labelfieldpair"> <div class="name"><?php echo gettext("Created On")?>:</div> ! <div class="value"><?php echo strftime($global_prefs['dateformat'].' %H:%M',$issue[0][createdon])?></div> </div> <?php if ($acl['view_reportedby']) { ?> *************** *** 1390,1406 **** } ?> ! <div class="remarklabel"> ! <?php echo strftime('%d/%m/%y %H:%M',$record[reportedon])?><br /> ! <?php if ($acl['view_reportedby']) { ! echo $record['reportedbyname']; ! }?> ! </div> ! <?php if ($acl['edit_remark']) {?> ! <div class="remarklabelright"> ! <input type="checkbox" name="selectremark[]" id="selectremark<?php echo $record[id]?>" value="<?php echo $record[id]?>" onclick="hideConfidentiality(this,'remark<?php echo $record[id]?>','#FFFFFF')" /> ! </div> ! <?php }?> ! <div class="remark"><?php echo ($record[confidential] == 1?'<strong>['. gettext("Confidential") .']</strong> ':'')?><?php loc_remarks($rmitems, $record[remark])?></div> ! </div> <?php } --- 1395,1411 ---- } ?> ! <div class="remarklabel"> ! <?php echo strftime($global_prefs['dateformat'].' %H:%M',$record[reportedon])?><br /> ! <?php if ($acl['view_reportedby']) { ! echo $record['reportedbyname']; ! }?> ! </div> ! <?php if ($acl['edit_remark']) {?> ! <div class="remarklabelright"> ! <input type="checkbox" name="selectremark[]" id="selectremark<?php echo $record[id]?>" value="<?php echo $record[id]?>" onclick="hideConfidentiality(this,'remark<?php echo $record[id]?>','#FFFFFF')" /> ! </div> ! <?php }?> ! <div class="remark"><?php echo ($record[confidential] == 1?'<strong>['. gettext("Confidential") .']</strong> ':'')?><?php loc_remarks($rmitems, $record[remark])?></div> ! </div> <?php } Index: find.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/find.php,v retrieving revision 1.12.4.5.2.4 retrieving revision 1.12.4.5.2.5 diff -C2 -d -r1.12.4.5.2.4 -r1.12.4.5.2.5 *** find.php 18 Oct 2006 00:09:34 -0000 1.12.4.5.2.4 --- find.php 2 Apr 2008 16:45:35 -0000 1.12.4.5.2.5 *************** *** 9,12 **** --- 9,14 ---- Changelog: + 2008-04-02 pegasus: Changed hard-coded date format display to use a new 'dateformat' global pref from the DB.* + * This still needs to be applied to the date entry, validation, and calendar portions as well. 2006-01-14 dave: Cleaned up code for v1.0 release 2005-07-03 arne_sf: Replaced all instances of column name 'user' for table tbl_UserSites with 'userid' *************** *** 567,574 **** print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime('%d/%m/%y',$record[createdon]) == strftime('%d/%m/%y')) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime('%d/%m/%y',$record[createdon]); } print "</td>\n"; --- 569,576 ---- print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime($global_prefs['dateformat'],$record[createdon]) == strftime($global_prefs['dateformat'])) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime($global_prefs['dateformat'],$record[createdon]); } print "</td>\n"; Index: mysitesissues.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/mysitesissues.php,v retrieving revision 1.3.4.6.2.4 retrieving revision 1.3.4.6.2.5 diff -C2 -d -r1.3.4.6.2.4 -r1.3.4.6.2.5 *** mysitesissues.php 18 Oct 2006 00:09:34 -0000 1.3.4.6.2.4 --- mysitesissues.php 2 Apr 2008 16:45:36 -0000 1.3.4.6.2.5 *************** *** 9,12 **** --- 9,13 ---- Changelog: + 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release 2005-07-03 arne_sf: Replaced all instances of column name 'user' for table tbl_UserSites with 'userid' *************** *** 265,272 **** print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime('%d/%m/%y',$record[createdon]) == strftime('%d/%m/%y')) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime('%d/%m/%y',$record[createdon]); } print "</td>\n"; --- 266,273 ---- print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime($global_prefs['dateformat'],$record[createdon]) == strftime($global_prefs['dateformat'])) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime($global_prefs['dateformat'],$record[createdon]); } print "</td>\n"; Index: unassignedissues.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/unassignedissues.php,v retrieving revision 1.5.4.8.2.3 retrieving revision 1.5.4.8.2.4 diff -C2 -d -r1.5.4.8.2.3 -r1.5.4.8.2.4 *** unassignedissues.php 17 Oct 2006 11:19:32 -0000 1.5.4.8.2.3 --- unassignedissues.php 2 Apr 2008 16:45:36 -0000 1.5.4.8.2.4 *************** *** 9,12 **** --- 9,13 ---- Changelog: + 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release 2005-07-02 arne_sf: Replaced all instances of column name 'user' for *************** *** 277,284 **** print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime('%d/%m/%y',$record[createdon]) == strftime('%d/%m/%y')) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime('%d/%m/%y',$record[createdon]); } print "</td>\n"; --- 278,285 ---- print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime($global_prefs['dateformat'],$record[createdon]) == strftime($global_prefs['dateformat'])) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime($global_prefs['dateformat'],$record[createdon]); } print "</td>\n"; Index: reports.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/reports.php,v retrieving revision 1.8.4.5.2.5 retrieving revision 1.8.4.5.2.6 diff -C2 -d -r1.8.4.5.2.5 -r1.8.4.5.2.6 *** reports.php 6 Nov 2006 18:16:47 -0000 1.8.4.5.2.5 --- reports.php 2 Apr 2008 16:45:36 -0000 1.8.4.5.2.6 *************** *** 8,11 **** --- 8,12 ---- Changelog: + 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release 2005-07-02 arne_sf: Replaced all instances of column name 'user' for table tbl_UserSites with 'userid' *************** *** 482,489 **** print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime('%d/%m/%y',$record[createdon]) == strftime('%d/%m/%y')) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime('%d/%m/%y',$record[createdon]); } print "</td>\n"; --- 483,490 ---- print " <td class=\"$class\"><a href=\"issue.php?id=${record[id]}\">${record[id]}</a></td>\n"; print " <td class=\"$class\">"; ! if (strftime($global_prefs['dateformat'],$record[createdon]) == strftime($global_prefs['dateformat'])) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime($global_prefs['dateformat'],$record[createdon]); } print "</td>\n"; Index: myissues.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/myissues.php,v retrieving revision 1.3.4.6.2.3 retrieving revision 1.3.4.6.2.4 diff -C2 -d -r1.3.4.6.2.3 -r1.3.4.6.2.4 *** myissues.php 17 Oct 2006 11:19:32 -0000 1.3.4.6.2.3 --- myissues.php 2 Apr 2008 16:45:36 -0000 1.3.4.6.2.4 *************** *** 13,16 **** --- 13,17 ---- Changelog: + 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release *************** *** 275,290 **** if ($closed == 'true') { print " <td class=\"$class\">"; ! if (strftime('%d/%m/%y',$record[closedon]) == strftime('%d/%m/%y')) { print strftime('%H:%M',$record[closedon]); } else { ! print strftime('%d/%m/%y',$record[closedon]); } print "</td>\n"; } else { print " <td class=\"$class\">"; ! if (strftime('%d/%m/%y',$record[createdon]) == strftime('%d/%m/%y')) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime('%d/%m/%y',$record[createdon]); } print "</td>\n"; --- 276,291 ---- if ($closed == 'true') { print " <td class=\"$class\">"; ! if (strftime($global_prefs['dateformat'],$record[closedon]) == strftime($global_prefs['dateformat'])) { print strftime('%H:%M',$record[closedon]); } else { ! print strftime($global_prefs['dateformat'],$record[closedon]); } print "</td>\n"; } else { print " <td class=\"$class\">"; ! if (strftime($global_prefs['dateformat'],$record[createdon]) == strftime($global_prefs['dateformat'])) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime($global_prefs['dateformat'],$record[createdon]); } print "</td>\n"; *************** *** 434,441 **** if ($closed == 'true') { print " <td class=\"$class\">"; ! if (strftime('%d/%m/%y',$record[closedon]) == strftime('%d/%m/%y')) { print strftime('%H:%M',$record[closedon]); } else { ! print strftime('%d/%m/%y',$record[closedon]); } print "</td>\n"; --- 435,442 ---- if ($closed == 'true') { print " <td class=\"$class\">"; ! if (strftime($global_prefs['dateformat'],$record[closedon]) == strftime($global_prefs['dateformat'])) { print strftime('%H:%M',$record[closedon]); } else { ! print strftime($global_prefs['dateformat'],$record[closedon]); } print "</td>\n"; *************** *** 443,450 **** } else { print " <td class=\"$class\">"; ! if (strftime('%d/%m/%y',$record[createdon]) == strftime('%d/%m/%y')) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime('%d/%m/%y',$record[createdon]); } print "</td>\n"; --- 444,451 ---- } else { print " <td class=\"$class\">"; ! if (strftime($global_prefs['dateformat'],$record[createdon]) == strftime($global_prefs['dateformat'])) { print strftime('%H:%M',$record[createdon]); } else { ! print strftime($global_prefs['dateformat'],$record[createdon]); } print "</td>\n"; Index: newissue.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/newissue.php,v retrieving revision 1.9.4.9.2.5 retrieving revision 1.9.4.9.2.6 diff -C2 -d -r1.9.4.9.2.5 -r1.9.4.9.2.6 *** newissue.php 7 Feb 2007 00:44:13 -0000 1.9.4.9.2.5 --- newissue.php 2 Apr 2008 16:45:36 -0000 1.9.4.9.2.6 *************** *** 10,13 **** --- 10,14 ---- Changelog: + 2008-04-02 pegasus: Changed hard-coded date formats to use a new 'dateformat' global pref from the DB. 2006-01-14 dave: Cleaned up code for v1.0 release 2005-07-02 arne_sf: Replaced all instances of column name 'user' for table tbl_UserSites with 'userid' *************** *** 307,311 **** <div class="labelfieldpair"> <div class="name"><label><?php echo gettext("Created On")?></label></div> ! <div class="value"><?php echo strftime('%d/%m/%y %H:%M',time())?></div> </div> <?php --- 308,312 ---- <div class="labelfieldpair"> <div class="name"><label><?php echo gettext("Created On")?></label></div> ! <div class="value"><?php echo strftime($global_prefs['dateformat'].' %H:%M',time())?></div> </div> <?php |
From: Scott P. <sp...@sb...> - 2007-10-30 21:39:39
|
Dax... I was looking to getting this in myself. Let me look in your code and test and if it works I will check it in post 1.0. Thanks, Scott Parker Senior Multi-Media Engineer Sinclair Broadcast Group Avid Support Email: avi...@sb... Avid Support Hotline: 410-568-1632 Voice: 410-568-1577 Fax: 410-568-2121 Email: sp...@sb... Dax Bunce wrote, On 10/25/2007 9:54 PM: > Sorry, I diffed the wrong file! > I'll just attach the correct file for review, > Cheers > Dax > Dax Bunce wrote: >> Hi, >> I don't know what the process of submitting changes is, so I thought >> I'd just send the changes to this list and if anyone thinks this code >> is useful then they can add it to the codebase. >> >> What this does is add an "Import from LDAP" feature alongside the >> "Import from CSV" button. It then prompts for the servername, bind >> account and password. It then returns a list of users and imports them. >> >> Heres the diff output from sitesandusers.php CVS version 1.22 >> >> I can provide the entire file if thats more useful? >> >> Cheers >> Dax >> -------------------------------------------------------------------------------------- >> >> # diff sitesandusers.php ../helpdeskcvs/sitesandusers.php >> 63c63 >> < global $act, $usertype, $message, $users, $is_pgsql, $iuds, $ldap, >> $lpass,$loginname, $ldapname, $ldapmail, $server, $basedn, $ds, $data; >> --- >> > global $act, $usertype, $message, $users, $is_pgsql, $iuds, $ldap; >> 65a66 >> > >> 131,138c132 >> < 'ldap', >> < 'server', >> < 'basedn', >> < 'lname', >> < 'lpass', >> < 'loginname', >> < 'ldapname', >> < 'ldapmail', >> --- >> > 'ldap' >> 547,697d540 >> < // Dax Changes start here: >> < // Action: Import users from LDAP Action >> < if ($act == 'importldapaction') { >> < < if (!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { >> < die("Failed to set protocol version to 3"); >> < } >> < >> < // Connect to LDAP server >> < if (!($connect=ldap_connect($server))) { >> < die("Could not connect to ldap server"); >> < } >> < < if (!($bind=ldap_bind($connect, $lname, $lpass))) { >> < die("Unable to bind to server " . >> < "(invalid lookup username/password?)"); >> < < } >> < >> < // Lookup the details via LDAP >> < < $filter = "(&(objectClass=user)(".$loginname."=*))"; >> < < if (!($search=ldap_search($connect, $basedn, $filter))) { >> < die("Unable to search ldap server."); >> < } >> < < $number_returned = ldap_count_entries($connect,$search); >> < $info = ldap_get_entries($connect, $search); >> < < if ($number_returned == 0) { >> < die("Search for user returned no results (Either the user >> doesn't" >> < . "exist or the lookup username does not have the" >> < . "required priviledges to search."); >> < } >> < < $act = ''; >> < $row = 0; >> < $skippedrows = array(); >> < $ignoredrows = array(); >> < $insertedrows = array(); >> < $importedrows = array(); < foreach ($info as $key2 => >> $rsts) { >> < if ($rsts[$ldapname][0]) { >> < $data[0] = $rsts[$ldapname][0]; >> < } >> < if ($rsts[$loginname][0]) { >> < $data[1] = $rsts[$loginname][0]; >> < } >> < $row++; >> < $num = count ($data); >> < if ($num != 3) { >> < $skippedrows[] = $row; >> < } else if (substr(strtolower(trim($data[1])), -9) == >> '{deleted}') { >> < $invalidusernamerows[] = $row; >> < } else { >> < $usersRS = db_recordset("SELECT * FROM tbl_Users WHERE >> \"username\"='" . addslashes(strtolower(trim($data[1]))) . "'"); >> < if (count($usersRS) == 0) { >> < // Add user >> < < $data[0] = str_replace("'", "", $data[0] ); >> < >> < db_send("INSERT INTO tbl_Users >> (name,username,pass,available,email,ldap) VALUES >> ('".trim($data[0])."','" . strtolower(trim($data[1])) . "','" . >> md5(strtolower(trim($data[1]))) . "',1,'" . trim($data[2]) . "',1)"); >> < < $userset = db_recordset("SELECT >> currval('tbl_users_id_seq') AS val FROM tbl_Users;"); >> < $user = $userset[0][val]; >> < < db_send("INSERT INTO tbl_UserDomains >> (userid,domain,defaultflag) VALUES ($user,$_SESSION[_domain],1);"); >> < < $insertedrows[] = $row; >> < } else { >> < $ignoredrows[] = $row; >> < } >> < } >> < $data = array(); >> < } < < if ((count($insertedrows)+count($importedrows))>0) { >> < $message = 'NOTE: ' . >> (count($insertedrows)+count($importedrows)) . ' users successfully >> imported.'; >> < } else { >> < $message = 'NOTE: No users imported.'; >> < } >> < $message .= '<br />› <strong> ' . $row . ' records found >> in file</strong>.'; >> < if (count($skippedrows)>0) { >> < $message .= '<br />› <strong> ' . count($skippedrows) . >> ' malformed records were skipped</strong>.'; >> < } >> < if (count($ignoredrows)>0) { >> < $message .= '<br />› <strong> ' . count($ignoredrows) . >> ' duplicate records were ignored</strong>.'; >> < } >> < if (count($invalidusernamerows)>0) { >> < $message .= '<br />› <strong> ' . >> count($invalidusernamerows) . ' >> < records with invalid usernames (i.e. with the suffix >> {deleted}) were >> < skipped</strong>.'; >> < } >> < < } >> < // Action: Import users from LDAP >> < if ($act == 'importldap') { >> < < display($message); >> < ?> >> < < <div class="maintitle"> >> < <h1>Import Users</h1> >> < </div> >> < <div class="maindark"> >> < <p>Upload user list from LDAP</p></div> >> < <div class="main"> >> < <p>This will import all users defined in the organisational >> unit defined below, any users that already exist will be ignnored. The >> predefined values are suitable for Active Directory imports. >> < </p> >> < <form method="post"> >> < <input type="hidden" name="act" value="importldapaction" /> >> < <div class="labelfieldpair"> >> < <div class="label"><label for="server">LDAP >> server:</label></div> >> < <div class="field"><input type="text" name="server" >> id="server" size="20" maxlength="40" value="ldapservername.domain.com" >> /></div> >> < </div> >> < <div class="labelfieldpair"> >> < <div class="label"><label for="basedn">Base DN:</label></div> >> < <div class="field"><input type="text" name="basedn" >> id="basedn" size="20" maxlength="80" value="ou=Domain >> Users,dc=corp,dc=domain,dc=com" /></div> >> < </div> >> < <div class="labelfieldpair"> >> < <div class="label"><label for="lname">Lookup >> Username:</label></div> >> < <div class="field"><input type="text" name="lname" >> id="lname" size="20" maxlength="40" value="search" /></div> >> < </div> >> < <div class="labelfieldpair"> >> < <div class="label"><label for="lpass">Lookup >> Password:</label></div> >> < <div class="field"><input type="text" name="lpass" >> id="lpass" size="20" maxlength="40" value="" /></div> >> < </div> >> < <div class="labelfieldpair"> >> < <div class="label"><label for="loginname">LDAP >> username:</label></div> >> < <div class="field"><input type="text" name="loginname" >> id="loginname" size="20" maxlength="40" value="samaccountname" /></div> >> < </div> >> < <div class="labelfieldpair"> >> < <div class="label"><label for="ldapname">LDAP Full >> Name:</label></div> >> < <div class="field"><input type="text" name="ldapname" >> id="ldapname" size="20" maxlength="40" value="cn" /></div> >> < </div> >> < <div class="buttonpanel"> >> < <input name="submit" type="submit" id="submit" >> value="Import!" /> >> < <input name="reset" type="reset" id="reset" value="Reset" /> >> < <input name="cancel" type="button" id="cancel" >> value="Cancel" onclick="document.location='sitesandusers.php'" /> >> < </div> >> < </form> >> < </div> >> < >> < <?php >> < < < } >> < >> < //Dax changes finish >> < >> 783d625 >> < <input type="button" value="From LDAP..." >> onclick="mainSubmit('importldap')" /><br /> >> [root@asu-apache-01 helpdesk]# >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Helpmeict-cvs mailing list >> Hel...@li... >> https://lists.sourceforge.net/lists/listinfo/helpmeict-cvs >> > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Helpmeict-cvs mailing list > Hel...@li... > https://lists.sourceforge.net/lists/listinfo/helpmeict-cvs |
From: Dax B. <db...@pe...> - 2007-10-26 01:54:58
|
Sorry, I diffed the wrong file! I'll just attach the correct file for review, Cheers Dax Dax Bunce wrote: > Hi, > I don't know what the process of submitting changes is, so I thought I'd > just send the changes to this list and if anyone thinks this code is > useful then they can add it to the codebase. > > What this does is add an "Import from LDAP" feature alongside the > "Import from CSV" button. It then prompts for the servername, bind > account and password. It then returns a list of users and imports them. > > Heres the diff output from sitesandusers.php CVS version 1.22 > > I can provide the entire file if thats more useful? > > Cheers > Dax > -------------------------------------------------------------------------------------- > # diff sitesandusers.php ../helpdeskcvs/sitesandusers.php > 63c63 > < global $act, $usertype, $message, $users, $is_pgsql, $iuds, $ldap, > $lpass,$loginname, $ldapname, $ldapmail, $server, $basedn, $ds, $data; > --- > > global $act, $usertype, $message, $users, $is_pgsql, $iuds, $ldap; > 65a66 > > > 131,138c132 > < 'ldap', > < 'server', > < 'basedn', > < 'lname', > < 'lpass', > < 'loginname', > < 'ldapname', > < 'ldapmail', > --- > > 'ldap' > 547,697d540 > < // Dax Changes start here: > < // Action: Import users from LDAP Action > < if ($act == 'importldapaction') { > < > < if (!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { > < die("Failed to set protocol version to 3"); > < } > < > < // Connect to LDAP server > < if (!($connect=ldap_connect($server))) { > < die("Could not connect to ldap server"); > < } > < > < if (!($bind=ldap_bind($connect, $lname, $lpass))) { > < die("Unable to bind to server " . > < "(invalid lookup username/password?)"); > < > < } > < > < // Lookup the details via LDAP > < > < $filter = "(&(objectClass=user)(".$loginname."=*))"; > < > < if (!($search=ldap_search($connect, $basedn, $filter))) { > < die("Unable to search ldap server."); > < } > < > < $number_returned = ldap_count_entries($connect,$search); > < $info = ldap_get_entries($connect, $search); > < > < if ($number_returned == 0) { > < die("Search for user returned no results (Either the user doesn't" > < . "exist or the lookup username does not have the" > < . "required priviledges to search."); > < } > < > < $act = ''; > < $row = 0; > < $skippedrows = array(); > < $ignoredrows = array(); > < $insertedrows = array(); > < $importedrows = array(); > < foreach ($info as $key2 => $rsts) { > < if ($rsts[$ldapname][0]) { > < $data[0] = $rsts[$ldapname][0]; > < } > < if ($rsts[$loginname][0]) { > < $data[1] = $rsts[$loginname][0]; > < } > < $row++; > < $num = count ($data); > < if ($num != 3) { > < $skippedrows[] = $row; > < } else if (substr(strtolower(trim($data[1])), -9) == '{deleted}') { > < $invalidusernamerows[] = $row; > < } else { > < $usersRS = db_recordset("SELECT * FROM tbl_Users WHERE > \"username\"='" . addslashes(strtolower(trim($data[1]))) . "'"); > < if (count($usersRS) == 0) { > < // Add user > < > < $data[0] = str_replace("'", "", $data[0] ); > < > < db_send("INSERT INTO tbl_Users > (name,username,pass,available,email,ldap) VALUES > ('".trim($data[0])."','" . strtolower(trim($data[1])) . "','" . > md5(strtolower(trim($data[1]))) . "',1,'" . trim($data[2]) . "',1)"); > < > < $userset = db_recordset("SELECT currval('tbl_users_id_seq') AS > val FROM tbl_Users;"); > < $user = $userset[0][val]; > < > < db_send("INSERT INTO tbl_UserDomains > (userid,domain,defaultflag) VALUES ($user,$_SESSION[_domain],1);"); > < > < $insertedrows[] = $row; > < } else { > < $ignoredrows[] = $row; > < } > < } > < $data = array(); > < } > < > < if ((count($insertedrows)+count($importedrows))>0) { > < $message = 'NOTE: ' . > (count($insertedrows)+count($importedrows)) . ' users successfully > imported.'; > < } else { > < $message = 'NOTE: No users imported.'; > < } > < $message .= '<br />› <strong> ' . $row . ' records found in > file</strong>.'; > < if (count($skippedrows)>0) { > < $message .= '<br />› <strong> ' . count($skippedrows) . ' > malformed records were skipped</strong>.'; > < } > < if (count($ignoredrows)>0) { > < $message .= '<br />› <strong> ' . count($ignoredrows) . ' > duplicate records were ignored</strong>.'; > < } > < if (count($invalidusernamerows)>0) { > < $message .= '<br />› <strong> ' . > count($invalidusernamerows) . ' > < records with invalid usernames (i.e. with the suffix > {deleted}) were > < skipped</strong>.'; > < } > < > < } > < // Action: Import users from LDAP > < if ($act == 'importldap') { > < > < display($message); > < ?> > < > < <div class="maintitle"> > < <h1>Import Users</h1> > < </div> > < <div class="maindark"> > < <p>Upload user list from LDAP</p></div> > < <div class="main"> > < <p>This will import all users defined in the organisational unit > defined below, any users that already exist will be ignnored. The > predefined values are suitable for Active Directory imports. > < </p> > < <form method="post"> > < <input type="hidden" name="act" value="importldapaction" /> > < <div class="labelfieldpair"> > < <div class="label"><label for="server">LDAP server:</label></div> > < <div class="field"><input type="text" name="server" > id="server" size="20" maxlength="40" value="ldapservername.domain.com" > /></div> > < </div> > < <div class="labelfieldpair"> > < <div class="label"><label for="basedn">Base DN:</label></div> > < <div class="field"><input type="text" name="basedn" > id="basedn" size="20" maxlength="80" value="ou=Domain > Users,dc=corp,dc=domain,dc=com" /></div> > < </div> > < <div class="labelfieldpair"> > < <div class="label"><label for="lname">Lookup > Username:</label></div> > < <div class="field"><input type="text" name="lname" id="lname" > size="20" maxlength="40" value="search" /></div> > < </div> > < <div class="labelfieldpair"> > < <div class="label"><label for="lpass">Lookup > Password:</label></div> > < <div class="field"><input type="text" name="lpass" id="lpass" > size="20" maxlength="40" value="" /></div> > < </div> > < <div class="labelfieldpair"> > < <div class="label"><label for="loginname">LDAP > username:</label></div> > < <div class="field"><input type="text" name="loginname" > id="loginname" size="20" maxlength="40" value="samaccountname" /></div> > < </div> > < <div class="labelfieldpair"> > < <div class="label"><label for="ldapname">LDAP Full > Name:</label></div> > < <div class="field"><input type="text" name="ldapname" > id="ldapname" size="20" maxlength="40" value="cn" /></div> > < </div> > < <div class="buttonpanel"> > < <input name="submit" type="submit" id="submit" value="Import!" /> > < <input name="reset" type="reset" id="reset" value="Reset" /> > < <input name="cancel" type="button" id="cancel" value="Cancel" > onclick="document.location='sitesandusers.php'" /> > < </div> > < </form> > < </div> > < > < <?php > < > < > < } > < > < //Dax changes finish > < > 783d625 > < <input type="button" value="From LDAP..." > onclick="mainSubmit('importldap')" /><br /> > [root@asu-apache-01 helpdesk]# > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Helpmeict-cvs mailing list > Hel...@li... > https://lists.sourceforge.net/lists/listinfo/helpmeict-cvs > |
From: Dax B. <db...@pe...> - 2007-10-26 01:28:59
|
Hi, I don't know what the process of submitting changes is, so I thought I'd just send the changes to this list and if anyone thinks this code is useful then they can add it to the codebase. What this does is add an "Import from LDAP" feature alongside the "Import from CSV" button. It then prompts for the servername, bind account and password. It then returns a list of users and imports them. Heres the diff output from sitesandusers.php CVS version 1.22 I can provide the entire file if thats more useful? Cheers Dax -------------------------------------------------------------------------------------- # diff sitesandusers.php ../helpdeskcvs/sitesandusers.php 63c63 < global $act, $usertype, $message, $users, $is_pgsql, $iuds, $ldap, $lpass,$loginname, $ldapname, $ldapmail, $server, $basedn, $ds, $data; --- > global $act, $usertype, $message, $users, $is_pgsql, $iuds, $ldap; 65a66 > 131,138c132 < 'ldap', < 'server', < 'basedn', < 'lname', < 'lpass', < 'loginname', < 'ldapname', < 'ldapmail', --- > 'ldap' 547,697d540 < // Dax Changes start here: < // Action: Import users from LDAP Action < if ($act == 'importldapaction') { < < if (!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { < die("Failed to set protocol version to 3"); < } < < // Connect to LDAP server < if (!($connect=ldap_connect($server))) { < die("Could not connect to ldap server"); < } < < if (!($bind=ldap_bind($connect, $lname, $lpass))) { < die("Unable to bind to server " . < "(invalid lookup username/password?)"); < < } < < // Lookup the details via LDAP < < $filter = "(&(objectClass=user)(".$loginname."=*))"; < < if (!($search=ldap_search($connect, $basedn, $filter))) { < die("Unable to search ldap server."); < } < < $number_returned = ldap_count_entries($connect,$search); < $info = ldap_get_entries($connect, $search); < < if ($number_returned == 0) { < die("Search for user returned no results (Either the user doesn't" < . "exist or the lookup username does not have the" < . "required priviledges to search."); < } < < $act = ''; < $row = 0; < $skippedrows = array(); < $ignoredrows = array(); < $insertedrows = array(); < $importedrows = array(); < foreach ($info as $key2 => $rsts) { < if ($rsts[$ldapname][0]) { < $data[0] = $rsts[$ldapname][0]; < } < if ($rsts[$loginname][0]) { < $data[1] = $rsts[$loginname][0]; < } < $row++; < $num = count ($data); < if ($num != 3) { < $skippedrows[] = $row; < } else if (substr(strtolower(trim($data[1])), -9) == '{deleted}') { < $invalidusernamerows[] = $row; < } else { < $usersRS = db_recordset("SELECT * FROM tbl_Users WHERE \"username\"='" . addslashes(strtolower(trim($data[1]))) . "'"); < if (count($usersRS) == 0) { < // Add user < < $data[0] = str_replace("'", "", $data[0] ); < < db_send("INSERT INTO tbl_Users (name,username,pass,available,email,ldap) VALUES ('".trim($data[0])."','" . strtolower(trim($data[1])) . "','" . md5(strtolower(trim($data[1]))) . "',1,'" . trim($data[2]) . "',1)"); < < $userset = db_recordset("SELECT currval('tbl_users_id_seq') AS val FROM tbl_Users;"); < $user = $userset[0][val]; < < db_send("INSERT INTO tbl_UserDomains (userid,domain,defaultflag) VALUES ($user,$_SESSION[_domain],1);"); < < $insertedrows[] = $row; < } else { < $ignoredrows[] = $row; < } < } < $data = array(); < } < < if ((count($insertedrows)+count($importedrows))>0) { < $message = 'NOTE: ' . (count($insertedrows)+count($importedrows)) . ' users successfully imported.'; < } else { < $message = 'NOTE: No users imported.'; < } < $message .= '<br />› <strong> ' . $row . ' records found in file</strong>.'; < if (count($skippedrows)>0) { < $message .= '<br />› <strong> ' . count($skippedrows) . ' malformed records were skipped</strong>.'; < } < if (count($ignoredrows)>0) { < $message .= '<br />› <strong> ' . count($ignoredrows) . ' duplicate records were ignored</strong>.'; < } < if (count($invalidusernamerows)>0) { < $message .= '<br />› <strong> ' . count($invalidusernamerows) . ' < records with invalid usernames (i.e. with the suffix {deleted}) were < skipped</strong>.'; < } < < } < // Action: Import users from LDAP < if ($act == 'importldap') { < < display($message); < ?> < < <div class="maintitle"> < <h1>Import Users</h1> < </div> < <div class="maindark"> < <p>Upload user list from LDAP</p></div> < <div class="main"> < <p>This will import all users defined in the organisational unit defined below, any users that already exist will be ignnored. The predefined values are suitable for Active Directory imports. < </p> < <form method="post"> < <input type="hidden" name="act" value="importldapaction" /> < <div class="labelfieldpair"> < <div class="label"><label for="server">LDAP server:</label></div> < <div class="field"><input type="text" name="server" id="server" size="20" maxlength="40" value="ldapservername.domain.com" /></div> < </div> < <div class="labelfieldpair"> < <div class="label"><label for="basedn">Base DN:</label></div> < <div class="field"><input type="text" name="basedn" id="basedn" size="20" maxlength="80" value="ou=Domain Users,dc=corp,dc=domain,dc=com" /></div> < </div> < <div class="labelfieldpair"> < <div class="label"><label for="lname">Lookup Username:</label></div> < <div class="field"><input type="text" name="lname" id="lname" size="20" maxlength="40" value="search" /></div> < </div> < <div class="labelfieldpair"> < <div class="label"><label for="lpass">Lookup Password:</label></div> < <div class="field"><input type="text" name="lpass" id="lpass" size="20" maxlength="40" value="" /></div> < </div> < <div class="labelfieldpair"> < <div class="label"><label for="loginname">LDAP username:</label></div> < <div class="field"><input type="text" name="loginname" id="loginname" size="20" maxlength="40" value="samaccountname" /></div> < </div> < <div class="labelfieldpair"> < <div class="label"><label for="ldapname">LDAP Full Name:</label></div> < <div class="field"><input type="text" name="ldapname" id="ldapname" size="20" maxlength="40" value="cn" /></div> < </div> < <div class="buttonpanel"> < <input name="submit" type="submit" id="submit" value="Import!" /> < <input name="reset" type="reset" id="reset" value="Reset" /> < <input name="cancel" type="button" id="cancel" value="Cancel" onclick="document.location='sitesandusers.php'" /> < </div> < </form> < </div> < < <?php < < < } < < //Dax changes finish < 783d625 < <input type="button" value="From LDAP..." onclick="mainSubmit('importldap')" /><br /> [root@asu-apache-01 helpdesk]# |
From: Scott P. <wht...@us...> - 2007-10-01 03:34:58
|
Update of /cvsroot/helpmeict/Helpdesk In directory sc8-pr-cvs17:/tmp/cvs-serv13612 Modified Files: login.php sitesandusers.php Log Message: Fix MySQL script missing auto_increments Index: login.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/login.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** login.php 30 Sep 2007 20:46:31 -0000 1.19 --- login.php 1 Oct 2007 03:34:51 -0000 1.20 *************** *** 92,97 **** $ldapresult = search_ldap($ldapfilter); for ($i=0; $i<$ldapresult['count']; $i++) { ! $nextid = db_next_id('tbl_Users_id'); ! db_send("INSERT INTO tbl_Users (id,name,username,pass,available,email,ldap,active,root,restricted) VALUES ($nextid, '".$ldapresult[$i]['cn'][0]."', '".strtolower($user)."', '".md5($password)."', '1', '".$ldapresult[$i]['mail'][0]."', '1','1','0','0')"); db_send("INSERT INTO tbl_UserDomains (userid,domain,defaultflag) VALUES ($nextid,0,1);"); } --- 92,97 ---- $ldapresult = search_ldap($ldapfilter); for ($i=0; $i<$ldapresult['count']; $i++) { ! db_send("INSERT INTO tbl_Users (name,username,pass,available,email,ldap) VALUES ('".$ldapresult[$i]['cn'][0]."', '".strtolower($user)."', '".md5($password)."', '1', '".$ldapresult[$i]['mail'][0]."', '1')"); ! $nextid = db_next_id('tbl_Users'); db_send("INSERT INTO tbl_UserDomains (userid,domain,defaultflag) VALUES ($nextid,0,1);"); } Index: sitesandusers.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/sitesandusers.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** sitesandusers.php 30 Sep 2007 20:46:31 -0000 1.21 --- sitesandusers.php 1 Oct 2007 03:34:51 -0000 1.22 *************** *** 286,290 **** // Add user $user = db_next_id('tbl_Users_id'); ! db_send("INSERT INTO tbl_Users (id,name,username,pass,available,email,ldap) VALUES ($user, '$name','" . strtolower($username) . "','" . md5($password) . "',$available, '$email', '$ldap')"); // Add user to the current domain --- 286,290 ---- // Add user $user = db_next_id('tbl_Users_id'); ! db_send("INSERT INTO tbl_Users (id,name,username,pass,available,email,ldap) VALUES ('$user', '$name','" . strtolower($username) . "','" . md5($password) . "','$available', '$email', '$ldap')"); // Add user to the current domain |
From: Scott P. <wht...@us...> - 2007-10-01 03:34:58
|
Update of /cvsroot/helpmeict/Helpdesk/system In directory sc8-pr-cvs17:/tmp/cvs-serv13612/system Modified Files: logs.php Log Message: Fix MySQL script missing auto_increments Index: logs.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/logs.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** logs.php 7 Feb 2007 01:20:17 -0000 1.4 --- logs.php 1 Oct 2007 03:34:51 -0000 1.5 *************** *** 42,46 **** // Pervent problems with apostrophes/quotes in the log entry $log = addslashes($log); ! db_send("INSERT INTO tbl_Logs (userid,domain,timestamp,code,log) VALUES ($id,$domain," . time() . ",'$code','$log');"); } --- 42,47 ---- // Pervent problems with apostrophes/quotes in the log entry $log = addslashes($log); ! $nextid = db_next_id('tbl_Logs_id'); ! db_send("INSERT INTO tbl_Logs (id,userid,domain,timestamp,code,log) VALUES ('$nextid','$id','$domain','" . time() . "','$code','$log');"); } |
From: Scott P. <wht...@us...> - 2007-10-01 03:34:58
|
Update of /cvsroot/helpmeict/Helpdesk/install In directory sc8-pr-cvs17:/tmp/cvs-serv13612/install Modified Files: DB-MySQL.sql Log Message: Fix MySQL script missing auto_increments Index: DB-MySQL.sql =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/install/DB-MySQL.sql,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DB-MySQL.sql 30 Sep 2007 21:24:40 -0000 1.7 --- DB-MySQL.sql 1 Oct 2007 03:34:51 -0000 1.8 *************** *** 12,16 **** /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; ! /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; --- 12,16 ---- /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; ! /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; *************** *** 29,33 **** `value` varchar(100) NOT NULL default '', PRIMARY KEY (`identifier`) ! ) TYPE=MyISAM; -- --- 29,33 ---- `value` varchar(100) NOT NULL default '', PRIMARY KEY (`identifier`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 60,64 **** `value` varchar(100) NOT NULL default '', PRIMARY KEY (`identifier`,`domain`) ! ) TYPE=MyISAM; -- --- 60,64 ---- `value` varchar(100) NOT NULL default '', PRIMARY KEY (`identifier`,`domain`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 77,81 **** -- CREATE TABLE `tbl_Domains` ( ! `id` int(4) unsigned NOT NULL, `domain` varchar(200) NOT NULL default '', `active` int(4) NOT NULL default '1', --- 77,81 ---- -- CREATE TABLE `tbl_Domains` ( ! `id` int(4) unsigned NOT NULL auto_increment, `domain` varchar(200) NOT NULL default '', `active` int(4) NOT NULL default '1', *************** *** 85,89 **** `defaultpriority` int(4) NOT NULL default '0', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 85,89 ---- `defaultpriority` int(4) NOT NULL default '0', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 107,111 **** `date` int(11) NOT NULL default '0', PRIMARY KEY (`hash`) ! ) TYPE=MyISAM; -- --- 107,111 ---- `date` int(11) NOT NULL default '0', PRIMARY KEY (`hash`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 121,125 **** -- CREATE TABLE `tbl_Issues` ( ! `id` int(4) unsigned NOT NULL, `reportedby` int(4) NOT NULL default '0', `createdby` int(4) NOT NULL default '0', --- 121,125 ---- -- CREATE TABLE `tbl_Issues` ( ! `id` int(4) unsigned NOT NULL auto_increment, `reportedby` int(4) NOT NULL default '0', `createdby` int(4) NOT NULL default '0', *************** *** 145,149 **** `recalled` int(2) NOT NULL default '0', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 145,149 ---- `recalled` int(2) NOT NULL default '0', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 159,163 **** -- CREATE TABLE `tbl_Levels` ( ! `id` int(4) unsigned NOT NULL, `level` varchar(100) NOT NULL default '', `sortorder` int(4) NOT NULL default '0', --- 159,163 ---- -- CREATE TABLE `tbl_Levels` ( ! `id` int(4) unsigned NOT NULL auto_increment, `level` varchar(100) NOT NULL default '', `sortorder` int(4) NOT NULL default '0', *************** *** 165,169 **** `active` int(4) NOT NULL default '1', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 165,169 ---- `active` int(4) NOT NULL default '1', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 183,192 **** -- CREATE TABLE `tbl_Link_Categories` ( ! `id` int(4) unsigned NOT NULL, `name` varchar(100) NOT NULL default '', `sortorder` int(4) NOT NULL default '0', `lang` varchar(5) NOT NULL default 'en_UK', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 183,192 ---- -- CREATE TABLE `tbl_Link_Categories` ( ! `id` int(4) unsigned NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', `sortorder` int(4) NOT NULL default '0', `lang` varchar(5) NOT NULL default 'en_UK', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 205,209 **** -- CREATE TABLE `tbl_Links` ( ! `id` int(4) unsigned NOT NULL, `text` varchar(100) NOT NULL default '', `link` varchar(200) NOT NULL default '', --- 205,209 ---- -- CREATE TABLE `tbl_Links` ( ! `id` int(4) unsigned NOT NULL auto_increment, `text` varchar(100) NOT NULL default '', `link` varchar(200) NOT NULL default '', *************** *** 211,215 **** `sortorder` int(4) NOT NULL default '0', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 211,215 ---- `sortorder` int(4) NOT NULL default '0', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 237,241 **** -- CREATE TABLE `tbl_Logs` ( ! `id` int(4) unsigned NOT NULL, `userid` int(4) NOT NULL default '0', `domain` int(4) NOT NULL default '0', --- 237,241 ---- -- CREATE TABLE `tbl_Logs` ( ! `id` int(4) unsigned NOT NULL auto_increment, `userid` int(4) NOT NULL default '0', `domain` int(4) NOT NULL default '0', *************** *** 244,248 **** `log` text NOT NULL, PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 244,248 ---- `log` text NOT NULL, PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 251,256 **** /*!40000 ALTER TABLE `tbl_Logs` DISABLE KEYS */; - INSERT INTO `tbl_Logs` (`id`,`userid`,`domain`,`timestamp`,`code`,`log`) VALUES - (1,2,2,1138757551,'LOGIN','Project Admin has successfully logged in.'); /*!40000 ALTER TABLE `tbl_Logs` ENABLE KEYS */; --- 251,254 ---- *************** *** 260,264 **** -- CREATE TABLE `tbl_News` ( ! `id` int(4) unsigned NOT NULL, `date` date NOT NULL default '0000-00-00', `content` text NOT NULL, --- 258,262 ---- -- CREATE TABLE `tbl_News` ( ! `id` int(4) unsigned NOT NULL auto_increment, `date` date NOT NULL default '0000-00-00', `content` text NOT NULL, *************** *** 267,271 **** `domain_id` int(4) default NULL, PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 265,269 ---- `domain_id` int(4) default NULL, PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 292,296 **** `overridable` int(2) NOT NULL default '0', PRIMARY KEY (`identifier`) ! ) TYPE=MyISAM; -- --- 290,294 ---- `overridable` int(2) NOT NULL default '0', PRIMARY KEY (`identifier`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 319,323 **** -- CREATE TABLE `tbl_Priorities` ( ! `id` int(4) unsigned NOT NULL, `priority` varchar(100) NOT NULL default '', `class` int(4) NOT NULL default '0', --- 317,321 ---- -- CREATE TABLE `tbl_Priorities` ( ! `id` int(4) unsigned NOT NULL auto_increment, `priority` varchar(100) NOT NULL default '', `class` int(4) NOT NULL default '0', *************** *** 327,331 **** `notify` int(2) NOT NULL default '0', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 325,329 ---- `notify` int(2) NOT NULL default '0', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 345,354 **** -- CREATE TABLE `tbl_ProblemCategories` ( ! `id` int(4) unsigned NOT NULL, `description` varchar(100) NOT NULL default '', `active` int(2) NOT NULL default '1', `domain` int(4) NOT NULL default '0', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 343,352 ---- -- CREATE TABLE `tbl_ProblemCategories` ( ! `id` int(4) unsigned NOT NULL auto_increment, `description` varchar(100) NOT NULL default '', `active` int(2) NOT NULL default '1', `domain` int(4) NOT NULL default '0', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 368,372 **** -- CREATE TABLE `tbl_ProblemDetails` ( ! `id` int(4) unsigned NOT NULL, `category` int(4) NOT NULL default '0', `description` varchar(100) NOT NULL default '', --- 366,370 ---- -- CREATE TABLE `tbl_ProblemDetails` ( ! `id` int(4) unsigned NOT NULL auto_increment, `category` int(4) NOT NULL default '0', `description` varchar(100) NOT NULL default '', *************** *** 374,378 **** `domain` int(4) NOT NULL default '0', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 372,376 ---- `domain` int(4) NOT NULL default '0', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 399,403 **** -- CREATE TABLE `tbl_Remarks` ( ! `id` int(4) unsigned NOT NULL, `issue` int(4) NOT NULL default '0', `reportedby` int(4) default '0', --- 397,401 ---- -- CREATE TABLE `tbl_Remarks` ( ! `id` int(4) unsigned NOT NULL auto_increment, `issue` int(4) NOT NULL default '0', `reportedby` int(4) default '0', *************** *** 407,411 **** `time` time default '00:00:00', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 405,409 ---- `time` time default '00:00:00', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 421,430 **** -- CREATE TABLE `tbl_Sites` ( ! `id` int(4) unsigned NOT NULL, `site` varchar(100) NOT NULL default '', `domain` int(4) NOT NULL default '0', `active` int(4) NOT NULL default '1', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 419,428 ---- -- CREATE TABLE `tbl_Sites` ( ! `id` int(4) unsigned NOT NULL auto_increment, `site` varchar(100) NOT NULL default '', `domain` int(4) NOT NULL default '0', `active` int(4) NOT NULL default '1', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 442,446 **** -- CREATE TABLE `tbl_Statuses` ( ! `id` int(4) unsigned NOT NULL, `status` varchar(100) NOT NULL default '', `sortorder` int(4) NOT NULL default '0', --- 440,444 ---- -- CREATE TABLE `tbl_Statuses` ( ! `id` int(4) unsigned NOT NULL auto_increment, `status` varchar(100) NOT NULL default '', `sortorder` int(4) NOT NULL default '0', *************** *** 448,452 **** `active` int(4) NOT NULL default '1', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 446,450 ---- `active` int(4) NOT NULL default '1', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 466,470 **** -- CREATE TABLE `tbl_System_Preferences` ( ! `id` int(4) unsigned NOT NULL, `identifier` varchar(20) NOT NULL default '', `value` varchar(100) NOT NULL default '', --- 464,468 ---- -- CREATE TABLE `tbl_System_Preferences` ( ! `id` int(4) unsigned NOT NULL auto_increment, `identifier` varchar(20) NOT NULL default '', `value` varchar(100) NOT NULL default '', *************** *** 472,476 **** `system` int(2) NOT NULL default '0', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 470,474 ---- `system` int(2) NOT NULL default '0', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 492,499 **** -- CREATE TABLE `tbl_Thesaurus` ( ! `id` int(4) unsigned NOT NULL, `term` varchar(40) NOT NULL default '', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 490,497 ---- -- CREATE TABLE `tbl_Thesaurus` ( ! `id` int(4) unsigned NOT NULL auto_increment, `term` varchar(40) NOT NULL default '', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 512,516 **** `issue` int(4) NOT NULL default '0', PRIMARY KEY (`term`,`issue`) ! ) TYPE=MyISAM; -- --- 510,514 ---- `issue` int(4) NOT NULL default '0', PRIMARY KEY (`term`,`issue`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 530,534 **** `time` int(14) NOT NULL default '0', PRIMARY KEY (`issue`,`userid`) ! ) TYPE=MyISAM; -- --- 528,532 ---- `time` int(14) NOT NULL default '0', PRIMARY KEY (`issue`,`userid`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 544,553 **** -- CREATE TABLE `tbl_UserDomains` ( ! `id` int(4) unsigned NOT NULL, `userid` int(4) NOT NULL default '0', `domain` int(4) NOT NULL default '0', `defaultflag` int(2) NOT NULL default '0', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 542,551 ---- -- CREATE TABLE `tbl_UserDomains` ( ! `id` int(4) unsigned NOT NULL auto_increment, `userid` int(4) NOT NULL default '0', `domain` int(4) NOT NULL default '0', `defaultflag` int(2) NOT NULL default '0', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 570,574 **** `defaultflag` int(2) NOT NULL default '1', PRIMARY KEY (`userid`,`site`,`usertype`) ! ) TYPE=MyISAM; -- --- 568,572 ---- `defaultflag` int(2) NOT NULL default '1', PRIMARY KEY (`userid`,`site`,`usertype`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 584,592 **** -- CREATE TABLE `tbl_UserTypes` ( ! `id` int(4) unsigned NOT NULL, `type` varchar(100) NOT NULL default '', `sortorder` int(4) NOT NULL default '0', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 582,590 ---- -- CREATE TABLE `tbl_UserTypes` ( ! `id` int(4) unsigned NOT NULL auto_increment, `type` varchar(100) NOT NULL default '', `sortorder` int(4) NOT NULL default '0', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 614,618 **** `value` varchar(100) NOT NULL default '', PRIMARY KEY (`identifier`,`userid`,`domain`) ! ) TYPE=MyISAM; -- --- 612,616 ---- `value` varchar(100) NOT NULL default '', PRIMARY KEY (`identifier`,`userid`,`domain`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 628,632 **** -- CREATE TABLE `tbl_Users` ( ! `id` int(4) unsigned NOT NULL, `username` varchar(20) NOT NULL default '', `pass` varchar(50) NOT NULL default '', --- 626,630 ---- -- CREATE TABLE `tbl_Users` ( ! `id` int(4) unsigned NOT NULL auto_increment, `username` varchar(20) NOT NULL default '', `pass` varchar(50) NOT NULL default '', *************** *** 639,643 **** `ldap` smallint(6) NOT NULL default '0', PRIMARY KEY (`id`) ! ) TYPE=MyISAM; -- --- 637,641 ---- `ldap` smallint(6) NOT NULL default '0', PRIMARY KEY (`id`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- *************** *** 662,666 **** `end` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`issue`,`userid`) ! ) TYPE=MyISAM; -- --- 660,664 ---- `end` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`issue`,`userid`) ! ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- |
From: Scott P. <wht...@us...> - 2007-09-30 21:24:46
|
Update of /cvsroot/helpmeict/Helpdesk/install In directory sc8-pr-cvs17:/tmp/cvs-serv32109/install Modified Files: DB-MySQL.sql Log Message: Version 1.0 MySQL install script Index: DB-MySQL.sql =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/install/DB-MySQL.sql,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DB-MySQL.sql 16 Sep 2007 23:21:07 -0000 1.6 --- DB-MySQL.sql 30 Sep 2007 21:24:40 -0000 1.7 *************** *** 1,50 **** ! -- phpMyAdmin SQL Dump ! -- version 2.7.0-pl1 ! -- http://www.phpmyadmin.net ! -- ! -- Host: localhost ! -- Generation Time: Feb 01, 2006 at 02:32 AM ! -- Server version: 4.1.14 ! -- PHP Version: 4.4.0-pl1-gentoo ! -- ! -- Database: `helpdeskdb` [...1247 lines suppressed...] ! PRIMARY KEY (`issue`,`userid`) ! ) TYPE=MyISAM; ! -- ! -- Dumping data for table `tbl_Wrktimer` ! -- ! /*!40000 ALTER TABLE `tbl_Wrktimer` DISABLE KEYS */; ! /*!40000 ALTER TABLE `tbl_Wrktimer` ENABLE KEYS */; ! ! ! ! ! /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; ! /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; ! /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; ! /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; ! /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; ! /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; ! /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; |
Update of /cvsroot/helpmeict/Helpdesk/share/templates/en_UK In directory sc8-pr-cvs17:/tmp/cvs-serv24764/share/templates/en_UK Modified Files: mail_assignissue.tpl mail_newissue.tpl mail_newldapuser.tpl mail_remark.tpl mail_resolveissue.tpl mail_verifyemail.tpl Log Message: some v1.0 cleanup Index: mail_newldapuser.tpl =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/share/templates/en_UK/mail_newldapuser.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mail_newldapuser.tpl 16 Sep 2007 22:00:38 -0000 1.1 --- mail_newldapuser.tpl 30 Sep 2007 21:06:44 -0000 1.2 *************** *** 4,8 **** Remarks = No ;FCharset = iso-8859-1 ! Sender = <noreply> (Helmeict Helpdesk 0.9.2) ;SCharset = iso-8859-1 --- 4,8 ---- Remarks = No ;FCharset = iso-8859-1 ! Sender = <noreply> (Helmeict Helpdesk 1.0) ;SCharset = iso-8859-1 Index: mail_newissue.tpl =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/share/templates/en_UK/mail_newissue.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mail_newissue.tpl 7 Feb 2007 01:20:16 -0000 1.2 --- mail_newissue.tpl 30 Sep 2007 21:06:44 -0000 1.3 *************** *** 4,8 **** Remarks = No ;FCharset = iso-8859-1 ! Sender = [%%DOMAIN%%] <noreply> (Helmeict Helpdesk 0.9.2) ;SCharset = iso-8859-1 --- 4,8 ---- Remarks = No ;FCharset = iso-8859-1 ! Sender = [%%DOMAIN%%] <noreply> (Helmeict Helpdesk 1.0) ;SCharset = iso-8859-1 Index: mail_remark.tpl =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/share/templates/en_UK/mail_remark.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mail_remark.tpl 7 Feb 2007 01:20:16 -0000 1.2 --- mail_remark.tpl 30 Sep 2007 21:06:44 -0000 1.3 *************** *** 4,8 **** Remarks = No ;FCharset = iso-8859-1 ! Sender = [%%DOMAIN%%] <noreply> (Helmeict Helpdesk 0.9.1) ;SCharset = iso-8859-1 --- 4,8 ---- Remarks = No ;FCharset = iso-8859-1 ! Sender = [%%DOMAIN%%] <noreply> (Helmeict Helpdesk 1.0) ;SCharset = iso-8859-1 Index: mail_assignissue.tpl =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/share/templates/en_UK/mail_assignissue.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mail_assignissue.tpl 7 Feb 2007 01:20:16 -0000 1.2 --- mail_assignissue.tpl 30 Sep 2007 21:06:44 -0000 1.3 *************** *** 4,8 **** Remarks = No ;FCharset = iso-8859-1 ! Sender = [%%DOMAIN%%] <noreply> (Helmeict Helpdesk 0.9.3) ;SCharset = iso-8859-1 --- 4,8 ---- Remarks = No ;FCharset = iso-8859-1 ! Sender = [%%DOMAIN%%] <noreply> (Helmeict Helpdesk 1.0) ;SCharset = iso-8859-1 Index: mail_resolveissue.tpl =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/share/templates/en_UK/mail_resolveissue.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mail_resolveissue.tpl 7 Feb 2007 01:20:16 -0000 1.2 --- mail_resolveissue.tpl 30 Sep 2007 21:06:44 -0000 1.3 *************** *** 4,8 **** Remarks = No ;FCharset = iso-8859-1 ! Sender = [%%DOMAIN%%] <noreply> (Helmeict Helpdesk 0.9.2) ;SCharset = iso-8859-1 --- 4,8 ---- Remarks = No ;FCharset = iso-8859-1 ! Sender = [%%DOMAIN%%] <noreply> (Helmeict Helpdesk 1.0) ;SCharset = iso-8859-1 Index: mail_verifyemail.tpl =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/share/templates/en_UK/mail_verifyemail.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mail_verifyemail.tpl 7 Feb 2007 01:20:16 -0000 1.2 --- mail_verifyemail.tpl 30 Sep 2007 21:06:44 -0000 1.3 *************** *** 4,8 **** Remarks = No ;FCharset = iso-8859-1 ! Sender = [%%DOMAIN%%] <noreply> (Helmeict Helpdesk 0.9.1) ;SCharset = iso-8859-1 --- 4,8 ---- Remarks = No ;FCharset = iso-8859-1 ! Sender = [%%DOMAIN%%] <noreply> (Helmeict Helpdesk 1.0) ;SCharset = iso-8859-1 |
From: Scott P. <wht...@us...> - 2007-09-30 21:06:48
|
Update of /cvsroot/helpmeict/Helpdesk/system In directory sc8-pr-cvs17:/tmp/cvs-serv24764/system Modified Files: mail.php Log Message: some v1.0 cleanup Index: mail.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/mail.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mail.php 16 Sep 2007 22:00:38 -0000 1.4 --- mail.php 30 Sep 2007 21:06:44 -0000 1.5 *************** *** 233,237 **** " charset=\"us-ascii\"\n". "Content-Transfer-Encoding: 7bit\n". ! "X-Mailer: Heldesk V0.9.1\n"; if ($mailopts['sender']) { --- 233,237 ---- " charset=\"us-ascii\"\n". "Content-Transfer-Encoding: 7bit\n". ! "X-Mailer: Heldesk V1.0\n"; if ($mailopts['sender']) { |
From: Scott P. <wht...@us...> - 2007-09-30 20:46:35
|
Update of /cvsroot/helpmeict/Helpdesk In directory sc8-pr-cvs17:/tmp/cvs-serv16841 Modified Files: login.php sitesandusers.php Log Message: Fix DB calls for MySQL Index: login.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/login.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** login.php 30 Sep 2007 20:13:43 -0000 1.18 --- login.php 30 Sep 2007 20:46:31 -0000 1.19 *************** *** 93,97 **** for ($i=0; $i<$ldapresult['count']; $i++) { $nextid = db_next_id('tbl_Users_id'); ! db_send("INSERT INTO tbl_Users (id,name,username,pass,available,email,ldap) VALUES ($nextid, '".$ldapresult[$i]['cn'][0]."', '".strtolower($user)."', '".md5($password)."', '1', '".$ldapresult[$i]['mail'][0]."', '1')"); db_send("INSERT INTO tbl_UserDomains (userid,domain,defaultflag) VALUES ($nextid,0,1);"); } --- 93,97 ---- for ($i=0; $i<$ldapresult['count']; $i++) { $nextid = db_next_id('tbl_Users_id'); ! db_send("INSERT INTO tbl_Users (id,name,username,pass,available,email,ldap,active,root,restricted) VALUES ($nextid, '".$ldapresult[$i]['cn'][0]."', '".strtolower($user)."', '".md5($password)."', '1', '".$ldapresult[$i]['mail'][0]."', '1','1','0','0')"); db_send("INSERT INTO tbl_UserDomains (userid,domain,defaultflag) VALUES ($nextid,0,1);"); } Index: sitesandusers.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/sitesandusers.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** sitesandusers.php 16 Sep 2007 22:00:38 -0000 1.20 --- sitesandusers.php 30 Sep 2007 20:46:31 -0000 1.21 *************** *** 545,554 **** db_send("INSERT INTO tbl_UserDomains (userid,domain,defaultflag) VALUES ($userrecord,$_SESSION[_domain],0)"); //Search to find if User is in System domain from LDAP auto adding. ! $result = db_recordset("SELECT * from tbl_userdomains WHERE userid=$userrecord"); //Remove user from System domian and set defaultflag for LDAP auto add users. foreach ($result as $key) { if ($result[$key]['domain'] == 0) { ! db_send("DELETE FROM tbl_userdomains WHERE userid=$userrecord AND domain=0"); ! db_send("UPDATE tbl_userdomains SET defaultflag=1 WHERE userid=$userrecord"); } } --- 545,554 ---- db_send("INSERT INTO tbl_UserDomains (userid,domain,defaultflag) VALUES ($userrecord,$_SESSION[_domain],0)"); //Search to find if User is in System domain from LDAP auto adding. ! $result = db_recordset("SELECT * from tbl_UserDomains WHERE userid=$userrecord"); //Remove user from System domian and set defaultflag for LDAP auto add users. foreach ($result as $key) { if ($result[$key]['domain'] == 0) { ! db_send("DELETE FROM tbl_UserDomains WHERE userid=$userrecord AND domain=0"); ! db_send("UPDATE tbl_UserDomains SET defaultflag=1 WHERE userid=$userrecord"); } } |
From: Scott P. <wht...@us...> - 2007-09-30 20:26:10
|
Update of /cvsroot/helpmeict/Helpdesk/system In directory sc8-pr-cvs17:/tmp/cvs-serv8683/system Modified Files: functions.php Log Message: Fix db call for MySQL Index: functions.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions.php 16 Sep 2007 22:00:38 -0000 1.3 --- functions.php 30 Sep 2007 20:25:55 -0000 1.4 *************** *** 60,64 **** function search_ldap($filter) { ! $sql = "SELECT * FROM tbl_default_Preferences"; $default_prefs = Array(); $result = db_recordset($sql); --- 60,64 ---- function search_ldap($filter) { ! $sql = "SELECT * FROM tbl_Default_Preferences"; $default_prefs = Array(); $result = db_recordset($sql); |
From: Scott P. <wht...@us...> - 2007-09-30 20:13:47
|
Update of /cvsroot/helpmeict/Helpdesk In directory sc8-pr-cvs17:/tmp/cvs-serv3370 Modified Files: login.php Log Message: Fix db calls for MySQL case sensitivity Index: login.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/login.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** login.php 16 Sep 2007 22:00:38 -0000 1.17 --- login.php 30 Sep 2007 20:13:43 -0000 1.18 *************** *** 86,103 **** if (!isset($act)) { ! $sql = "SELECT * FROM tbl_users WHERE username='".strtolower($user)."' AND active=1 AND ldap=1"; $result = db_recordset($sql); if (ldap_authenticate(strtolower($user), $password) && $result == NULL) { - //todo create user $ldapfilter = "uid=".strtolower($user); $ldapresult = search_ldap($ldapfilter); for ($i=0; $i<$ldapresult['count']; $i++) { ! $nextid = db_next_id('tbl_users_id'); ! db_send("INSERT INTO tbl_users (id,name,username,pass,available,email,ldap) VALUES ($nextid, '".$ldapresult[$i]['cn'][0]."', '".strtolower($user)."', '".md5($password)."', '1', '".$ldapresult[$i]['mail'][0]."', '1')"); db_send("INSERT INTO tbl_UserDomains (userid,domain,defaultflag) VALUES ($nextid,0,1);"); } ! $address = db_recordset("SELECT value from tbl_default_preferences WHERE identifier='newissue-email'"); if ($address[0]['value'] != '') { ! $lng = db_recordset("SELECT value from tbl_default_preferences WHERE identifier='language'"); send_mail('newldap',$lng[0]['value'],$address[0]['value'],"",$user,""); } --- 86,102 ---- if (!isset($act)) { ! $sql = "SELECT * FROM tbl_Users WHERE username='".strtolower($user)."' AND active=1 AND ldap=1"; $result = db_recordset($sql); if (ldap_authenticate(strtolower($user), $password) && $result == NULL) { $ldapfilter = "uid=".strtolower($user); $ldapresult = search_ldap($ldapfilter); for ($i=0; $i<$ldapresult['count']; $i++) { ! $nextid = db_next_id('tbl_Users_id'); ! db_send("INSERT INTO tbl_Users (id,name,username,pass,available,email,ldap) VALUES ($nextid, '".$ldapresult[$i]['cn'][0]."', '".strtolower($user)."', '".md5($password)."', '1', '".$ldapresult[$i]['mail'][0]."', '1')"); db_send("INSERT INTO tbl_UserDomains (userid,domain,defaultflag) VALUES ($nextid,0,1);"); } ! $address = db_recordset("SELECT value from tbl_Default_Preferences WHERE identifier='newissue-email'"); if ($address[0]['value'] != '') { ! $lng = db_recordset("SELECT value from tbl_Default_Preferences WHERE identifier='language'"); send_mail('newldap',$lng[0]['value'],$address[0]['value'],"",$user,""); } |
From: Scott P. <wht...@us...> - 2007-09-30 20:13:47
|
Update of /cvsroot/helpmeict/Helpdesk/system In directory sc8-pr-cvs17:/tmp/cvs-serv3370/system Modified Files: authentication.php upgrade.1.0.inc.php Log Message: Fix db calls for MySQL case sensitivity Index: upgrade.1.0.inc.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/upgrade.1.0.inc.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** upgrade.1.0.inc.php 30 Sep 2007 17:18:32 -0000 1.4 --- upgrade.1.0.inc.php 30 Sep 2007 20:13:43 -0000 1.5 *************** *** 33,39 **** // Add 'ldap' column to table tbl_users $output[] = "Adding ldap column to table 'tbl_users' ....... "; ! $qry['pgsql'] = "ALTER TABLE tbl_users ADD COLUMN ldap smallint"; ! $qry['mysql'] = "ALTER TABLE tbl_users ADD COLUMN smallint DEFAULT '0' NOT NULL"; ! $qry['mssql'] = "ALTER TABLE tbl_users ADD COLUMN smallint"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); --- 33,39 ---- // Add 'ldap' column to table tbl_users $output[] = "Adding ldap column to table 'tbl_users' ....... "; ! $qry['pgsql'] = "ALTER TABLE tbl_Users ADD COLUMN ldap smallint"; ! $qry['mysql'] = "ALTER TABLE tbl_Users ADD COLUMN ldap smallint DEFAULT '0' NOT NULL"; ! $qry['mssql'] = "ALTER TABLE tbl_Users ADD COLUMN ldap smallint"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); *************** *** 46,59 **** // Set default value for new 'ldap' column in tbl_users $output[] = "Setting default value for 'ldap' column in tbl_users ....... "; ! $qry = "UPDATE tbl_users SET ldap='0'"; $res = $helpdeskdb->query($qry); if (!PEAR::isError($res)) { //PostgreSQL and MSSQL need a couple of more ALTER TABLE's if ($helpdeskdb->phptype == 'pgsql' || $helpdesk->phptype =='mssql') { ! $qry = "ALTER TABLE tbl_users ALTER COLUMN ldap SET DEFAULT '0'"; $res = $helpdeskdb->query($qry); if (!PEAR::isError($res)) { // Set column to not allow NULL ! $qry = "ALTER TABLE tbl_users ALTER COLUMN ldap SET NOT NULL"; $res = $helpdeskdb->query($qry); $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; --- 46,59 ---- // Set default value for new 'ldap' column in tbl_users $output[] = "Setting default value for 'ldap' column in tbl_users ....... "; ! $qry = "UPDATE tbl_Users SET ldap='0'"; $res = $helpdeskdb->query($qry); if (!PEAR::isError($res)) { //PostgreSQL and MSSQL need a couple of more ALTER TABLE's if ($helpdeskdb->phptype == 'pgsql' || $helpdesk->phptype =='mssql') { ! $qry = "ALTER TABLE tbl_Users ALTER COLUMN ldap SET DEFAULT '0'"; $res = $helpdeskdb->query($qry); if (!PEAR::isError($res)) { // Set column to not allow NULL ! $qry = "ALTER TABLE tbl_Users ALTER COLUMN ldap SET NOT NULL"; $res = $helpdeskdb->query($qry); $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; *************** *** 75,81 **** //Insert ldap-ause prefs to tbl_preference_descriptions $output[] = "Adding ldap-ause preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-ause', 'boolean', 'Use LDAP Authentication', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-ause', 'boolean', 'Use LDAP Authentication', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-ause', 'boolean', 'Use LDAP Authentication', '0')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); --- 75,81 ---- //Insert ldap-ause prefs to tbl_preference_descriptions $output[] = "Adding ldap-ause preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-ause', 'boolean', 'Use LDAP Authentication', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-ause', 'boolean', 'Use LDAP Authentication', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-ause', 'boolean', 'Use LDAP Authentication', '0')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); *************** *** 90,96 **** //Insert ldap-basdn prefs to tbl_preference_descriptions $output[] = "Adding ldap-basdn preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-basedn', 'text', 'LDAP BaseDN', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-basedn', 'text', 'LDAP BaseDN', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-basedn', 'text', 'LDAP BaseDN', '0')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); --- 90,96 ---- //Insert ldap-basdn prefs to tbl_preference_descriptions $output[] = "Adding ldap-basdn preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-basedn', 'text', 'LDAP BaseDN', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-basedn', 'text', 'LDAP BaseDN', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-basedn', 'text', 'LDAP BaseDN', '0')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); *************** *** 105,111 **** //Insert ldap-host prefs to tbl_preference_descriptions $output[] = "Adding ldap-host preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-host', 'text', 'LDAP Hostname', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-host', 'text', 'LDAP Hostname', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-host', 'text', 'LDAP Hostname', '0')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); --- 105,111 ---- //Insert ldap-host prefs to tbl_preference_descriptions $output[] = "Adding ldap-host preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-host', 'text', 'LDAP Hostname', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-host', 'text', 'LDAP Hostname', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-host', 'text', 'LDAP Hostname', '0')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); *************** *** 120,126 **** //Insert ldap-v2 prefs to tbl_preference_descriptions $output[] = "Adding ldap-v2 preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-v2', 'boolean', 'Use LDAP Protocol Version 2(No means Version 3)', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-v2', 'boolean', 'Use LDAP Protocol Version 2(No means Version 3)', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-v2', 'boolean', 'Use LDAP Protocol Version 2(No means Version 3)', '0')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); --- 120,126 ---- //Insert ldap-v2 prefs to tbl_preference_descriptions $output[] = "Adding ldap-v2 preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-v2', 'boolean', 'Use LDAP Protocol Version 2(No means Version 3)', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-v2', 'boolean', 'Use LDAP Protocol Version 2(No means Version 3)', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_Preference_Descriptions (identifier, type, description, overridable) VALUES ('ldap-v2', 'boolean', 'Use LDAP Protocol Version 2(No means Version 3)', '0')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); *************** *** 135,141 **** //Insert ldap-ause pref to tbl_default_preferences $output[] = "Adding ldap-ause preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-ause', 'false')"; ! $qry['mysql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-ause', 'false')"; ! $qry['mssql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-ause', 'false')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); --- 135,141 ---- //Insert ldap-ause pref to tbl_default_preferences $output[] = "Adding ldap-ause preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-ause', 'false')"; ! $qry['mysql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-ause', 'false')"; ! $qry['mssql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-ause', 'false')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); *************** *** 150,156 **** //Insert ldap-basedn pref to tbl_default_preferences $output[] = "Adding ldap-basedn preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-basedn', '')"; ! $qry['mysql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-basedn', '')"; ! $qry['mssql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-basedn', '')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); --- 150,156 ---- //Insert ldap-basedn pref to tbl_default_preferences $output[] = "Adding ldap-basedn preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-basedn', '')"; ! $qry['mysql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-basedn', '')"; ! $qry['mssql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-basedn', '')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); *************** *** 165,171 **** //Insert ldap-host pref to tbl_default_preferences $output[] = "Adding ldap-host preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-host', '')"; ! $qry['mysql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-host', '')"; ! $qry['mssql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-host', '')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); --- 165,171 ---- //Insert ldap-host pref to tbl_default_preferences $output[] = "Adding ldap-host preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-host', '')"; ! $qry['mysql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-host', '')"; ! $qry['mssql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-host', '')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); *************** *** 180,186 **** //Insert ldap-v2 pref to tbl_default_preferences $output[] = "Adding ldap-v2 preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-v2', 'false')"; ! $qry['mysql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-v2', 'false')"; ! $qry['mssql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-v2', 'false')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); --- 180,186 ---- //Insert ldap-v2 pref to tbl_default_preferences $output[] = "Adding ldap-v2 preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-v2', 'false')"; ! $qry['mysql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-v2', 'false')"; ! $qry['mssql'] = "INSERT INTO tbl_Default_Preferences (identifier, value) VALUES ('ldap-v2', 'false')"; if ($qry[$helpdeskdb->phptype] != "") { $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); Index: authentication.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/authentication.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** authentication.php 16 Sep 2007 22:00:38 -0000 1.7 --- authentication.php 30 Sep 2007 20:13:43 -0000 1.8 *************** *** 45,49 **** function ldap_authenticate($ldapuser, $ldappassword) { ! $sql = "SELECT * FROM tbl_default_Preferences"; $result = db_recordset($sql); $default_prefs = Array(); --- 45,49 ---- function ldap_authenticate($ldapuser, $ldappassword) { ! $sql = "SELECT * FROM tbl_Default_Preferences"; $result = db_recordset($sql); $default_prefs = Array(); |
From: Scott P. <wht...@us...> - 2007-09-30 19:11:37
|
Update of /cvsroot/helpmeict/Helpdesk/install In directory sc8-pr-cvs17:/tmp/cvs-serv11320/install Modified Files: DB-PostgreSQL.sql Log Message: Add back in worktimer Fix PostgreSQL create script for tbl_wrktimer Index: DB-PostgreSQL.sql =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/install/DB-PostgreSQL.sql,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DB-PostgreSQL.sql 16 Sep 2007 23:21:07 -0000 1.5 --- DB-PostgreSQL.sql 30 Sep 2007 19:11:33 -0000 1.6 *************** *** 4,33 **** SET client_encoding = 'SQL_ASCII'; SET check_function_bodies = false; SET client_min_messages = warning; -- ! -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres -- [...2853 lines suppressed...] + + -- + -- Name: tbl_wrktimer_userid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - + -- + + ALTER TABLE ONLY tbl_wrktimer + ADD CONSTRAINT tbl_wrktimer_userid_fkey FOREIGN KEY (userid) REFERENCES tbl_users(id) ON DELETE CASCADE; + + + -- + -- Name: public; Type: ACL; Schema: -; Owner: - + -- + + REVOKE ALL ON SCHEMA public FROM PUBLIC; + GRANT ALL ON SCHEMA public TO PUBLIC; + + + -- -- PostgreSQL database dump complete -- |
From: Scott P. <wht...@us...> - 2007-09-30 19:11:37
|
Update of /cvsroot/helpmeict/Helpdesk In directory sc8-pr-cvs17:/tmp/cvs-serv11320 Modified Files: issue.php Log Message: Add back in worktimer Fix PostgreSQL create script for tbl_wrktimer Index: issue.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/issue.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** issue.php 13 Sep 2007 00:01:26 -0000 1.44 --- issue.php 30 Sep 2007 19:11:32 -0000 1.45 *************** *** 401,404 **** --- 401,417 ---- } + // Action worktimer. + if ($acl['use_wrktimer']) { + if ($is_pgsql) { + require_once 'system/worktimer_pg.inc'; + } else { + require_once 'system/worktimer_mysql.inc'; + } + + if ($act == 'wrktm') { + wrktm_act(); + $act = ''; + } + } // Action: Edit issue *************** *** 899,902 **** --- 912,931 ---- <?php } + if ($acl['view_wrktimer']) { + $wrktm_labels = array ( + gettext('Start Timer'), + gettext('Stop Timer'), + gettext('Restart Timer'), + gettext('Reset Timer'), + gettext('Add Time to Issue'), + gettext('The time has been copied to the "Spend Time" fields below.\n\nPlease submit the issue to finally save it with the issue.') + ); + if ($is_pgsql) { + require_once 'system/worktimer_pg.inc'; + } else { + require_once 'system/worktimer_mysql.inc'; + } + wrktm_display(); + } ?> <div class="block"> |
From: Scott P. <wht...@us...> - 2007-09-30 17:18:36
|
Update of /cvsroot/helpmeict/Helpdesk/system In directory sc8-pr-cvs17:/tmp/cvs-serv31307/system Modified Files: upgrade.1.0.inc.php upgrade.php Log Message: Update upgrade scripts for 1.0 Index: upgrade.1.0.inc.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/upgrade.1.0.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** upgrade.1.0.inc.php 11 Mar 2007 15:23:49 -0000 1.3 --- upgrade.1.0.inc.php 30 Sep 2007 17:18:32 -0000 1.4 *************** *** 29,48 **** */ ! // Initialize array (important!) ! $qry = array(); ! // Add 'tbl_files' table ! $output[] = "Adding table 'tbl_Assets' ....... "; ! $qry['pgsql'] = " ! CREATE TABLE tbl_assets ( ! );"; ! $qry['mysql'] = " ! CREATE TABLE `tbl_Assets` ( ! );"; ! $qry['mssql'] = ""; ! if ($qry[$helpdeskdb->phptype] != "") ! { ! $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; ! } else $output[] = "ERROR: DBMS " . $helpdeskdb->phptype . " not yet supported by the upgrade routine!<BR />\n"; ?> --- 29,193 ---- */ ! // Initialize array (important!) ! $qry = array(); ! // Add 'ldap' column to table tbl_users ! $output[] = "Adding ldap column to table 'tbl_users' ....... "; ! $qry['pgsql'] = "ALTER TABLE tbl_users ADD COLUMN ldap smallint"; ! $qry['mysql'] = "ALTER TABLE tbl_users ADD COLUMN smallint DEFAULT '0' NOT NULL"; ! $qry['mssql'] = "ALTER TABLE tbl_users ADD COLUMN smallint"; ! if ($qry[$helpdeskdb->phptype] != "") { ! $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; ! } ! else { ! $output[] = "ERROR: DBMS " . $helpdeskdb->phptype . " not yet supported by the upgrade routine!<BR />\n"; ! } ! ! // Set default value for new 'ldap' column in tbl_users ! $output[] = "Setting default value for 'ldap' column in tbl_users ....... "; ! $qry = "UPDATE tbl_users SET ldap='0'"; ! $res = $helpdeskdb->query($qry); ! if (!PEAR::isError($res)) { ! //PostgreSQL and MSSQL need a couple of more ALTER TABLE's ! if ($helpdeskdb->phptype == 'pgsql' || $helpdesk->phptype =='mssql') { ! $qry = "ALTER TABLE tbl_users ALTER COLUMN ldap SET DEFAULT '0'"; ! $res = $helpdeskdb->query($qry); ! if (!PEAR::isError($res)) { ! // Set column to not allow NULL ! $qry = "ALTER TABLE tbl_users ALTER COLUMN ldap SET NOT NULL"; ! $res = $helpdeskdb->query($qry); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; ! } ! else { ! $output[] = $res->getMessage(); //Query failed ! } ! } ! else { ! $output [] = "Success!<br />\n"; ! } ! } ! else { ! $output[] = $res->getMessage(); //Query failed ! } ! ! // Re-initialize arry (important!) ! $qry = array(); ! //Insert ldap-ause prefs to tbl_preference_descriptions ! $output[] = "Adding ldap-ause preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-ause', 'boolean', 'Use LDAP Authentication', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-ause', 'boolean', 'Use LDAP Authentication', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-ause', 'boolean', 'Use LDAP Authentication', '0')"; ! if ($qry[$helpdeskdb->phptype] != "") { ! $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; ! } ! else { ! $output[] = "ERROR: DBMS " . $helpdeskdb->phptype . " not yet supported by the upgrade routine!<BR />\n"; ! } ! ! // Re-initialize arry (important!) ! $qry = array(); ! //Insert ldap-basdn prefs to tbl_preference_descriptions ! $output[] = "Adding ldap-basdn preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-basedn', 'text', 'LDAP BaseDN', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-basedn', 'text', 'LDAP BaseDN', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-basedn', 'text', 'LDAP BaseDN', '0')"; ! if ($qry[$helpdeskdb->phptype] != "") { ! $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; ! } ! else { ! $output[] = "ERROR: DBMS " . $helpdeskdb->phptype . " not yet supported by the upgrade routine!<BR />\n"; ! } ! ! // Re-initialize arry (important!) ! $qry = array(); ! //Insert ldap-host prefs to tbl_preference_descriptions ! $output[] = "Adding ldap-host preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-host', 'text', 'LDAP Hostname', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-host', 'text', 'LDAP Hostname', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-host', 'text', 'LDAP Hostname', '0')"; ! if ($qry[$helpdeskdb->phptype] != "") { ! $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; ! } ! else { ! $output[] = "ERROR: DBMS " . $helpdeskdb->phptype . " not yet supported by the upgrade routine!<BR />\n"; ! } ! ! // Re-initialize arry (important!) ! $qry = array(); ! //Insert ldap-v2 prefs to tbl_preference_descriptions ! $output[] = "Adding ldap-v2 preference to tbl_preference_descriptions ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-v2', 'boolean', 'Use LDAP Protocol Version 2(No means Version 3)', '0')"; ! $qry['mysql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-v2', 'boolean', 'Use LDAP Protocol Version 2(No means Version 3)', '0')"; ! $qry['mssql'] = "INSERT INTO tbl_preference_descriptions (identifier, type, description, overridable) VALUES ('ldap-v2', 'boolean', 'Use LDAP Protocol Version 2(No means Version 3)', '0')"; ! if ($qry[$helpdeskdb->phptype] != "") { ! $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; ! } ! else { ! $output[] = "ERROR: DBMS " . $helpdeskdb->phptype . " not yet supported by the upgrade routine!<BR />\n"; ! } ! ! // Re-initialize arry (important!) ! $qry = array(); ! //Insert ldap-ause pref to tbl_default_preferences ! $output[] = "Adding ldap-ause preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-ause', 'false')"; ! $qry['mysql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-ause', 'false')"; ! $qry['mssql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-ause', 'false')"; ! if ($qry[$helpdeskdb->phptype] != "") { ! $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; ! } ! else { ! $output[] = "ERROR: DBMS " . $helpdeskdb->phptype . " not yet supported by the upgrade routine!<BR />\n"; ! } ! ! // Re-initialize arry (important!) ! $qry = array(); ! //Insert ldap-basedn pref to tbl_default_preferences ! $output[] = "Adding ldap-basedn preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-basedn', '')"; ! $qry['mysql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-basedn', '')"; ! $qry['mssql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-basedn', '')"; ! if ($qry[$helpdeskdb->phptype] != "") { ! $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; ! } ! else { ! $output[] = "ERROR: DBMS " . $helpdeskdb->phptype . " not yet supported by the upgrade routine!<BR />\n"; ! } ! ! // Re-initialize arry (important!) ! $qry = array(); ! //Insert ldap-host pref to tbl_default_preferences ! $output[] = "Adding ldap-host preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-host', '')"; ! $qry['mysql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-host', '')"; ! $qry['mssql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-host', '')"; ! if ($qry[$helpdeskdb->phptype] != "") { ! $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; ! } ! else { ! $output[] = "ERROR: DBMS " . $helpdeskdb->phptype . " not yet supported by the upgrade routine!<BR />\n"; ! } ! ! // Re-initialize arry (important!) ! $qry = array(); ! //Insert ldap-v2 pref to tbl_default_preferences ! $output[] = "Adding ldap-v2 preference to tbl_default_preferences ....... "; ! $qry['pgsql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-v2', 'false')"; ! $qry['mysql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-v2', 'false')"; ! $qry['mssql'] = "INSERT INTO tbl_default_preferences (identifier, value) VALUES ('ldap-v2', 'false')"; ! if ($qry[$helpdeskdb->phptype] != "") { ! $res = $helpdeskdb->query($qry[$helpdeskdb->phptype]); ! $output[] = (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<br />\n"; ! } ! else { ! $output[] = "ERROR: DBMS " . $helpdeskdb->phptype . " not yet supported by the upgrade routine!<BR />\n"; ! } ?> Index: upgrade.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/upgrade.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** upgrade.php 11 Mar 2007 15:23:49 -0000 1.3 --- upgrade.php 30 Sep 2007 17:18:32 -0000 1.4 *************** *** 87,91 **** include 'system/upgrade.0.9.3.inc.php'; include 'system/upgrade.0.9.9.inc.php'; ! // include 'system/upgrade.1.0.inc.php'; $res = updateversion(SCRIPTVERSION); $output[] = "Updating version field to " . SCRIPTVERSION . " ....... " . (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; --- 87,91 ---- include 'system/upgrade.0.9.3.inc.php'; include 'system/upgrade.0.9.9.inc.php'; ! include 'system/upgrade.1.0.inc.php'; $res = updateversion(SCRIPTVERSION); $output[] = "Updating version field to " . SCRIPTVERSION . " ....... " . (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; *************** *** 105,109 **** include 'system/upgrade.0.9.3.inc.php'; include 'system/upgrade.0.9.9.inc.php'; ! // include 'system/upgrade.1.0.inc.php'; $res = updateversion(SCRIPTVERSION); $output[] = "Updating version field to " . SCRIPTVERSION . " ....... " . (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; --- 105,110 ---- include 'system/upgrade.0.9.3.inc.php'; include 'system/upgrade.0.9.9.inc.php'; ! include 'system/upgrade.1.0.inc.php'; ! $res = updateversion(SCRIPTVERSION); $output[] = "Updating version field to " . SCRIPTVERSION . " ....... " . (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; *************** *** 122,126 **** include 'system/upgrade.0.9.3.inc.php'; include 'system/upgrade.0.9.9.inc.php'; ! // include 'system/upgrade.1.0.inc.php'; $res = updateversion(SCRIPTVERSION); $output[] = "Updating version field to " . SCRIPTVERSION . " ....... " . (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; --- 123,127 ---- include 'system/upgrade.0.9.3.inc.php'; include 'system/upgrade.0.9.9.inc.php'; ! include 'system/upgrade.1.0.inc.php'; $res = updateversion(SCRIPTVERSION); $output[] = "Updating version field to " . SCRIPTVERSION . " ....... " . (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; *************** *** 138,142 **** include 'system/upgrade.0.9.9.inc.php'; ! // include 'system/upgrade.1.0.inc.php'; $res = updateversion(SCRIPTVERSION); $output[] = "Updating version field to " . SCRIPTVERSION . " ....... " . (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; --- 139,143 ---- include 'system/upgrade.0.9.9.inc.php'; ! include 'system/upgrade.1.0.inc.php'; $res = updateversion(SCRIPTVERSION); $output[] = "Updating version field to " . SCRIPTVERSION . " ....... " . (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; *************** *** 146,150 **** case '0.9.9': ! // From development version v0.9.9 $output[] = "<div class=\"maindark\"> <p>Upgrade from v" . $global_prefs['version'] . " to " . SCRIPTVERSION . "</p> --- 147,151 ---- case '0.9.9': ! // From release version v0.9.9 $output[] = "<div class=\"maindark\"> <p>Upgrade from v" . $global_prefs['version'] . " to " . SCRIPTVERSION . "</p> *************** *** 153,157 **** <p>"; ! // include 'system/upgrade.1.0.inc.php'; $res = updateversion(SCRIPTVERSION); $output[] = "Updating version field to " . SCRIPTVERSION . " ....... " . (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; --- 154,158 ---- <p>"; ! include 'system/upgrade.1.0.inc.php'; $res = updateversion(SCRIPTVERSION); $output[] = "Updating version field to " . SCRIPTVERSION . " ....... " . (!PEAR::isError($res) ? "Success!" : $res->getMessage()) . "<BR />\n"; |
From: Scott P. <wht...@us...> - 2007-09-30 17:18:36
|
Update of /cvsroot/helpmeict/Helpdesk In directory sc8-pr-cvs17:/tmp/cvs-serv31307 Modified Files: index.php upgrade.php Log Message: Update upgrade scripts for 1.0 Index: upgrade.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/upgrade.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** upgrade.php 7 Feb 2007 01:46:40 -0000 1.3 --- upgrade.php 30 Sep 2007 17:18:31 -0000 1.4 *************** *** 33,37 **** // Version number of this release (also defined in index.php) ! define(SCRIPTVERSION, '0.9.9'); // Destroy any session that might exist effectively logging off --- 33,37 ---- // Version number of this release (also defined in index.php) ! define("SCRIPTVERSION", '1.0'); // Destroy any session that might exist effectively logging off Index: index.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/index.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** index.php 12 Sep 2007 23:37:32 -0000 1.14 --- index.php 30 Sep 2007 17:18:31 -0000 1.15 *************** *** 37,41 **** // Version number of this release (also defined in upgrade.php) ! define("SCRIPTVERSION", '0.9.9'); // Global configuration --- 37,41 ---- // Version number of this release (also defined in upgrade.php) ! define("SCRIPTVERSION", '1.0'); // Global configuration |