tutos-commits Mailing List for TUTOS (Page 27)
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
| 2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
| 2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
| 2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
| 2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
| 2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
| 2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
| 2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
| 2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
| 2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
| 2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
| 2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
| 2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
| 2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <gok...@us...> - 2012-06-27 12:32:19
|
Revision: 665
http://tutos.svn.sourceforge.net/tutos/?rev=665&view=rev
Author: gokohnert
Date: 2012-06-27 12:32:08 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
fix overview
Modified Paths:
--------------
trunk/php/expense/expense.pinc
trunk/php/expense/expense_overview.php
trunk/php/expense/expense_select.php
Modified: trunk/php/expense/expense.pinc
===================================================================
--- trunk/php/expense/expense.pinc 2012-06-27 11:13:02 UTC (rev 664)
+++ trunk/php/expense/expense.pinc 2012-06-27 12:32:08 UTC (rev 665)
@@ -298,7 +298,7 @@
function getRefLink($text = "") {
global $lang;
if ( is_object($this->ref) ) {
- return $this->ref->getLink();
+ return $this->ref->getLink($text);
}
return $lang['HistoryDeleted'];
}
@@ -309,7 +309,7 @@
function getAdrRefLink($text = "") {
global $lang;
if ( is_object($this->adr_ref) ) {
- return $this->adr_ref->getLink();
+ return $this->adr_ref->getLink($text);
}
return $lang['HistoryDeleted'];
}
@@ -820,7 +820,7 @@
case 'ExpenseInvoice':
case 'ExpenseCreate':
$x = resolve_history_obj($f,$this->dbconn);
- break;
+ break;
case 'ExpenseCategory':
$x = resolve_history_lgarr ($f,'ExpenseCategories');
break;
@@ -830,7 +830,7 @@
case 'ExpenseStartTime':
case 'ExpenseEndTime':
$x = resolve_history_datetime($f,$this->dbconn,false);
- break;
+ break;
default:
return null;
}
Modified: trunk/php/expense/expense_overview.php
===================================================================
--- trunk/php/expense/expense_overview.php 2012-06-27 11:13:02 UTC (rev 664)
+++ trunk/php/expense/expense_overview.php 2012-06-27 12:32:08 UTC (rev 665)
@@ -154,7 +154,9 @@
$this->flds++;
$this->preflds++;
}
- $r .= $this->orderHeader('',$lang['ExpenseAddress'],$this->link2);
+ if ($this->head['adr_id']) {
+ $r .= $this->orderHeader('',$lang['ExpenseAddress'],$this->link2);
+ }
if ($this->head['category']) {
$r .= $this->orderHeader('category',$lang['ExpenseCategory'],$this->link2);
$this->flds++;
@@ -198,17 +200,28 @@
$x = $this->mark_filter(myentities($b->getFullName()),'name');
$r .= ' <td class="over_l">'. $b->getLink($x,'ss='.$ss) ."</td>\n";
if ($this->head['link_id']) {
- $r .= ' <td class="over_l">'. $b->getRefLink() ."</td>\n";
+ $x = '';
+ if ( is_object($b->ref) ) {
+ $x = $this->mark_filter(myentities($b->ref->getFullName()),'nsrn');
+ }
+ $r .= ' <td class="over_l">'. $b->getRefLink($x) ."</td>\n";
}
if ($this->head['supplier']) {
+ $x = '';
if (is_object($b->supplier)) {
- $x = $this->mark_filter(myentities($b->supplier->getFullName()),'supfn');
+ $x = $this->mark_filter(myentities($b->supplier->getFullName()),'supplier');
}
$r .= ' <td class="over_l">'. (is_object($b->supplier) ? $b->supplier->getLink($x):' ') ."</td>\n";
}
- $r .= ' <td class="over_l">'. $b->getAdrRefLink() ."</td>\n";
+ if ($this->head['adr_id']) {
+ $x = '';
+ if ( is_object($b->adr_ref) ) {
+ $x = $this->mark_filter(myentities($b->adr_ref->getFullName()),'adr_id');
+ }
+ $r .= ' <td class="over_l">'. $b->getAdrRefLink($x) ."</td>\n";
+ }
if ($this->head['category']) {
$r .= ' <td class="over_l">'. $b->getCategory() ."</td>\n";
@@ -326,7 +339,7 @@
* prepare
*/
Function prepare() {
- global $msg,$lang;
+ global $msg,$lang,$table;
$this->layout_id = useexpenses;
$this->name = $lang['ExpensesOverview'];
@@ -340,12 +353,13 @@
$this->link1 = 'expense/expense_overview.php';
$this->filter = array();
- $this->head['link_id'] = true;
- $this->head['custom'] = true;
- $this->head['mods'] = true;
+ $this->head['link_id'] = true;
+ $this->head['custom'] = true;
+ $this->head['mods'] = true;
$this->head['supplier'] = true;
$this->head['category'] = true;
$this->head['quantity'] = true;
+ $this->head['adr_id'] = true;
if (isset($this->hide['category']) && $this->hide['category'] ) {
$this->head['category'] = false;
@@ -361,26 +375,40 @@
}
$this->link1 = addHiddenFields($this->link1);
- $reftype = "";
- $name = "";
- $nsrn = "";
- $nscr = "";
+ if (isset($_GET['ext'])) {
+ $this->ext = $_GET['ext'];
+ $this->link1 = addUrlParameter($this->link1,"ext=".$this->ext);
+ } else {
+ $this->ext = 2; // call from somewhere else
+ }
- if ( isset($_GET['reftype']) ) {
- $reftype = $_GET['reftype'];
- }
+ $reftype = '';
+ $name = '';
+ $nsrn = '';
+ $nscr = '';
+
if ( isset($_GET['name']) ) {
$name = $_GET['name'];
}
- if ( isset($_GET['nsrn']) ) {
- $nsrn = $_GET['nsrn'];
+ if ($this->ext != 0) {
+ if ( isset($_GET['reftype']) ) {
+ $reftype = $_GET['reftype'];
+ $this->link1 = addUrlParameter($this->link1,"reftype=". $reftype);
+ $this->filter['reftype'] = $reftype;
+ }
+ if ( isset($_GET['nsrn']) ) {
+ $nsrn = $_GET['nsrn'];
+ $this->link1 = addUrlParameter($this->link1,"nsrn=". $nsrn);
+ $this->filter['nsrn'] = $nsrn;
+ }
+ if ( isset($_GET['nscr']) ) {
+ $nscr = $_GET['nscr'];
+ $this->link1 = addUrlParameter($this->link1,"nscr=".UrlEncode($nscr));
+ $this->filter['nscr'] = $nscr;
+ }
}
- if ( isset($_GET['nscr']) ) {
- $nscr = $_GET['nscr'];
- }
-
- $j = "SELECT DISTINCT e.* FROM ". $this->dbconn->prefix ."expenses e "; // select + join
+ $j = "SELECT DISTINCT e.* FROM ". $this->dbconn->prefix .$table['expense'][name].' e '; // select + join
$q = "";
$pre = " WHERE ";
@@ -416,7 +444,7 @@
$nsrn = "";
}
if ( ($reftype == 1) || ($reftype == -1) ) {
- $j .= ", ". $this->dbconn->prefix ."companies c ";
+ $j .= ", ". $this->dbconn->prefix .$table['company'][name].' c ';
$q .= " ". $pre . "(e.link_id=c.id ";
if ( $nsrn != "" ) {
$q .= " AND ". $this->dbconn->Like("c.name",$nsrn);
@@ -425,7 +453,7 @@
$pre = " OR ";
}
if ( ($reftype == 2) || ($reftype == -1) ) {
- $j .= ",". $this->dbconn->prefix ."departments d ";
+ $j .= ",". $this->dbconn->prefix .$table['department'][name].' d ';
$q .= " ". $pre . "(e.link_id=d.id ";
if ( $nsrn != "" ) {
$q .= " AND ". $this->dbconn->Like("d.name",$nsrn);
@@ -434,7 +462,7 @@
$pre = " OR ";
}
if ( ($reftype == 3) || ($reftype == -1) ) {
- $j .= ",". $this->dbconn->prefix ."addresses a ";
+ $j .= ",". $this->dbconn->prefix .$table['address'][name].' a ';
$q .= $pre ."( (";
$q .= $this->dbconn->Like("a.f_name",$nsrn) ." OR ";
$q .= $this->dbconn->Like("a.m_name",$nsrn) ." OR ";
@@ -443,7 +471,7 @@
$pre = " OR ";
}
if ( ($reftype == 4) || ($reftype == -1) ) {
- $j .= ",". $this->dbconn->prefix ."bugs b";
+ $j .= ",". $this->dbconn->prefix .$table['bugtracking'][name].' b';
$q .= " ". $pre . "(e.link_id=b.id ";
if ( $nsrn != "" ) {
$q .= " AND ". $this->dbconn->Like("b.short",$nsrn);
@@ -452,7 +480,7 @@
$pre = " OR ";
}
if ( ($reftype == 5) || ($reftype == -1) ) {
- $j .= ",". $this->dbconn->prefix ."products p";
+ $j .= ",". $this->dbconn->prefix .$table['product'][name].' p';
$q .= $pre ."( e.link_id=p.id ";
if ( $nsrn != "" ) {
$q .= " AND (";
@@ -463,19 +491,19 @@
$pre = " OR ";
}
if ( ($reftype == 6) || ($reftype == -1) ) {
- $j .= ",". $this->dbconn->prefix ."teams t";
+ $j .= ",". $this->dbconn->prefix .$table['team'][name].' t';
$q .= $pre . "(e.link_id=t.id AND ". $this->dbconn->Like("t.name",$nsrn) .")";
$pre = " OR ";
}
if ( ($reftype == 7) || ($reftype == -1) ) {
- $j .= ",". $this->dbconn->prefix ."tasks k";
+ $j .= ",". $this->dbconn->prefix .$table['task'][name].' k';
$q .= $pre . "(e.link_id=k.id AND ". $this->dbconn->Like("k.name",$nsrn) .")";
$pre = " OR ";
}
if ( ($reftype == 8) || ($reftype == -1) ) {
- $j .= ",". $this->dbconn->prefix ."installations i";
- if ( ! stristr($j, "products") ) {
- $j .= ",". $this->dbconn->prefix ."products p";
+ $j .= ",". $this->dbconn->prefix.$table['installation'][name].' i';
+ if ( ! stristr($j, $table['product'][name]) ) {
+ $j .= ",".$this->dbconn->prefix.$table['product'][name].' p';
}
$q .= $pre ."( e.link_id=i.id AND i.product_id=p.id AND (";
$q .= $this->dbconn->Like("p.name",$nsrn) ." OR ";
@@ -484,25 +512,10 @@
}
$pre = "AND ";
- $this->link1 = addUrlParameter($this->link1,"reftype=". $reftype);
- $this->link1 = addUrlParameter($this->link1,"nsrn=". $nsrn);
- // remember this
- $_SESSION['expensesearchreftype'] = $reftype;
- $this->filter['reftype'] = $reftype;
}
- if ( ($nscr != "*") && ($nscr != "") ) {
- $j .= ", addresses ";
- $q .= $pre ."( (";
- $q .= $this->dbconn->Like("addresses.f_name",$nscr) ." OR ";
- $q .= $this->dbconn->Like("addresses.m_name",$nscr) ." OR ";
- $q .= $this->dbconn->Like("addresses.l_name",$nscr) .")";
- $q .= " AND e.creator=addresses.id )";
- $pre = "AND ";
- $this->link1 = addUrlParameter($this->link1,"nscr=".UrlEncode($nscr));
- $this->filter['nscr'] = $nscr;
- }
+ // remember this
+ $_SESSION['expensesearchreftype'] = $reftype;
-
$this->q = $j.$q;
$this->qpre = $pre;
@@ -518,6 +531,14 @@
overview_arg($this,'supfn',OVERVIEW_ARG_FN,'expense',array('supplier'),'ExpenseSupplier','e.','cd');
overview_arg($this,'supid',OVERVIEW_ARG_OBJID,'expense',array('supplier'),'ExpenseSupplier','e.');
+ // adr
+ overview_arg($this,'adrfn',OVERVIEW_ARG_FN,'expense',array('adr_id'),'ExpenseAddress','e.','at');
+ overview_arg($this,'adrid',OVERVIEW_ARG_OBJID,'expense',array('adr_id'),'ExpenseAddress','e.');
+
+ // creator
+ overview_arg($this,'crfn',OVERVIEW_ARG_FN,'expense',array('creator'),'ExpenseCreator','e.','a');
+ overview_arg($this,'crid',OVERVIEW_ARG_OBJID,'expense',array('creator'),'ExpenseCreator','e.');
+
// category
overview_arg($this,'cat',OVERVIEW_ARG_INT,'expense',array('category'),array('ExpenseCategory','ExpenseCategories'),'e.');
@@ -535,7 +556,7 @@
foreach ($custom[1] as $s) {
$this->q = preg_replace('# where#i',','.$s.' WHERE',$this->q);
}
- # $msg .= $this->q;
+ // $msg = addLine($this->q,$msg);
check_dbacl($this->dbconn,$this->q, $this->user->id);
Modified: trunk/php/expense/expense_select.php
===================================================================
--- trunk/php/expense/expense_select.php 2012-06-27 11:13:02 UTC (rev 664)
+++ trunk/php/expense/expense_select.php 2012-06-27 12:32:08 UTC (rev 665)
@@ -36,10 +36,8 @@
$this->width = 3;
$r = '';
$r .= "<form id=\"expensesearch\" name=\"expensesearch\" method=\"get\" action=\"expense_overview.php\">\n";
- if ( $this->ext == false ) {
- $this->addHidden("reftype",0);
- }
$r .= $this->SelectTableStart();
+ $this->addHidden('ext',$this->ext);
$r .= $this->headline($lang['SearchForExpense']);
$r .= $this->ContentRowStart();
@@ -70,7 +68,7 @@
}
$r .= $this->ContentRowStart('ext');
- $r .= $this->showfieldc($lang['ExpenseRefType']);
+ $r .= $this->showfieldc($lang['ExpenseRefType'],0,'reftype');
$r .= $this->showdata($this->ExpenseAskRefType($this->nsrt,1),2);
$r .= $this->ContentRowEnd();
@@ -85,13 +83,18 @@
$r .= $this->ContentRowEnd();
$r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['ExpenseAddress'],0,'adr');
+ $r .= $this->showdata(select_from_array_or_input($this->obj,"adr",null,1,'at'),2);
+ $r .= $this->ContentRowEnd();
+
+ $r .= $this->ContentRowStart('ext');
$r .= $this->showfieldc($lang['ExpenseCategory'],0,'cat');
$r .= $this->showdata(SelectLangArray('cat','ExpenseCategories',-1,true),2);
$r .= $this->ContentRowEnd();
$r .= $this->ContentRowStart('ext');
- $r .= $this->showfieldc($lang['ExpenseCreator'],0,'nscr');
- $r .= $this->showdata('<input type="text" value="" name="nscr" id="nscr" />',2);
+ $r .= $this->showfieldc($lang['ExpenseCreator'],0,'cr');
+ $r .= $this->showdata(select_from_array_or_input($this->obj,"cr",null,1,'a'),2);
$r .= $this->ContentRowEnd();
$r .= $this->ContentRowStart('ext');
@@ -127,7 +130,7 @@
function ExpenseAskRefType ($default,$any) {
global $lang;
- $r = '<select name="reftype">';
+ $r = '<select id="reftype" name="reftype">';
foreach ($lang['ExpenseReferences'] as $i => $f ) {
$r .= "<option value=\"". $i ."\" ";
if ( $i == $default ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-27 11:13:13
|
Revision: 664
http://tutos.svn.sourceforge.net/tutos/?rev=664&view=rev
Author: gokohnert
Date: 2012-06-27 11:13:02 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
added state to overview
Modified Paths:
--------------
trunk/php/invoice/invoice_overview.php
Modified: trunk/php/invoice/invoice_overview.php
===================================================================
--- trunk/php/invoice/invoice_overview.php 2012-06-27 11:11:34 UTC (rev 663)
+++ trunk/php/invoice/invoice_overview.php 2012-06-27 11:13:02 UTC (rev 664)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2002 - 2011 by Gero Kohnert
+ * Copyright 2002 - 2012 by Gero Kohnert
*
* 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
@@ -280,6 +280,7 @@
$this->head['creation'] = true;
$this->head['sum'] = true;
$this->head['customer'] = true;
+ $this->head['state'] = true;
if ( ! $this->user->feature_ok(useinvoice,PERM_SEE) ) {
$msg .= sprintf($lang['Err0022'],"'". $this->name ."'");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-27 11:11:43
|
Revision: 663
http://tutos.svn.sourceforge.net/tutos/?rev=663&view=rev
Author: gokohnert
Date: 2012-06-27 11:11:34 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/bugtracking/templates/bug_new.proto.de
Modified: trunk/php/bugtracking/templates/bug_new.proto.de
===================================================================
--- trunk/php/bugtracking/templates/bug_new.proto.de 2012-06-27 10:47:33 UTC (rev 662)
+++ trunk/php/bugtracking/templates/bug_new.proto.de 2012-06-27 11:11:34 UTC (rev 663)
@@ -1,7 +1,7 @@
Hallo,
@CREATOR@ hat eine neue Fehlermeldung in das
-TUTOS Fehlermanagementsystem eingefügt.
+TUTOS Fehlermanagementsystem eingefügt.
Hier die Daten des Fehlers:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-27 10:47:42
|
Revision: 662
http://tutos.svn.sourceforge.net/tutos/?rev=662&view=rev
Author: gokohnert
Date: 2012-06-27 10:47:33 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/bugtracking/templates/bug_new.proto.de
Modified: trunk/php/bugtracking/templates/bug_new.proto.de
===================================================================
--- trunk/php/bugtracking/templates/bug_new.proto.de 2012-06-27 10:31:03 UTC (rev 661)
+++ trunk/php/bugtracking/templates/bug_new.proto.de 2012-06-27 10:47:33 UTC (rev 662)
@@ -1,7 +1,7 @@
Hallo,
@CREATOR@ hat eine neue Fehlermeldung in das
-TUTOS Fehlermanagementsystem eingefügt.
+TUTOS Fehlermanagementsystem eingefügt.
Hier die Daten des Fehlers:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-27 10:31:13
|
Revision: 661
http://tutos.svn.sourceforge.net/tutos/?rev=661&view=rev
Author: gokohnert
Date: 2012-06-27 10:31:03 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
smtp auth check
Modified Paths:
--------------
trunk/php/mail.pinc
trunk/php/mail_ins.php
Modified: trunk/php/mail.pinc
===================================================================
--- trunk/php/mail.pinc 2012-06-27 09:10:50 UTC (rev 660)
+++ trunk/php/mail.pinc 2012-06-27 10:31:03 UTC (rev 661)
@@ -1478,6 +1478,7 @@
$msg .= 'could not connect to smtp server '.$tutos['smtphost'].' port:'.$tutos['smtpport']."<br />\n";
return $msg . $errno ." ". $errstr;
}
+ stream_set_timeout($this->fd, 0,500000);
$this->readsmtp($msg); // Read the Greetings
@@ -1555,40 +1556,42 @@
function readsmtp(&$msg) {
global $tutos;
+ $result = true; // all ok
if ($tutos['mailmode'] == MAILMODE_NOMAIL) return true;
if ( ($tutos['mailmode'] != MAILMODE_SMTP) && ($tutos['mailmode'] != MAILMODE_SMTP_EHLO) ) {
- return true;
+ return $result;
}
- $line = fgets($this->fd,1024);
- if (empty($line)) {
- return true;
+
+ // read all info
+ $cnt = 1;
+ while (($line = fgets($this->fd, 1024)) !== false) {
+ #$line = fgets($this->fd,1024);
+ error_log('smtp in: '.$cnt++.' '.$line."",3,$tutos[errlog]);
+ if (empty($line)) {
+ return $result;
+ } else if ( preg_match("#^220#",$line ) ) {
+ continue;
+ } else if ( preg_match("#^221#",$line ) ) {
+ continue;
+ } else if ( preg_match("#^235#",$line ) ) {
+ // The OK response from AUTH LOGIN
+ continue;
+ } else if ( preg_match("#^250#",$line ) ) {
+ continue;
+ } else if ( preg_match("#^354#",$line ) ) {
+ continue;
+ } else if ( preg_match("#^334#",$line ) ) {
+ // The response from AUTH LOGIN
+ continue;
+ } else if ( preg_match("#^5#",$line ) ) {
+ $msg = addLine($msg,$line);
+ error_log('smtp: '.$line."",3,$tutos[errlog]);
+ $result = false;
+ } else {
+ $msg = addLine($msg,$line);
+ }
}
- if ( preg_match("#^220#",$line ) ) {
- return true;
- }
- if ( preg_match("#^221#",$line ) ) {
- return true;
- }
- // The OK response from AUTH LOGIN
- if ( preg_match("#^235#",$line ) ) {
- return true;
- }
- if ( preg_match("#^250#",$line ) ) {
- return true;
- }
- if ( preg_match("#^354#",$line ) ) {
- return true;
- }
- // The response from AUTH LOGIN
- if ( preg_match("#^334#",$line ) ) {
- return true;
- }
- if ( preg_match("#^5#",$line ) ) {
- $msg = addLine($msg,$line);
- return false;
- }
- $msg = addLine($msg,$line);
- return false;
+ return $result;
}
/**
@@ -1748,6 +1751,7 @@
$this->fd = @fopen($fname,'wb');
}
if ($omsg != "") {
+ fclose($this->fd);
return addLine($msg,$omsg);
}
Modified: trunk/php/mail_ins.php
===================================================================
--- trunk/php/mail_ins.php 2012-06-27 09:10:50 UTC (rev 660)
+++ trunk/php/mail_ins.php 2012-06-27 10:31:03 UTC (rev 661)
@@ -34,7 +34,7 @@
$m->from->read_locs_data();
$found = 0;
if (isset($_POST['from'])) {
- $t = split(",",$_POST['from']);
+ $t = preg_split("#,#",$_POST['from']);
if ( isset($m->from->location) ) {
@reset($m->from->location);
while( list ($i,$f) = @each ($m->from->location)) {
@@ -109,7 +109,7 @@
if (isset($_POST['to'])) {
- $t = split("[,;]",$_POST['to']);
+ $t = preg_split("#[,;]#",$_POST['to']);
$gotourl = addUrlParameter($gotourl,"to[]=". UrlEncode($_POST['to']),true);
for ($j = 0; $j < count($t); $j++) {
$m->addTo($t[$j]);
@@ -139,12 +139,12 @@
}
}
-$t = split("[,;]",$_POST['cc']);
+$t = preg_split("#[,;]#",$_POST['cc']);
$gotourl = addUrlParameter($gotourl,"cc[]=". UrlEncode($_POST['cc']),true);
for ($j = 0; $j < count($t); $j++) {
$m->addCc($t[$j]);
}
-$t = split("[,;]",$_POST['bcc']);
+$t = preg_split("#[,;]#",$_POST['bcc']);
if($t == ""){
$gotourl = addUrlParameter($gotourl,"bcc[]=". UrlEncode($_POST['bcc']),true);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-27 09:11:01
|
Revision: 660
http://tutos.svn.sourceforge.net/tutos/?rev=660&view=rev
Author: gokohnert
Date: 2012-06-27 09:10:50 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/layout/layout_base.pinc
trunk/php/layout/mobile_layout.pinc
Modified: trunk/php/layout/layout_base.pinc
===================================================================
--- trunk/php/layout/layout_base.pinc 2012-06-27 09:10:28 UTC (rev 659)
+++ trunk/php/layout/layout_base.pinc 2012-06-27 09:10:50 UTC (rev 660)
@@ -667,7 +667,7 @@
if (isset($tarr['handler'])) {
$r .= $this->showdata(handle($tarr['handler'],$obj->$tarr['field'],myentities($obj->$tarr['field'])) ,$colsd);
} else {
- $r .= $this->showdata(urlreplace(htmlentities($obj->$tarr['field'])) ,$colsd);
+ $r .= $this->showdata(urlreplace($obj->$tarr['field'],1) ,$colsd);
}
} else if ($tarr[type] == 'TS_TYPE') {
if ( isset($tarr['ftype']) && ($tarr['ftype'] == 'DateTime') ) {
Modified: trunk/php/layout/mobile_layout.pinc
===================================================================
--- trunk/php/layout/mobile_layout.pinc 2012-06-27 09:10:28 UTC (rev 659)
+++ trunk/php/layout/mobile_layout.pinc 2012-06-27 09:10:50 UTC (rev 660)
@@ -1156,6 +1156,12 @@
}
/**
+ * help for input fields
+ */
+ function help_popup($tag) {
+ }
+
+ /**
* getLayoutName
*/
function getLayoutName() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-27 09:10:39
|
Revision: 659
http://tutos.svn.sourceforge.net/tutos/?rev=659&view=rev
Author: gokohnert
Date: 2012-06-27 09:10:28 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/bugtracking/bug.pinc
trunk/php/bugtracking/bug_ins.php
trunk/php/webelements.p3
Modified: trunk/php/bugtracking/bug.pinc
===================================================================
--- trunk/php/bugtracking/bug.pinc 2012-06-26 13:14:01 UTC (rev 658)
+++ trunk/php/bugtracking/bug.pinc 2012-06-27 09:10:28 UTC (rev 659)
@@ -445,7 +445,7 @@
$desc = trim($i->description);
if ($showlinks == true) {
if ($reg != '')
- $desc = preg_replace('#('.$reg.')#m' ,'<a href="'.normalize_url($url).'$1">$1</a>',$desc);
+ $desc = preg_replace('#'.$reg.'#m' ,'$1<a href="'.normalize_url($url).'$2">$2</a>$3',$desc);
if ($desc == $olddesc) {
$r .= '... ';
} else {
@@ -1437,7 +1437,7 @@
case 'BugReportedFrom':
case 'BugCreate':
$x = resolve_history_obj($f,$this->dbconn);
- break;
+ break;
case 'BugAssignedTo':
$x = $f;
if ($f['old'] < 0)
@@ -2084,15 +2084,18 @@
*/
function get_bug_regex() {
global $tutos;
+ //%Y-%m-&X-&Y
+ $reg = $tutos['bug_autoname'];
+ if ($reg == '')
+ return '';
- $reg = $tutos['bug_autoname'];
$reg = preg_replace("/%Y/",'[\d]{4}',$reg);
$reg = preg_replace("/%m/",'[\d]{2}',$reg);
- $reg = preg_replace("/&X/",'[\d]*',$reg);
- $reg = preg_replace("/&Y/",'[\d]*',$reg);
+ $reg = preg_replace("/&X/",'[\d]+',$reg);
+ $reg = preg_replace("/&Y/",'[\d]+',$reg);
// $reg = preg_replace("/&Z/",'.*',$reg);
- return $reg;
+ return '(\s)('.$reg.')(\s)';
}
/**
Modified: trunk/php/bugtracking/bug_ins.php
===================================================================
--- trunk/php/bugtracking/bug_ins.php 2012-06-26 13:14:01 UTC (rev 658)
+++ trunk/php/bugtracking/bug_ins.php 2012-06-27 09:10:28 UTC (rev 659)
@@ -269,7 +269,7 @@
//
if ( $olds != $news ) {
if ( $olds != '' && $news != '' ) {
- $newlines = sprintf("<b>". $lang['BugAssignedTo'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$olds,$news,$newlines);
+ $newlines = sprintf("<b>". $lang['BugAssignedTo'] .": <i> %s </i> → <i> %s </i></b>\n%s" ,$olds,$news,$newlines);
} else {
$newlines = sprintf("<b>". $lang['BugAssignedTo'] ." changed</b>\n%s",$newlines);
}
@@ -280,7 +280,7 @@
//
if ( $b->reporter->id != $reporter->id ) {
if ( ($reporter->id > 0) && ($b->reporter->id > 0 ) ) {
- $newlines = sprintf("<b>". $lang['BugReportedFrom'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$b->reporter->getFullName(),$reporter->getFullName() , $newlines);
+ $newlines = sprintf("<b>". $lang['BugReportedFrom'] .": <i> %s </i> → <i> %s </i></b>\n%s" ,$b->reporter->getFullName(),$reporter->getFullName() , $newlines);
} else {
$newlines = sprintf("<b>". $lang['BugReportedFrom'] ." changed</b>\n%s",$newlines);
}
@@ -290,49 +290,49 @@
// Parent Change
//
if (is_object($oldparent) && ($b->parent->id != $oldparent->id) ) {
- $newlines = sprintf("<b>". $lang['BugReference'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$oldparent->getFullName(),$b->parent->getFullName() , $newlines);
+ $newlines = sprintf("<b>". $lang['BugReference'] .": <i> %s </i> → <i> %s </i></b>\n%s" ,$oldparent->getFullName(),$b->parent->getFullName() , $newlines);
}
//
// Target Change
//
if (is_object($oldtarget) && (is_object($b->target)) && ($b->target->id != $oldtarget->id) ) {
- $newlines = sprintf("<b>". $lang['BugTarget'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$oldtarget->getFullName(),$b->target->getFullName() , $newlines);
+ $newlines = sprintf("<b>". $lang['BugTarget'] .": <i> %s </i> → <i> %s </i></b>\n%s" ,$oldtarget->getFullName(),$b->target->getFullName() , $newlines);
} else
if (is_object($oldtarget) && (!is_object($b->target)) ) {
- $newlines = sprintf("<b>". $lang['BugTarget'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$oldtarget->getFullName(),'--' , $newlines);
+ $newlines = sprintf("<b>". $lang['BugTarget'] .": <i> %s </i> → <i> %s </i></b>\n%s" ,$oldtarget->getFullName(),'--' , $newlines);
} else
if (is_object($b->target) && (!is_object($oldtarget)) ) {
- $newlines = sprintf("<b>". $lang['BugTarget'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,'--',$b->target->getFullName() , $newlines);
+ $newlines = sprintf("<b>". $lang['BugTarget'] .": <i> %s </i> → <i> %s </i></b>\n%s" ,'--',$b->target->getFullName() , $newlines);
}
//
// State Change
//
if ( $b->state != $state ) {
- $newlines = sprintf("<b>". $lang['BugState'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$b->getState(),$b->getState($state) , $newlines);
+ $newlines = sprintf("<b>". $lang['BugState'] .": <i> %s </i> → <i> %s </i></b>\n%s" ,$b->getState(),$b->getState($state) , $newlines);
}
//
// Class Change
//
if ( $b->class != $class ) {
- $newlines = sprintf("<b>". $lang['BugClass'] .":<i>%s</i> → <i>%s</i></b>\n%s" ,$b->getClass(),$b->getClass($class) , $newlines);
+ $newlines = sprintf("<b>". $lang['BugClass'] .":<i> %s </i> → <i> %s </i></b>\n%s" ,$b->getClass(),$b->getClass($class) , $newlines);
}
//
// Medium Change
//
if ( $b->medium != $medium ) {
- $newlines = sprintf("<b>". $lang['BugMedium'] .":<i>%s</i> → <i>%s</i></b>\n%s" ,$b->getMedium(),$b->getMedium($medium) , $newlines);
+ $newlines = sprintf("<b>". $lang['BugMedium'] .":<i> %s </i> → <i> %s </i></b>\n%s" ,$b->getMedium(),$b->getMedium($medium) , $newlines);
}
//
// Short Descr Changed
//
if ( $b->short != $short ) {
- $newlines = sprintf("<b>". $lang['BugShort'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$b->short,$short , $newlines);
+ $newlines = sprintf("<b>". $lang['BugShort'] .": <i> %s </i> → <i> %s </i></b>\n%s" ,myentities($b->short),myentities($short) , $newlines);
}
//
// Plandate Change
//
if ( $b->plandate->getYYYYMMDD() != $plandate->getYYYYMMDD() ) {
- $newlines = sprintf("<b>". $lang['DateTimeTill'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$b->plandate->getDate(),$plandate->getDate() , $newlines);
+ $newlines = sprintf("<b>". $lang['DateTimeTill'] .": <i> %s </i> → <i> %s </i></b>\n%s" ,$b->plandate->getDate(),$plandate->getDate() , $newlines);
}
$b->newdesc = $newlines;
@@ -404,4 +404,4 @@
* SVN Info $Id$
* $Author$
*/
-?>
+?>
\ No newline at end of file
Modified: trunk/php/webelements.p3
===================================================================
--- trunk/php/webelements.p3 2012-06-26 13:14:01 UTC (rev 658)
+++ trunk/php/webelements.p3 2012-06-27 09:10:28 UTC (rev 659)
@@ -904,21 +904,22 @@
if ( $mode == 1 ) {
$b = myentities($b);
}
- $b = preg_replace('#&#','&',$b);
- $b = preg_replace('#"#','"',$b);
- $b = preg_replace('#<SPAN ([a-z,0-9=_"]*)>#im','<span $1>',$b);
- $b = preg_replace('#</SPAN>#im','</span>',$b);
- $b = preg_replace('#<LI>#im' ,'<li>',$b);
- $b = preg_replace('#</LI>#im' ,'</li>',$b);
- $b = preg_replace('#<OL>#im' ,'<ol>',$b);
- $b = preg_replace('#</OL>#im' ,'</ol>',$b);
- $b = preg_replace('#<UL>#im' ,'<ul>',$b);
- $b = preg_replace('#</UL>#im' ,'</ul>',$b);
- $b = preg_replace('#<BR />#im','<br />',$b);
- $b = preg_replace('#<BR>#im' ,'<br />',$b);
- $b = preg_replace('#<HR>#im' ,'<hr>',$b);
- $b = preg_replace('#<([BIU])>#im' ,'<$1>',$b);
- $b = preg_replace('#</([BIU])>#im' ,'</$1>',$b);
+ // $b = preg_replace('#&#','&',$b);
+ // $b = preg_replace('#"#','"',$b);
+ // $b = preg_replace('#<SPAN ([a-z,0-9=_"]*)>#im','<span $1>',$b);
+ // $b = preg_replace('#</SPAN>#im','</span>',$b);
+ // $b = preg_replace('#<LI>#im' ,'<li>',$b);
+ // $b = preg_replace('#</LI>#im' ,'</li>',$b);
+ // $b = preg_replace('#<OL>#im' ,'<ol>',$b);
+ // $b = preg_replace('#</OL>#im' ,'</ol>',$b);
+ // $b = preg_replace('#<UL>#im' ,'<ul>',$b);
+ // $b = preg_replace('#</UL>#im' ,'</ul>',$b);
+ // $b = preg_replace('#<BR />#im','<br />',$b);
+ // $b = preg_replace('#<BR>#im' ,'<br />',$b);
+ // $b = preg_replace('#<HR>#im' ,'<hr>',$b);
+ // $b = preg_replace('#<([BIU])>#im' ,'<$1>',$b);
+ // $b = preg_replace('#</([BIU])>#im' ,'</$1>',$b);
+
$b = preg_replace('#(ftp|http|https):(//([.]?[a-z,0-9_\#/+-?&%=:])*)#im','<a href="$1:$2" target="_blank">$1:$2</a>',$b);
$b = preg_replace('#(file:/[a-z,0-9_\#:/?&=_.+-]*)#im','<a href="$1" target="_blank">$1</a>',$b);
return $b;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-26 13:14:12
|
Revision: 658
http://tutos.svn.sourceforge.net/tutos/?rev=658&view=rev
Author: gokohnert
Date: 2012-06-26 13:14:01 +0000 (Tue, 26 Jun 2012)
Log Message:
-----------
virt perm update
Modified Paths:
--------------
trunk/php/bugtracking/bug.pinc
trunk/php/expense/expense.pinc
trunk/php/installation/installation.pinc
Modified: trunk/php/bugtracking/bug.pinc
===================================================================
--- trunk/php/bugtracking/bug.pinc 2012-06-26 11:51:40 UTC (rev 657)
+++ trunk/php/bugtracking/bug.pinc 2012-06-26 13:14:01 UTC (rev 658)
@@ -1437,7 +1437,7 @@
case 'BugReportedFrom':
case 'BugCreate':
$x = resolve_history_obj($f,$this->dbconn);
- break;
+ break;
case 'BugAssignedTo':
$x = $f;
if ($f['old'] < 0)
@@ -1589,7 +1589,7 @@
foreach ($lang['ProdRole'] as $role => $f) {
if ( $tutos[rolecheck][$role] == "p") continue;
if ($role+10 == $id2) {
- $x = $this->parent->role[$role];
+ $x = $this->parent->getObjectGroupList($role+128);
}
}
}
Modified: trunk/php/expense/expense.pinc
===================================================================
--- trunk/php/expense/expense.pinc 2012-06-26 11:51:40 UTC (rev 657)
+++ trunk/php/expense/expense.pinc 2012-06-26 13:14:01 UTC (rev 658)
@@ -126,7 +126,7 @@
* constructor
*/
function expense(tutos_db $dbconn) {
- global $tutos,$current_user;
+ global $tutos,$current_user,$table;
$this->init($dbconn);
@@ -153,7 +153,7 @@
$this->country = $tutos[defaultcntry];
$this->t_start = new TUTOS_Date_Time();
$this->t_end = new TUTOS_Date_Time(0);
- $this->tablename = $this->dbconn->prefix ."expenses";
+ $this->tablename = $this->dbconn->prefix .$table['expense'][name];
$this->run_postinit_hook();
}
@@ -168,20 +168,20 @@
$this->sup_id = $r->get($pos, 'supplier');
$this->adr_id = $r->get($pos, 'adr_id');
$this->name = $r->get($pos, 'name');
- $this->description = $r->get($pos, "description");
- $this->quantity = $r->get($pos, "quantity");
- $this->gamount = $r->get($pos, "gamount");
- $this->currency = $r->get($pos, "currency");
- $this->deduction = $r->get($pos, "deduction");
- $this->itax = $r->get($pos, "itax");
- $this->category = $r->get($pos, "category");
- $this->reason = $r->get($pos, "reason");
- $this->people = $r->get($pos, "people");
- $this->mop = $r->get($pos, "mop");
- $this->ccentre = $r->get($pos, "ccentre");
- $this->invoice = $r->get($pos, "invoice");
- $this->city = $r->get($pos, "city");
- $this->country = $r->get($pos, "country");
+ $this->description = $r->get($pos, 'description');
+ $this->quantity = $r->get($pos, 'quantity');
+ $this->gamount = $r->get($pos, 'gamount');
+ $this->currency = $r->get($pos, 'currency');
+ $this->deduction = $r->get($pos, 'deduction');
+ $this->itax = $r->get($pos, 'itax');
+ $this->category = $r->get($pos, 'category');
+ $this->reason = $r->get($pos, 'reason');
+ $this->people = $r->get($pos, 'people');
+ $this->mop = $r->get($pos, 'mop');
+ $this->ccentre = $r->get($pos, 'ccentre');
+ $this->invoice = $r->get($pos, 'invoice');
+ $this->city = $r->get($pos, 'city');
+ $this->country = $r->get($pos, 'country');
$this->t_start = $r->getDateTime($pos, "t_start");
$this->t_end = $r->getDateTime($pos, "t_end");
@@ -684,6 +684,9 @@
$this->acl = $this->ref->acl;
acl_default($this,$this->creator);
+ acl_raise($this,$this->getObjectGroupId(2),$tutos[useok]);
+ acl_raise($this,$this->getObjectGroupId(3),$tutos[seeok]);
+
// Prepare the history
$this->modified[] = array ( "field" => "ExpenseCreate" ,
"old" => "-1" ,
@@ -817,7 +820,7 @@
case 'ExpenseInvoice':
case 'ExpenseCreate':
$x = resolve_history_obj($f,$this->dbconn);
- break;
+ break;
case 'ExpenseCategory':
$x = resolve_history_lgarr ($f,'ExpenseCategories');
break;
@@ -827,7 +830,7 @@
case 'ExpenseStartTime':
case 'ExpenseEndTime':
$x = resolve_history_datetime($f,$this->dbconn,false);
- break;
+ break;
default:
return null;
}
@@ -854,7 +857,44 @@
function getHtmlIcon () {
return 'coins';
}
+ /**
+ * get a array with virtual groups
+ */
+ function getObjectGroups() {
+ global $lang,$tutos;
+ $x = parent::getObjectGroups();
+ $x[$this->getTypeId()][2] = $lang[$this->getType()].':'.$lang['ExpenseAddress'];
+ $x[$this->getTypeId()][3] = $lang[$this->getType()].':'.$lang['ExpenseSupplier'];
+
+ return $x;
+ }
+
+ /**
+ * get a array with virtual groups members
+ */
+ function getObjectGroupList($id) {
+ global $lang,$tutos;
+
+ if ($id < 0) {
+ $id2 = -($id - ($this->getTypeId() << ACLSHIFT));
+ } else {
+ $id2 = $id;
+ }
+
+ $x = parent::getObjectGroupList($id);
+ if (($id2 == 2) && is_object($this->adr)) {
+ $this->read_adr_reference();
+ $x[$this->adr_id] = $this->adr_ref;
+ }
+ if (($id2 == 3) && is_object($this->adr)) {
+ $this->read_reference();
+ $x[$this->sup_id] = $this->supplier;
+ }
+
+ return $x;
+ }
+
/* ---------------------------------------------------------------------------
* The following methods are abstract factory functions for groups
* which handle the membership list of an object
Modified: trunk/php/installation/installation.pinc
===================================================================
--- trunk/php/installation/installation.pinc 2012-06-26 11:51:40 UTC (rev 657)
+++ trunk/php/installation/installation.pinc 2012-06-26 13:14:01 UTC (rev 658)
@@ -43,7 +43,7 @@
case 'department':
case 'address':
$url = addUrlParameter($url,'cid='.$obj->id);
- break;
+ break;
default:
$url = addUrlParameter($url,'link_id='.$obj->id);
}
@@ -607,13 +607,13 @@
case 'SoldDateTime':
case 'InstDateTime':
$x = resolve_history_datetime($f,$this->dbconn);
- return $x;
- break;
+ return $x;
+ break;
case 'InstCreate':
case 'InstalledBy':
case 'SoldBy':
$x = resolve_history_obj($f,$this->dbconn);
- break;
+ break;
}
return $x;
}
@@ -667,7 +667,7 @@
foreach ($lang['ProdRole'] as $role => $f) {
if ( $tutos[rolecheck][$role] == "p") continue;
if ($role+10 == $id2) {
- $x = $this->product->role[$role];
+ $x = $this->product->getObjectGroupList($role + 128);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-26 11:51:51
|
Revision: 657
http://tutos.svn.sourceforge.net/tutos/?rev=657&view=rev
Author: gokohnert
Date: 2012-06-26 11:51:40 +0000 (Tue, 26 Jun 2012)
Log Message:
-----------
support multiple store methods
Modified Paths:
--------------
trunk/php/file/mtable.pinc
Modified: trunk/php/file/mtable.pinc
===================================================================
--- trunk/php/file/mtable.pinc 2012-06-26 04:28:41 UTC (rev 656)
+++ trunk/php/file/mtable.pinc 2012-06-26 11:51:40 UTC (rev 657)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2002 - 2010 by Gero Kohnert
+ * Copyright 2002 - 2012 by Gero Kohnert
*
* 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
@@ -28,6 +28,7 @@
$table['file']['vsys'] = array(type => 'ID_TYPE', constraints => '', Desc => 'files versioning system');
$table['file']['adr_pic'] = array(type => 'ID_TYPE', constraints => '', Desc => '1 = is address picture (not a real doc)');
$table['file']['logtxt'] = array(type => 'TX_TYPE', constraints => '', Desc => 'logs');
+$table['file']['stor_m'] = array(type => 'ID_TYPE', constraints => '', Desc => 'storage method 0=plain 1=gzip 2=bzip');
$table['file']['author'] = array(type => 'ID_TYPE', constraints => 'NN', Desc => 'authors id');
$table['file']['creator'] = array(type => 'ID_TYPE', constraints => '', Desc => 'creator ID');
$table['file']['creation'] = array(type => 'TS_TYPE', constraints => '', Desc => 'creation date');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-26 04:28:47
|
Revision: 656
http://tutos.svn.sourceforge.net/tutos/?rev=656&view=rev
Author: gokohnert
Date: 2012-06-26 04:28:41 +0000 (Tue, 26 Jun 2012)
Log Message:
-----------
update
Modified Paths:
--------------
trunk/php/acl_ins.php
trunk/php/admin/main_config.php
trunk/php/mail_ins.php
trunk/php/scrum/sprint_ins.php
Modified: trunk/php/acl_ins.php
===================================================================
--- trunk/php/acl_ins.php 2012-06-25 18:31:31 UTC (rev 655)
+++ trunk/php/acl_ins.php 2012-06-26 04:28:41 UTC (rev 656)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -30,10 +30,10 @@
$list = array();
$x = getObject($dbconn,$id);
if ( !is_object($x) ) {
- $msg .= sprintf($lang['Err0040'],"Object ". $id);
+ $msg = addLine(sprintf($lang['Err0040'],"Object ". $id),$msg);
} else if ( ! $current_user->isadmin() && ! $x->del_ok() ) {
// we need delete permissions but talk about modify !
- $msg .= sprintf($lang['Err0024'],$lang[$x->getType()]);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$x->getType()]),$msg);
} else {
$list[] = &$x;
}
@@ -82,7 +82,7 @@
$gotourl = 'mytutos.php';
if ( !isset($_POST['id']) ) {
- $msg .= "Missing ID<br />";
+ $msg = addLine('Missing ID',$msg);
} else {
if (! is_Array($_POST['id'])) {
$id[0] = $_POST['id'];
@@ -146,7 +146,7 @@
acl_raise($val,$f,$tutos[delok]);
}
}
- $msg .= acl_save($val);
+ $msg = addLine(acl_save($val),$msg);
if ($val->getType() != "url") {
$gotourl = $val->getURL();
}
Modified: trunk/php/admin/main_config.php
===================================================================
--- trunk/php/admin/main_config.php 2012-06-25 18:31:31 UTC (rev 655)
+++ trunk/php/admin/main_config.php 2012-06-26 04:28:41 UTC (rev 656)
@@ -491,12 +491,12 @@
if (!isset($tutos['password_need_special'])) $tutos['password_need_special'] = 0;
if (isset($_REQUEST['password_max_age']) && !is_numeric($_REQUEST['password_max_age'])) {
- $msg .= $this->error('password_max_age: '.$_REQUEST['password_max_age'].' not a number');
+ $msg = addLine($this->error('password_max_age: '.$_REQUEST['password_max_age'].' not a number'),$msg);
$this->stop = isset($_REQUEST['save']);
}
if (isset($_REQUEST['smtpport']) && !is_numeric($_REQUEST['smtpport'])) {
- $msg .= $this->error('smtpport: '.$_REQUEST['smtpport'].' not a number');
+ $msg = addLine($this->error('smtpport: '.$_REQUEST['smtpport'].' not a number'),$msg);
$this->stop = isset($_REQUEST['save']);
}
@@ -599,7 +599,7 @@
config_field_parse($this->dbconn,'maxshort');
config_field_parse($this->dbconn,'CSV_delimiter');
config_field_parse($this->dbconn,'CSV_enclosure');
- $msg .= ' saving done ';
+ $msg = addLine('saving done',$msg);
}
}
}
Modified: trunk/php/mail_ins.php
===================================================================
--- trunk/php/mail_ins.php 2012-06-25 18:31:31 UTC (rev 655)
+++ trunk/php/mail_ins.php 2012-06-26 04:28:41 UTC (rev 656)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -52,7 +52,7 @@
}
}
if ($found == 0 ) {
- $msg .= $lang['Err0029'];
+ $msg = addLine($lang['Err0029'],$msg);
} else {
$m->setFromTxt($from);
// bcc will only work with sendmail not with smtp ;-(
@@ -152,7 +152,7 @@
$m->addBcc($t[$j]);
}
if (trim($_POST['body']) == "") {
- $msg .= "empty message not sent";
+ $msg = addLine("empty message not sent",$msg);
# $msg .= "<br />". $m->getToAscii();
}
@@ -189,7 +189,7 @@
}
if ( $msg == "" ) {
- $msg .= $m->send();
+ $msg = addLine($m->send(),$msg);
}
// bug when $gotourl is too long
Modified: trunk/php/scrum/sprint_ins.php
===================================================================
--- trunk/php/scrum/sprint_ins.php 2012-06-25 18:31:31 UTC (rev 655)
+++ trunk/php/scrum/sprint_ins.php 2012-06-26 04:28:41 UTC (rev 656)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2004 - 2010 by Gero Kohnert
+ * Copyright 2004 - 2012 by Gero Kohnert
*
* 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
@@ -36,7 +36,7 @@
}
if ( !isset($_POST['name']) || (trim($_POST['name']) == '') ) {
- $msg .= sprintf($lang['Err0009'],$lang['SprintName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['SprintName']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$obj->setName(trim($_POST['name']));
@@ -44,7 +44,7 @@
}
if ( !isset($_POST['p_id']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['SprintRef']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['SprintRef']),$msg);
} else {
$obj->setPRefId(trim($_POST['p_id']));
$gotourl = addUrlParameter($gotourl,"p_id=". $obj->p_id,true);
@@ -55,7 +55,7 @@
$obj->setDuration(trim($_POST['duration']));
$gotourl = addUrlParameter($gotourl,"duration=". $obj->duration,true);
} else {
- $msg .= sprintf($lang['Err0009'],$lang['SprintDuration']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['SprintDuration']),$msg);
$gotourl = addBadField($gotourl,'duration',true);
}
@@ -68,7 +68,7 @@
$start->setDateTimeF('start_dt');
$gotourl= addUrlParameter($gotourl,'start_dt='. $start->getYYYYMMDD(),true);
if ( !$start->checkDMY(true) ) {
- $msg .= sprintf($lang['Err0038'],$lang['SprintStart']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0038'],$lang['SprintStart']),$msg);
} else {
$obj->setStartDt($start);
}
@@ -77,7 +77,7 @@
$end->setDateTimeF('end_dt');
$gotourl= addUrlParameter($gotourl,'end_dt='. $end->getYYYYMMDD(),true);
if ( !$end->checkDMY(true) ) {
- $msg .= sprintf($lang['Err0038'],$lang['SprintEnd']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0038'],$lang['SprintEnd']),$msg);
} else {
$obj->setEndDt($end);
}
@@ -120,7 +120,7 @@
$obj->team[$x][4] = 'mod';
}
} else {
- $msg .= sprintf($lang['Err0009'],$lang['SprintCapacityD']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['SprintCapacityD']),$msg);
$gotourl = addBadField($gotourl,'c_'.$x,true);
}
$gotourl= addUrlParameter($gotourl,'c_'.$x.'='. $_POST['c_'.$x],true);
@@ -134,7 +134,7 @@
$obj->team[$x][4] = 'mod';
}
} else {
- $msg .= sprintf($lang['Err0009'],$lang['SprintDaysOff']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['SprintDaysOff']),$msg);
$gotourl = addBadField($gotourl,'o_'.$x,true);
}
$gotourl= addUrlParameter($gotourl,'o_'.$x.'='. $_POST['o_'.$x],true);
@@ -159,12 +159,12 @@
if (is_object($t_0)) {
$cap = $_POST['c_0'];
if(!checkHHMM($cap,false) && !checkfloat($cap,false)) {
- $msg .= sprintf($lang['Err0009'],$lang['SprintCapacityD']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['SprintCapacityD']),$msg);
$gotourl = addBadField($gotourl,'c_0',true);
}
$d_off = $_POST['o_0'];
if (!is_numeric($d_off) || $d_off < 0 ) {
- $msg .= sprintf($lang['Err0009'],$lang['SprintDaysOff']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['SprintDaysOff']),$msg);
$gotourl = addBadField($gotourl,'o_0',true);
}
$obj->team[$t_0->id][1] = $cap;
@@ -206,14 +206,17 @@
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields($obj->gettype(),$obj);
+$msg = addLine(parse_custom_fields($obj->gettype(),$obj),$msg);
# other modules
-$msg .= module_parseforms($current_user,$obj,$gotourl);
+$msg = addLine(module_parseforms($current_user,$obj,$gotourl),$msg);
// Check
if ($obj->end_dt->lessthan($obj->start_dt)) {
- $msg .= $lang['Scrum_Err003'];
+ $msg = addLine($lang['Scrum_Err003'],$msg);
}
+
+$msg = addLine($msg,$obj->run_check_hook());
+
$obj->calc_duration();
if ($obj->duration > $obj->real_duration) {
$msg .= sprintf($lang['Scrum_Err004'],$obj->real_duration);
@@ -222,16 +225,16 @@
if ( $msg == "" ) {
$dbconn->Begin("WORK");
- $msg .= $obj->save();
- $msg .= $obj->save_team();
+ $msg = addLine($obj->save(),$msg);
+ $msg = addLine($obj->save_team(),$msg);
if (is_object($preobj) && $preobj->id > 0) {
$preobj->setNextId($obj->id);
- $msg .= $preobj->save();
+ $msg = addLine($preobj->save(),$msg);
}
$dbconn->Commit("WORK");
- $gotourl = $obj->getURL();
+ $gotourl = $obj->getURL();
}
leave_insert($dbconn,'../'.$gotourl,$msg);
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-25 18:31:38
|
Revision: 655
http://tutos.svn.sourceforge.net/tutos/?rev=655&view=rev
Author: gokohnert
Date: 2012-06-25 18:31:31 +0000 (Mon, 25 Jun 2012)
Log Message:
-----------
fix popup placement
Modified Paths:
--------------
trunk/html/js/new2_layout.js
trunk/html/js/new_layout.js
trunk/php/webelements.p3
Modified: trunk/html/js/new2_layout.js
===================================================================
--- trunk/html/js/new2_layout.js 2012-06-25 14:08:40 UTC (rev 654)
+++ trunk/html/js/new2_layout.js 2012-06-25 18:31:31 UTC (rev 655)
@@ -1,5 +1,5 @@
/**
- * Copyright 2005 - 2011 by Gero Kohnert
+ * Copyright 2005 - 2012 by Gero Kohnert
*
* 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
@@ -13,7 +13,6 @@
jQuery.bt.defaults.width = 250;
jQuery.bt.defaults.positions = ['most'];
-jQuery.bt.defaults.padding = 0;
jQuery.bt.defaults.shadow = true;
jQuery.bt.defaults.shadowOffsetX = 4;
jQuery.bt.defaults.shadowOffsetY = 4;
@@ -27,7 +26,6 @@
jQuery.bt.defaults.killTitle = true;
jQuery.bt.defaults.fill = '#BBB';
jQuery.bt.defaults.cssStyles = { width: 'auto',color: 'blue'};
-jQuery.bt.defaults.windowMargin = '0px';
jQuery.bt.defaults.padding = '0px';
jQuery.bt.defaults.noShadowOpts = {strokeStyle: '#999', strokeWidth: 2};
Modified: trunk/html/js/new_layout.js
===================================================================
--- trunk/html/js/new_layout.js 2012-06-25 14:08:40 UTC (rev 654)
+++ trunk/html/js/new_layout.js 2012-06-25 18:31:31 UTC (rev 655)
@@ -1,5 +1,5 @@
/**
- * Copyright 2005 - 2011 by Gero Kohnert
+ * Copyright 2005 - 2012 by Gero Kohnert
*
* 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
@@ -25,7 +25,6 @@
jQuery.bt.defaults.spikeLength = 18;
jQuery.bt.defaults.fill = '#222';
jQuery.bt.defaults.cssStyles = { width: 'auto',color: 'white'};
-jQuery.bt.defaults.windowMargin = '0px';
jQuery.bt.defaults.padding = '0px';
jQuery.bt.defaults.noShadowOpts = {strokeStyle: '#999', strokeWidth: 2};
Modified: trunk/php/webelements.p3
===================================================================
--- trunk/php/webelements.p3 2012-06-25 14:08:40 UTC (rev 654)
+++ trunk/php/webelements.p3 2012-06-25 18:31:31 UTC (rev 655)
@@ -1220,7 +1220,7 @@
$tutos['pagescript'] .= "$('#".$id."').bt('".addslashes($plus)."');\n";
}
}
- $r .= sprintf ('<a'.$key.' href="%s" '.$target." title=\"%s\">%s</a>",$href,myentities($info),$text);
+ $r .= sprintf ('<a'.$key.' href="%s" '.$target.' title="%s">%s</a>',$href,myentities($info),$text);
return $r;
} else {
if ($tag != '') {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-25 14:08:50
|
Revision: 654
http://tutos.svn.sourceforge.net/tutos/?rev=654&view=rev
Author: gokohnert
Date: 2012-06-25 14:08:40 +0000 (Mon, 25 Jun 2012)
Log Message:
-----------
links in graphs
Modified Paths:
--------------
trunk/php/bugtracking/bug_overview.php
trunk/php/counter/counter_show.php
trunk/php/graphs.pinc
trunk/php/product_overview.php
trunk/php/timetrack/timetrack_overview.php
Modified: trunk/php/bugtracking/bug_overview.php
===================================================================
--- trunk/php/bugtracking/bug_overview.php 2012-06-25 08:16:32 UTC (rev 653)
+++ trunk/php/bugtracking/bug_overview.php 2012-06-25 14:08:40 UTC (rev 654)
@@ -740,9 +740,10 @@
$spie = array();
$spie['title'] = $lang['BugAssignedTo'];
foreach ($solver as $i => $f) {
+ $e = array();
if ($i > 0) {
$slv = getObject($this->dbconn,$i);
- $i = $slv->getFullName();
+ $i = $slv->getLink();
} else if ($i == -1) {
$i = $lang['HistoryDeleted'];
} else if ($i<0) {
@@ -750,7 +751,6 @@
$i = $lang['ProdRole'][-($i+10)];
}
- $e = array();
$e['val'] = $f;
$e['cnt'] = $f;
$e['title'] = $i;
@@ -769,7 +769,7 @@
foreach ($reporter as $i => $f) {
if ($i > 0) {
$repo = getObject($this->dbconn,$i);
- $i = $repo->getFullName();
+ $i = $repo->getLink();
} else if ($i == -1) {
$i = $lang['HistoryDeleted'];
} else if ($i<0) {
@@ -884,10 +884,10 @@
continue;
}
if ( $b->del_ok() ) {
- $msg .= sprintf($lang['BugDeleteI'], $b->getFullName()) ."<br />";
- $msg .= $b->delete();
+ $msg = addLine(sprintf($lang['BugDeleteI'], $b->getFullName()),$msg);
+ $msg = addLine($b->delete(),$msg);
} else {
- $msg .= $b->getLink() .": ". sprintf($lang['Err0023'],$lang[$b->getType()]) ."<br />\n";
+ $msg = addLine($b->getLink() .': '. sprintf($lang['Err0023'],$lang[$b->getType()]),$msg);
}
unset($b);
}
@@ -914,28 +914,28 @@
if ( $a[1] == "S" ) {
if ($a[2] == $b->state) continue; // keep
if (!$this->stc->check_trans($b->state,$a[2])) {
- $msg .= $b->getLink() .': '. sprintf($lang['Err0024'],$lang[$b->getType()]).' ('.$lang['BugState'].")<br />\n";
+ $msg = addLine($b->getLink() .': '. sprintf($lang['Err0024'],$lang[$b->getType()]).' ('.$lang['BugState'].')',$msg);
continue;
}
- $msg .= $b->getLink() .' '. $lang['BugState'] .' = '. $lang['BugStates'][$a[2]] ."<br />";
+ $msg = addLine($b->getLink() .' '. $lang['BugState'] .' = '. $lang['BugStates'][$a[2]],$msg);
$state = $b->state;
if ($b->setState($a[2])) {
$newlines = sprintf('<b>'. $lang['BugState'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$b->getState($state),$b->getState() , $newlines);
}
} else if ( $a[1] == "C" ) {
if ($a[2] == $b->class) continue; // keep
- $msg .= $b->getLink() .' '. $lang['BugClass'] .' = '. $lang['BugClasses'][$a[2]] ."<br />";
+ $msg = addLine($b->getLink() .' '. $lang['BugClass'] .' = '. $lang['BugClasses'][$a[2]],$msg);
$class = $b->class;
if ($b->setClass($a[2])) {
$newlines = sprintf('<b>'. $lang['BugClass'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$b->getClass($class),$b->getClass() , $newlines);
}
} else {
- $msg .= "A:".$_GET['action'] ." M: '". $val[1] ."' V:". $val[2] ."<br />";
+ $msg = addLine("A:".$_GET['action'] ." M: '". $val[1] ."' V:". $val[2],$msg);
}
$b->newdesc = $newlines;
- $msg .= $b->save();
+ $msg = addLine($b->save(),$msg);
} else {
- $msg .= $b->getLink() .': '. sprintf($lang['Err0024'],$lang[$b->getType()])."<br />\n";
+ $msg = addLine($b->getLink() .': '. sprintf($lang['Err0024'],$lang[$b->getType()]),$msg);
}
unset ($b);
}
@@ -991,7 +991,7 @@
$this->css_class = 'overviewbox';
if ( ! $this->user->feature_ok(usebugtracking,PERM_SEE) ) {
- $msg .= sprintf($lang['Err0022'],"'". $this->name ."'");
+ $msg = addLine(sprintf($lang['Err0022'],"'". $this->name ."'"),$msg);
$this->stop = true;
return;
}
@@ -1272,7 +1272,7 @@
$this->result2->free();
if ( 0 == $n) {
- $msg .= $lang['Err0048'].'<br />';
+ $msg = addLine($lang['Err0048'],$msg);
$this->redirect = 'bug_select.php';
if ($this->ext != 0) {
$this->redirect = addUrlParameter($this->redirect,'ext=1',true);
Modified: trunk/php/counter/counter_show.php
===================================================================
--- trunk/php/counter/counter_show.php 2012-06-25 08:16:32 UTC (rev 653)
+++ trunk/php/counter/counter_show.php 2012-06-25 14:08:40 UTC (rev 654)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2008 - 2011 by Gero Kohnert
+ * Copyright 2008 - 2012 by Gero Kohnert
*
* 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
@@ -150,7 +150,7 @@
$e['val'] = $cnt;
$e['cnt'] = $cnt;
- $e['title'] = $uobj->getFullName();
+ $e['title'] = $uobj->getLink();
$spie['data'][] = $e;
}
$r .= "<tr>\n";
Modified: trunk/php/graphs.pinc
===================================================================
--- trunk/php/graphs.pinc 2012-06-25 08:16:32 UTC (rev 653)
+++ trunk/php/graphs.pinc 2012-06-25 14:08:40 UTC (rev 654)
@@ -39,8 +39,8 @@
$pre = '';
foreach($a['data'] as $e) {
$data.= $pre.'[';
- $data .= '"'.$e['title'].' ('.$e['val'].')"';
- $data .= ','.$e['cnt'];
+ $data .= '"'.addslashes($e['title']).' ('.$e['val'].')';
+ $data .= '",'.$e['cnt'];
$data.= ']';
if (isset($e['color'])) {
$colors1 .= $pre.'"'.$e['color'].'"';
@@ -135,7 +135,7 @@
foreach($a as $e) {
$r .= '<tr>';
$r .= ' <td><span style="font-size:0.8em;background:'.$e['color'].';">  </span> ';
- $r .= myentities($e['title']).'</td>';
+ $r .= myentities($e['title']).'</td>';
$r .= ' <td>'.$e['val'].'</td>';
$r .= ' <td>'.$e['cnt'].'</td>';
$r .= '</tr>';
@@ -227,6 +227,7 @@
}
}
});
+ $('.jqplot-highlighter-tooltip').addClass('ui-corner-all')
\n";
return $r;
} else if ( function_exists('ImageCreate') ) {
Modified: trunk/php/product_overview.php
===================================================================
--- trunk/php/product_overview.php 2012-06-25 08:16:32 UTC (rev 653)
+++ trunk/php/product_overview.php 2012-06-25 14:08:40 UTC (rev 654)
@@ -605,7 +605,7 @@
$e = array();
$e['val'] = $f;
$e['cnt'] = $f;
- $e['title'] = $m->getShortName();
+ $e['title'] = $m->getLink();
$e['tobj'] = $m;
$c++;
$spie['data'][] = $e;
Modified: trunk/php/timetrack/timetrack_overview.php
===================================================================
--- trunk/php/timetrack/timetrack_overview.php 2012-06-25 08:16:32 UTC (rev 653)
+++ trunk/php/timetrack/timetrack_overview.php 2012-06-25 14:08:40 UTC (rev 654)
@@ -461,10 +461,12 @@
$e['val'] = hour_format($f) ." ". $lang['hours'];
$e['cnt'] = $f;
if ($worker->gettype() == "address") {
- $e['title'] = $worker->getShortName();
+ $xx = $worker->getShortName();
} else {
- $e['title'] = $worker->getFullName();
+ $xx = $worker->getFullName();
}
+ $e['title'] = $worker->getLink($xx);
+
$spie['data'][] = $e;
}
$r .= pie($spie);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-25 08:16:41
|
Revision: 653
http://tutos.svn.sourceforge.net/tutos/?rev=653&view=rev
Author: gokohnert
Date: 2012-06-25 08:16:32 +0000 (Mon, 25 Jun 2012)
Log Message:
-----------
bugfix
Modified Paths:
--------------
trunk/php/bugtracking/bug_ins.php
Modified: trunk/php/bugtracking/bug_ins.php
===================================================================
--- trunk/php/bugtracking/bug_ins.php 2012-06-25 05:57:56 UTC (rev 652)
+++ trunk/php/bugtracking/bug_ins.php 2012-06-25 08:16:32 UTC (rev 653)
@@ -219,7 +219,7 @@
//
// direct added documents
//
-if ($this->user->feature_ok(usedocmanagement,PERM_NEW) ) {
+if ($current_user->feature_ok(usedocmanagement,PERM_NEW) ) {
if ( isset($_FILES['file']) ) {
$file = $_FILES['file'];
$gotourl = addUrlParameter($gotourl,"pic_path=". $file['name'],true);
@@ -404,4 +404,4 @@
* SVN Info $Id$
* $Author$
*/
-?>
\ No newline at end of file
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-25 05:58:02
|
Revision: 652
http://tutos.svn.sourceforge.net/tutos/?rev=652&view=rev
Author: gokohnert
Date: 2012-06-25 05:57:56 +0000 (Mon, 25 Jun 2012)
Log Message:
-----------
mobile layout
Modified Paths:
--------------
trunk/php/expense/expense_select.php
Modified: trunk/php/expense/expense_select.php
===================================================================
--- trunk/php/expense/expense_select.php 2012-06-24 18:37:06 UTC (rev 651)
+++ trunk/php/expense/expense_select.php 2012-06-25 05:57:56 UTC (rev 652)
@@ -17,6 +17,8 @@
// Check if user is allowed to use it
check_user();
+
+$tutos['mobileok'] = 1;
loadmodules('expense','select');
loadmodule('expense');
loadlayout();
@@ -40,13 +42,16 @@
$r .= $this->SelectTableStart();
$r .= $this->headline($lang['SearchForExpense']);
- $r .= "<tr>\n";
+ $r .= $this->ContentRowStart();
$r .= $this->showfieldc($lang['ExpenseName'],0,'name');
- $r .= " <td><input id=\"name\" type=\"text\" value=\"\" name=\"name\" /></td>\n";
- $r .= ' <td><input type="submit" value="'. $lang['Search'] .'" title="'.$lang['SearchForExpense']."\" /></td>\n";
+ $r .= $this->showdata('<input id="name" type="text" value="" name="name" />',1);
+ $r .= $this->showdata('<input type="submit" value="'. $lang['Search'] .'" title="'.$lang['SearchForExpense'].'" />',1);
+ $r .= $this->ContentRowEnd();
- $r .= "</tr><tr>\n";
- $r .= ' <td colspan="3" align="right"><span style="text-align:right;" id="toggler">'. $lang['extended'] ."</span></td>\n";
+ $r .= $this->ContentRowStart();
+ $r .= ' <td colspan="3" align="right"><span id="toggler">'. $lang['extended'] ."</span></td>\n";
+ $r .= $this->ContentRowEnd();
+
$tutos['pagescript'] .= "
$( \"#toggler\" ).click(function() {
$(\".ext\").toggle();
@@ -64,49 +69,44 @@
\n";
}
- $r .= "</tr><tr class=\"ext\">\n";
+ $r .= $this->ContentRowStart('ext');
$r .= $this->showfieldc($lang['ExpenseRefType']);
- $r .= " <td colspan=\"2\"><b>". $this->ExpenseAskRefType($this->nsrt,1) ."</b></td>\n";
+ $r .= $this->showdata($this->ExpenseAskRefType($this->nsrt,1),2);
+ $r .= $this->ContentRowEnd();
- $r .= "</tr><tr class=\"ext\">\n";
- $r .= $this->showfieldc($lang['ExpenseRefName']);
- $r .= " <td colspan=\"2\"><input type=\"text\" value=\"\" name=\"nsrn\" /></td>\n";
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['ExpenseRefName'],0,'nsrn');
+ $r .= $this->showdata('<input type="text" value="" id="nsrn" name="nsrn" />',2);
+ $r .= $this->ContentRowEnd();
- $r .= "</tr><tr class=\"ext\">\n";
- $r .= $this->showfieldc($lang['ExpenseSupplier']);
- $r .= ' <td colspan="2">';
- $r .= select_from_array_or_input($this->obj,"sup",null,1,'cd');
- $r .= "</td>\n";
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['ExpenseSupplier'],0,'sup');
+ $r .= $this->showdata(select_from_array_or_input($this->obj,"sup",null,1,'cd'),2);
+ $r .= $this->ContentRowEnd();
- $r .= "</tr><tr class=\"ext\">\n";
- $r .= $this->showfieldc($lang['ExpenseCategory']);
- $r .= ' <td colspan="2"><b>'. SelectLangArray('cat','ExpenseCategories',-1,true) ."</b></td>\n";
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['ExpenseCategory'],0,'cat');
+ $r .= $this->showdata(SelectLangArray('cat','ExpenseCategories',-1,true),2);
+ $r .= $this->ContentRowEnd();
- $r .= "</tr><tr class=\"ext\">\n";
- $r .= $this->showfieldc($lang['ExpenseCreator']);
- $r .= " <td colspan=\"2\"><input type=\"text\" value=\"\" name=\"nscr\" /></td>\n";
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['ExpenseCreator'],0,'nscr');
+ $r .= $this->showdata('<input type="text" value="" name="nscr" id="nscr" />',2);
+ $r .= $this->ContentRowEnd();
- $r .= "</tr><tr class=\"ext\">\n";
- $r .= ' <td rowspan="2" class="desc">'. $lang['ExpenseBetween'] ."</td>\n";
- $r .= " <td colspan=\"2\">";
- $r .= $this->nsfd->EnterDate("f",1);
- $r .= "</td>\n";
+ $r .= $this->ContentRowStart('ext');
+ $r .= $this->showfieldc($lang['ExpenseBetween'],0,'f');
+ $r .= $this->showdata($this->nsfd->EnterDate("f",1).' - '.$this->nstd->EnterDate("t",1),2);
+ $r .= $this->ContentRowEnd();
- $r .= "</tr><tr class=\"ext\">\n";
- $r .= ' <td colspan="2">';
- $r .= $this->nstd->EnterDate("t",1);
- $r .= "</td>\n";
-
// add custom selectors
$x = get_custom_selectors('expense');
foreach ($x as $s) {
- $r .= "</tr><tr class=\"ext\">\n";
+ $r .= $this->ContentRowStart('ext');
$r .= $this->showfieldc($s[0]);
- $r .= " <td colspan=\"2\">\n";
- $r .= $s[1];
- $r .= " </td>\n";
+ $r .= $this->showdata($s[1],2);
+ $r .= $this->ContentRowEnd();
}
- $r .= "</tr>\n";
$r .= $this->SelectTableEnd();
$r .= hiddenFormElements();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-24 18:37:13
|
Revision: 651
http://tutos.svn.sourceforge.net/tutos/?rev=651&view=rev
Author: gokohnert
Date: 2012-06-24 18:37:06 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
update
Modified Paths:
--------------
trunk/ChangeLog
trunk/php/company_show.php
trunk/php/department_show.php
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2012-06-24 18:15:05 UTC (rev 650)
+++ trunk/ChangeLog 2012-06-24 18:37:06 UTC (rev 651)
@@ -1,10 +1,21 @@
#$Id$
+xx xxx 2012
+ * Release 1.9.2012xxxx
+ * start using mobile layout support using jquery mobile
+ allows to automatically jump to a mobile layout when called in a mobile browser (see user config)
+ * more usage of jquery in layout
+ * config variables for users (like maxrows in overview)
* added repository description to mail templates
- * redesigned the bug statistics (domut for bug states)
- * Custom Field type list for growing lists
+ * redesigned the bug statistics (donut for bug states)
+ * testspec overview shows number of testcases
+ * teams can now have a hidden flag which allows to only define permissions but do not count in "all my teams"
+ * Custom Field type list for growing lists
(see table_custom_example.pinc for an example using modules in projects and bugs)
* Bugs can require a target projekt for a set of states
* Feature to check age , length and number of special chars in a new password
+ * new hook info page (via admin page) about defined hook scripts
+ * updated jquery version / is also displayed in admin page
+ * history will note the deletion of locations
23 December 2011
* Release 1.8.20111223
* stc edits will appear in history
@@ -15,7 +26,7 @@
* bugtracking allows to select a project role as solver
* bugtracking detail page will show the age of the current state
* bugtracking new stateage flag in bug config to show age of state in overview
- * bugtracking will mark bugids in comments
+ * bugtracking will mark bugids in comments
* more reminder anchors (dpendand on object to be reminded)
* tasks can now be defined with exact time instead of day only
* state coloring in overviews (bugs, projects, tasks etc)
Modified: trunk/php/company_show.php
===================================================================
--- trunk/php/company_show.php 2012-06-24 18:15:05 UTC (rev 650)
+++ trunk/php/company_show.php 2012-06-24 18:37:06 UTC (rev 651)
@@ -144,11 +144,11 @@
$b->read_locs_data();
foreach($b->locall as $i => $f) {
if ($f->company->id == $this->obj->id) {
- $msg .= $lang['Delete'].':'.$b->getLink().'@'.$f->company->getFullName().'<br />';
+ $msg = addLine($lang['Delete'].':'.$b->getLink().'@'.$f->company->getFullName(),$msg);
$this->dbconn->Begin("WORK");
$f->setCompany(null);
$f->setDepartment(null);
- $msg .= $f->save();
+ $msg = addLine($f->save(),$msg);
$this->dbconn->Commit("WORK");
}
}
@@ -178,17 +178,17 @@
$this->obj = $this->obj->read($_GET['id'],$this->obj);
}
if ( !is_object($this->obj) ) {
- $msg .= sprintf($lang['Err0040'],$lang['Company']);
+ $msg = addLine(sprintf($lang['Err0040'],$lang['Company']),$msg);
$this->stop = true;
$this->format = "html";
return;
} else if ( ! $this->obj->see_ok() ) {
- $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0022'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
$this->format = "html";
return;
} else if ( $this->obj->id < 0 ) {
- $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0040'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
$this->format = "html";
return;
Modified: trunk/php/department_show.php
===================================================================
--- trunk/php/department_show.php 2012-06-24 18:15:05 UTC (rev 650)
+++ trunk/php/department_show.php 2012-06-24 18:37:06 UTC (rev 651)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -124,11 +124,11 @@
$b->read_locs_data();
foreach($b->locall as $i => $f) {
if ($f->department->id == $this->obj->id) {
- $msg .= $lang['Delete'].':'.$b->getLink().'@'.$f->department->getFullName() .' + '. $f->company->getFullName().'<br />';
+ $msg = addLine($lang['Delete'].':'.$b->getLink().'@'.$f->department->getFullName() .' + '. $f->company->getFullName(),$msg);
$this->dbconn->Begin("WORK");
$f->setCompany(null);
$f->setDepartment(null);
- $msg .= $f->save();
+ $msg = addLine($f->save(),$msg);
$this->dbconn->Commit("WORK");
}
}
@@ -154,23 +154,22 @@
$this->obj = $this->obj->read($_GET['id'],$this->obj);
}
if ( !is_object($this->obj) ) {
- $msg .= sprintf($lang['Err0040'],$lang['Department']);
+ $msg = addLine(sprintf($lang['Err0040'],$lang['Department']),$msg);
$this->stop = true;
$this->format = "html";
return;
} else if ( ! $this->obj->see_ok() ) {
- $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0022'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
$this->format = "html";
return;
} else if ( $this->obj->id < 0 ) {
- $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0040'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
$this->format = "html";
return;
}
-
$this->obj->read_locs_data();
$this->addHidden("id",$this->obj->id);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-24 18:15:14
|
Revision: 650
http://tutos.svn.sourceforge.net/tutos/?rev=650&view=rev
Author: gokohnert
Date: 2012-06-24 18:15:05 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
better msg handling
Modified Paths:
--------------
trunk/php/address_ins.php
trunk/php/address_new.php
trunk/php/app_ins.php
trunk/php/app_new.php
trunk/php/app_new_r.php
trunk/php/company_ins.php
trunk/php/custom.pinc
trunk/php/department_ins.php
trunk/php/expense/expense_ins.php
trunk/php/file/file.pinc
trunk/php/file/file_ins.php
trunk/php/file/file_new.php
trunk/php/group/group_ins.php
trunk/php/installation/installation_ins.php
trunk/php/invoice/invoice_ins.php
trunk/php/module_template/AAA_ins.php
trunk/php/note/note_ins.php
trunk/php/permission.p3
trunk/php/rate/rate_ins.php
trunk/php/reminder/reminder_ins.php
trunk/php/resource/resource_ins.php
trunk/php/stuff/stuff_ins.php
trunk/php/stuff/stuff_new.php
trunk/php/subversion/svn_ins.php
trunk/php/task_ins.php
trunk/php/team_ins.php
trunk/php/testmanager/testcase_ins.php
trunk/php/testmanager/testsuite_ins.php
trunk/php/timetrack/timetrack_ins.php
trunk/php/url/url_ins.php
trunk/php/user_ins.php
trunk/php/watchlist/watchlist_ins.php
Modified: trunk/php/address_ins.php
===================================================================
--- trunk/php/address_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/address_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2010 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -38,7 +38,7 @@
$a->read_picture();
if ( ! $a->mod_ok() ) {
// Not allowed
- $msg .= sprintf($lang['Err0024'],$lang[$a->getType()],true);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$a->getType()],true),$msg);
}
$new = false;
} else {
@@ -50,17 +50,16 @@
$l = $l->read($_POST['loc_id'],$l);
if ( ! $l->mod_ok() ) {
// Not allowed
- $msg .= sprintf($lang['Err0024'],$lang[$l->getType()],true);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$l->getType()],true),$msg);
}
}
-
$birthday = new TUTOS_Date_Time(0);
$birthday->setDateTimeF("birthday",1);
if ( !$birthday->checkDMY(true) ) {
- $msg .= sprintf($lang['Err0038'],$lang['AdrBirthday']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0038'],$lang['AdrBirthday']),$msg);
} else {
$gotourl= addUrlParameter($gotourl,"bd=". $birthday->getYYYYMMDD(),true);
}
@@ -71,7 +70,7 @@
}
if ( empty($_POST['l_name']) || !isset($_POST['l_name']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['AdrLastName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['AdrLastName']),$msg);
$gotourl = addBadField($gotourl,'l_name',true);
} else {
$l_name = trim($_POST['l_name']);
@@ -117,7 +116,7 @@
if ( 0 != $n) {
$x = new tutos_address($dbconn);
$x->read_result($r,0);
- $msg .= sprintf($lang['Err0039'],$x->getLink()) ."<br />";
+ $msg = addLine(sprintf($lang['Err0039'],$x->getLink()),$msg);
}
$r->free();
}
@@ -131,7 +130,7 @@
// location
$lmsg = $l->parseform();
if ($l->used || ($l->id >0)) {
- $msg .= $lmsg;
+ $msg = addLine($lmsg,$msg);
}
$savefile = 0;
@@ -157,28 +156,28 @@
//
// Parse additional custom fields
//
-$msg .= parse_custom_fields($a->gettype(),$a);
+$msg = addLine(parse_custom_fields($a->gettype(),$a),$msg);
// other modules
-$msg .= module_parseforms($current_user,$a,$gotourl);
+$msg = addLine(module_parseforms($current_user,$a,$gotourl),$msg);
-$msg .= $a->run_check_hook();
+$msg = addLine($a->run_check_hook(),$msg);
if ( $msg == "" ) {
$dbconn->Begin("WORK");
- $msg .= $a->save();
+ $msg = addLine($a->save(),$msg);
$gotourl = $a->getModUrl();
$l->adr_id = $a->id;
$l->ref = $a;
if ($l->used || ($l->id >0)) {
- $msg .= $l->save();
+ $msg = addLine($l->save(),$msg);
$gotourl= addUrlParameter($gotourl,"loc_id=". $l->id,true);
}
if ( $savefile == 1 ) {
$a->pic_file->addReference($a);
$a->pic_file->adr_pic = 1;
- $msg .= $a->pic_file->save();
+ $msg = addLine($a->pic_file->save(),$msg);
$a->pic_id = $a->pic_file->id;
- $msg .= $a->save();
+ $msg = addLine($a->save(),$msg);
}
$dbconn->Commit("WORK");
Modified: trunk/php/address_new.php
===================================================================
--- trunk/php/address_new.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/address_new.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -349,7 +349,7 @@
// Modify Base Address
$this->obj = $this->obj->read($id,$this->obj);
if ( is_numeric($this->obj) && $this->obj == -1 ) {
- $msg .= sprintf($lang['Err0040'],$lang['Address']);
+ $msg = addLine(sprintf($lang['Err0040'],$lang['Address']),$msg);
$this->stop = true;
return;
}
@@ -373,10 +373,10 @@
} else {
$this->loc->lname = $this->obj->loc[$loc_id];
if ($this->loc->id < 0) {
- $msg .= sprintf($lang['Err0040'],$lang[$this->loc->getType()]);
+ $msg = addLine(sprintf($lang['Err0040'],$lang[$this->loc->getType()]),$msg);
$this->stop = true;
} else if ( ! $this->loc->mod_ok() ) {
- $msg .= sprintf($lang['Err0024'],$lang[$this->loc->getType()]);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$this->loc->getType()]),$msg);
$this->stop = true;
}
}
@@ -458,10 +458,10 @@
}
}
if (($this->obj->id < 0) && !$this->user->feature_ok(useaddressbook,PERM_NEW) ) {
- $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0054'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
} else if ( ! $this->obj->mod_ok() ) {
- $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
}
Modified: trunk/php/app_ins.php
===================================================================
--- trunk/php/app_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/app_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -58,7 +58,7 @@
$start = new TUTOS_Date_Time();
$start->setDateTimeF("start");
if ( ( !$start->checkDMY()) || (-1 == $start->getTimeStamp() ) ) {
- $msg .= sprintf($lang['Err0038'],$lang['StartDate']).' '.$start->getDate().'<br />';
+ $msg = addLine(sprintf($lang['Err0038'],$lang['StartDate']).' '.$start->getDate(),$msg);
$gotourl = addBadField($gotourl,'start',true);
$gotourl = addBadField($gotourl,'jqc_start',true);
} else {
@@ -69,7 +69,7 @@
$end = new TUTOS_Date_Time();
$end->setDateTimeF("end");
if ( ( !$end->checkDMY()) || (-1 == $end->getTimeStamp()) ) {
- $msg .= sprintf($lang['Err0038'],$lang['EndDate']) .' '.$end->getDate().'<br />';
+ $msg = addLine(sprintf($lang['Err0038'],$lang['EndDate']) .' '.$end->getDate(),$msg);
$gotourl = addBadField($gotourl,'end',true);
} else {
$gotourl= addUrlParameter($gotourl,"end=".$end->getYYYYMMDDHHMM(),true);
@@ -81,7 +81,7 @@
#
if ( ($a->start->ts > $a->end->ts) && ($a->r_ignore == 0) ) {
# Start after End
- $msg .= $lang['Err0002'] ."<br />";
+ $msg = addLine($lang['Err0002'],$msg);
}
@@ -112,22 +112,15 @@
}
if ( count($a->participant) == 0 ) {
- $msg .= sprintf($lang['Err0014'],$lang['Participants']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0014'],$lang['Participants']),$msg);
}
if ( !isset($_POST['mod_allow']) ) {
- $msg .= sprintf($lang['Err0014'],$lang['AppChangeOrDel']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0014'],$lang['AppChangeOrDel']),$msg);
} else {
$gotourl= addUrlParameter($gotourl,"mod_allow=".$_POST['mod_allow'],true);
$a->mod_allow = $_POST['mod_allow'];
}
-
-if ( !isset($_POST['creator']) ) {
- $msg .= "Missing creator<br />";
-} else {
- $a->creator = new Tutos_user($dbconn);
- $a->creator = $a->creator->read($_POST['creator'],$a->creator);
-}
#
# TRACE
#
@@ -234,11 +227,11 @@
$a->setProduct(-1);
}
# other modules
-$msg .= module_parseforms($current_user,$a,$gotourl);
+$msg = addLine(module_parseforms($current_user,$a,$gotourl),$msg);
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields('appointment1',$a);
+$msg = addLine(parse_custom_fields('appointment1',$a),$msg);
# check availability of participants and resources
@@ -248,13 +241,13 @@
}
-$msg .= $a->run_check_hook();
+$msg = addLine($a->run_check_hook(),$msg);
##################################################
# End of Checks
##################################################
if ( $msg == "" ) {
$dbconn->Begin("WORK");
- $msg .= $a->save();
+ $msg = addLine($a->save(),$msg);
$dbconn->Commit("WORK");
/* Go back to calendar */
Modified: trunk/php/app_new.php
===================================================================
--- trunk/php/app_new.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/app_new.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -72,7 +72,6 @@
if ( $this->obj->id > 0 ) {
$this->addHidden("id",$this->obj->id);
}
- $this->addHidden("creator",$this->obj->creator->id);
$r .= $this->DataTableStart();
$r .= $this->Headline();
@@ -245,7 +244,7 @@
$this->name = $lang['AppointModify'];
$this->obj = $this->obj->read($_GET['id'],$this->obj);
if ( !is_object($this->obj) ) {
- $msg .= sprintf($lang['Err0040'],$lang['Appointment']);
+ $msg = addLine(sprintf($lang['Err0040'],$lang['Appointment']),$msg);
$this->stop = true;
$this->format = "html";
return;
@@ -325,10 +324,10 @@
$this->obj->allowed = $this->obj->mod_ok();
if ( ($this->obj->id < 0) && !$this->user->feature_ok(usecalendar,PERM_NEW) ) {
- $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0054'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
} else if ( ! $this->obj->mod_ok() ) {
- $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
return;
}
@@ -374,4 +373,4 @@
<!--
SVN Info $Id$
$Author$
--->
+-->
\ No newline at end of file
Modified: trunk/php/app_new_r.php
===================================================================
--- trunk/php/app_new_r.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/app_new_r.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -78,7 +78,6 @@
if ( $this->obj->id > 0 ) {
$this->addHidden("id",$this->obj->id);
}
- $this->addHidden("creator",$this->obj->creator->id);
$r .= $this->DataTableStart();
$r .= $this->Headline();
@@ -224,7 +223,7 @@
$this->name = $lang['AppointModify'];
$this->obj = $this->obj->read($_GET['id'],$this->obj);
if (!is_object($this->obj)) {
- $msg .= sprintf($lang['Err0040'],$lang['appointment']);
+ $msg = addLine(sprintf($lang['Err0040'],$lang['appointment']),$msg);
$this->stop = true;
return;
}
@@ -296,10 +295,10 @@
$this->obj->allowed = $this->obj->mod_ok();
if ( ($this->obj->id < 0) && !$this->user->feature_ok(usecalendar,PERM_NEW) ) {
- $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0054'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
} else if ( ! $this->obj->mod_ok() ) {
- $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
}
# menu
Modified: trunk/php/company_ins.php
===================================================================
--- trunk/php/company_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/company_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2010 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -31,7 +31,7 @@
$c = $c->read($_POST['id'],$c);
if ( ! $c->mod_ok() ) {
// Not allowed
- $msg .= sprintf($lang['Err0024'],$lang[$c->getType()],true);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$c->getType()],true),$msg);
}
}
@@ -40,12 +40,12 @@
$l = $l->read($_POST['loc_id'],$l);
if ( ! $l->mod_ok() ) {
// Not allowed
- $msg .= sprintf($lang['Err0024'],$lang[$l->getType()],true);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$l->getType()],true),$msg);
}
}
if ( !isset($_POST['name']) || (trim($_POST['name']) == '') ) {
- $msg .= sprintf($lang['Err0009'],$lang['Company']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['Company']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$name = trim($_POST['name']);
@@ -83,7 +83,7 @@
if ( 0 != $n) {
$x = new company($dbconn);
$x->read_result($r,0);
- $msg .= sprintf($lang['Err0044'],$x->getLink()) ."<br />";
+ $msg = addLine(sprintf($lang['Err0044'],$x->getLink()),$msg);
}
$r->free();
}
@@ -93,7 +93,7 @@
$_POST['c_id'] = -1;
$lmsg = $l->parseform();
if ($l->used || ($l->id >0)) {
- $msg .= $lmsg;
+ $msg = addLine($lmsg,$msg);
}
$c->setName($name);
@@ -101,18 +101,18 @@
//
// Parse additional custom fields
//
-$msg .= parse_custom_fields($c->gettype(),$c);
+$msg = addLine(parse_custom_fields($c->gettype(),$c),$msg);
// other modules
-$msg .= module_parseforms($current_user,$c,$gotourl);
+$msg = addLine(module_parseforms($current_user,$c,$gotourl),$msg);
-$msg .= $c->run_check_hook();
+$msg = addLine($c->run_check_hook(),$msg);
if ( $msg == "" ) {
$dbconn->Begin("WORK");
- $msg .= $c->save();
+ $msg = addLine($c->save(),$msg);
$l->adr_id = $c->id;
$l->ref = $c;
if ($l->used || ($l->id >0)) {
- $msg = $l->save();
+ $msg = addLine($l->save(),$msg);
}
$dbconn->Commit("WORK");
Modified: trunk/php/custom.pinc
===================================================================
--- trunk/php/custom.pinc 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/custom.pinc 2012-06-24 18:15:05 UTC (rev 650)
@@ -316,7 +316,7 @@
}
if ($this->required && $this->is_empty() ) {
- $r .= sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))) ."<br />";
+ $r = addLine(sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,$pn,true);
}
@@ -483,7 +483,7 @@
}
}
if ($this->required && $this->is_empty()) {
- $r .= sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))) .'<br />';
+ $r = addLine(sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,$pn,true);
}
return $r;
@@ -573,7 +573,7 @@
$this->content = $_POST[$pn];
if ($this->required && $this->is_empty() ) {
- $r .= sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))) ."<br />";
+ $r = addLine(sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,$pn,true);
}
@@ -615,7 +615,7 @@
if (!isset($_POST[$pn])) return $r;
if ( !checkfloat($_POST[$pn]) ) {
- $r .= sprintf($lang['Err0017'],myentities(getLang($this->x['lang']))) ."<br />";
+ $r = addLine(sprintf($lang['Err0017'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,$pn,true);
}
$gotourl= addUrlParameter($gotourl,$pn .'='. $_POST[$pn],true);
@@ -623,7 +623,7 @@
$this->content = $this->obj->$fn;
if ($this->required && $this->is_empty() ) {
- $r .= sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))) ."<br />";
+ $r = addLine(sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,$pn,true);
}
return $r;
@@ -658,7 +658,7 @@
$r = '';
if ( !checkfloat($_POST[$this->get_parsename()]) ) {
- $r .= sprintf($lang['Err0017'],myentities(getLang($this->x['lang']))) ."<br />";
+ $r = addLine(sprintf($lang['Err0017'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,$this->get_parsename(),true);
}
$gotourl= addUrlParameter($gotourl,$this->get_parsename() .'='. $_POST[$this->get_parsename()],true);
@@ -709,7 +709,7 @@
$this->content = $this->obj->$fn;
if ($this->required && $this->is_empty() ) {
- $r .= sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))) ."<br />";
+ $r = addLine(sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,'jqc_'.$pn,true);
}
return $r;
@@ -757,7 +757,7 @@
$this->content = $this->obj->$fn;
if ($this->required && $this->is_empty() ) {
- $r .= sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))) ."<br />";
+ $r = addLine(sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,'jqc_'.$pn,true);
}
return $r;
@@ -790,10 +790,14 @@
function set() {
global $gotourl;
+ $r = '';
+
if (!isset($_POST[$this->get_parsename()])) $_POST[$this->get_parsename()] = 0;
$gotourl= addUrlParameter($gotourl,$this->get_parsename() ."=". $_POST[$this->get_parsename()],true);
$this->obj->setIntField($this->get_fldname(),$_POST[$this->get_parsename()],$this->x['lang']);
$this->required = false;
+
+ return $r;
}
}
@@ -834,7 +838,7 @@
$this->content = $this->obj->$fn;
if ($this->required && $this->is_empty() ) {
- $r .= sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))) ."<br />";
+ $r = addLine(sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,$pn,true);
}
return $r;
@@ -900,7 +904,7 @@
$gotourl= addUrlParameter($gotourl,$pn .'='. UrlEncode($xx),true);
if ( ($xx == '') && $this->required) {
- $r .= sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))) ."<br />";
+ $r = addLine(sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,$this->get_parsename(),true);
};
@@ -1004,7 +1008,7 @@
$this->content = $this->obj->$fn;
if ($this->required && $this->is_empty() ) {
- $r .= sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))) ."<br />";
+ $r = addLine(sprintf($lang['Err0009'],myentities(getLang($this->x['lang']))),$r);
$gotourl = addBadField($gotourl,$pn,true);
}
return $r;
@@ -1650,7 +1654,7 @@
$f = get_fld_obj($obj,$x,$section,$i);
if (is_object($f)) {
- $r .= $f->set();
+ $r = addLine($f->set(),$r);
continue;
}
}
Modified: trunk/php/department_ins.php
===================================================================
--- trunk/php/department_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/department_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2010 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -31,7 +31,7 @@
$gotourl = addUrlParameter($gotourl,"id=". $d->id,true);
if ( ! $d->mod_ok() ) {
// Not allowed
- $msg .= sprintf($lang['Err0024'],$lang[$d->getType()],true);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$d->getType()],true),$msg);
}
}
@@ -40,12 +40,12 @@
$l = $l->read($_POST['loc_id'],$l);
if ( ! $l->mod_ok() ) {
// Not allowed
- $msg .= sprintf($lang['Err0024'],$lang[$l->getType()],true);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$l->getType()],true),$msg);
}
}
if ( !isset($_POST['name']) || (trim($_POST['name']) == '') ) {
- $msg .= sprintf($lang['Err0009'],$lang['Department']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['Department']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$name = trim($_POST['name']);
@@ -55,7 +55,7 @@
// Check Company
if ( isset($_POST['cfn']) ) {
if ( empty($_POST['cfn']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['Company']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['Company']),$msg);
} else {
$x = check_field($_POST['cfn'],"cfn","cl","c");
$d->setCompany($x->id);
@@ -68,13 +68,13 @@
// Check for duplicate name
if ( $msg == "" ) {
if ( ($d->id < 0) || ($name != $d->name) ) {
- $q = "SELECT * FROM ". $d->tablename ." WHERE ". $dbconn->Like2("name",$name) ." AND c_id = ". $d->company->id;
+ $q = 'SELECT * FROM '. $d->tablename .' WHERE '. $dbconn->Like2("name",$name) .' AND c_id = '. $d->company->id;
$r = $dbconn->Exec($q);
$n = $r->numrows();
if ( 0 != $n) {
$x = new department($dbconn);
$x->read_result($r,0);
- $msg .= sprintf($lang['Err0045'],$x->getLink()) ."<br />";
+ $msg = addLine(sprintf($lang['Err0045'],$x->getLink()),$msg);
}
$r->free();
}
@@ -85,7 +85,7 @@
$_POST['d_id'] = -1;
$lmsg = $l->parseform();
if ($l->used || ($l->id >0)) {
- $msg .= $lmsg;
+ $msg = addLine($lmsg,$msg);
}
$d->setName($name);
@@ -94,19 +94,19 @@
//
// Parse additional custom fields
//
-$msg .= parse_custom_fields($d->gettype(),$d);
+$msg = addLine(parse_custom_fields($d->gettype(),$d),$msg);
// other modules
-$msg .= module_parseforms($current_user,$d,$gotourl);
+$msg = addLine(module_parseforms($current_user,$d,$gotourl),$msg);
-$msg .= $d->run_check_hook();
+$msg = addLine($d->run_check_hook(),$msg);
if ( $msg == '' ) {
$dbconn->Begin("WORK");
- $msg .= $d->save();
+ $msg = addLine($d->save(),$msg);
$l->adr_id = $d->id;
$l->ref = $d;
if ($l->used || ($l->id >0)) {
- $msg = $l->save();
+ $msg = addLine($l->save(),$msg);
}
$dbconn->Commit("WORK");
$gotourl = $d->getURL();
Modified: trunk/php/expense/expense_ins.php
===================================================================
--- trunk/php/expense/expense_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/expense/expense_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert and ECOsoft.net
+ * Copyright 1999 - 2012 by Gero Kohnert and ECOsoft.net
*
* 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
@@ -52,7 +52,7 @@
$u->creator = $current_user;
}
if ( empty($_POST['name']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['ExpenseName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['ExpenseName']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$u->setName(trim($_POST['name']));
@@ -79,7 +79,7 @@
$gotourl= addUrlParameter($gotourl,"country=". UrlEncode($u->country),true);
}
if ( empty($_POST['currency']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['Currency']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['Currency']),$msg);
} else {
$u->setCurrency(trim($_POST['currency']));
$gotourl= addUrlParameter($gotourl,"currency=". UrlEncode($u->currency),true);
@@ -97,7 +97,7 @@
$gotourl= addUrlParameter($gotourl,"description=". UrlEncode($u->description),true);
}
if ( empty($_POST['link_id']) ) {
- $msg .= "No Link ID given !<br />";
+ $msg = addLine("No Link ID given !",$msg);
} else {
$u->setReference($_POST['link_id']);
$gotourl= addUrlParameter($gotourl,"link_id=". $u->link_id,true);
@@ -111,7 +111,7 @@
if ( empty($_POST['quantity']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['ExpenseQuantity']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['ExpenseQuantity']),$msg);
$gotourl = addBadField($gotourl,'quantity',true);
} else {
$u->setQuantity(trim($_POST['quantity']));
@@ -119,7 +119,7 @@
}
if ( empty($_POST['gamount']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['ExpenseGAmount']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['ExpenseGAmount']),$msg);
$gotourl = addBadField($gotourl,'gamount',true);
} else {
$u->setGAmount(trim($_POST['gamount']));
@@ -140,7 +140,7 @@
$t_start = new TUTOS_Date_Time();
$t_start->setDateTimeF("t_start");
if ( ( !$t_start->checkDMY()) || (-1 == $t_start->getTimeStamp() ) ) {
- $msg .= sprintf($lang['Err0038'],$lang['ExpenseStartTime']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0038'],$lang['ExpenseStartTime']),$msg);
} else {
$u->setStartTime($t_start);
$gotourl= addUrlParameter($gotourl,"t_start=". $t_start->getYYYYMMDDHHMM(),true);
@@ -159,7 +159,7 @@
if ( isset($_POST['sfn']) ) {
if ( empty($_POST['sfn']) ) {
$u->setSupplier(-1);
- $msg .= sprintf($lang['Err0009'],$lang['ExpenseSupplier']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['ExpenseSupplier']),$msg);
$gotourl = addBadField($gotourl,'s',true);
} else {
$x = check_field($_POST['sfn'],"sfn","sl","cd");
@@ -177,7 +177,7 @@
if ( isset($_POST['afn']) ) {
if ( empty($_POST['afn']) ) {
$u->setAdrReference(-1);
- $msg .= sprintf($lang['Err0009'],$lang['ExpenseAddress']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['ExpenseAddress']),$msg);
$gotourl = addBadField($gotourl,'a',true);
} else {
$x = check_field($_POST['afn'],"afn","al","a");
@@ -196,10 +196,12 @@
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields($u->gettype(),$u);
+$msg = addLine(parse_custom_fields($u->gettype(),$u),$msg);
# other modules
-$msg .= module_parseforms($current_user,$u,$gotourl);
+$msg = addLine(module_parseforms($current_user,$u,$gotourl),$msg);
+$msg = addLine($msg,$u->run_check_hook());
+
if ( !$bad && $msg == "" ) {
$dbconn->Begin("WORK");
$msg .= $u->save();
Modified: trunk/php/file/file.pinc
===================================================================
--- trunk/php/file/file.pinc 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/file/file.pinc 2012-06-24 18:15:05 UTC (rev 650)
@@ -963,8 +963,7 @@
function save() {
global $table,$current_user, $tutos, $php_errormsg;
- $msg = '';
- $msg .= $this->run_presave_hook();
+ $msg = $this->run_presave_hook();
if ( !is_dir($this->base)) {
$x = @mkdir($this->base ,octdec($tutos['file_dirperm']));
@@ -1133,7 +1132,7 @@
$this->dbconn->Exec($query);
$this->saveLinks();
- $msg .= parent::save();
+ $msg = addLine(parent::save(),$msg);
return $msg;
}
@@ -1185,7 +1184,7 @@
if ( is_dir($this->base ."/". dirname($this->fileloc)) ) {
@rmdir ($this->base ."/". dirname($this->fileloc) );
}
- $msg .= parent::delete();
+ $msg = addLine(parent::delete(),$msg);
return $msg;
}
@@ -1374,7 +1373,7 @@
/**
* create a list of documents for the given object and given user
*/
- static function infolist (&$user,&$obj,$cols,$format = "html") {
+ static function infolist (tutos_user $user,tutos_base $obj,$cols,$format = "html") {
global $lang;
$r = '';
@@ -1402,7 +1401,7 @@
/**
* create a link where a note to for the given object could be added
*/
- static function getaddlink (&$user,&$obj,$text = "") {
+ static function getaddlink (tutos_user $user,tutos_base $obj,$text = "") {
global $lang;
if (! is_object($obj) ) return '';
@@ -1423,14 +1422,14 @@
/**
* delete file entries for an object
*/
- static function obj_delete(&$user,&$obj) {
- $msg = "";
+ static function obj_delete(tutos_user $user,tutos_base $obj) {
+ $msg = '';
tutos_file::obj_read($obj);
if ( count($obj->list[usedocmanagement]) > 0 ) {
foreach ($obj->list[usedocmanagement] as $i => $f) {
unset($f->links[$obj->id]);
if (count($f->links) == 0) {
- $msg .= $f->delete();
+ $msg = addLine($f->delete(),$msg);
} else {
$f->savelinks();
}
@@ -1442,7 +1441,7 @@
/**
* create a link to an overview page
*/
- static function getSelectLink (&$user,$text = "") {
+ static function getSelectLink (tutos_user $user,$text = "") {
global $lang,$tutos;
if ( ! $user->feature_ok(usedocmanagement,PERM_SEL) ) {
return;
@@ -1458,7 +1457,7 @@
/**
* show the mytutos info about files
*/
- static function mytutos (&$user) {
+ static function mytutos (tutos_user $user) {
global $tutos,$lang,$current_user;
if ( ! $current_user->feature_ok(usedocmanagement,PERM_SEE) ) {
Modified: trunk/php/file/file_ins.php
===================================================================
--- trunk/php/file/file_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/file/file_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -46,7 +46,7 @@
if ( is_object($m) ) {
$f = $m;
} else {
- $msg .= sprintf($lang['Err0009'],$lang['FileNameDoc']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['FileNameDoc']),$msg);
$gotourl = addBadField($gotourl,'file3',true);
}
} else if ( isset($_REQUEST['file3fn']) ) {
@@ -54,14 +54,14 @@
if ( is_object($m) ) {
$f = $m;
} else {
- $msg .= sprintf($lang['Err0009'],$lang['FileNameDoc']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['FileNameDoc']),$msg);
$gotourl = addBadField($gotourl,'file3',true);
}
}
if ( !isset($_REQUEST['link_id']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['FileReference']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['FileReference']),$msg);
} else {
$j = $_REQUEST['link_id'];
$l = getObject($f->dbconn,$j);
@@ -75,12 +75,10 @@
$gotourl = $l->getUrl();
$dbconn->Begin("WORK");
- $msg .= $f->save();
+ $msg = addLine($f->save(),$msg);
$dbconn->Commit("WORK");
}
-
}
-
leave_insert($dbconn,'../'.$gotourl,$msg,$info);
exit;
}
@@ -108,7 +106,7 @@
}
if ( !isset($_REQUEST['link_id']) || !is_array($_REQUEST['link_id'])) {
- $msg .= sprintf($lang['Err0009'],$lang['FileReference']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['FileReference']),$msg);
} else {
foreach($_REQUEST['link_id'] as $i => $j) {
$l = getObject($f->dbconn,$j);
@@ -141,10 +139,10 @@
unset ($x);
}
} else if ( count($l) > $tutos['maxselect']) {
- $msg .= sprintf($lang['Err0018'],$lang[$c].":".$n,count($l)) ."<br />";
- $msg .= $lang['Err0006'] ."<br />";
+ $msg = addLine(sprintf($lang['Err0018'],$lang[$c].":".$n,count($l)),$msg);
+ $msg = addLine($lang['Err0006'],$msg);
} else if ( count($l) < $tutos['maxselect']) {
- $msg .= sprintf($lang['Err0018'],$lang[$c].":".$n,count($l)) ."<br />";
+ $msg = addLine(sprintf($lang['Err0018'],$lang[$c].":".$n,count($l)),$msg);
foreach ($l as $x) {
$gotourl = addUrlParameter($gotourl,"refl[]=". UrlEncode($x->id),true);
unset ($x);
@@ -171,7 +169,7 @@
# check for at least one reference
if (count($f->links) == 0) {
- $msg .= sprintf($lang['Err0009'],$lang['FileReference']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['FileReference']),$msg);
}
$file = 'none';
@@ -222,11 +220,11 @@
$name = "";
# New files need a path !
if ( ($file == "none") && ($f->id == -1) ) {
- $msg .= sprintf($lang['Err0009'],$lang['FileName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['FileName']),$msg);
$gotourl = addBadField($gotourl,'file1',true);
} else
if ( ( !isset($_REQUEST['name']) || trim($_REQUEST['name']) == "") && ($file == "none") ) {
- $msg .= sprintf($lang['Err0009'],$lang['FileName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['FileName']),$msg);
$gotourl = addBadField($gotourl,'file1',true);
} else {
$name = trim($_REQUEST['name']);
@@ -287,9 +285,9 @@
$f->filetype = $farr['type'];
} else {
if ( isset($farr['tmp_name']) ) {
- $msg .= sprintf($lang['File_Err001'],$farr['tmp_name']);
+ $msg = addLine(sprintf($lang['File_Err001'],$farr['tmp_name']),$msg);
} else {
- $msg .= sprintf($lang['File_Err001'],"");
+ $msg = addLine(sprintf($lang['File_Err001'],""),$msg);
}
}
}
@@ -297,11 +295,11 @@
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields($f->gettype(),$f);
+$msg = addLine(parse_custom_fields($f->gettype(),$f),$msg);
# other modules
-$msg .= module_parseforms($current_user,$f,$gotourl);
+$msg = addLine(module_parseforms($current_user,$f,$gotourl),$msg);
-$msg .= $f->run_check_hook();
+$msg = addLine($f->run_check_hook(),$msg);
if ( $msg == "" ) {
$f->oldversion = $f->version;
$f->setVersion($version);
@@ -329,7 +327,7 @@
$f->newlog = $log;
$dbconn->Begin("WORK");
- $msg .= $f->save();
+ $msg = addLine($f->save(),$msg);
$dbconn->Commit("WORK");
if ( $f->id != -1 ) {
Modified: trunk/php/file/file_new.php
===================================================================
--- trunk/php/file/file_new.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/file/file_new.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2000 - 2011 by Gero Kohnert
+ * Copyright 2000 - 2012 by Gero Kohnert
*
* 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
@@ -255,11 +255,11 @@
$this->name = $lang['FileMod'];
$this->obj = $this->obj->read($_GET['id'],$this->obj);
if ( !is_object($this->obj) ) {
- $msg .= sprintf($lang['Err0040'],$lang['File']);
+ $msg = addLine(sprintf($lang['Err0040'],$lang['File']),$msg);
$this->stop = true ;
return;
} else if ( ! $this->obj->mod_ok() ) {
- $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0024'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
return;
}
@@ -267,7 +267,7 @@
} else {
$this->name = $lang['FileCreation'];
if ( ! $this->user->feature_ok(usedocmanagement,PERM_NEW) ) {
- $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]);
+ $msg = addLine(sprintf($lang['Err0054'],$lang[$this->obj->getType()]),$msg);
$this->stop = true;
}
}
@@ -341,4 +341,4 @@
<!--
SVN Info $Id$
$Author$
--->
+-->
\ No newline at end of file
Modified: trunk/php/group/group_ins.php
===================================================================
--- trunk/php/group/group_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/group/group_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2002 - 2010 by Gero Kohnert
+ * Copyright 2002 - 2012 by Gero Kohnert
*
* 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
@@ -33,7 +33,7 @@
}
if ( !isset($_POST['name']) || (trim($_POST['name']) == '') ) {
- $msg .= sprintf($lang['Err0009'],$lang['GroupName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['GroupName']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$obj->setName(trim($_POST['name']));
@@ -45,17 +45,17 @@
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields($obj->gettype(),$obj);
+$msg = addLine(parse_custom_fields($obj->gettype(),$obj),$msg);
# other modules
-$msg .= module_parseforms($current_user,$obj,$gotourl);
+$msg = addLine(module_parseforms($current_user,$obj,$gotourl),$msg);
-$msg .= $obj->run_check_hook();
+$msg = addLine($obj->run_check_hook(),$msg);
if ( $msg == "" ) {
$obj->setDesc(trim($_POST['desc']));
$dbconn->Begin("WORK");
- $msg .= $obj->save();
+ $msg = addLine($obj->save(),$msg);
$dbconn->Commit("WORK");
$gotourl = $obj->getURL();
Modified: trunk/php/installation/installation_ins.php
===================================================================
--- trunk/php/installation/installation_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/installation/installation_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -36,7 +36,7 @@
}
if ( empty($_POST['pid']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['Product']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['Product']),$msg);
$gotourl = addBadField($gotourl,'pid',true);
} else {
$gotourl= addUrlParameter($gotourl,"pid=". $_POST['pid'],true);
@@ -44,7 +44,7 @@
if ( isset($_POST['cfn']) ) {
if ( empty($_POST['cfn']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['Customer']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['Customer']),$msg);
$gotourl = addBadField($gotourl,'c',true);
} else {
$x = check_field($_POST['cfn'],"cfn","cl","acd");
@@ -91,7 +91,7 @@
if ( !checkfloat($_POST['money']) ) {
- $msg .= sprintf($lang['Err0017'],$lang['Money']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0017'],$lang['Money']),$msg);
$gotourl = addBadField($gotourl,'money',true);
}
@@ -115,13 +115,12 @@
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields($obj->gettype(),$obj);
+$msg = addLine(parse_custom_fields($obj->gettype(),$obj),$msg);
# other modules
-$msg .= module_parseforms($current_user,$obj,$gotourl);
+$msg = addLine(module_parseforms($current_user,$obj,$gotourl),$msg);
-
-$msg .= $obj->run_check_hook();
+$msg = addLine($obj->run_check_hook(),$msg);
if ( $msg == "" ) {
$obj->setMoney($_POST['money']);
$obj->setCurrency($_POST['currency']);
@@ -136,7 +135,7 @@
$dbconn->Begin("WORK");
- $msg .= $obj->save();
+ $msg = addLine($obj->save(),$msg);
$dbconn->Commit("WORK");
$gotourl = $obj->getUrl();
Modified: trunk/php/invoice/invoice_ins.php
===================================================================
--- trunk/php/invoice/invoice_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/invoice/invoice_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -30,7 +30,7 @@
if ( isset($_POST['id']) ) {
$i = $i->read($_POST['id'],$i);
if ( $i->id != $_POST['id'] ) {
- $msg .= sprintf($lang['Err0040'],$lang[$i->getType()]);
+ $msg = addLine(sprintf($lang['Err0040'],$lang[$i->getType()]),$msg);
} else {
$gotourl= addUrlParameter($gotourl,"id=". $i->id,true);
}
@@ -53,7 +53,7 @@
$i->setName($_POST['name']);
$gotourl= addUrlParameter($gotourl,"name=". UrlEncode($i->name),true);
} else {
- $msg .= sprintf($lang['Err0009'],$lang['InvoiceName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['InvoiceName']),$msg);
$gotourl = addBadField($gotourl,'name',true);
}
@@ -68,7 +68,7 @@
$d->setDateTimeF("d". $x);
$gotourl= addUrlParameter($gotourl,"d".$x."=". $d->getYYYYMMDD() ,true);
if ( !$d->checkDMY(true) ) {
- $msg .= sprintf($lang['Err0038'],$lang['InvDateDue'][$i]) ."<br />";
+ $msg = addLine(sprintf($lang['Err0038'],$lang['InvDateDue'][$i]),$msg);
$gotourl = addBadField($gotourl,'jqc_d'.$x,true);
} else {
$i->setDateDue($x,$d);
@@ -79,7 +79,7 @@
$d->setDateTimeF("s". $x);
$gotourl= addUrlParameter($gotourl,"s".$x."=". $d->getYYYYMMDD() ,true);
if ( !$d->checkDMY(true) ) {
- $msg .= sprintf($lang['Err0038'],$lang['InvDateSent'][$x]) ."<br />";
+ $msg = addLine(sprintf($lang['Err0038'],$lang['InvDateSent'][$x]),$msg);
$gotourl = addBadField($gotourl,'jqc_s'.$x,true);
} else {
$i->setDateSent($x,$d);
@@ -89,7 +89,7 @@
if ( isset($_POST['cfn']) ) {
if ( empty($_POST['cfn']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['InvoiceCustomer']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['InvoiceCustomer']),$msg);
$gotourl = addBadField($gotourl,'c',true);
} else {
$customer = check_field($_POST['cfn'],"cfn","cl","acd");
@@ -111,13 +111,13 @@
foreach ($_POST as $key => $val) {
if ( preg_match("#^([CIDST])-(.*)#",$key,$a) ) {
if ( !isset($i->pos[$a[2]]) ) {
- $msg .= "missing |". $a[2] ."|<br />";
+ $msg = addLine("missing |". $a[2] ."|",$msg);
}
if ( $a[1] == "T" ) {
if ( checkfloat($val) ) {
$i->pos[$a[2]]->tax = $val;
} else {
- $msg .= "Wrong input format";
+ $msg = addLine("Wrong input format",$msg);
}
} else if ( $a[1] == "D" ) {
$i->pos[$a[2]]->description = $val;
@@ -125,14 +125,14 @@
if ( checkfloat($val) ) {
$i->pos[$a[2]]->items = $val;
} else {
- $msg .= sprintf($lang['Err0017'],$lang['InvPosItems']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0017'],$lang['InvPosItems']),$msg);
$gotourl = addBadField($gotourl,$key,true);
}
} else if ( $a[1] == "S" ) {
if ( checkfloat($val) ) {
$i->pos[$a[2]]->sum_single = $val;
} else {
- $msg .= sprintf($lang['Err0017'],$lang['InvPosSingle']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0017'],$lang['InvPosSingle']),$msg);
$gotourl = addBadField($gotourl,$key,true);
}
}
@@ -152,14 +152,14 @@
//
// Parse additional custom fields
//
-$msg .= parse_custom_fields($i->gettype(),$i);
+$msg = addLine(parse_custom_fields($i->gettype(),$i),$msg);
# other modules
-$msg .= module_parseforms($current_user,$i,$gotourl);
+$msg = addLine(module_parseforms($current_user,$i,$gotourl),$msg);
-$msg .= $i->run_check_hook();
+$msg = addLine($i->run_check_hook(),$msg);
if ( $msg == "" ) {
$dbconn->Begin("WORK");
- $msg .= $i->save();
+ $msg = addLine($i->save(),$msg);
$dbconn->Commit("WORK");
$gotourl = $i->getModUrl();
Modified: trunk/php/module_template/AAA_ins.php
===================================================================
--- trunk/php/module_template/AAA_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/module_template/AAA_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -34,14 +34,14 @@
// update
$obj = $obj->read($_POST['id'],$obj);
if ( !is_object($obj) ) {
- $msg .= sprintf($lang['Err0040'],$lang['AAA']);
+ $msg = addLine(sprintf($lang['Err0040'],$lang['AAA']),$msg);
$obj = new AAA($dbconn);
}
$gotourl= addUrlParameter($gotourl,'id='. $_POST['id'],true);
}
if ( !isset($_POST['name']) || (trim($_POST['name']) == '') ) {
- $msg .= sprintf($lang['Err0009'],$lang['AAAName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['AAAName']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$obj->setName(trim($_POST['name']));
@@ -49,7 +49,7 @@
}
if ( !isset($_POST['link_id']) || empty($_POST['link_id']) ) {
- $msg .= "No Link ID given !<br />";
+ $msg = addLine("No Link ID given !",$msg);
} else {
$obj->setReference($_POST['link_id']);
$gotourl= addUrlParameter($gotourl,"link_id=". $obj->link_id,true);
@@ -59,16 +59,16 @@
//
// Parse additional custom fields
//
-$msg .= parse_custom_fields($obj->gettype(),$obj);
+$msg = addLine(parse_custom_fields($obj->gettype(),$obj),$msg);
// other modules
-$msg .= module_parseforms($current_user,$obj,$gotourl);
+$msg = addLine(module_parseforms($current_user,$obj,$gotourl),$msg);
-$msg .= $obj->run_check_hook();
+$msg = addLine($obj->run_check_hook(),$msg);
if ( $msg == '' ) {
$dbconn->Begin("WORK");
- $msg .= $obj->save();
+ $msg = addLine($obj->save(),$msg);
$dbconn->Commit("WORK");
$gotourl = $obj->getURL();
if (isset($_REQUEST['ss'])) {
Modified: trunk/php/note/note_ins.php
===================================================================
--- trunk/php/note/note_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/note/note_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2009 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -34,7 +34,7 @@
}
if ( empty($_POST['name']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['NoteName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['NoteName']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$u->setName(trim($_POST['name']));
@@ -50,7 +50,7 @@
$gotourl= addUrlParameter($gotourl,"note=". UrlEncode($u->note),true);
}
if ( empty($_POST['link_id']) ) {
- $msg .= "No Link ID given !<br />";
+ $msg = addLine("No Link ID given !",$msg);
} else {
$u->setReference($_POST['link_id']);
$gotourl= addUrlParameter($gotourl,"link_id=". $u->link_id,true);
@@ -63,21 +63,21 @@
$gotourl= addUrlParameter($gotourl,"remember=". $u->remember->getYYYYMMDD(),true);
if ( !$r->checkDMY(true) ) {
- $msg .= sprintf($lang['Err0038'],$lang['NoteRemember']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0038'],$lang['NoteRemember']),$msg);
}
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields($u->gettype(),$u);
+$msg = addLine(parse_custom_fields($u->gettype(),$u),$msg);
# other modules
-$msg .= module_parseforms($current_user,$u,$gotourl);
+$msg = addLine(module_parseforms($current_user,$u,$gotourl),$msg);
-$msg .= $u->run_check_hook();
+$msg = addLine($u->run_check_hook(),$msg);
if ( $msg == "" ) {
$dbconn->Begin("WORK");
- $msg .= $u->save();
+ $msg = addLine($u->save(),$msg);
$dbconn->Commit("WORK");
$gotourl = $u->ref->getURL();
}
Modified: trunk/php/permission.p3
===================================================================
--- trunk/php/permission.p3 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/permission.p3 2012-06-24 18:15:05 UTC (rev 650)
@@ -328,10 +328,10 @@
// handeld with HtmlEntities
$msg = '';
if ( isset($_REQUEST['msg']) ) {
- $msg .= HtmlEntities(UrlDecode($_REQUEST['msg']));
+ $msg = HtmlEntities(UrlDecode($_REQUEST['msg']));
} elseif ( isset($_REQUEST['msgid']) ) {
if (isset($_SESSION[$_REQUEST['msgid']])) {
- $msg .= UrlDecode($_SESSION[$_REQUEST['msgid']]);
+ $msg = UrlDecode($_SESSION[$_REQUEST['msgid']]);
unset($_SESSION[$_REQUEST['msgid']]);
} else {
$msg = "?";
@@ -339,10 +339,10 @@
}
$info = '';
if ( isset($_REQUEST['info']) ) {
- $info .= HtmlEntities(UrlDecode($_REQUEST['info']));
+ $info = HtmlEntities(UrlDecode($_REQUEST['info']));
} elseif ( isset($_REQUEST['infoid']) ) {
if (isset($_SESSION[$_REQUEST['infoid']])) {
- $info .= UrlDecode($_SESSION[$_REQUEST['infoid']]);
+ $info = UrlDecode($_SESSION[$_REQUEST['infoid']]);
unset($_SESSION[$_REQUEST['infoid']]);
} else {
$info = "?";
Modified: trunk/php/rate/rate_ins.php
===================================================================
--- trunk/php/rate/rate_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/rate/rate_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2010 by Gero Kohnert and ecosoft
+ * Copyright 1999 - 2012 by Gero Kohnert and ecosoft
*
* 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
@@ -37,7 +37,7 @@
}
# name
if ( empty($_POST['name']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['RateName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['RateName']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$u->setName(trim($_POST['name']));
@@ -45,14 +45,14 @@
}
# cph
if ( empty($_POST['cph']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['Rate']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['Rate']),$msg);
} else {
$u->setCph($_POST['cph']);
$gotourl= addUrlParameter($gotourl,"cph=". UrlEncode($u->cph),true);
}
# currency
if ( empty($_POST['currency']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['Rate']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['Rate']),$msg);
} else {
$u->setCurrency($_POST['currency']);
$gotourl= addUrlParameter($gotourl,"currency=". UrlEncode($u->currency),true);
@@ -87,7 +87,7 @@
}
# reference
if ( empty($_POST['link_id']) ) {
- $msg .= "No Link ID given !<br />";
+ $msg = addLine("No Link ID given !",$msg);
} else {
$u->setReference($_POST['link_id']);
$gotourl= addUrlParameter($gotourl,"link_id=". $u->link_id,true);
@@ -97,13 +97,14 @@
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields($u->gettype(),$u);
+$msg = addLine(parse_custom_fields($u->gettype(),$u),$msg);
# other modules
-$msg .= module_parseforms($current_user,$u,$gotourl);
+$msg = addLine(module_parseforms($current_user,$u,$gotourl),$msg);
+$msg = addLine($msg,$u->run_check_hook());
if ( $msg == "" ) {
$dbconn->Begin("WORK");
- $msg .= $u->save();
+ $msg = addLine($u->save(),$msg);
$dbconn->Commit("WORK");
$gotourl = $u->ref->getURL();
}
Modified: trunk/php/reminder/reminder_ins.php
===================================================================
--- trunk/php/reminder/reminder_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/reminder/reminder_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2004 - 2010 by Gero Kohnert
+ * Copyright 2004 - 2012 by Gero Kohnert
*
* 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
@@ -36,7 +36,7 @@
}
if ( empty($_POST['link_id']) ) {
- $msg .= "No Link ID given !<br />";
+ $msg = addLine("No Link ID given !",$msg);
} else {
$obj->setReference($_POST['link_id']);
$gotourl= addUrlParameter($gotourl,"link_id=". $obj->link_id,true);
@@ -44,7 +44,7 @@
}
if ( empty($_POST['to']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['ReminderTo']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['ReminderTo']),$msg);
} else {
$obj->setTo($_POST['to']);
$gotourl= addUrlParameter($gotourl,"to=". $obj->to_id,true);
@@ -80,7 +80,7 @@
$type = $_POST['rd_type'];
$gotourl= addUrlParameter($gotourl,"type=1",true);
} else {
- $msg .= sprintf($lang['Err0009'],$lang['ReminderType']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['ReminderType']),$msg);
}
if ($type == REMINDER_SIMPLE)
$obj->setOffset(0);
@@ -91,19 +91,20 @@
$gotourl= addUrlParameter($gotourl,"offset=". UrlEncode($obj->offset),true);
$obj->setType($type);
-$msg .= $obj->calc_date($r);
+$msg = addLine($obj->calc_date($r),$msg);
$obj->setRemindDate($r);
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields($obj->gettype(),$obj);
+$msg = addLine(parse_custom_fields($obj->gettype(),$obj),$msg);
# other modules
-$msg .= module_parseforms($current_user,$obj,$gotourl);
+$msg = addLine(module_parseforms($current_user,$obj,$gotourl),$msg);
+$msg = addLine($msg,$obj->run_check_hook());
if ( $msg == "" ) {
$dbconn->Begin("WORK");
- $msg .= $obj->save();
+ $msg = addLine($obj->save(),$msg);
$dbconn->Commit("WORK");
$gotourl = $obj->getURL();
if (isset($_REQUEST['ss'])) {
Modified: trunk/php/resource/resource_ins.php
===================================================================
--- trunk/php/resource/resource_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/resource/resource_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2001 - 2010 by Gero Kohnert
+ * Copyright 2001 - 2012 by Gero Kohnert
*
* 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
@@ -36,7 +36,7 @@
}
if ( !isset($_POST['name']) || (trim($_POST['name']) == '') ) {
- $msg .= sprintf($lang['Err0009'],$lang['ResName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['ResName']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$b->setName(trim($_POST['name']));
@@ -50,14 +50,15 @@
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields($b->gettype(),$b);
+$msg = addLine(parse_custom_fields($b->gettype(),$b),$msg);
# other modules
-$msg .= module_parseforms($current_user,$b,$gotourl);
+$msg = addLine(module_parseforms($current_user,$b,$gotourl),$msg);
+$msg = addLine($msg,$b->run_check_hook());
if ( $msg == '' ) {
$dbconn->Begin("WORK");
- $msg .= $b->save();
+ $msg = addLine($b->save(),$msg);
$dbconn->Commit("WORK");
$gotourl = $b->getURL();
if (isset($_REQUEST['ss'])) {
Modified: trunk/php/stuff/stuff_ins.php
===================================================================
--- trunk/php/stuff/stuff_ins.php 2012-06-24 18:12:49 UTC (rev 649)
+++ trunk/php/stuff/stuff_ins.php 2012-06-24 18:15:05 UTC (rev 650)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 2004 - 2010 by Gero Kohnert
+ * Copyright 2004 - 2012 by Gero Kohnert
*
* 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
@@ -36,7 +36,7 @@
}
if ( !isset($_POST['name']) || (trim($_POST['name']) == '') ) {
- $msg .= sprintf($lang['Err0009'],$lang['StuffName']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['StuffName']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$obj->setName(trim($_POST['name']));
@@ -44,7 +44,7 @@
}
if ( !isset($_POST['desc']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['StuffDesc']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['StuffDesc']),$msg);
$gotourl = addBadField($gotourl,'desc',true);
} else {
$obj->setDesc(trim($_POST['desc']));
@@ -52,14 +52,14 @@
}
if ( !isset($_POST['type']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['StuffType']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['StuffType']),$msg);
} else {
$obj->setType(trim($_POST['type']));
$gotourl = addUrlParameter($gotourl,"type=". UrlEncode($_POST['type']),true);
}
if ( !isset($_POST['serial']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['StuffSerial']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['StuffSerial']),$msg);
$gotourl = addBadField($gotourl,'serial',true);
} else {
$obj->setSerial(trim($_POST['serial']));
@@ -67,7 +67,7 @@
}
if ( !isset($_POST['invid']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['StuffId']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['StuffId']),$msg);
} else {
$obj->setInvId(trim($_POST['invid']));
$gotourl = addUrlParameter($gotourl,"invid=". UrlEncode($_POST['invid']),true);
@@ -140,20 +140,20 @@
$pdate->setDateTimeF("p_date");
$gotourl= addUrlParameter($gotourl,"p_date=". $pdate->getYYYYMMDD(),true);
if ( !$pdate->checkDMY(true) ) {
- $msg .= sprintf($lang['Err0038'],$lang['StuffPurchaseDate']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0038'],$lang['StuffPurchaseDate']),$msg);
} else {
$obj->setPurchaseDate($pdate);
}
if ( !checkfloat($_POST['price']) ) {
- $msg .= sprintf($lang['Err0017'],$lang['StuffPrice']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0017'],$lang['StuffPrice']),$msg);
} else {
$gotourl= addUrlParameter($gotourl,"price=". $_POST['price'],true);
$obj->setPrice($_POST['price']);
}
if ( !isset($_POST['currency']) ) {
- $msg .= sprintf($lang['Err...
[truncated message content] |
|
From: <gok...@us...> - 2012-06-24 18:12:56
|
Revision: 649
http://tutos.svn.sourceforge.net/tutos/?rev=649&view=rev
Author: gokohnert
Date: 2012-06-24 18:12:49 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
direct file additions on bug create time
Modified Paths:
--------------
trunk/php/bugtracking/bug_ins.php
trunk/php/bugtracking/bug_new.php
Modified: trunk/php/bugtracking/bug_ins.php
===================================================================
--- trunk/php/bugtracking/bug_ins.php 2012-06-24 15:04:33 UTC (rev 648)
+++ trunk/php/bugtracking/bug_ins.php 2012-06-24 18:12:49 UTC (rev 649)
@@ -54,7 +54,7 @@
}
if ( empty($_POST['name']) || !isset($_POST['name']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['BugID']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['BugID']),$msg);
$gotourl = addBadField($gotourl,'name',true);
} else {
$name = trim($_POST['name']);
@@ -62,7 +62,7 @@
}
if ( (empty($_POST['description']) || !isset($_POST['description']) ) && ($b->id < 0 )) {
- $msg .= sprintf($lang['Err0009'],$lang['BugLong']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['BugLong']),$msg);
$gotourl = addBadField($gotourl,'description',true);
} else {
$description = trim($_POST['description']);
@@ -70,7 +70,7 @@
}
if ( empty($_POST['short1']) || !isset($_POST['short1']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['BugShort']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['BugShort']),$msg);
$gotourl = addBadField($gotourl,'short1',true);
} else {
$short = trim($_POST['short1']);
@@ -78,7 +78,7 @@
}
if ( empty($_POST['medium']) || !isset($_POST['medium']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['BugMedium']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['BugMedium']),$msg);
} else {
$medium = $_POST['medium'];
$gotourl= addUrlParameter($gotourl,"medium=". $medium,true);
@@ -93,7 +93,7 @@
$b->parent->readroles();
}
} else {
- $msg .= sprintf($lang['Err0009'],$lang['BugReference']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['BugReference']),$msg);
$gotourl = addBadField($gotourl,'pid',true);
}
@@ -140,17 +140,15 @@
$b->setFollowup($m);
}
-
-
if ( empty($_POST['state']) || !isset($_POST['state']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['BugState']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['BugState']),$msg);
$gotourl = addBadField($gotourl,'state',true);
} else {
$state = $_POST['state'];
$gotourl= addUrlParameter($gotourl,"state=". $state,true);
}
if ( empty($_POST['class']) || !isset($_POST['class']) ) {
- $msg .= sprintf($lang['Err0009'],$lang['BugClass']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['BugClass']),$msg);
$gotourl = addBadField($gotourl,'class',true);
} else {
$class = $_POST['class'];
@@ -176,37 +174,36 @@
// Auto set solver to project manager
$b->setSolver($_POST['sid']);
$solver = $b->solver;
-} else
- if ( !isset($_POST['sfn']) || ($_POST['sfn'] == '') ) {
- if ( isset($_POST['sid']) ) {
- $_POST['sid'] = ltrim($_POST['sid'],'T');
- if ($_POST['sid'] > 0)
- $solver = getObject($dbconn,$_POST['sid']);
- else
- $solver = $_POST['sid']; // subteam
- } else {
- $msg .= sprintf($lang['Err0009'],$lang['BugAssignedTo']) ."<br />";
- $gotourl = addBadField($gotourl,'sfn',true);
- }
+} else if ( !isset($_POST['sfn']) || ($_POST['sfn'] == '') ) {
+ if ( isset($_POST['sid']) ) {
+ $_POST['sid'] = ltrim($_POST['sid'],'T');
+ if ($_POST['sid'] > 0)
+ $solver = getObject($dbconn,$_POST['sid']);
+ else
+ $solver = $_POST['sid']; // subteam
} else {
- if (is_object($b->solver) && $b->solver->getFullName() == $_POST['sfn']) {
- // Keep an existing solver even if we cannot see/use it
- $solver = $b->solver;
- } else {
- $b->search_id = $b->parent->id;
- $solver = check_field($_POST['sfn'],"sfn","sl",'atT',$b);
- if (is_array($solver)) {
- // a rolename
- $solver = ltrim($solver[0],'T');
- }
+ $msg = addLine(sprintf($lang['Err0009'],$lang['BugAssignedTo']),$msg);
+ $gotourl = addBadField($gotourl,'sfn',true);
+ }
+} else {
+ if (is_object($b->solver) && $b->solver->getFullName() == $_POST['sfn']) {
+ // Keep an existing solver even if we cannot see/use it
+ $solver = $b->solver;
+ } else {
+ $b->search_id = $b->parent->id;
+ $solver = check_field($_POST['sfn'],"sfn","sl",'atT',$b);
+ if (is_array($solver)) {
+ // a rolename
+ $solver = ltrim($solver[0],'T');
}
}
+}
$plandate = new TUTOS_Date_Time(0);
$plandate->setDateTimeF("pd");
$gotourl= addUrlParameter($gotourl,"pd=". $plandate->getYYYYMMDD(),true);
if ( !$plandate->checkDMY(true) ) {
- $msg .= sprintf($lang['Err0038'],$lang['DateTimeTill']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0038'],$lang['DateTimeTill']),$msg);
}
// check if target is required
@@ -214,20 +211,29 @@
if ( ($tutos['bug_need_target'] != '') && !is_object($b->target) ) {
$x = preg_split('#,#',$tutos['bug_need_target']);
if (in_array($state,$x)) {
- $msg .= sprintf($lang['Err0009'],$lang['BugTarget']) ."<br />";
+ $msg = addLine(sprintf($lang['Err0009'],$lang['BugTarget']),$msg);
$gotourl = addBadField($gotourl,'t',true);
}
}
-
+//
+// direct added documents
+//
+if ($this->user->feature_ok(usedocmanagement,PERM_NEW) ) {
+ if ( isset($_FILES['file']) ) {
+ $file = $_FILES['file'];
+ $gotourl = addUrlParameter($gotourl,"pic_path=". $file['name'],true);
+ }
+}
#
# Parse additional custom fields
#
-$msg .= parse_custom_fields($b->gettype(),$b);
+$msg = addLine(parse_custom_fields($b->gettype(),$b),$msg);
# other modules
-$msg .= module_parseforms($current_user,$b,$gotourl);
+$msg = addLine(module_parseforms($current_user,$b,$gotourl),$msg);
-$msg .= $b->run_check_hook();
+$msg = addLine($b->run_check_hook(),$msg);
+
if ( $msg != "" ) {
$gotourl = addMessage($gotourl,$msg,true);
$gotourl = addSessionKey($gotourl,true);
@@ -363,8 +369,29 @@
$b->setState($state);
$b->setClass($class);
$b->setPlanDate($plandate);
+
$dbconn->Begin("WORK");
-$msg .= $b->save();
+$msgx = '';
+$msgx = addLine($b->save(),$msgx);
+
+if ( $msg == "" && $b->id > 0) {
+ if ( isset($file) && ($file != "none") ) {
+ $ff = new tutos_file($dbconn);
+ $ff->tmploc = $file['tmp_name'];
+ $ff->name = $file['name'];
+ $ff->filesize = $file['size'];
+ $ff->filename = $file['name'];
+ $ff->filetype = $file['type'];
+ $ff->savemode = 0;
+ $ff->addReference($b);
+ if ( isset($file['size']) && ($file['size'] > 0) && ($file['name'] != "")) {
+ $msgx = addLine($ff->save(),$msgx);
+ }
+ }
+} else {
+ $msg = addLine('no addfile',$msg);
+}
+$msg = addLine($msgx,$msg);
$dbconn->Commit("WORK");
$gotourl = $b->getUrl();
@@ -377,4 +404,4 @@
* SVN Info $Id$
* $Author$
*/
-?>
+?>
\ No newline at end of file
Modified: trunk/php/bugtracking/bug_new.php
===================================================================
--- trunk/php/bugtracking/bug_new.php 2012-06-24 15:04:33 UTC (rev 648)
+++ trunk/php/bugtracking/bug_new.php 2012-06-24 18:12:49 UTC (rev 649)
@@ -39,7 +39,7 @@
$r = '';
$this->width = 4;
- $r .= "<form id=\"bugnew\" name=\"bugnew\" action=\"bug_ins.php\" method=\"post\">\n";
+ $r .= "<form id=\"bugnew\" name=\"bugnew\" enctype=\"multipart/form-data\" action=\"bug_ins.php\" method=\"post\">\n";
if ( $this->obj->id > 0 ) {
$this->addHidden("id",$this->obj->id);
} else {
@@ -253,7 +253,14 @@
$r .= $this->showdata('<textarea id="description" rows="10" cols="80" name="description">'. $this->obj->newdesc.'</textarea>',$this->width-1);
$r .= $this->EditRowEnd();
-
+ // Add directly a new pictue or document
+ if ($this->user->feature_ok(usedocmanagement,PERM_NEW) ) {
+ $r .= $this->EditRowStart();
+ $r .= $this->showfield($lang['FileCreate']);
+ $d = '<input size="30" id="picture" name="file" type="file" value="">';
+ $r .= $this->showdata($d,$this->width-1);
+ $r .= $this->EditRowEnd();
+ }
// Edit additional custom fields
$r .= edit_custom_fields($this,$this->obj->getType(),$this->obj,4);
// References to modules
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-24 15:04:39
|
Revision: 648
http://tutos.svn.sourceforge.net/tutos/?rev=648&view=rev
Author: gokohnert
Date: 2012-06-24 15:04:33 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
less comments
Modified Paths:
--------------
trunk/php/permission.p3
Modified: trunk/php/permission.p3
===================================================================
--- trunk/php/permission.p3 2012-06-24 12:58:56 UTC (rev 647)
+++ trunk/php/permission.p3 2012-06-24 15:04:33 UTC (rev 648)
@@ -62,15 +62,15 @@
foreach($tutos[modules] as $m) {
if ($m[name] == $class) {
loadmodule($m['perm']);
- error_log('autoloaded '.$class."\n",3,$tutos[errlog]);
+# error_log('autoloaded '.$class."\n",3,$tutos[errlog]);
# echo 'loaded module '.$m[Desc].' <br />';
return;
# } else {
# echo 'check '.$m[name].' <br />';
}
}
- error_log('Look for '.$class."\n",3,$tutos[errlog]);
- error_log(TUTOS_backtrace()."\n",3,$tutos[errlog]);
+# error_log('Look for '.$class."\n",3,$tutos[errlog]);
+# error_log(TUTOS_backtrace()."\n",3,$tutos[errlog]);
}
spl_autoload_register('tutos_autoloader');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-24 12:59:03
|
Revision: 647
http://tutos.svn.sourceforge.net/tutos/?rev=647&view=rev
Author: gokohnert
Date: 2012-06-24 12:58:56 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
move prefteam arg to t_config
Modified Paths:
--------------
trunk/php/acl_overview.php
trunk/php/db/table.pinc
trunk/php/layout/layout_base.pinc
trunk/php/permission.p3
trunk/php/user.pinc
trunk/php/webelements.p3
Modified: trunk/php/acl_overview.php
===================================================================
--- trunk/php/acl_overview.php 2012-06-24 12:58:02 UTC (rev 646)
+++ trunk/php/acl_overview.php 2012-06-24 12:58:56 UTC (rev 647)
@@ -120,7 +120,7 @@
if ($tutos[debug] == 1) {
$line++;
$r .= $this->OverviewRowStart($line);
- $r .= '<td colspan="'.(6 + $tutos[massupdate]) .'">removed invalid entry:'. $g ."</td>\n";
+ $r .= '<td colspan="'.(7 + $tutos[massupdate]) .'">removed invalid entry:'. $g ."</td>\n";
$r .= $this->OverviewRowEnd($line);
}
}
Modified: trunk/php/db/table.pinc
===================================================================
--- trunk/php/db/table.pinc 2012-06-24 12:58:02 UTC (rev 646)
+++ trunk/php/db/table.pinc 2012-06-24 12:58:56 UTC (rev 647)
@@ -79,7 +79,6 @@
'last_host' => array(type => 'VARCHAR', size => 40, constraints => '', Desc => 'last login host'),
'admin' => array(type => 'ID_TYPE', constraints => '', Desc => 'admin or not'),
'pw' => array(type => 'VARCHAR', size => 50, constraints => '', Desc => 'users password'),
- 'prefteam' => array(type => 'ID_TYPE', constraints => 'default 1', Desc => 'last seen team in calendar'),
'lang' => array(type => 'VARCHAR', size => 5 , constraints => '', Desc => 'users language'),
'tz' => array(type => 'VARCHAR', size => 30, constraints => '', Desc => 'users timezone'),
'holidays' => array(type => 'VARCHAR', size => 60, constraints => '', Desc => 'users holiday sets'),
@@ -717,4 +716,4 @@
Desc => 'main TUTOS sequencer',
);
-?>
\ No newline at end of file
+?>
Modified: trunk/php/layout/layout_base.pinc
===================================================================
--- trunk/php/layout/layout_base.pinc 2012-06-24 12:58:02 UTC (rev 646)
+++ trunk/php/layout/layout_base.pinc 2012-06-24 12:58:56 UTC (rev 647)
@@ -667,7 +667,7 @@
if (isset($tarr['handler'])) {
$r .= $this->showdata(handle($tarr['handler'],$obj->$tarr['field'],myentities($obj->$tarr['field'])) ,$colsd);
} else {
- $r .= $this->showdata(urlreplace($obj->$tarr['field']) ,$colsd);
+ $r .= $this->showdata(urlreplace(htmlentities($obj->$tarr['field'])) ,$colsd);
}
} else if ($tarr[type] == 'TS_TYPE') {
if ( isset($tarr['ftype']) && ($tarr['ftype'] == 'DateTime') ) {
Modified: trunk/php/permission.p3
===================================================================
--- trunk/php/permission.p3 2012-06-24 12:58:02 UTC (rev 646)
+++ trunk/php/permission.p3 2012-06-24 12:58:56 UTC (rev 647)
@@ -563,9 +563,9 @@
}
}
- read_config_values_by_tag($current_user->dbconn,array('product','task','main','timetrack'));
+ read_config_values_by_tag($current_user->dbconn,array('product','task','main','timetrack','appointment'));
// read user_specifi config values
- read_config_values_by_tag($current_user->dbconn,array('product','task','main','timetrack'),$current_user->id);
+ read_config_values_by_tag($current_user->dbconn,array('product','task','main','timetrack','appointment'),$current_user->id);
// update the TTL
if (isset($_SERVER['REQUEST_URI'])) {
Modified: trunk/php/user.pinc
===================================================================
--- trunk/php/user.pinc 2012-06-24 12:58:02 UTC (rev 646)
+++ trunk/php/user.pinc 2012-06-24 12:58:56 UTC (rev 647)
@@ -41,7 +41,6 @@
$this->admin = 0;
$this->last_seen = new TUTOS_Date_Time(0);
$this->last_host = "unknown";
- $this->prefteam = 1;
$this->theme = $tutos[themes][0];
$this->ly = $tutos[layouts][0];
$this->disabled = 0;
@@ -173,7 +172,6 @@
$this->uid = $r->get($pos,"u_id");
$this->admin = $r->get($pos,"admin");
$this->disabled = $r->get($pos,"disabled");
- $this->prefteam = $r->get($pos,"prefteam");
$this->lang = strtolower($r->get($pos, "lang"));
$this->tz = $r->get($pos, "tz");
$this->theme = $r->get($pos, "theme");
@@ -575,37 +573,29 @@
}
// Get the list sorted
- $useOPTGROUP = UseOptGroup();
if (count($rlist)) {
- if ($useOPTGROUP) {
- $r .= '<optgroup label="'. $lang['Participants'] ."\">\n";
- }
+ $r .= '<optgroup label="'. $lang['Participants'] ."\">\n";
foreach ($rlist as $f) {
$r .= $f;
}
- if ($useOPTGROUP) {
- $r .= "</optgroup>\n";
- }
+ $r .= "</optgroup>\n";
}
- if ($useOPTGROUP) {
- $r .= '<optgroup label="'. $lang['User'] ."\">\n";
- }
+
+ $r .= '<optgroup label="'. $lang['User'] ."\">\n";
@ksort($plist);
foreach($plist as $f) {
$r .= $f;
}
- if ($useOPTGROUP) {
- $r .= "</optgroup>\n";
- $r .= '<optgroup label="'. $lang['Teams'] ."\">\n";
- }
+ $r .= "</optgroup>\n";
+
+ $r .= '<optgroup label="'. $lang['Teams'] ."\">\n";
@ksort($tlist);
foreach($tlist as $f) {
$r .= $f;
}
- if ($useOPTGROUP) {
- $r .= "</optgroup>\n";
- }
+ $r .= "</optgroup>\n";
+
$r .= "\n</select>";
return $r;
@@ -761,20 +751,6 @@
}
/**
- * set preferred team (not set via user_new , but when using the calendars)
- */
- function set_prefteam($team) {
- if (is_array($team) ) {
- $team = $team[0];
- }
- $x = $this->setIntField("prefteam",$team,"forphrase");
- if ($x == 1) {
- $this->update(false);
- }
- return $x;
- }
-
- /**
* get the admin flag
*/
function isAdmin() {
@@ -926,16 +902,6 @@
}
/**
- * get preferred team for calendar selection
- */
- function get_prefteam() {
- if ( strlen($this->prefteam) == 0 ) {
- $this->prefteam = 1;
- }
- return $this->prefteam;
- }
-
- /**
* get preferred number of displayed weeks for calendar display
*/
function get_prefweeks() {
@@ -1006,7 +972,6 @@
$q = new query($this->dbconn);
$q->setTable($this->tablename);
$q->addFV('last_seen',$this->last_seen,'DATETIME');
- $q->addFV('prefteam',$this->get_prefteam(),'');
$q->addFV('last_host',$this->last_host,"STRING",20);
# $q->addFV("creator",$this->creator,"OBJ");
# $q->addFV("creation",$this->creation,"DATETIME");
Modified: trunk/php/webelements.p3
===================================================================
--- trunk/php/webelements.p3 2012-06-24 12:58:02 UTC (rev 646)
+++ trunk/php/webelements.p3 2012-06-24 12:58:56 UTC (rev 647)
@@ -727,22 +727,6 @@
}
/**
- * Check if we can use the html optgroup stuff
- */
-Function UseOptGroup() {
- if (!isset ($_SERVER['HTTP_USER_AGENT'])) {
- return false;
- }
- if (preg_match("#Opera#",$_SERVER['HTTP_USER_AGENT'])) {
- return false;
- }
- if (preg_match ("#MSIE.*Mac#",$_SERVER['HTTP_USER_AGENT'])) {
- return false;
- }
- return true;
-}
-
-/**
* normalize a url so that unecessary ../ parts disappear
*/
function normalize_url($url) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-24 12:58:08
|
Revision: 646
http://tutos.svn.sourceforge.net/tutos/?rev=646&view=rev
Author: gokohnert
Date: 2012-06-24 12:58:02 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
fix remembering of last calendar
Modified Paths:
--------------
trunk/php/appointment.pinc
trunk/php/calendar.php
trunk/php/calendar_day.php
trunk/php/calendar_week.php
trunk/php/config_default.pinc
trunk/php/db.p3
Modified: trunk/php/appointment.pinc
===================================================================
--- trunk/php/appointment.pinc 2012-06-24 12:56:53 UTC (rev 645)
+++ trunk/php/appointment.pinc 2012-06-24 12:58:02 UTC (rev 646)
@@ -47,36 +47,26 @@
}
$r .= '<select id="team" name="team[]">'."\n";
- $showed[] = array();
+ $showed[] = array(); // no duplicates please
- $useOPTGROUP = UseOptGroup();
-
if (count($current_user->t_parties)) {
- if ($useOPTGROUP) {
- $r .= ' <optgroup label="'. $lang['Teams'] ."\">\n";
- }
+ $r .= ' <optgroup label="'. $lang['Teams'] ."\">\n";
foreach ( $current_user->t_parties as $i => $f ) {
- $r .= ' <option value="'. $i .'"'. ($team == $i ? ' selected="selected"' : '') .'>'. myentities($f) ."</option>\n";
- if ( $team == $i ) {
- $showed = 1;
- }
+ $r .= ' <option value="'. $i .'"'. (in_array($i,$team) ? ' selected="selected"' : '') .'>'. myentities($f) ."</option>\n";
+ $showed[$i] = 1;
}
- if ($useOPTGROUP) {
- $r .= " </optgroup>\n";
- }
+ $r .= " </optgroup>\n";
}
- if ($useOPTGROUP) {
- $r .= ' <optgroup label="'.$lang['User'].'">'."\n";
- }
- $r .= ' <option value="'. CAL_MYOWN .'"'. (isset($team[CAL_MYOWN]) ? ' selected="selected"' : '') .'>'.($useOPTGROUP ? "": $lang['User']) ." ". $current_user->getFullname() ."</option>\n";
+
+ $r .= ' <optgroup label="'.$lang['User'].'">'."\n";
+ $r .= ' <option value="'. CAL_MYOWN .'"'. (isset($team[CAL_MYOWN]) ? ' selected="selected"' : '') .'>'. $lang['User'] .': '. $current_user->getFullname() ."</option>\n";
if ( isset($team[CAL_MYOWN]) ) {
$showed[CAL_MYOWN] = 1;
$showed[$current_user->id] = 1;
}
- if ($useOPTGROUP) {
- $r .= " </optgroup>\n";
- $r .= ' <optgroup label="-----">'."\n";
- }
+ $r .= " </optgroup>\n";
+
+ $r .= ' <optgroup label="-----">'."\n";
$r .= ' <option value="'. CAL_OWNTEAMS .'"'. (isset($team[CAL_OWNTEAMS]) ? ' selected="selected"' : '') .'>'. $lang['AppAllTeams'] ."</option>\n";
if ( isset($team[CAL_OWNTEAMS]) ) {
$showed[CAL_OWNTEAMS] = 1;
@@ -91,27 +81,21 @@
$showed[CAL_EVERYTHING] = 1;
}
}
- if ($useOPTGROUP) {
- $r .= " </optgroup>\n";
- }
+ $r .= " </optgroup>\n";
$rx = '';
foreach($team as $t => $tt) {
if ( isset($showed[$t]) && ($showed[$t] == 1) ) continue;
$obj = getObject($current_user->dbconn,$t);
if (is_object($obj)) {
- $rx .= ' <option value="'. $t .'" selected="selected">'.$lang[$obj->getType()].': '. $obj->getFullName() ."</option>\n";
+ $rx .= ' <option value="'. $t .'" selected="selected">'.$lang[$obj->getType()].': '. myentities($obj->getFullName()) ."</option>\n";
}
# $r .= ("XXXX".$t);
}
if (!empty($rx)) {
- if ($useOPTGROUP) {
- $r .= ' <optgroup label="-----">'."\n";
- }
+ $r .= ' <optgroup label="-----">'."\n";
$r .= $rx;
- if ($useOPTGROUP) {
- $r .= " </optgroup>\n";
- }
+ $r .= " </optgroup>\n";
}
$r .= " </select>\n";
$r .= ' <input type="submit" value="GO" />'."\n";
@@ -217,32 +201,29 @@
/**
* parse the calendar options
+ * team[]
+ * set in layout temname and team
*/
function cal_parse_options(layout $ly) {
- global $msg,$lang;
+ global $msg,$lang,$current_user,$tutos;
$ly->tnpre = ': ';
$ly->uids = array();
- $first = true;
$tt = array();
- if ( isset($_GET['team']) ) {
- if (is_array($_GET['team'])) {
- foreach ($_GET['team'] as $i) {
- $tt[$i] = $i;
- if ($first) {
- $x = $ly->user->set_prefteam($i);
- $first = false;
- }
- }
- } else {
- $tt[$_GET['team']] = $_GET['team'];
- $x = $ly->user->set_prefteam($_GET['team']);
+ if ( isset($_REQUEST['team']) ) {
+ if (is_array($_REQUEST['team'])) {
+ foreach ($_REQUEST['team'] as $t)
+ $tt[$t] = $t;
+ $tutos['app_prefteam'] = implode(',',$_REQUEST['team']);
+ } else if (is_numeric($_REQUEST['team'])){
+ $tt[$_REQUEST['team']] = $_REQUEST['team'];
+ $tutos['app_prefteam'] = $_REQUEST['team'];
}
+ write_config_value($current_user->dbconn,'app_prefteam','appointment',$current_user->id);
} else {
- /* Get the last used team */
- $x = $ly->user->get_prefteam();
- $tt[$x] = $x;
+ foreach (preg_split('#,#',$tutos['app_prefteam']) as $t)
+ $tt[$t] = $t;
}
$ly->user->readKnownParties();
@@ -277,7 +258,7 @@
if (!isset($t->member[$i1]->teamlist)) {
team::obj_read($t->member[$i1]);
}
- foreach($tt->member[$i1]->teamlist as $i2 => $f2 ) {
+ foreach($t->member[$i1]->teamlist as $i2 => $f2 ) {
$ly->uids[$i2] = 1;
}
}
@@ -291,7 +272,7 @@
$ly->uids[$ip] = 1;
}
foreach($ly->user->t_parties as $ip => $fn ) {
- $uids[$ip] = 1;
+ $ly->uids[$ip] = 1;
$t = new team($ly->user->dbconn);
$t = $t->read($ip,$t);
foreach($t->ids as $i1 => $f1 ) {
@@ -300,6 +281,7 @@
unset($t);
}
} else {
+ // "normal" team
$t = getObject($ly->user->dbconn,$team);
if ( ! is_object($t) ) continue;
if (!$t->see_ok()) {
@@ -317,7 +299,6 @@
foreach($t->teamlist as $i => $f ) {
$ly->uids[$i] = 1;
}
- //print_r($ly->uids);
} else if (method_exists($t,'get_cal_owners')) {
$ly->teamname .= $ly->tnpre.$lang[$t->getType()] .' '. $t->getFullname();
$ly->tnpre = ' & ';
@@ -329,6 +310,8 @@
}
}
}
+
+ $ly->team = $tt;
}
/**
Modified: trunk/php/calendar.php
===================================================================
--- trunk/php/calendar.php 2012-06-24 12:56:53 UTC (rev 645)
+++ trunk/php/calendar.php 2012-06-24 12:58:02 UTC (rev 646)
@@ -280,9 +280,9 @@
if ($tutos[jscalendar] == 1) {
$format = "%Y-%m-%d";
- // $r .= '<tr><td>';
+ $r .= '<tr><td>';
$r .= '<div style="float: left; margin-left: 0em; margin-bottom: -1em;margin-top:8em" id="datepicker"></div>';
- // $r .= '</td></tr>';
+ $r .= '</td></tr>';
$tutos['pagescript'] .= '$(function() {
$( "#datepicker" ).datepicker({
defaultDate : "'.$this->tobj->getYYYYMMDD().'",
@@ -336,13 +336,13 @@
cal_parse_options($this);
$this->name .= $this->teamname;
- if ( isset($_GET['team']) && is_array($_GET['team']) ) {
- foreach($_GET['team'] as $x) {
- if (is_numeric($x) ) {
- $this->team[$x] = $x;
- }
- }
- }
+ // if ( isset($_GET['team']) && is_array($_GET['team']) ) {
+ // foreach($_GET['team'] as $x) {
+ // if (is_numeric($x) ) {
+ // $this->team[$x] = $x;
+ // }
+ // }
+ // }
if ( isset($_GET['loc']) && is_array($_GET['loc']) ) {
foreach($_GET['loc'] as $x) {
if (is_numeric($x) ) {
@@ -372,7 +372,6 @@
);
$this->addMenu($x);
}
-
}
}
Modified: trunk/php/calendar_day.php
===================================================================
--- trunk/php/calendar_day.php 2012-06-24 12:56:53 UTC (rev 645)
+++ trunk/php/calendar_day.php 2012-06-24 12:58:02 UTC (rev 646)
@@ -234,9 +234,9 @@
}
$format = "%Y-%m-%d";
- // $r .= '<tr><td>';
+ $r .= '<tr><td>';
$r .= '<div style="float: left; margin-left: 0em; margin-bottom: -1em;margin-top:8em" id="datepicker"></div>';
- // $r .= '</td></tr>';
+ $r .= '</td></tr>';
$tutos['pagescript'] .= '$(function() {
$( "#datepicker" ).datepicker({
defaultDate : "'.$this->tobj->getYYYYMMDD().'",
Modified: trunk/php/calendar_week.php
===================================================================
--- trunk/php/calendar_week.php 2012-06-24 12:56:53 UTC (rev 645)
+++ trunk/php/calendar_week.php 2012-06-24 12:58:02 UTC (rev 646)
@@ -175,9 +175,9 @@
}
$format = "%Y-%m-%d";
- // $r .= '<tr><td>';
+ $r .= '<tr><td>';
$r .= '<div style="float: left; margin-left: 0em; margin-bottom: -1em;margin-top:8em" id="datepicker"></div>';
- // $r .= '</td></tr>';
+ $r .= '</td></tr>';
$tutos['pagescript'] .= '$(function() {
$( "#datepicker" ).datepicker({
defaultDate : "'.$this->tobj->getYYYYMMDD().'",
@@ -251,8 +251,6 @@
}
}
-# info($_GET['t'],$current_user->get_prefteam(),$teamname,$uids);
-
$l = new Calendar_week($current_user);
$l->display();
$dbconn->Close();
Modified: trunk/php/config_default.pinc
===================================================================
--- trunk/php/config_default.pinc 2012-06-24 12:56:53 UTC (rev 645)
+++ trunk/php/config_default.pinc 2012-06-24 12:58:02 UTC (rev 646)
@@ -758,10 +758,10 @@
#
# The TUTOS Version number
#
-$tutos[version] = '1.8.20120615';
+$tutos[version] = '1.8.20120624';
#
### Local Variables: ***
### mode:iso-accents ***
### coding:utf-8 ***
### End: ***
-?>
\ No newline at end of file
+?>
Modified: trunk/php/db.p3
===================================================================
--- trunk/php/db.p3 2012-06-24 12:56:53 UTC (rev 645)
+++ trunk/php/db.p3 2012-06-24 12:58:02 UTC (rev 646)
@@ -556,6 +556,9 @@
if (!isset($tutos['smtp_password']))
$tutos['smtp_password'] = 'change me';
+if (!isset($tutos['app_prefteam']))
+ $tutos['app_prefteam'] = 1;
+
$tutos['CSV_delimiter'] = ',';
$tutos['CSV_enclosure'] = '"';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-24 12:56:59
|
Revision: 645
http://tutos.svn.sourceforge.net/tutos/?rev=645&view=rev
Author: gokohnert
Date: 2012-06-24 12:56:53 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/product.pinc
Modified: trunk/php/product.pinc
===================================================================
--- trunk/php/product.pinc 2012-06-24 12:56:24 UTC (rev 644)
+++ trunk/php/product.pinc 2012-06-24 12:56:53 UTC (rev 645)
@@ -708,7 +708,9 @@
} else {
$negate = false;
}
-
+ $n1 = 0;
+ $n2 = 0;
+ $xs = array();
// search for a given object ID
$qx = '';
$qpre = ' WHERE';
@@ -716,9 +718,9 @@
$qx = ' where id = '.$regs[1];
} else {
$qx = ' where '.$user->dbconn->Like("name",$name,"version");
+ $xs = preg_split('#,#',$tutos['prod_activ_states']);
}
- $xs = preg_split('#,#',$tutos['prod_activ_states']);
// Search active
$q = "SELECT ".($mode == 1 ? '*':'id')." from ". $user->dbconn->prefix .$table['product'][name];
$q .= $qx;
@@ -735,9 +737,9 @@
check_dbacl($user->dbconn, $q, $user->id);
$r = $user->dbconn->Exec($q);
- $n = $r->numrows();
+ $n1 = $r->numrows();
$a = 0;
- while ( $a < $n ) {
+ while ( $a < $n1 ) {
if ($mode == 1) {
$x = new Product($user->dbconn);
$x->read_result($r,$a);
@@ -772,9 +774,9 @@
check_dbacl($user->dbconn, $q, $user->id);
$r = $user->dbconn->Exec($q);
- $n = $r->numrows();
+ $n2 = $r->numrows();
$a = 0;
- while ( $a < $n ) {
+ while ( $a < $n2 ) {
if ($mode == 1) {
$x = new Product($user->dbconn);
$x->read_result($r,$a);
@@ -794,7 +796,7 @@
}
$r->free();
}
- return $n;
+ return ($n1+$n2);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-24 12:56:30
|
Revision: 644
http://tutos.svn.sourceforge.net/tutos/?rev=644&view=rev
Author: gokohnert
Date: 2012-06-24 12:56:24 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
XLS Format for Date
Modified Paths:
--------------
trunk/php/Date.pinc
trunk/php/bugtracking/bug.pinc
trunk/php/bugtracking/bug_overview.php
Modified: trunk/php/Date.pinc
===================================================================
--- trunk/php/Date.pinc 2012-06-21 09:55:11 UTC (rev 643)
+++ trunk/php/Date.pinc 2012-06-24 12:56:24 UTC (rev 644)
@@ -949,6 +949,7 @@
}
/**
+ * get Date and Time formatted well
*/
function getDateTime() {
global $lang;
@@ -960,7 +961,19 @@
}
/**
+ * get Date and Time formatted for Excel
*/
+ function getXLSDateTime() {
+ global $lang;
+
+ if ( $this->notime == 1) {
+ return '';
+ }
+ return Date($lang['DateTimePHP'],$this->ts);
+ }
+
+ /**
+ */
function getTime() {
global $lang;
@@ -994,6 +1007,7 @@
}
/**
+ * get Date formatted well
*/
function getDate() {
global $lang,$tutos;
@@ -1002,11 +1016,21 @@
return sprintf ($lang['DateFormat'],"--","--","----");
}
return strftime ($lang['DateFormatStr'],$this->ts);
-# return sprintf ($lang['DateFormat'],$this->day,$this->month,$this->year);
}
/**
+ * get Date formatted for Excel
*/
+ function getXLSDate() {
+ global $lang,$tutos;
+
+ if ( $this->notime == 1) {
+ return '';
+ }
+ return strftime ($lang['DateFormatStr'],$this->ts);
+ }
+ /**
+ */
function getDateShort() {
global $lang,$tutos;
Modified: trunk/php/bugtracking/bug.pinc
===================================================================
--- trunk/php/bugtracking/bug.pinc 2012-06-21 09:55:11 UTC (rev 643)
+++ trunk/php/bugtracking/bug.pinc 2012-06-24 12:56:24 UTC (rev 644)
@@ -771,7 +771,7 @@
global $tutos,$lang;
if (!isset($tutos['bug_long_pop']) || ($tutos['bug_long_pop'] == 0) ) {
- $n =str_replace("\n","<br />",myentities(wordwrap($this->short,80)));
+ $n =str_replace("\n","<br />",myentities(wordwrap($this->short,90)));
} else {
$n = str_replace("\n","<br />",$this->getBugHistory(false));
}
@@ -1437,7 +1437,7 @@
case 'BugReportedFrom':
case 'BugCreate':
$x = resolve_history_obj($f,$this->dbconn);
- break;
+ break;
case 'BugAssignedTo':
$x = $f;
if ($f['old'] < 0)
Modified: trunk/php/bugtracking/bug_overview.php
===================================================================
--- trunk/php/bugtracking/bug_overview.php 2012-06-21 09:55:11 UTC (rev 643)
+++ trunk/php/bugtracking/bug_overview.php 2012-06-24 12:56:24 UTC (rev 644)
@@ -289,7 +289,7 @@
$c++;
}
$worksheet1->write_string($x,$c++, myiconv($lang['BugClasses'][$b->class]),$format2);
- $worksheet1->write_string($x,$c++, myiconv($b->creation->getDate()),$format2);
+ $worksheet1->write_string($x,$c++, myiconv($b->creation->getXLSDate()),$format2);
if ( $b->parent->id > 0 ) {
$worksheet1->write_string($x,$c++, myiconv($b->parent->getFullName()),$format2);
@@ -312,7 +312,7 @@
} else {
$worksheet1->write_string($x,$c++,myiconv($lang['HistoryDeleted']),$format2);
}
- $worksheet1->write_string($x,$c++, myiconv($b->solvedate->getDateTime()),$format2);
+ $worksheet1->write_string($x,$c++, myiconv($b->solvedate->getXLSDateTime()),$format2);
$x++;
unset($b);
}
@@ -1108,6 +1108,9 @@
$s = $_REQUEST['state'];
$_REQUEST['state'] = array();
$_REQUEST['state'][] = $s;
+ } else if (!isset($_REQUEST['state'])) {
+ $_REQUEST['state'] = array();
+ $_REQUEST['state'][] = -1;
}
if (in_array(-1,$_REQUEST['state'])) {
// all
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-21 09:55:21
|
Revision: 643
http://tutos.svn.sourceforge.net/tutos/?rev=643&view=rev
Author: gokohnert
Date: 2012-06-21 09:55:11 +0000 (Thu, 21 Jun 2012)
Log Message:
-----------
fix (backup uses classic layout)
Modified Paths:
--------------
trunk/php/layout/classic_layout.pinc
Modified: trunk/php/layout/classic_layout.pinc
===================================================================
--- trunk/php/layout/classic_layout.pinc 2012-06-21 06:06:55 UTC (rev 642)
+++ trunk/php/layout/classic_layout.pinc 2012-06-21 09:55:11 UTC (rev 643)
@@ -38,7 +38,7 @@
/**
* start a info row
*/
- function ContentRowStart() {
+ function ContentRowStart($class = '') {
return '<tr>'."\n";
}
@@ -92,6 +92,41 @@
}
/**
+ * start a overview row
+ */
+ function OverviewRowStart($line,$title = '',$class = '') {
+ return '<tr title="'. myentities($title) .'" class="line'. ($line % 2 +1) .' '.$class."\">\n";
+ }
+
+ /**
+ * end a overview row
+ */
+ function OverviewRowEnd($line) {
+ return '</tr>'."\n";
+ }
+
+ /**
+ * get an overview row block
+ */
+ function OverviewRowBlock($content,$class = '',$rows=1) {
+ return '<td'.($rows > 1 ? ' rowspan="'.$rows.'" ':'').($class!='' ? ' class="'.$class.'"':'').'>'.$content.'</td>'."\n";
+ }
+
+ /**
+ * start a overview header
+ */
+ function OverviewHeaderStart($class = '') {
+ return '<thead><tr'.($class != '' ? ' class="'.$class.'"':'').">\n";
+ }
+
+ /**
+ * end a overview header row
+ */
+ function OverviewHeaderEnd($line) {
+ return '</tr></thead>'."\n";
+ }
+
+ /**
* start a edit row
*/
function EditRowStart($attr = '') {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-21 06:07:02
|
Revision: 642
http://tutos.svn.sourceforge.net/tutos/?rev=642&view=rev
Author: gokohnert
Date: 2012-06-21 06:06:55 +0000 (Thu, 21 Jun 2012)
Log Message:
-----------
more mobile updates / introduce autoload / introduce exceptions
Modified Paths:
--------------
trunk/php/address.pinc
trunk/php/address_new.php
trunk/php/address_show.php
trunk/php/address_tools.p3
trunk/php/custom.pinc
trunk/php/file/file.pinc
trunk/php/invoice/invoice.pinc
trunk/php/invoice/invoice_show.php
trunk/php/layout/layout_base.pinc
trunk/php/layout/mobile_layout.pinc
trunk/php/layout/new2_layout.pinc
trunk/php/layout/new_base.pinc
trunk/php/mail.pinc
trunk/php/mail_new.php
trunk/php/mytutos.php
trunk/php/permission.p3
trunk/php/product_overview.php
trunk/php/timetrack/timetrack_overview.php
trunk/php/webelements.p3
Modified: trunk/php/address.pinc
===================================================================
--- trunk/php/address.pinc 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/address.pinc 2012-06-21 06:06:55 UTC (rev 642)
@@ -42,11 +42,7 @@
$this->birthday = new TUTOS_Date_Time(0);
$this->pic_id = -1;
$this->location = array();
- if (class_exists('tutos_file')) {
- $this->pic_file = new Tutos_file($this->dbconn);
- } else {
- $this->pic_file = -1;
- }
+ $this->pic_file = -1;
$this->rl1 = false;
$this->rl2 = false;
if (isset($dbconn)) {
@@ -84,6 +80,7 @@
$this->birthday->setDateTime($r->get($pos, "birthday"),1);
$this->pic_id = $r->get($pos, "pic_id");
+ $this->pic_file = new tutos_file($this->dbconn);
$cid = $r->get($pos, "creator");
if ( isset($cid) ) {
@@ -101,11 +98,9 @@
*/
function read_picture () {
if ( $this->pic_id < 1 ) {
+ // no picture
return;
}
- if (! is_object($this->pic_file) ) {
- return;
- }
$this->pic_file = $this->pic_file->read($this->pic_id,$this->pic_file);
}
Modified: trunk/php/address_new.php
===================================================================
--- trunk/php/address_new.php 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/address_new.php 2012-06-21 06:06:55 UTC (rev 642)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2010 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
Modified: trunk/php/address_show.php
===================================================================
--- trunk/php/address_show.php 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/address_show.php 2012-06-21 06:06:55 UTC (rev 642)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -15,12 +15,11 @@
*/
require_once 'webelements.p3';
require_once 'permission.p3';
-require_once 'address_tools.p3';
-require_once 'product.pinc';
-require_once 'appointment.pinc';
// Check if user is allowed to use it
check_user();
+
+require_once 'address_tools.p3';
loadmodules('address','show');
loadlayout();
Modified: trunk/php/address_tools.p3
===================================================================
--- trunk/php/address_tools.p3 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/address_tools.p3 2012-06-21 06:06:55 UTC (rev 642)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
@@ -124,7 +124,7 @@
}
$r .= "</tr>\n";
return $r;
-}
+ }
/**
* initialize for adress search and overview pages
*/
@@ -511,4 +511,4 @@
}
return $r;
}
-?>
+?>
\ No newline at end of file
Modified: trunk/php/custom.pinc
===================================================================
--- trunk/php/custom.pinc 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/custom.pinc 2012-06-21 06:06:55 UTC (rev 642)
@@ -1534,7 +1534,7 @@
$d = $layout->mark_filter(myentities($d),$f);
}
}
- $r .= ' <td '.($rows > 1 ? 'rowspan="'.$rows.'" ':'').'class="over_l">'.($d != '' ? $d:' ').'</td>'."\n";
+ $r .= $layout->OverviewRowBlock(($d != '' ? $d:' '),'over_l',$rows);
}
return $r;
}
Modified: trunk/php/file/file.pinc
===================================================================
--- trunk/php/file/file.pinc 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/file/file.pinc 2012-06-21 06:06:55 UTC (rev 642)
@@ -163,7 +163,7 @@
/**
*
*/
- function tutos_file(&$dbconn) {
+ function tutos_file(tutos_db $dbconn) {
global $tutos,$current_user,$table;
$this->init($dbconn);
@@ -204,7 +204,7 @@
* @param Object $r a result set object
* @param int $pos a index in the resultset
*/
- function read_result(&$r, $pos ) {
+ function read_result(result $r, $pos ) {
$this->name = $r->get($pos, "name");
$this->fileloc = $r->get($pos, "loc");
$this->filetype = $r->get($pos, "type");
Modified: trunk/php/invoice/invoice.pinc
===================================================================
--- trunk/php/invoice/invoice.pinc 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/invoice/invoice.pinc 2012-06-21 06:06:55 UTC (rev 642)
@@ -1274,7 +1274,7 @@
/**
* get an data for overview tables that shows a line with obj info
*/
- function get_overview_data (&$layout,&$obj) {
+ function get_overview_data (layout_base $layout,tutos_base $obj) {
global $tutos,$lang;
$r = '';
@@ -1282,34 +1282,34 @@
return $r;
}
if ( ($obj->gettype() == "timetrack") ) {
- $r .= '<td class="over_l">';
+ $xx = '';
if ( $obj->inv_id != -1 ) {
$obj->invoice = new invoice($obj->dbconn);
$obj->invoice = $obj->invoice->read($obj->inv_id,$obj->invoice);
if ( $obj->inv_id == $obj->invoice->id ) {
- $r .= $obj->invoice->getLink().' : '. $obj->invoice->getState();
+ $xx .= $obj->invoice->getLink().' : '. $obj->invoice->getState();
}
}
- $r .= " </td>\n";
+ $r .= $layout->OverviewRowBlock(($xx != '' ? $xx:' '),'over_l');
} else if ( ($obj->gettype() == "installation") ) {
- $r .= '<td class="over1">';
+ $xx = '';
invoice::obj_read($obj);
if ( count($obj->list[useinvoice]) > 0 ) {
$pre = "";
foreach ($obj->list[useinvoice] as $i => $f) {
- $r .= $pre . $f->getLink() ." : ". $f->getState() ;
+ $xx .= $pre . $f->getLink() ." : ". $f->getState() ;
$pre = "\n<br />";
}
}
- $r .= " </td>\n";
+ $r .= $layout->OverviewRowBlock(($xx != '' ? $xx:' '),'over_l');
} else if ( ($obj->gettype() == "expense") ) {
- $r .= "<td class=\"over1\">\n";
+ $xx = '';
$obj->inv = new invoice($obj->dbconn);
$obj->inv = $obj->inv->read($obj->invoice,$obj->inv);
if (is_object($obj->inv) && ($obj->invoice == $obj->inv->id) ) {
- $r .= $obj->inv->getLink()." : ". $obj->inv->getState() ;;
+ $xx .= $obj->inv->getLink()." : ". $obj->inv->getState() ;;
}
- $r .= " </td>\n";
+ $r .= $layout->OverviewRowBlock(($xx != '' ? $xx:' '),'over_l');
}
return $r;
}
Modified: trunk/php/invoice/invoice_show.php
===================================================================
--- trunk/php/invoice/invoice_show.php 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/invoice/invoice_show.php 2012-06-21 06:06:55 UTC (rev 642)
@@ -26,11 +26,7 @@
loadmodule('invoice');
loadlayout();
-if ($tutos[fpdfpath] != '') {
- include_once $tutos['base'] ."/". $tutos[fpdfpath].'/fpdf.php';
-}
-
/**
* display a invoice
*/
@@ -244,7 +240,7 @@
$this->addMenu($x);
}
- if ( ($this->obj->id > 0) && $this->obj->see_ok() && class_exists( 'fpdf') ) {
+ if ( ($this->obj->id > 0) && $this->obj->see_ok() && class_exists( 'FPDF') ) {
$x = array( url => $this->obj->getUrl() .'&format=pdf',
text => $lang['InvDocument'],
info => $lang['InvDocumentI'],
Modified: trunk/php/layout/layout_base.pinc
===================================================================
--- trunk/php/layout/layout_base.pinc 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/layout/layout_base.pinc 2012-06-21 06:06:55 UTC (rev 642)
@@ -404,6 +404,11 @@
abstract function OverviewRowEnd($line);
/**
+ * get an overview row block
+ */
+ abstract function OverviewRowBlock($content,$class = '',$rows=1);
+
+ /**
* start a edit row
*/
abstract function EditRowStart($attr = '');
Modified: trunk/php/layout/mobile_layout.pinc
===================================================================
--- trunk/php/layout/mobile_layout.pinc 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/layout/mobile_layout.pinc 2012-06-21 06:06:55 UTC (rev 642)
@@ -103,7 +103,7 @@
* start a overview table
*/
function OverviewTableStart() {
- return '<ul data-role="listview" data-theme="g">'."\n";
+ return '<ul data-role="listview" data-theme="g" data-divider-theme="d">'."\n";
}
/**
@@ -117,6 +117,7 @@
* start a overview row
*/
function OverviewRowStart($line,$title = '',$class = '') {
+ $this->blk_cnt = 0;
return '<li>';
}
@@ -128,6 +129,35 @@
}
/**
+ * end a overview row
+ */
+ function OverviewRowBlock($content,$class = '',$rows=1) {
+ $this->blk_cnt++;
+ $r = '<span'.($class!='' ? ' class="'.$class.'"':'').'>'.$content.'</span> '."\n";
+ if ($this->blk_cnt >3) {
+ $this->blk_cnt = 0;
+ $r .= '<p>';
+ }
+ return $r;
+ }
+
+ /**
+ * start a overview header row
+ */
+ function OverviewHeaderStart($class = '') {
+ $this->blk_cnt = 0;
+ return '<li>';
+ }
+
+ /**
+ * end a overview header row
+ */
+ function OverviewHeaderEnd($line) {
+ return "</li>\n";
+ }
+
+
+ /**
* start a edit row
*/
function EditRowStart($attr = '') {
@@ -270,44 +300,44 @@
global $tutos, $lang;
$base = addUrlParameter($base,"xf=".$oname,false);
- $r = '<th nowrap="nowrap" colspan="'. $cols ."\">\n";
+ $r = '<span nowrap="nowrap">'."\n";
if ( $ "" ) {
$r .= $link;
} else {
- $r .= '<span style="float:left;">';
// remove HTML
$txt = preg_replace('#<[/]*[a-z0-9 "=-]*[/]*>#i','',$link);
// LEFT
$l = addUrlParameter($base,"xo=1",false);
- $r .= '<span style="overflow:visible;float:left;text-align:left;vertical-align:top;">';
if ( isset ($_GET['xo']) && $_GET['xo'] == 1 && ($_GET['xf'] == $oname) ) {
$r .= "(". makelink($l ,$this->theme->getImage(up,'list'),sprintf($lang['OrderBy'], $txt)) .")";
} else {
$r .= makelink($l ,$this->theme->getImage(up,'list'),sprintf($lang['OrderBy'], $txt));
}
- $r .= ' </span>';
+ $r .= ' ';
// CENTER
- $r .= '<span style="overflow:visible;float:left;text-align:center">';
if ( isset ($_GET['xo']) && ($_GET['xf'] == $oname) ) {
$r .= '<b>'. $link .'</b>';
} else {
$r .= $link;
}
- $r .= '</span>';
// RIGHT
$l = addUrlParameter($base,"xo=2",false);
- $r .= '<span style="overflow:visible;float:right;text-align:right;vertical-align:top;"> ';
+ $r .= ' ';
if ( isset ($_GET['xo']) && $_GET['xo'] == 2 && ($_GET['xf'] == $oname) ) {
$r .= '('. makelink($l ,$this->theme->getImage(down,'list'),sprintf($lang['RevOrderBy'],$txt)) .')';
} else {
$r .= makelink($l ,$this->theme->getImage(down,'list'),sprintf($lang['RevOrderBy'],$txt));
}
- $r .= '</span>';
$r .= '</span>';
- $r .= '<div style="clear: both;"></div>';
}
- $r .= "</th>\n";
+ $r .= "</span>\n";
+
+ $this->blk_cnt++;
+ if ($this->blk_cnt >3) {
+ $this->blk_cnt = 0;
+ $r .= '<p>';
+ }
return $r;
}
Modified: trunk/php/layout/new2_layout.pinc
===================================================================
--- trunk/php/layout/new2_layout.pinc 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/layout/new2_layout.pinc 2012-06-21 06:06:55 UTC (rev 642)
@@ -1130,8 +1130,12 @@
$this->actionresult = $this->action();
}
$this->mainmenu();
- $this->prepare();
-
+ try {
+ $this->prepare();
+ } catch (Exception $e) {
+ $msg = addLIne($e->getMessage(),$msg);
+ $this->stop = true;
+ }
if ( $this->redirect != '' ) {
leave_insert($this->dbconn,$this->redirect,$msg,$info);
return;
@@ -1140,13 +1144,23 @@
// Start the HTML
echo $this->shorthtml($this->HTML_Start());
flush();
- $this->read_data();
+ try {
+ $this->read_data();
+ } catch (Exception $e) {
+ echo $e->getMessage();
+ $this->stop = true;
+ }
flush();
echo $this->shorthtml($this->layout_start());
flush();
if ($this->stop == false ) {
# $r = preg_replace('#>[[:space:]]*<#m','><',$this->info());
- echo $this->shorthtml($this->info());
+ try {
+ echo $this->shorthtml($this->info());
+ } catch (Exception $e) {
+ echo $e->getMessage();
+ $this->stop = true;
+ }
}
echo $this->shorthtml($this->showContent());
echo $this->shorthtml($this->layout_stop());
Modified: trunk/php/layout/new_base.pinc
===================================================================
--- trunk/php/layout/new_base.pinc 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/layout/new_base.pinc 2012-06-21 06:06:55 UTC (rev 642)
@@ -115,6 +115,27 @@
}
/**
+ * get an overview row block
+ */
+ function OverviewRowBlock($content,$class = '',$rows=1) {
+ return '<td'.($rows > 1 ? ' rowspan="'.$rows.'" ':'').($class!='' ? ' class="'.$class.'"':'').'>'.$content.'</td>'."\n";
+ }
+
+ /**
+ * start a overview header
+ */
+ function OverviewHeaderStart($class = '') {
+ return '<thead><tr'.($class != '' ? ' class="'.$class.'"':'').">\n";
+ }
+
+ /**
+ * end a overview header row
+ */
+ function OverviewHeaderEnd($line) {
+ return '</tr></thead>'."\n";
+ }
+
+ /**
* start a edit row
*/
function EditRowStart($attr = '') {
Modified: trunk/php/mail.pinc
===================================================================
--- trunk/php/mail.pinc 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/mail.pinc 2012-06-21 06:06:55 UTC (rev 642)
@@ -300,6 +300,8 @@
$show_html = false;
} elseif (strtolower($this->contenttype) == "message/disposition-notification") {
$show_html = false;
+ } elseif (preg_match("#^multipart/related#i",$this->contenttype)) {
+ $skip = true;
} elseif (preg_match("#^multipart/report#i",$this->contenttype)) {
$skip = true;
} elseif (preg_match("#^multipart/mixed#i",$this->contenttype)) {
@@ -715,13 +717,15 @@
$this->user = $user;
$this->subject = '';
$this->resetTo();
- $this->hdr = array();
- $this->fd = false;
- $this->prio = 0;
- $this->date = '';
- $this->from = null;
- $this->from_adr = '';
- $this->show_header = false;
+ $this->hdr = array();
+ $this->fd = false;
+ $this->prio = 0;
+ $this->date = '';
+ $this->from = null;
+ $this->from_adr = '';
+ $this->reply_to = null;
+ $this->reply_to_adr = '';
+ $this->show_header = false;
$this->replyurl= "mail_new.php";
// Parser
@@ -1075,6 +1079,14 @@
$this->from_adr = $from;
}
+ function setReplyTo(&$obj) {
+ $this->reply_to = &$obj;
+ }
+
+ function setReplyToTxt($reply) {
+ $this->reply_to_adr =$reply;
+ }
+
/**
* reset the addresses where to send the mail
*/
@@ -1596,6 +1608,18 @@
$msg = addLine($msg,sprintf($lang['Err0034'],$this->from->getFullName()));
return $msg;
}
+
+ $replyto = '';
+ if ( $this->reply_to_adr != "" ) {
+ $replyto = $this->reply_to_adr;
+ } else if (is_object($this->reply_to)) {
+ $replyto = $this->reply_to->default_email();
+ } else {
+ // no reply to
+ }
+
+
+
if ( (($tutos['mailmode'] == MAILMODE_SENDMAIL) && !is_executable($tutos['sendmail']))
|| (($tutos['mailmode'] == MAILMODE_SMTP) && empty($tutos['smtphost']))
|| ($tutos['mailmode'] == MAILMODE_NOMAIL)
@@ -1729,7 +1753,8 @@
$x = "=?". $lang['content_encoding'] ."?B?" . base64_encode($this->from->getFullName()) . "?=";
$this->writechannel("From: \"". $x ." (TUTOS)\" <". $from .">");
- $this->writechannel("Reply-To: \"". $x ."\" <". $from .">");
+ if ($replyto != '')
+ $this->writechannel("Reply-To: \"". $x ."\" <". $replyto .">");
$this->writechannel("Date: ". Date("r"));
// encode subject line
$subj = "=?". $this->charset ."?B?" . base64_encode( $this->subject ) . "?=";
Modified: trunk/php/mail_new.php
===================================================================
--- trunk/php/mail_new.php 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/mail_new.php 2012-06-21 06:06:55 UTC (rev 642)
@@ -263,7 +263,7 @@
if ( isset($_GET['filepath']) ) {
$this->obj->file_path = $_GET['filepath'];
}
- if ( isset($_GET['to']) ) {
+ if ( isset($_GET['to']) && is_array($_GET['to'])) {
foreach ( $_GET['to'] as $t ) {
$this->obj->addTo($t);
}
Modified: trunk/php/mytutos.php
===================================================================
--- trunk/php/mytutos.php 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/mytutos.php 2012-06-21 06:06:55 UTC (rev 642)
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2011 by Gero Kohnert
+ * Copyright 1999 - 2012 by Gero Kohnert
*
* 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
Modified: trunk/php/permission.p3
===================================================================
--- trunk/php/permission.p3 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/permission.p3 2012-06-21 06:06:55 UTC (rev 642)
@@ -13,18 +13,6 @@
* @module permission
* @package BASE
*/
-if ( ! isset($tutos['base']) ) {
- $tutos['base'] = "..";
- ini_set("include_path",".");
-}
-# Files noted here are included everywhere
-require_once 'base.pinc';
-require_once 'module_base.pinc';
-require_once 'handler.pinc';
-require_once 'db.p3';
-require_once 'Date.pinc';
-require_once 'user.pinc';
-
// clean
if (isset($_SERVER["REQUEST_URI"]) && strpos($_SERVER["REQUEST_URI"],'//') === 0) {
Header("Content-Description: TUTOS Redirect" );
@@ -33,6 +21,65 @@
exit;
}
+if ( ! isset($tutos['base']) ) {
+ $tutos['base'] = "..";
+ ini_set("include_path",".");
+}
+
+
+/**
+ * autoload function for TUTOS
+ */
+function tutos_autoloader($class) {
+ global $tutos;
+
+ if ($class == 'Tutos_base') {
+ include_once('base.pinc');
+ return;
+ }
+ if ($class == 'TUTOS_Date_Time') {
+ include_once('Date.pinc');
+ return;
+ }
+ if ($class == 'tutos_user') {
+ include_once('user.pinc');
+ return;
+ }
+ if ($class == 'tutos_module') {
+ include_once('module_base.pinc');
+ return;
+ }
+ if ($class == 'task') {
+ include_once('task.pinc');
+ return;
+ }
+ if ($class == 'FPDF') {
+ if ($tutos[fpdfpath] != '') {
+ include_once $tutos['base'] ."/". $tutos[fpdfpath].'/fpdf.php';
+ return;
+ }
+ }
+ foreach($tutos[modules] as $m) {
+ if ($m[name] == $class) {
+ loadmodule($m['perm']);
+ error_log('autoloaded '.$class."\n",3,$tutos[errlog]);
+# echo 'loaded module '.$m[Desc].' <br />';
+ return;
+ # } else {
+# echo 'check '.$m[name].' <br />';
+ }
+ }
+ error_log('Look for '.$class."\n",3,$tutos[errlog]);
+ error_log(TUTOS_backtrace()."\n",3,$tutos[errlog]);
+}
+
+spl_autoload_register('tutos_autoloader');
+
+# Files noted here are included everywhere
+require_once 'db.p3';
+require_once 'handler.pinc';
+
+
$tutos['memcache'] = null;
if ( count($tutos[memcache_hosts]) && class_exists("memcache")) {
$tutos['memcache'] = new memcache();
Modified: trunk/php/product_overview.php
===================================================================
--- trunk/php/product_overview.php 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/product_overview.php 2012-06-21 06:06:55 UTC (rev 642)
@@ -962,4 +962,4 @@
$l = new Product_overview($current_user);
$l->display();
$dbconn->Close();
-?>
+?>
\ No newline at end of file
Modified: trunk/php/timetrack/timetrack_overview.php
===================================================================
--- trunk/php/timetrack/timetrack_overview.php 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/timetrack/timetrack_overview.php 2012-06-21 06:06:55 UTC (rev 642)
@@ -168,8 +168,7 @@
$r .= $this->actionformStart("timetrack_overview.php");
$r .= $this->header;
$r .= $this->OverviewTableStart();
- $r .= "<thead>\n";
- $r .= "<tr>\n";
+ $r .= $this->OverviewHeaderStart();
$r .= $this->orderHeader('',"#",$this->link2);
if ($this->head['ref']) {
$r .= $this->orderHeader('',$lang['TimetrackRef'],$this->link2);
@@ -195,8 +194,7 @@
$r .= show_custom_overview_headers($this,'timetrack',$this->link2);
$r .= get_module_overview_header($this,'timetrack');
$r .= $this->MassUpdateHeader();
- $r .= "</tr>\n";
- $r .= "</thead>\n";
+ $r .= $this->OverviewHeaderEnd();
$sum['v'] = 0.0;
$sum['d'] = 0.0;
@@ -243,70 +241,66 @@
# $np[] = $tt->id;
$r .= $this->OverviewRowStart($line);
- $r .= ' <td class="over_r">';
if ( $tt->mod_ok() ) {
- $r .= makelink($tt->getModURL('ss='.$ss) ,sprintf("%03d",($a + 1)),$lang['TimetrackModify']);
+ $xx = makelink($tt->getModURL('ss='.$ss) ,sprintf("%03d",($a + 1)),$lang['TimetrackModify']);
} else {
- $r .= sprintf("%03d",($a + 1));
+ $xx = sprintf("%03d",($a + 1));
}
- $r .= ' </td>'."\n";
+ $r .= $this->OverviewRowBlock($xx,'over_l');
if ($this->head['ref']) {
- $r .= ' <td class="over_l">';
if ( ! is_object($tt->ref) ) {
- $r .= '<i>'. makelink('history_show.php?id='. $tt->link_id ,$lang['HistoryDeleted']) .'</i>';
+ $xx = '<i>'. makelink('history_show.php?id='. $tt->link_id ,$lang['HistoryDeleted']) .'</i>';
} else {
// Marks
$x = $this->mark_filter(myentities($tt->ref->getFullName()),'reffn');
- $r .= $tt->ref->getLink($x);
+ $xx = $tt->ref->getLink($x);
}
- $r .= ' </td>'."\n";
+ $r .= $this->OverviewRowBlock($xx,'over_l');
}
if ($this->head['worker']) {
- $r .= ' <td class="over_l">';
if ( ! is_object($tt->worker) ) {
- $r .= '<i>'. makelink('history_show.php?id='. $tt->wid ,$lang['HistoryDeleted']) .'</i>';
+ $xx = '<i>'. makelink('history_show.php?id='. $tt->wid ,$lang['HistoryDeleted']) .'</i>';
} else {
- $r .= $tt->worker->getLink();
+ $xx = $tt->worker->getLink();
}
- $r .= "</td>\n";
+ $r .= $this->OverviewRowBlock($xx,'over_l');
}
- $r .= ' <td class="over_r">'. hour_format($tt->volume) ."</td>\n";
+ $r .= $this->OverviewRowBlock(hour_format($tt->volume),'over_r');
- $r .= ' <td class="over_r">';
if ($tt->volume_todo != 0) {
- $r .= hour_format($tt->volume_todo);
+ $xx = hour_format($tt->volume_todo);
} else {
- $r .= " ";
+ $xx = " ";
}
- $r .= "</td>\n";
+ $r .= $this->OverviewRowBlock($xx,'over_r');
if ($this->head['distance']) {
- $r .= ' <td class="over_r">'. ($tt->distance != 0 ? $tt->distance:' ') ."</td>\n";
+ $r .= $this->OverviewRowBlock(($tt->distance != 0 ? $tt->distance:' '),'over_r');
}
$sum['v'] += $tt->volume;
$sum['d'] += $tt->distance;
if (!isset($sum[$tt->currency])) $sum[$tt->currency] = 0;
$sum[$tt->currency] += ( $tt->cph * $tt->volume );
- $r .= " <td class=\"over_l\">\n";
- $r .= $tt->wday->getDate();
+ $xx = $tt->wday->getDate();
if ( $tt->t_start->notime != 1) {
- $r .= '<br />'. $tt->t_start->getDateTimeShort() ." - ". $tt->t_end->getDateTimeShort();
+ $xx .= '<br />'. $tt->t_start->getDateTimeShort() ." - ". $tt->t_end->getDateTimeShort();
} else {
- $r .= " ";
+ $xx .= " ";
}
- $r .= "</td>\n";
+ $r .= $this->OverviewRowBlock($xx,'over_l');
- $r .= ' <td class="over_l">'. $this->mark_filter(myentities($tt->desc),'description') ."</td>\n";
+ $r .= $this->OverviewRowBlock($this->mark_filter(myentities($tt->desc),'description'),'over_r');
if ($this->head['state']) {
- $r .= ' <td class="over_l">'. $tt->getStateColorBlock().$tt->getState() ."</td>\n";
+ $r .= $this->OverviewRowBlock($tt->getStateColorBlock().$tt->getState(),'over_l');
}
$x= array($tt->cph * $tt->volume,$tt->currency);
- $r .= ' <td class="over_r">'. handle('money',$x,my_number_format($tt->cph * $tt->volume,2) .' '. myentities($tt->currency)) ."</td>\n";
+ $xx = handle('money',$x,my_number_format($tt->cph * $tt->volume,2) .' '. myentities($tt->currency));
+ $r .= $this->OverviewRowBlock($xx,'over_r');
$r .= show_custom_overview_data($this,'timetrack',$tt);
$r .= get_module_overview_data($this,$tt);
Modified: trunk/php/webelements.p3
===================================================================
--- trunk/php/webelements.p3 2012-06-19 14:58:16 UTC (rev 641)
+++ trunk/php/webelements.p3 2012-06-21 06:06:55 UTC (rev 642)
@@ -205,12 +205,12 @@
* Language is determined by looking at HTTP_ACCEPT_LANGUAGE in automatic mode
*/
Function ReadLang1(array &$lang,$path,&$user) {
- global $tutos;
+ global $tutos,$dbconn;
# error_log($_SERVER["REQUEST_URI"] ." > ReadLang1:".count($lang)." ". $path ." ". $user->f_name ." ". $user->l_name ." ". $user->lang ."<br />\n",3,$tutos[errlog]);
if (! isset($user) ) {
- $user = new tutos_user($user->dbconn);
+ $user = new tutos_user($dbconn);
}
if ($user->getType() != "user") {
echo "User Object required:".$user->getType() ." ". $user->getFullName() ."<br />\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gok...@us...> - 2012-06-19 14:58:27
|
Revision: 641
http://tutos.svn.sourceforge.net/tutos/?rev=641&view=rev
Author: gokohnert
Date: 2012-06-19 14:58:16 +0000 (Tue, 19 Jun 2012)
Log Message:
-----------
fix
Modified Paths:
--------------
trunk/php/rate/rate.pinc
Modified: trunk/php/rate/rate.pinc
===================================================================
--- trunk/php/rate/rate.pinc 2012-06-19 14:57:38 UTC (rev 640)
+++ trunk/php/rate/rate.pinc 2012-06-19 14:58:16 UTC (rev 641)
@@ -487,7 +487,7 @@
* a obj form is submitted
* parse the values
*/
- function parseform (&$user,&$obj,&$gotourl) {
+ function parseform (tutos_user $user,tutos_base $obj,&$gotourl) {
global $lang;
if ( $obj->gettype() != "timetrack") {
@@ -526,7 +526,7 @@
* a form for obj is displayed
* create a selectionlist of possible rates for the given reference and given user/team
*/
- function addform (&$user,&$obj,$cols) {
+ function addform (tutos_user $user,tutos_base $obj,$cols) {
global $lang;
$r = '';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|