Witam,
Próba nałożenia patch'a nodes-filename.diff skończyła się
niepowodzeniem. Poprawki linii, które nie zostały nałożone
automatycznie, nałożyłem ręcznie. Wydawało mi się, że wszystko
zadziałało poprawnie, gdyż poprawnie były wyświetlane pola w UI oraz
poprawnie byy generowane skrypty przez lms-mgc.
Jedyny problem na jaki napotkałem to próba dodania nowego komputera
kończyła się niepowodzeniem :(
Wersja na którą nakładałem łatkę to: 1.533/1.53
Czy mógłby ktoś sprawdzić co jest źle w załączonym patchu?
Różni się delikatnie od tego załączonego w standardowym contrib'ie gdyż
ten z contriba, nie nakłada się bezboleśnie na wersje jaką mam.
Z góry dzięki za pomoc.
Pozdr,
Dawid
diff -Naur lms-vanilla/lib/LMS.class.php lms-patched/lib/LMS.class.php
--- lms-vanilla/lib/LMS.class.php 2004-12-16 15:08:47.000000000 +0100
+++ lms-patched/lib/LMS.class.php 2005-02-26 20:10:16.000000000 +0100
@@ -1154,7 +1154,7 @@
function NodeUpdate($nodedata)
{
$this->SetTS('nodes');
- return $this->DB->Execute('UPDATE nodes SET name=UPPER(?), ipaddr=inet_aton(?), mac=UPPER(?), netdev=?, moddate=?NOW?, modid=?, access=?, warning=?, ownerid=?, info=? WHERE id=?', array($nodedata['name'], $nodedata['ipaddr'], $nodedata['mac'], $nodedata['netdev'], $this->SESSION->id, $nodedata['access'], $nodedata['warning'], $nodedata['ownerid'], $nodedata['info'], $nodedata['id']));
+ return $this->DB->Execute('UPDATE nodes SET name=UPPER(?), ipaddr=inet_aton(?), mac=UPPER(?), netdev=?, moddate=?NOW?, modid=?, access=?, warning=?, ownerid=?, info=?, filename=? WHERE id=?', array($nodedata['name'], $nodedata['ipaddr'], $nodedata['mac'], $nodedata['netdev'], $this->SESSION->id, $nodedata['access'], $nodedata['warning'], $nodedata['ownerid'], $nodedata['info'], $nodedata['filename'], $nodedata['id']));
}
function DeleteNode($id)
@@ -1205,7 +1205,7 @@
function GetNode($id)
{
- if($result = $this->DB->GetRow('SELECT id, name, ownerid, ipaddr, inet_ntoa(ipaddr) AS ip, mac, access, warning, creationdate, moddate, creatorid, modid, netdev, lastonline, info FROM nodes WHERE id=?', array($id)))
+ if($result = $this->DB->GetRow('SELECT id, name, ownerid, ipaddr, inet_ntoa(ipaddr) AS ip, mac, access, warning, creationdate, moddate, creatorid, modid, netdev, lastonline, info, filename FROM nodes WHERE id=?', array($id)))
{
$result['createdby'] = $this->GetAdminName($result['creatorid']);
$result['modifiedby'] = $this->GetAdminName($result['modid']);
@@ -1416,7 +1416,7 @@
function NodeAdd($nodedata)
{
$this->SetTS('nodes');
- if($this->DB->Execute('INSERT INTO nodes (name, mac, ipaddr, ownerid, creatorid, creationdate, access, warning, info) VALUES (?, ?, inet_aton(?), ?, ?, ?NOW?, ?, ?, ?)', array(strtoupper($nodedata['name']),strtoupper($nodedata['mac']),$nodedata['ipaddr'],$nodedata['ownerid'],$this->SESSION->id, $nodedata['access'], $nodedata['warning'], $nodedata['info'])))
+ if($this->DB->Execute('INSERT INTO nodes (name, mac, ipaddr, ownerid, creatorid, creationdate, access, warning, info, filename) VALUES (?, ?, inet_aton(?), ?, ?, ?NOW?, ?, ?, ?)', array(strtoupper($nodedata['name']),strtoupper($nodedata['mac']),$nodedata['ipaddr'],$nodedata['ownerid'],$this->SESSION->id, $nodedata['access'], $nodedata['warning'], $nodedata['info'],$nodedatea['filename'])))
return $this->DB->GetOne('SELECT MAX(id) FROM nodes');
else
return FALSE;
diff -Naur lms-vanilla/modules/nodeedit.php lms-patched/modules/nodeedit.php
--- lms-vanilla/modules/nodeedit.php 2004-12-16 15:08:47.000000000 +0100
+++ lms-patched/modules/nodeedit.php 2005-02-26 20:13:12.000000000 +0100
@@ -125,6 +125,7 @@
$nodeinfo['ip'] = $nodeedit['ipaddr'];
$nodeinfo['access'] = $nodeedit['access'];
$nodeinfo['ownerid'] = $nodeedit['ownerid'];
+ $nodeinfo['filename'] = $nodeedit['filename'];
if(!$error)
{
diff -Naur lms-vanilla/templates/nodeaddbox.html lms-patched/templates/nodeaddbox.html
--- lms-vanilla/templates/nodeaddbox.html 2004-11-23 20:26:44.000000000 +0100
+++ lms-patched/templates/nodeaddbox.html 2005-02-26 20:16:20.000000000 +0100
@@ -35,6 +35,14 @@
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="1%" CLASS="FLEFT">
+ <IMG SRC="img/save.gif" BORDER="0" ALT="Boot image:">
+ </TD>
+ <TD WIDTH="99%" CLASS="FRIGHT" COLSPAN="2">
+ <INPUT TYPE="TEXT" NAME="nodedata[filename]" VALUE="{$nodedata.filename}">
+ </TD>
+ </TR>
+ <TR CLASS="LIGHT">
+ <TD WIDTH="1%" CLASS="FLEFT">
<IMG SRC="img/{if ! $nodedata.access}no{/if}access.gif" BORDER="0" ALT="">
</TD>
<TD WIDTH="1%" NOWRAP>
diff -Naur lms-vanilla/templates/nodeeditbox.html lms-patched/templates/nodeeditbox.html
--- lms-vanilla/templates/nodeeditbox.html 2004-11-23 20:26:44.000000000 +0100
+++ lms-patched/templates/nodeeditbox.html 2005-02-26 20:18:05.000000000 +0100
@@ -28,6 +28,14 @@
</TR>
<TR CLASS="LIGHT">
<TD WIDTH="1%" CLASS="FLEFT">
+ <IMG SRC="img/save.gif" BORDER="0" ALT="Boot image:">
+ </TD>
+ <TD WIDTH="99%" CLASS="FRIGHT" COLSPAN="2">
+ <INPUT TYPE="TEXT" NAME="nodeedit[filename]" VALUE="{$nodeinfo.filename}" CLASS="BOLD">
+ </TD>
+ </TR>
+ <TR CLASS="LIGHT">
+ <TD WIDTH="1%" CLASS="FLEFT">
<IMG SRC="img/network.gif" BORDER="0" ALT="Sieæ:">
</TD>
<TD WIDTH="99%" CLASS="FRIGHT" COLSPAN="2">
diff -Naur lms-vanilla/templates/nodeinfobox.html lms-patched/templates/nodeinfobox.html
--- lms-vanilla/templates/nodeinfobox.html 2004-11-24 10:08:31.000000000 +0100
+++ lms-patched/templates/nodeinfobox.html 2005-02-26 20:18:27.000000000 +0100
@@ -24,6 +24,16 @@
{$nodeinfo.mac} {if $nodeinfo.producer}({$nodeinfo.producer}){/if}
</TD>
</TR>
+ {if $nodeinfo.filename neq ""}
+ <TR CLASS="LIGHT">
+ <TD WIDTH="1%" CLASS="FLEFT">
+ <IMG SRC="img/save.gif" BORDER="0" ALT="Boot image:">
+ </TD>
+ <TD WIDTH="99%" CLASS="FRIGHT" COLSPAN="2">
+ <B>{$nodeinfo.filename}</B>
+ </TD>
+ </TR>
+ {/if}
<TR CLASS="LIGHT">
<TD WIDTH="1%" CLASS="FLEFT">
<IMG SRC="img/network.gif" BORDER="0" ALT="Sieæ:">