From cvs w lms.org.pl Wed Feb 1 23:37:58 2012 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 1 Feb 2012 23:37:58 +0100 (CET) Subject: [lms-commits] CVS update of lms/modules (nodeprint.php) Message-ID: <20120201223758.D4DE530281A7@eftep.altec.pl> Date: Wednesday, February 1, 2012 @ 23:37:58 Author: chilek Path: /cvsroot/lms/modules Modified: nodeprint.php - BTS#0000903: fixed inproper network and group handling in nodeprint.php Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/modules/nodeprint.php.diff?&r1=1.15&r2=1.16 Index: lms/modules/nodeprint.php diff -u lms/modules/nodeprint.php:1.15 lms/modules/nodeprint.php:1.16 --- lms/modules/nodeprint.php:1.15 Mon Jan 2 12:01:35 2012 +++ lms/modules/nodeprint.php Wed Feb 1 23:37:58 2012 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: nodeprint.php,v 1.15 2012/01/02 11:01:35 alec Exp $ + * $Id: nodeprint.php,v 1.16 2012/02/01 22:37:58 chilek Exp $ */ $type = isset($_GET['type']) ? $_GET['type'] : ''; @@ -65,21 +65,22 @@ case 'mac': $sqlord = ' ORDER BY mac'; break; - case 'ip': + case 'ip': $sqlord = ' ORDER BY ipaddr'; break; case 'ownerid': $sqlord = ' ORDER BY ownerid'; break; - case 'owner': + case 'owner': $sqlord = ' ORDER BY owner'; break; } - if($_POST['network']) + $net = intval($_POST['network']); + if ($net) $net = $LMS->GetNetworkParams($_POST['network']); - - $group = $_POST['customergroup']; + + $group = intval($_POST['customergroup']); $nodelist = $DB->GetAll('SELECT vnodes.id AS id, inet_ntoa(ipaddr) AS ip, mac, vnodes.name AS name, vnodes.info AS info, From cvs w lms.org.pl Thu Feb 2 17:55:05 2012 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 2 Feb 2012 17:55:05 +0100 (CET) Subject: [lms-commits] CVS update of lms/modules (4 files) Message-ID: <20120202165505.2660030281AD@eftep.altec.pl> Date: Thursday, February 2, 2012 @ 17:55:05 Author: chilek Path: /cvsroot/lms/modules Modified: customeradd.php customeredit.php nodeadd.php nodeedit.php - new contact add and new mac add ported to javascript Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/modules/customeradd.php.diff?&r1=1.38&r2=1.39 http://cvs.lms.org.pl/viewvc/Development/lms/modules/customeredit.php.diff?&r1=1.48&r2=1.49 http://cvs.lms.org.pl/viewvc/Development/lms/modules/nodeadd.php.diff?&r1=1.102&r2=1.103 http://cvs.lms.org.pl/viewvc/Development/lms/modules/nodeedit.php.diff?&r1=1.123&r2=1.124 Index: lms/modules/customeradd.php diff -u lms/modules/customeradd.php:1.38 lms/modules/customeradd.php:1.39 --- lms/modules/customeradd.php:1.38 Mon Jan 2 12:01:34 2012 +++ lms/modules/customeradd.php Thu Feb 2 17:55:05 2012 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: customeradd.php,v 1.38 2012/01/02 11:01:34 alec Exp $ + * $Id: customeradd.php,v 1.39 2012/02/02 16:55:05 chilek Exp $ */ if(isset($_GET['ajax'])) @@ -72,12 +72,7 @@ $customeradd = array(); -if(isset($_POST['customeradd']) && isset($_GET['newcontact'])) -{ - $customeradd = $_POST['customeradd']; - $customeradd['contacts'][] = array(); -} -elseif(isset($_POST['customeradd'])) +if (isset($_POST['customeradd'])) { $customeradd = $_POST['customeradd']; Index: lms/modules/customeredit.php diff -u lms/modules/customeredit.php:1.48 lms/modules/customeredit.php:1.49 --- lms/modules/customeredit.php:1.48 Mon Jan 2 12:01:34 2012 +++ lms/modules/customeredit.php Thu Feb 2 17:55:05 2012 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: customeredit.php,v 1.48 2012/01/02 11:01:34 alec Exp $ + * $Id: customeredit.php,v 1.49 2012/02/02 16:55:05 chilek Exp $ */ $action = isset($_GET['action']) ? $_GET['action'] : ''; $exists = $LMS->CustomerExists($_GET['id']); @@ -34,7 +34,7 @@ { $SESSION->redirect('?m=customerlist'); } -elseif(isset($_POST['customerdata']) && !isset($_GET['newcontact'])) +elseif (isset($_POST['customerdata'])) { $customerdata = $_POST['customerdata']; foreach($customerdata as $key=>$value) @@ -192,13 +192,7 @@ foreach($customerinfo['messengers'] as $idx => $val) $customerinfo['uid'][$idx] = $val['uid']; - if(isset($_POST['customerdata']) && isset($_GET['newcontact'])) - { - $customerdata = $_POST['customerdata']; - $customerdata['contacts'][] = array(); - $customerinfo = array_merge($customerinfo, $customerdata); - } - elseif(empty($customerinfo['contacts'])) + if (empty($customerinfo['contacts'])) $customerinfo['contacts'][] = array(); } Index: lms/modules/nodeadd.php diff -u lms/modules/nodeadd.php:1.102 lms/modules/nodeadd.php:1.103 --- lms/modules/nodeadd.php:1.102 Mon Jan 2 12:01:35 2012 +++ lms/modules/nodeadd.php Thu Feb 2 17:55:05 2012 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: nodeadd.php,v 1.102 2012/01/02 11:01:35 alec Exp $ + * $Id: nodeadd.php,v 1.103 2012/02/02 16:55:05 chilek Exp $ */ $nodedata['access'] = 1; @@ -48,7 +48,7 @@ if(isset($_GET['prename'])) $nodedata['name'] = $_GET['prename']; -if(isset($_POST['nodedata']) && !isset($_GET['newmac'])) +if (isset($_POST['nodedata'])) { $nodedata = $_POST['nodedata']; @@ -203,16 +203,6 @@ $nodedata['ipaddr_pub'] = ''; } } -else -{ - if(isset($_POST['nodedata']) && isset($_GET['newmac'])) - { - $nodedata = $_POST['nodedata']; - $nodedata['ipaddr'] = $_POST['nodedataipaddr']; - $nodedata['ipaddr_pub'] = $_POST['nodedataipaddr_pub']; - $nodedata['macs'][] = ''; - } -} if(empty($nodedata['macs'])) $nodedata['macs'][] = ''; Index: lms/modules/nodeedit.php diff -u lms/modules/nodeedit.php:1.123 lms/modules/nodeedit.php:1.124 --- lms/modules/nodeedit.php:1.123 Mon Jan 2 12:01:35 2012 +++ lms/modules/nodeedit.php Thu Feb 2 17:55:05 2012 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: nodeedit.php,v 1.123 2012/01/02 11:01:35 alec Exp $ + * $Id: nodeedit.php,v 1.124 2012/02/02 16:55:05 chilek Exp $ */ $action = isset($_GET['action']) ? $_GET['action'] : ''; @@ -76,7 +76,7 @@ $layout['pagetitle'] = trans('Node Edit: $a', $nodeinfo['name']); -if(isset($_POST['nodeedit']) && !isset($_GET['newmac'])) +if (isset($_POST['nodeedit'])) { $nodeedit = $_POST['nodeedit']; @@ -247,17 +247,10 @@ } else { - if(isset($_POST['nodeedit']) && isset($_GET['newmac'])) - { - $nodeedit = $_POST['nodeedit']; - $nodeedit['macs'][] = ''; - $nodeinfo = array_merge($nodeinfo, $nodeedit); + if ($nodeinfo['city_name'] || $nodeinfo['street_name']) { + $nodeinfo['teryt'] = true; + $nodeinfo['location'] = location_str($nodeinfo); } - - if ($nodeinfo['city_name'] || $nodeinfo['street_name']) { - $nodeinfo['teryt'] = true; - $nodeinfo['location'] = location_str($nodeinfo); - } } if(empty($nodeinfo['macs'])) From cvs w lms.org.pl Thu Feb 2 17:55:05 2012 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 2 Feb 2012 17:55:05 +0100 (CET) Subject: [lms-commits] CVS update of lms/templates (4 files) Message-ID: <20120202165505.4F93C30281B0@eftep.altec.pl> Date: Thursday, February 2, 2012 @ 17:55:05 Author: chilek Path: /cvsroot/lms/templates Modified: customeradd.html customereditbox.html nodeaddbox.html nodeeditbox.html - new contact add and new mac add ported to javascript Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/templates/customeradd.html.diff?&r1=1.50&r2=1.51 http://cvs.lms.org.pl/viewvc/Development/lms/templates/customereditbox.html.diff?&r1=1.46&r2=1.47 http://cvs.lms.org.pl/viewvc/Development/lms/templates/nodeaddbox.html.diff?&r1=1.94&r2=1.95 http://cvs.lms.org.pl/viewvc/Development/lms/templates/nodeeditbox.html.diff?&r1=1.98&r2=1.99 Index: lms/templates/customeradd.html diff -u lms/templates/customeradd.html:1.50 lms/templates/customeradd.html:1.51 --- lms/templates/customeradd.html:1.50 Mon Jan 2 15:53:20 2012 +++ lms/templates/customeradd.html Thu Feb 2 17:55:05 2012 @@ -1,5 +1,5 @@ {include file="header.html"} - +