From cvs w lms.org.pl Wed Jan 6 09:12:06 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 6 Jan 2010 09:12:06 +0100 (CET) Subject: [lms-commits] CVS update of lms/modules (invoicenew.php) Message-ID: <20100106081206.8F876302A6E0@hydra.altec.pl> Date: Wednesday, January 6, 2010 @ 09:12:06 Author: alec Path: /cvsroot/lms/modules Modified: invoicenew.php - reverted last change Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/modules/invoicenew.php.diff?&r1=1.78&r2=1.79 Index: lms/modules/invoicenew.php diff -u lms/modules/invoicenew.php:1.78 lms/modules/invoicenew.php:1.79 --- lms/modules/invoicenew.php:1.78 Thu Dec 31 08:32:44 2009 +++ lms/modules/invoicenew.php Wed Jan 6 09:12:06 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: invoicenew.php,v 1.78 2009/12/31 07:32:44 chilek Exp $ + * $Id: invoicenew.php,v 1.79 2010/01/06 08:12:06 alec Exp $ */ // Invoiceless liabilities: Zobowiazania/obciazenia na ktore nie zostala wystawiona faktura @@ -246,7 +246,7 @@ } // set paytime - if(empty($invoice['paytime_default']) || $invoice['paytime_default'] == 1) + if(!empty($invoice['paytime_default'])) { if($customer['paytime'] != -1) $invoice['paytime'] = $customer['paytime']; @@ -257,7 +257,7 @@ $invoice['paytime'] = $CONFIG['invoices']['paytime']; } // set paytype - if(empty($invoice['paytype_default']) || $invoice['paytype_default'] == 1) + if(!empty($invoice['paytype_default'])) { if($customer['paytype']) $invoice['paytype'] = $customer['paytype']; From cvs w lms.org.pl Thu Jan 7 12:29:07 2010 From: cvs w lms.org.pl (LMS CVS) Date: Thu, 7 Jan 2010 12:29:07 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib/locale/pl (functions.php) Message-ID: <20100107112907.A9764302A6E0@hydra.altec.pl> Date: Thursday, January 7, 2010 @ 12:29:07 Author: alec Path: /cvsroot/lms/lib/locale/pl Modified: functions.php - code formatting Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/locale/pl/functions.php.diff?&r1=1.34&r2=1.35 Index: lms/lib/locale/pl/functions.php diff -u lms/lib/locale/pl/functions.php:1.34 lms/lib/locale/pl/functions.php:1.35 --- lms/lib/locale/pl/functions.php:1.34 Tue Dec 1 10:06:19 2009 +++ lms/lib/locale/pl/functions.php Thu Jan 7 12:29:07 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: functions.php,v 1.34 2009/12/01 09:06:19 alec Exp $ + * $Id: functions.php,v 1.35 2010/01/07 11:29:07 alec Exp $ */ function bankaccount($id, $account=NULL) @@ -29,8 +29,9 @@ global $DB; if($account === NULL) - $account = $DB->GetOne('SELECT account FROM divisions WHERE id IN (SELECT divisionid - FROM customers WHERE id = ?)', array($id)); + $account = $DB->GetOne('SELECT account FROM divisions + WHERE id IN (SELECT divisionid + FROM customers WHERE id = ?)', array($id)); $acclen = strlen($account); @@ -38,7 +39,8 @@ { $cc = '2521'; // Kod kraju - Polska $format = '%0'.(24 - $acclen) .'d'; - return sprintf('%02d',98-bcmod($account.sprintf($format,$id).$cc.'00',97)).$account.sprintf($format,$id); + $account .= sprintf($format, $id); + return sprintf('%02d', 98-bcmod($account.$cc.'00', 97)).$account; } return $account; From cvs w lms.org.pl Mon Jan 11 08:31:39 2010 From: cvs w lms.org.pl (LMS CVS) Date: Mon, 11 Jan 2010 08:31:39 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib (pdf.php) Message-ID: <20100111073139.1198B302A71C@hydra.altec.pl> Date: Monday, January 11, 2010 @ 08:31:38 Author: chilek Path: /cvsroot/lms/lib Modified: pdf.php - added lithuanian letters Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/pdf.php.diff?&r1=1.10&r2=1.11 Index: lms/lib/pdf.php diff -u lms/lib/pdf.php:1.10 lms/lib/pdf.php:1.11 --- lms/lib/pdf.php:1.10 Wed Nov 18 11:19:42 2009 +++ lms/lib/pdf.php Mon Jan 11 08:31:38 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: pdf.php,v 1.10 2009/11/18 10:19:42 ceho Exp $ + * $Id: pdf.php,v 1.11 2010/01/11 07:31:38 chilek Exp $ */ define('PDF_MARGIN_BOTTOM', 40); @@ -121,7 +121,21 @@ 188=>'zacute', 172=>'Zacute', 191=>'zdot', - 175=>'Zdot' + 175=>'Zdot', + 185=>'Scaron', + 169=>'Scaron', + 232=>'ccaron', + 200=>'Ccaron', + 236=>'edot', + 204=>'Edot', + 231=>'iogonek', + 199=>'Iogonek', + 249=>'uogonek', + 217=>'Uogonek', + 254=>'umacron', + 222=>'Umacron', + 190=>'zcaron', + 174=>'Zcaron' ); $tmp = array( From cvs w lms.org.pl Mon Jan 11 08:33:42 2010 From: cvs w lms.org.pl (LMS CVS) Date: Mon, 11 Jan 2010 08:33:42 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib (pdf.php) Message-ID: <20100111073342.882AF302A71C@hydra.altec.pl> Date: Monday, January 11, 2010 @ 08:33:42 Author: chilek Path: /cvsroot/lms/lib Modified: pdf.php - missed scaron Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/pdf.php.diff?&r1=1.11&r2=1.12 Index: lms/lib/pdf.php diff -u lms/lib/pdf.php:1.11 lms/lib/pdf.php:1.12 --- lms/lib/pdf.php:1.11 Mon Jan 11 08:31:38 2010 +++ lms/lib/pdf.php Mon Jan 11 08:33:42 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: pdf.php,v 1.11 2010/01/11 07:31:38 chilek Exp $ + * $Id: pdf.php,v 1.12 2010/01/11 07:33:42 chilek Exp $ */ define('PDF_MARGIN_BOTTOM', 40); @@ -122,7 +122,7 @@ 172=>'Zacute', 191=>'zdot', 175=>'Zdot', - 185=>'Scaron', + 185=>'scaron', 169=>'Scaron', 232=>'ccaron', 200=>'Ccaron', From cvs w lms.org.pl Mon Jan 11 10:12:29 2010 From: cvs w lms.org.pl (LMS CVS) Date: Mon, 11 Jan 2010 10:12:29 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib/ezpdf (4 files) Message-ID: <20100111091229.49CB6302A71C@hydra.altec.pl> Date: Monday, January 11, 2010 @ 10:12:29 Author: chilek Path: /cvsroot/lms/lib/ezpdf Modified: arial.afm arial.pfb arialbd.afm arialbd.pfb - enabled all letters for pdf generation Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/ezpdf/arial.afm.diff?&r1=1.1&r2=1.2 http://cvs.lms.org.pl/viewvc/Development/lms/lib/ezpdf/arial.pfb.diff?&r1=1.1&r2=1.2 http://cvs.lms.org.pl/viewvc/Development/lms/lib/ezpdf/arialbd.afm.diff?&r1=1.1&r2=1.2 http://cvs.lms.org.pl/viewvc/Development/lms/lib/ezpdf/arialbd.pfb.diff?&r1=1.1&r2=1.2 The diff is longer than the limit of 200KB. From cvs w lms.org.pl Wed Jan 13 10:58:36 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 13 Jan 2010 10:58:36 +0100 (CET) Subject: [lms-commits] CVS update of lms/modules (customer.inc.php) Message-ID: <20100113095836.2E30B302B329@hydra.altec.pl> Date: Wednesday, January 13, 2010 @ 10:58:36 Author: alec Path: /cvsroot/lms/modules Modified: customer.inc.php - fix displaying of expired assignments Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/modules/customer.inc.php.diff?&r1=1.3&r2=1.4 Index: lms/modules/customer.inc.php diff -u lms/modules/customer.inc.php:1.3 lms/modules/customer.inc.php:1.4 --- lms/modules/customer.inc.php:1.3 Sat Jun 6 19:40:56 2009 +++ lms/modules/customer.inc.php Wed Jan 13 10:58:35 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: customer.inc.php,v 1.3 2009/06/06 17:40:56 alec Exp $ + * $Id: customer.inc.php,v 1.4 2010/01/13 09:58:35 alec Exp $ */ if($layout['module'] != 'customeredit') @@ -30,6 +30,7 @@ $SMARTY->assign_by_ref('customerinfo', $customerinfo); } +$expired = !empty($_GET['expired']) ? true : false; $assignments = $LMS->GetCustomerAssignments($customerid, !empty($expired) ? $expired : NULL); $customergroups = $LMS->CustomergroupGetForCustomer($customerid); $othercustomergroups = $LMS->GetGroupNamesWithoutCustomer($customerid); @@ -58,7 +59,7 @@ } $SMARTY->assign(array( - 'expired' => isset($_GET['expired']) ? $_GET['expired'] : false, + 'expired' => $expired, 'time' => $SESSION->get('addbt'), 'value' => $SESSION->get('addbv'), 'taxid' => $SESSION->get('addbtax'), From cvs w lms.org.pl Wed Jan 13 11:53:05 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 13 Jan 2010 11:53:05 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc (ChangeLog, lms.mysql, lms.pgsql) Message-ID: <20100113105305.E6AFB302B329@hydra.altec.pl> Date: Wednesday, January 13, 2010 @ 11:53:05 Author: alec Path: /cvsroot/lms/doc Modified: ChangeLog lms.mysql lms.pgsql - fixed deletion of referenced node assignments on assignments deletion Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/ChangeLog.diff?&r1=1.1473&r2=1.1474 http://cvs.lms.org.pl/viewvc/Development/lms/doc/lms.mysql.diff?&r1=1.162&r2=1.163 http://cvs.lms.org.pl/viewvc/Development/lms/doc/lms.pgsql.diff?&r1=1.154&r2=1.155 Index: lms/doc/ChangeLog diff -u lms/doc/ChangeLog:1.1473 lms/doc/ChangeLog:1.1474 --- lms/doc/ChangeLog:1.1473 Fri Dec 18 13:21:57 2009 +++ lms/doc/ChangeLog Wed Jan 13 11:53:05 2010 @@ -1,4 +1,4 @@ -$Id: ChangeLog,v 1.1473 2009/12/18 12:21:57 alec Exp $ +$Id: ChangeLog,v 1.1474 2010/01/13 10:53:05 alec Exp $ version ? (????-??-??) @@ -37,6 +37,7 @@ queues (alec/chilan) - don't allow to create an account of type mail if alias with specified login w domain already exists (alec) + - fixed deletion of referenced node assignments on assignments deletion (alec) version 1.11.9 Moloc (2009-10-28): Index: lms/doc/lms.mysql diff -u lms/doc/lms.mysql:1.162 lms/doc/lms.mysql:1.163 --- lms/doc/lms.mysql:1.162 Wed Nov 18 15:56:12 2009 +++ lms/doc/lms.mysql Wed Jan 13 11:53:05 2010 @@ -1,5 +1,5 @@ # -------------------------------------------------------- -# $Id: lms.mysql,v 1.162 2009/11/18 14:56:12 alec Exp $ +# $Id: lms.mysql,v 1.163 2010/01/13 10:53:05 alec Exp $ # -------------------------------------------------------- # @@ -50,19 +50,6 @@ # -------------------------------------------------------- # -# Structure of table nodeassignments -# -DROP TABLE IF EXISTS nodeassignments; -CREATE TABLE nodeassignments ( - id int(11) NOT NULL auto_increment, - nodeid int(11) NOT NULL DEFAULT '0', - assignmentid int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (id), - UNIQUE KEY nodeid (nodeid, assignmentid) -) ENGINE=InnoDB; - -# -------------------------------------------------------- -# # Structure of table taxes # DROP TABLE IF EXISTS taxes; @@ -374,6 +361,23 @@ # -------------------------------------------------------- # +# Structure of table nodeassignments +# +DROP TABLE IF EXISTS nodeassignments; +CREATE TABLE nodeassignments ( + id int(11) NOT NULL auto_increment, + nodeid int(11) NOT NULL + REFERENCES nodes (id) ON DELETE CASCADE ON UPDATE CASCADE, + assignmentid int(11) NOT NULL + REFERENCES assignments (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + UNIQUE KEY nodeid (nodeid, assignmentid), + INDEX assignmentid (assignmentid) +) ENGINE=InnoDB; + + +# -------------------------------------------------------- +# # Structure of table payments # DROP TABLE IF EXISTS payments; @@ -1317,4 +1321,4 @@ # -------------------------------------------------------- -INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2009111700'); +INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2010011300'); Index: lms/doc/lms.pgsql diff -u lms/doc/lms.pgsql:1.154 lms/doc/lms.pgsql:1.155 --- lms/doc/lms.pgsql:1.154 Wed Nov 18 15:56:12 2009 +++ lms/doc/lms.pgsql Wed Jan 13 11:53:05 2010 @@ -1,4 +1,4 @@ -/* $Id: lms.pgsql,v 1.154 2009/11/18 14:56:12 alec Exp $ */ +/* $Id: lms.pgsql,v 1.155 2010/01/13 10:53:05 alec Exp $ */ /* -------------------------------------------------------- Structure of table "users" @@ -49,20 +49,6 @@ CREATE INDEX assignments_customerid_idx ON assignments (customerid); /* -------------------------------------------------------- - Structure of table "nodeassignments" --------------------------------------------------------- */ -DROP SEQUENCE nodeassignments_id_seq; -CREATE SEQUENCE nodeassignments_id_seq; -DROP TABLE nodeassignments; -CREATE TABLE nodeassignments ( - id integer DEFAULT nextval('nodeassignments_id_seq'::text) NOT NULL, - nodeid integer DEFAULT 0 NOT NULL, - assignmentid integer DEFAULT 0 NOT NULL, - PRIMARY KEY (id), - UNIQUE (nodeid, assignmentid) -); - -/* -------------------------------------------------------- Structure of table "cash" -------------------------------------------------------- */ DROP SEQUENCE cash_id_seq; @@ -183,6 +169,24 @@ ); /* -------------------------------------------------------- + Structure of table "nodeassignments" +-------------------------------------------------------- */ +DROP SEQUENCE nodeassignments_id_seq; +CREATE SEQUENCE nodeassignments_id_seq; +DROP TABLE nodeassignments; +CREATE TABLE nodeassignments ( + id integer DEFAULT nextval('nodeassignments_id_seq'::text) NOT NULL, + nodeid integer NOT NULL + REFERENCES nodes (id) ON DELETE CASCADE ON UPDATE CASCADE, + assignmentid integer NOT NULL + REFERENCES assignments (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + UNIQUE (nodeid, assignmentid) +); + +CREATE INDEX nodeassignments_assignmentid_idx ON nodeassignments (assignmentid); + +/* -------------------------------------------------------- Structure of table "tariffs" -------------------------------------------------------- */ DROP SEQUENCE tariffs_id_seq; @@ -1402,4 +1406,4 @@ INSERT INTO nastypes (name) VALUES ('usrhiper'); INSERT INTO nastypes (name) VALUES ('other'); -INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion','2009111700'); +INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion','2010011300'); From cvs w lms.org.pl Wed Jan 13 11:53:06 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 13 Jan 2010 11:53:06 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib (LMS.class.php, upgradedb.php) Message-ID: <20100113105306.24B42302B32A@hydra.altec.pl> Date: Wednesday, January 13, 2010 @ 11:53:06 Author: alec Path: /cvsroot/lms/lib Modified: LMS.class.php upgradedb.php - fixed deletion of referenced node assignments on assignments deletion Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/LMS.class.php.diff?&r1=1.1012&r2=1.1013 http://cvs.lms.org.pl/viewvc/Development/lms/lib/upgradedb.php.diff?&r1=1.168&r2=1.169 Index: lms/lib/LMS.class.php diff -u lms/lib/LMS.class.php:1.1012 lms/lib/LMS.class.php:1.1013 --- lms/lib/LMS.class.php:1.1012 Sat Nov 28 17:12:47 2009 +++ lms/lib/LMS.class.php Wed Jan 13 11:53:05 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: LMS.class.php,v 1.1012 2009/11/28 16:12:47 chilek Exp $ + * $Id: LMS.class.php,v 1.1013 2010/01/13 10:53:05 alec Exp $ */ // LMS Class - contains internal LMS database functions used @@ -34,7 +34,7 @@ var $CONFIG; // table including lms.ini options var $cache = array(); // internal cache var $_version = '1.11-cvs'; // class version - var $_revision = '$Revision: 1.1012 $'; + var $_revision = '$Revision: 1.1013 $'; function LMS(&$DB, &$AUTH, &$CONFIG) // class variables setting { @@ -1142,7 +1142,6 @@ { $this->DB->BeginTrans(); $this->DB->Execute('DELETE FROM nodes WHERE id = ?', array($id)); - $this->DB->Execute('DELETE FROM nodeassignments WHERE nodeid = ?', array($id)); $this->DB->Execute('DELETE FROM nodegroupassignments WHERE nodeid = ?', array($id)); $this->DB->CommitTrans(); } @@ -1699,7 +1698,6 @@ { $this->DB->Execute('DELETE FROM liabilities WHERE id=?', array($lid)); } - $this->DB->Execute('DELETE FROM nodeassignments WHERE assignmentid=?', array($id)); $this->DB->Execute('DELETE FROM assignments WHERE id=?', array($id)); $this->DB->CommitTrans(); Index: lms/lib/upgradedb.php diff -u lms/lib/upgradedb.php:1.168 lms/lib/upgradedb.php:1.169 --- lms/lib/upgradedb.php:1.168 Wed Nov 18 15:56:12 2009 +++ lms/lib/upgradedb.php Wed Jan 13 11:53:06 2010 @@ -21,10 +21,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: upgradedb.php,v 1.168 2009/11/18 14:56:12 alec Exp $ + * $Id: upgradedb.php,v 1.169 2010/01/13 10:53:06 alec Exp $ */ -define('DBVERSION', '2009111700'); // here should be always the newest version of database! +define('DBVERSION', '2010011300'); // here should be always the newest version of database! // it placed here to avoid read disk every time when we call this file. /* From cvs w lms.org.pl Wed Jan 13 11:53:06 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 13 Jan 2010 11:53:06 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib/upgradedb (2 files) Message-ID: <20100113105306.3C7CA302B32B@hydra.altec.pl> Date: Wednesday, January 13, 2010 @ 11:53:06 Author: alec Path: /cvsroot/lms/lib/upgradedb Added: mysql.2010011300.php postgres.2010011300.php - fixed deletion of referenced node assignments on assignments deletion Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/upgradedb/mysql.2010011300.php?rev=1.1 http://cvs.lms.org.pl/viewvc/Development/lms/lib/upgradedb/postgres.2010011300.php?rev=1.1 Index: lms/lib/upgradedb/mysql.2010011300.php diff -u /dev/null lms/lib/upgradedb/mysql.2010011300.php:1.1 --- /dev/null Wed Jan 13 11:53:06 2010 +++ lms/lib/upgradedb/mysql.2010011300.php Wed Jan 13 11:53:06 2010 @@ -0,0 +1,40 @@ +Execute("DELETE FROM nodeassignments WHERE assignmentid NOT IN (SELECT id FROM assignments)"); +$DB->Execute("DELETE FROM nodeassignments WHERE nodeid NOT IN (SELECT id FROM nodes)"); + +$DB->Execute("ALTER TABLE nodeassignments ALTER nodeid DROP DEFAULT"); +$DB->Execute("ALTER TABLE nodeassignments ALTER assignmentid DROP DEFAULT"); + +$DB->Execute("ALTER TABLE nodeassignments ADD FOREIGN KEY (nodeid) + REFERENCES nodes (id) ON DELETE CASCADE ON UPDATE CASCADE"); +$DB->Execute("ALTER TABLE nodeassignments ADD FOREIGN KEY (assignmentid) + REFERENCES assignments (id) ON DELETE CASCADE ON UPDATE CASCADE"); + +$DB->Execute("ALTER TABLE nodeassignments ADD INDEX assignmentid (assignmentid)"); + +$DB->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010011300', 'dbversion')); + +?> Index: lms/lib/upgradedb/postgres.2010011300.php diff -u /dev/null lms/lib/upgradedb/postgres.2010011300.php:1.1 --- /dev/null Wed Jan 13 11:53:06 2010 +++ lms/lib/upgradedb/postgres.2010011300.php Wed Jan 13 11:53:06 2010 @@ -0,0 +1,46 @@ +BeginTrans(); + +$DB->Execute(" + DELETE FROM nodeassignments WHERE assignmentid NOT IN (SELECT id FROM assignments); + DELETE FROM nodeassignments WHERE nodeid NOT IN (SELECT id FROM nodes); + + ALTER TABLE nodeassignments ALTER nodeid DROP DEFAULT; + ALTER TABLE nodeassignments ALTER assignmentid DROP DEFAULT; + + ALTER TABLE nodeassignments ADD FOREIGN KEY (nodeid) + REFERENCES nodes (id) ON DELETE CASCADE ON UPDATE CASCADE; + ALTER TABLE nodeassignments ADD FOREIGN KEY (assignmentid) + REFERENCES assignments (id) ON DELETE CASCADE ON UPDATE CASCADE; + + CREATE INDEX nodeassignments_assignmentid_idx ON nodeassignments (assignmentid); +"); + +$DB->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2010011300', 'dbversion')); + +$DB->CommitTrans(); + +?> From cvs w lms.org.pl Wed Jan 13 12:15:26 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 13 Jan 2010 12:15:26 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib (LMS.class.php) Message-ID: <20100113111526.9C326302B329@hydra.altec.pl> Date: Wednesday, January 13, 2010 @ 12:15:26 Author: alec Path: /cvsroot/lms/lib Modified: LMS.class.php - removed delete from nodeassignments, we're using ON DELETE CASCADE now Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/LMS.class.php.diff?&r1=1.1013&r2=1.1014 Index: lms/lib/LMS.class.php diff -u lms/lib/LMS.class.php:1.1013 lms/lib/LMS.class.php:1.1014 --- lms/lib/LMS.class.php:1.1013 Wed Jan 13 11:53:05 2010 +++ lms/lib/LMS.class.php Wed Jan 13 12:15:26 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: LMS.class.php,v 1.1013 2010/01/13 10:53:05 alec Exp $ + * $Id: LMS.class.php,v 1.1014 2010/01/13 11:15:26 alec Exp $ */ // LMS Class - contains internal LMS database functions used @@ -34,7 +34,7 @@ var $CONFIG; // table including lms.ini options var $cache = array(); // internal cache var $_version = '1.11-cvs'; // class version - var $_revision = '$Revision: 1.1013 $'; + var $_revision = '$Revision: 1.1014 $'; function LMS(&$DB, &$AUTH, &$CONFIG) // class variables setting { @@ -418,8 +418,6 @@ $this->DB->Execute('DELETE FROM customerassignments WHERE customerid=?', array($id)); $this->DB->Execute('DELETE FROM assignments WHERE customerid=?', array($id)); // nodes - $this->DB->Execute('DELETE FROM nodeassignments WHERE nodeid IN ( - SELECT id FROM nodes WHERE ownerid=?)', array($id)); $this->DB->Execute('DELETE FROM nodegroupassignments WHERE nodeid IN ( SELECT id FROM nodes WHERE ownerid=?)', array($id)); $this->DB->Execute('DELETE FROM nodes WHERE ownerid=?', array($id)); From cvs w lms.org.pl Wed Jan 13 15:01:55 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 13 Jan 2010 15:01:55 +0100 (CET) Subject: [lms-commits] CVS update of lmsweb (lms.org.pl.zone) Message-ID: <20100113140155.EDF98302B329@hydra.altec.pl> Date: Wednesday, January 13, 2010 @ 15:01:55 Author: lukasz Path: /cvsroot/lmsweb Modified: lms.org.pl.zone - req by chilek Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lmsweb/lms.org.pl.zone.diff?&r1=1.8&r2=1.9 Index: lmsweb/lms.org.pl.zone diff -u lmsweb/lms.org.pl.zone:1.8 lmsweb/lms.org.pl.zone:1.9 --- lmsweb/lms.org.pl.zone:1.8 Thu Dec 10 14:13:35 2009 +++ lmsweb/lms.org.pl.zone Wed Jan 13 15:01:55 2010 @@ -1,4 +1,4 @@ -; $Id: lms.org.pl.zone,v 1.8 2009/12/10 13:13:35 chilek Exp $ +; $Id: lms.org.pl.zone,v 1.9 2010/01/13 14:01:55 lukasz Exp $ $TTL 86400 $ORIGIN lms.org.pl. @@ -14,14 +14,13 @@ ; proszę o zabranie tej domeny i przekierowanie adresu e-mail lukasz w lms.org.pl na lukasz w netx.waw.pl. dziękuję! @ IN MX 10 netserv.baseciq.org. -serv IN A 212.180.180.1 @ IN A 194.150.197.160 www IN CNAME layla.altec.pl. * IN CNAME layla.altec.pl. $ORIGIN lists.lms.org.pl. -@ IN CNAME mail.chilan.com. +@ IN A 212.33.90.184 @ IN MX 10 mail.chilan.com. $ORIGIN cvs.lms.org.pl. From cvs w lms.org.pl Sat Jan 16 15:47:57 2010 From: cvs w lms.org.pl (LMS CVS) Date: Sat, 16 Jan 2010 15:47:57 +0100 (CET) Subject: [lms-commits] CVS update of lms/userpanel/modules/finances (invoice.php) Message-ID: <20100116144757.85F92302B32A@hydra.altec.pl> Date: Saturday, January 16, 2010 @ 15:47:57 Author: chilek Path: /cvsroot/lms/userpanel/modules/finances Modified: invoice.php - missed type variable in global scope Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/userpanel/modules/finances/invoice.php.diff?&r1=1.4&r2=1.5 Index: lms/userpanel/modules/finances/invoice.php diff -u lms/userpanel/modules/finances/invoice.php:1.4 lms/userpanel/modules/finances/invoice.php:1.5 --- lms/userpanel/modules/finances/invoice.php:1.4 Thu Nov 5 13:00:52 2009 +++ lms/userpanel/modules/finances/invoice.php Sat Jan 16 15:47:57 2010 @@ -21,10 +21,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: invoice.php,v 1.4 2009/11/05 12:00:52 alec Exp $ + * $Id: invoice.php,v 1.5 2010/01/16 14:47:57 chilek Exp $ */ -global $LMS,$SESSION,$CONFIG,$_CONFIG,$SMARTY,$invoice, $layout; +global $LMS,$SESSION,$CONFIG,$_CONFIG,$SMARTY,$invoice, $layout, $type; $type = chkconfig($CONFIG['userpanel']['invoice_duplicate']) ? trans('DUPLICATE') : trans('ORIGINAL'); $service_addr = $LMS->GetCustomerServiceAddress($SESSION->id); From cvs w lms.org.pl Mon Jan 18 09:33:31 2010 From: cvs w lms.org.pl (LMS CVS) Date: Mon, 18 Jan 2010 09:33:31 +0100 (CET) Subject: [lms-commits] CVS update of lms/templates (rtprintindex.html, rtprinttickets-ext.html) Message-ID: <20100118083331.BEA6C302B32E@hydra.altec.pl> Date: Monday, January 18, 2010 @ 09:33:31 Author: alec Path: /cvsroot/lms/templates Added: rtprinttickets-ext.html Modified: rtprintindex.html - List of Helpdesk Requests in extended format Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/templates/rtprintindex.html.diff?&r1=1.6&r2=1.7 http://cvs.lms.org.pl/viewvc/Development/lms/templates/rtprinttickets-ext.html?rev=1.1 Index: lms/templates/rtprintindex.html diff -u lms/templates/rtprintindex.html:1.6 lms/templates/rtprintindex.html:1.7 --- lms/templates/rtprintindex.html:1.6 Sun Dec 28 20:03:28 2008 +++ lms/templates/rtprintindex.html Mon Jan 18 09:33:31 2010 @@ -1,5 +1,5 @@ {include file="header.html"} - +

{$layout.pagetitle}

@@ -85,7 +85,6 @@ {t}days{/t} - {t}include contact info{/t} @@ -93,6 +92,9 @@ + {t}extended format{/t}   + {t}include contact info{/t} +       {t}Print{/t} Index: lms/templates/rtprinttickets-ext.html diff -u /dev/null lms/templates/rtprinttickets-ext.html:1.1 --- /dev/null Mon Jan 18 09:33:31 2010 +++ lms/templates/rtprinttickets-ext.html Mon Jan 18 09:33:31 2010 @@ -0,0 +1,87 @@ +{include file="clearheader.html"} + + + + + + +
+

{$layout.pagetitle}

+
+ LMS {$layout.lmsv} @ {$layout.hostname}
+ {$smarty.now|date_format:"%A, %x"}
+ {t 0=$layout.logname}Prepared by: $0{/t} +
+{foreach from=$list item=request} + + + + + + + + + + + + + +
+ + + {$request.id|string_format:"%08d"}: + + {$request.subject|escape} + + #{counter} +
+ + + + + + + + + + {if $request.address} + + + + + {/if} +
{t}Date:{/t} + {$request.createtime|date_format:"%Y/%m/%d %H:%M"} +
{t}Submitter:{/t} + {if $request.customerid} + {$request.customername} ({$request.customerid|string_format:"%04d"}) + {else} + {$request.requestor} + {/if} +
{t}Address:{/t} + {$request.address} + {if $request.phone}({t}phone:{/t} {$request.phone}){/if} +
+
+ + {foreach from=$request.content item=item} + + + + {/foreach} +
+ {$item.body|escape|replace:"\n":"
"} +
+

+{foreachelse} + + + + +
+

 

+

{t}No such requests in database.{/t}

+

 

+
+{/foreach} +{include file="clearfooter.html"} From cvs w lms.org.pl Mon Jan 18 09:33:31 2010 From: cvs w lms.org.pl (LMS CVS) Date: Mon, 18 Jan 2010 09:33:31 +0100 (CET) Subject: [lms-commits] CVS update of lms/doc (ChangeLog) Message-ID: <20100118083331.6A92A302B32B@hydra.altec.pl> Date: Monday, January 18, 2010 @ 09:33:31 Author: alec Path: /cvsroot/lms/doc Modified: ChangeLog - List of Helpdesk Requests in extended format Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/doc/ChangeLog.diff?&r1=1.1474&r2=1.1475 Index: lms/doc/ChangeLog diff -u lms/doc/ChangeLog:1.1474 lms/doc/ChangeLog:1.1475 --- lms/doc/ChangeLog:1.1474 Wed Jan 13 11:53:05 2010 +++ lms/doc/ChangeLog Mon Jan 18 09:33:31 2010 @@ -1,4 +1,4 @@ -$Id: ChangeLog,v 1.1474 2010/01/13 10:53:05 alec Exp $ +$Id: ChangeLog,v 1.1475 2010/01/18 08:33:31 alec Exp $ version ? (????-??-??) @@ -38,6 +38,7 @@ - don't allow to create an account of type mail if alias with specified login w domain already exists (alec) - fixed deletion of referenced node assignments on assignments deletion (alec) + - List of Helpdesk Requests in extended format (alec) version 1.11.9 Moloc (2009-10-28): From cvs w lms.org.pl Mon Jan 18 09:33:31 2010 From: cvs w lms.org.pl (LMS CVS) Date: Mon, 18 Jan 2010 09:33:31 +0100 (CET) Subject: [lms-commits] CVS update of lms/modules (rtprint.php) Message-ID: <20100118083331.9B071302B32A@hydra.altec.pl> Date: Monday, January 18, 2010 @ 09:33:31 Author: alec Path: /cvsroot/lms/modules Modified: rtprint.php - List of Helpdesk Requests in extended format Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/modules/rtprint.php.diff?&r1=1.12&r2=1.13 Index: lms/modules/rtprint.php diff -u lms/modules/rtprint.php:1.12 lms/modules/rtprint.php:1.13 --- lms/modules/rtprint.php:1.12 Tue Jan 13 08:45:53 2009 +++ lms/modules/rtprint.php Mon Jan 18 09:33:31 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: rtprint.php,v 1.12 2009/01/13 07:45:53 alec Exp $ + * $Id: rtprint.php,v 1.13 2010/01/18 08:33:31 alec Exp $ */ $type = isset($_GET['type']) ? $_GET['type'] : ''; @@ -81,7 +81,8 @@ $queue = intval($_POST['queue']); $status = $_POST['status']; $subject = $_POST['subject']; - + $extended = !empty($_POST['extended']) ? true : false; + if($queue) $where[] = 'queueid = '.$queue; if($customer) @@ -99,20 +100,44 @@ $where[] = 'rttickets.state = '.intval($status); } + $list = $DB->GetAllByKey('SELECT rttickets.id, createtime, customerid, subject, requestor, ' + .$DB->Concat('UPPER(customers.lastname)',"' '",'customers.name').' AS customername ' + .(isset($_POST['contacts']) ? ', address, (SELECT phone + FROM customercontacts + WHERE customerid = customers.id LIMIT 1) AS phone ' : '') + .'FROM rttickets + LEFT JOIN customers ON (customerid = customers.id) + WHERE state != '.RT_RESOLVED + .(isset($where) ? ' AND '.implode(' AND ', $where) : '') + .' ORDER BY createtime', 'id'); - $list = $DB->GetAll('SELECT rttickets.id, createtime, customerid, subject, requestor, ' - .$DB->Concat('UPPER(customers.lastname)',"' '",'customers.name').' AS customername ' - .(isset($_POST['extended']) ? ', address, (SELECT phone FROM customercontacts WHERE customerid = customers.id LIMIT 1) AS phone ' : '') - .'FROM rttickets - LEFT JOIN customers ON (customerid = customers.id) - WHERE state != '.RT_RESOLVED - .(isset($where) ? ' AND '.implode(' AND ', $where) : '') - .' ORDER BY createtime'); + if ($list && $extended) + { + $tickets = implode(',', array_keys($list)); + if ($content = $DB->GetAll('(SELECT body, ticketid, createtime, 0 AS note + FROM rtmessages + WHERE ticketid in ('.$tickets.')) + UNION + (SELECT body, ticketid, createtime, 1 AS note + FROM rtnotes + WHERE ticketid in ('.$tickets.')) + ORDER BY createtime')) + { + foreach ($content as $idx => $row) + { + $list[$row['ticketid']]['content'][] = array( + 'body' => trim($row['body']), + 'note' => $row['note'], + ); + unset($content[$idx]); + } + } + } $layout['pagetitle'] = trans('List of Requests'); $SMARTY->assign('list', $list); - $SMARTY->display('rtprinttickets.html'); + $SMARTY->display($extended ? 'rtprinttickets-ext.html' : 'rtprinttickets.html'); break; default: From cvs w lms.org.pl Mon Jan 18 09:33:31 2010 From: cvs w lms.org.pl (LMS CVS) Date: Mon, 18 Jan 2010 09:33:31 +0100 (CET) Subject: [lms-commits] CVS update of lms/img (style_print.css) Message-ID: <20100118083331.81E8E302B32D@hydra.altec.pl> Date: Monday, January 18, 2010 @ 09:33:31 Author: alec Path: /cvsroot/lms/img Modified: style_print.css - List of Helpdesk Requests in extended format Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/img/style_print.css.diff?&r1=1.7&r2=1.8 Index: lms/img/style_print.css diff -u lms/img/style_print.css:1.7 lms/img/style_print.css:1.8 --- lms/img/style_print.css:1.7 Mon Aug 28 10:20:33 2006 +++ lms/img/style_print.css Mon Jan 18 09:33:31 2010 @@ -1,7 +1,7 @@ BODY { font-size: 8pt; font-family: Tahoma, Verdana, Arial, Helvetica; padding: 0pt; background-color: #FFFFFF; } BODY.landscape { font-size: 8pt; font-family: Tahoma, Verdana, Arial, Helvetica; padding: 0pt; background-color: #FFFFFF; size: landscape; } -TABLE { border-collapse: collapse; border-color: #000000 } +TABLE { border-collapse: collapse; border-color: #000000; } TD { font-size: 8pt; } TD.fleft { border-left-width: 1pt; border-left-style: solid; } TD.fright { border-right-width: 1pt; border-right-style: solid; } @@ -16,6 +16,7 @@ TD.flr { border-left-width: 1pt; border-left-style: solid; border-right-width: 1pt; border-right-style: solid; } TD.head { color: white; background-color: black; font-weight: bold; border-width: 1pt; border-style: solid; } TD.headgrey { color: black; background-color: #A9A9A9; font-weight: bold; border-width: 1pt; border-style: solid; } +TD.bb { border-color: black; } A { text-decoration: none; } From cvs w lms.org.pl Wed Jan 20 09:31:43 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 20 Jan 2010 09:31:43 +0100 (CET) Subject: [lms-commits] CVS update of lms/modules (rtprint.php) Message-ID: <20100120083143.BEEDC302B32A@hydra.altec.pl> Date: Wednesday, January 20, 2010 @ 09:31:43 Author: alec Path: /cvsroot/lms/modules Modified: rtprint.php - support raport parameters in GET Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/modules/rtprint.php.diff?&r1=1.13&r2=1.14 Index: lms/modules/rtprint.php diff -u lms/modules/rtprint.php:1.13 lms/modules/rtprint.php:1.14 --- lms/modules/rtprint.php:1.13 Mon Jan 18 09:33:31 2010 +++ lms/modules/rtprint.php Wed Jan 20 09:31:43 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: rtprint.php,v 1.13 2010/01/18 08:33:31 alec Exp $ + * $Id: rtprint.php,v 1.14 2010/01/20 08:31:43 alec Exp $ */ $type = isset($_GET['type']) ? $_GET['type'] : ''; @@ -30,9 +30,9 @@ { case 'stats': /******************************************/ - $days = intval($_POST['days']); - $times = intval($_POST['times']); - $queue = intval($_POST['queue']); + $days = !empty($_GET['days']) ? intval($_GET['days']) : intval($_POST['days']); + $times = !empty($_GET['times']) ? intval($_GET['times']) : intval($_POST['times']); + $queue = !empty($_GET['queue']) ? intval($_GET['queue']) : intval($_POST['queue']); if($queue) $where[] = 'queueid = '.$queue; @@ -76,12 +76,12 @@ case 'ticketslist': /******************************************/ - $days = intval($_POST['days']); - $customer = intval($_POST['customer']); - $queue = intval($_POST['queue']); - $status = $_POST['status']; - $subject = $_POST['subject']; - $extended = !empty($_POST['extended']) ? true : false; + $days = !empty($_GET['days']) ? intval($_GET['days']) : intval($_POST['days']); + $customer = !empty($_GET['customer']) ? intval($_GET['customer']) : intval($_POST['customer']); + $queue = !empty($_GET['queue']) ? intval($_GET['queue']) : intval($_POST['queue']); + $status = isset($_GET['status']) ? $_GET['status'] : $_POST['status']; + $subject = !empty($_GET['subject']) ? $_GET['subject'] : $_POST['subject']; + $extended = !empty($_GET['extended']) ? true : !empty($_POST['extended']) ? true : false; if($queue) $where[] = 'queueid = '.$queue; @@ -89,8 +89,8 @@ $where[] = 'customerid = '.$customer; if($days) $where[] = 'rttickets.createtime < '.mktime(0, 0, 0, date('n'), date('j')-$days); - if($subject != '') - $where[] = 'rttickets.subject ?LIKE? \'%'.$subject.'%\''; + if($subject) + $where[] = 'rttickets.subject ?LIKE? '.$DB->Escape("%$subject%"); if($status != '') { @@ -102,7 +102,8 @@ $list = $DB->GetAllByKey('SELECT rttickets.id, createtime, customerid, subject, requestor, ' .$DB->Concat('UPPER(customers.lastname)',"' '",'customers.name').' AS customername ' - .(isset($_POST['contacts']) ? ', address, (SELECT phone + .(!empty($_POST['contacts']) || !empty($_GET['contacts']) + ? ', address, (SELECT phone FROM customercontacts WHERE customerid = customers.id LIMIT 1) AS phone ' : '') .'FROM rttickets