tutos-commits Mailing List for TUTOS
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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
(1) |
2
(1) |
3
(5) |
4
|
5
|
6
(4) |
7
(10) |
8
(9) |
9
(14) |
10
|
11
|
12
|
13
(10) |
14
(1) |
15
(6) |
16
(5) |
17
|
18
|
19
(2) |
20
|
21
(6) |
22
(3) |
23
(5) |
24
(5) |
25
|
26
|
27
(4) |
28
(7) |
29
(1) |
30
(4) |
31
(13) |
|
From: Gero K. <gok...@us...> - 2009-07-31 09:04:57
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/php/bugtracking Modified Files: bug.pinc bug_ins.php Log Message: better mail template handling and documentation Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- bug.pinc 23 Jul 2009 13:03:53 -0000 1.97 +++ bug.pinc 31 Jul 2009 09:04:08 -0000 1.98 @@ -749,6 +749,8 @@ } else { $s = preg_replace("/@SOLVER@/","-",$s); } + $s = preg_replace("/@HISTORY@/",removehtml($this->getBugHistory(false)),$s); + $s = preg_replace("/@HTML_HISTORY@/",$this->getBugHistory(false),$s); return $s; } @@ -951,10 +953,21 @@ $mail->setSubject($this->replace_mail_tags($ml[$i]->lg[$mailsubject],$ml[$i]->lg)); if ( count($this->modified) > 0 ) { + $count1 = 0; + $count2 = 0; + $body = preg_replace('/@ATTACH_HISTORY@/','',$body,-1,$count1); + $body = preg_replace('/@ATTACH_HTML_HISTORY@/','',$body,-1,$count2); + $this->make_mail_body($body,$ml[$i]); $mail->addBody($body,$mformat,$lang['BugsDetail'],"",$ml[$i]->lg['content_encoding']); - $mail->addBody($mail->HtmlStart(). $this->getBugHistory(false) .$mail->HtmlEnd(),"text/html" , $lang['BugHistory'].'.html'); + + if ($count1 > 0) { + $mail->addBody(removehtml($this->getBugHistory(false)),"text/plain" , $lang['BugHistory'].'.txt'); + } + if ($count2 > 0) { + $mail->addBody($mail->HtmlStart(). $this->getBugHistory(false) .$mail->HtmlEnd(),"text/html" , $lang['BugHistory'].'.html'); + } if ( ! isset ($this->newid) ) { $msg .= $mail->send() ."--<br />"; } @@ -1329,19 +1342,30 @@ $m->resetBodies(); $m->resetTo(); $m->addTo($f); - $body = ""; + $body = ''; $mformat = 'text/plain'; if ( ! findMailTemplate($bugmailtxt,$f,$body,'/php/bugtracking/templates',$mformat) ) { $msg .= sprintf($lang['Err0037'],$m->subject,$body) ."<br />\n"; continue; } - $m->setSubject($this->replace_mail_tags($f->lg['EmailStillOpen'],$f->lg)); + $m->setSubject($b->replace_mail_tags($f->lg['EmailStillOpen'],$f->lg)); + + $count1 = 0; + $count2 = 0; + $body = preg_replace('/@ATTACH_HISTORY@/','',$body,-1,$count1); + $body = preg_replace('/@ATTACH_HTML_HISTORY@/','',$body,-1,$count2); $b->make_mail_body($body,$f); $body = eregi_replace("@TIME@",$diff_total,$body); - $m->addBody($body,"text/plain",$lang['BugsDetail'],"",$f->lg['content_encoding']); - $m->addBody($m->HtmlStart(). $b->getBugHistory(false) .$m->HtmlEnd(),"text/html" , $lang['BugHistory'].'.html'); + $m->addBody($body,$mformat,$lang['BugsDetail'],"",$f->lg['content_encoding']); + + if ($count1 > 0) { + $m->addBody(removehtml($b->getBugHistory(false)),"text/plain" , $lang['BugHistory'].'.txt'); + } + if ($count2 > 0) { + $m->addBody($m->HtmlStart(). $b->getBugHistory(false) .$m->HtmlEnd(),"text/html" , $lang['BugHistory'].'.html'); + } $msg .= $m->send(); } } Index: bug_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_ins.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- bug_ins.php 23 Jul 2009 13:03:53 -0000 1.27 +++ bug_ins.php 31 Jul 2009 09:04:08 -0000 1.28 @@ -34,220 +34,222 @@ $gotourl = 'bug_new.php'; $msg = ''; - $b = new bug($dbconn); - if ( isset($_POST['id']) ) { - $gotourl= addUrlParameter($gotourl,"id=". $_POST['id'],true); - $b = $b->read($_POST['id'],$b); - $b->read_bughistory(); - } - $b->newdesc = ""; +$b = new bug($dbconn); +if ( isset($_POST['id']) ) { + $gotourl= addUrlParameter($gotourl,"id=". $_POST['id'],true); + $b = $b->read($_POST['id'],$b); + $b->read_bughistory(); +} +$b->newdesc = ""; - if ( empty($_POST['name']) || !isset($_POST['name']) ) { - $msg .= sprintf($lang['Err0009'],$lang['BugID']) ."<br />"; - $gotourl = addBadField($gotourl,'name',true); - } else { - $name = StripSlashes($_POST['name']); - $gotourl= addUrlParameter($gotourl,"name=". UrlEncode($name),true); - } +if ( empty($_POST['name']) || !isset($_POST['name']) ) { + $msg .= sprintf($lang['Err0009'],$lang['BugID']) ."<br />"; + $gotourl = addBadField($gotourl,'name',true); +} else { + $name = StripSlashes($_POST['name']); + $gotourl= addUrlParameter($gotourl,"name=". UrlEncode($name),true); +} - if ( (empty($_POST['description']) || !isset($_POST['description']) ) && ($b->id < 0 )) { - $msg .= sprintf($lang['Err0009'],$lang['BugLong']) ."<br />"; - $gotourl = addBadField($gotourl,'description',true); - } else { - $description = StripSlashes($_POST['description']); - $gotourl= addUrlParameter($gotourl,"description=". UrlEncode($description),true); - } +if ( (empty($_POST['description']) || !isset($_POST['description']) ) && ($b->id < 0 )) { + $msg .= sprintf($lang['Err0009'],$lang['BugLong']) ."<br />"; + $gotourl = addBadField($gotourl,'description',true); +} else { + $description = StripSlashes($_POST['description']); + $gotourl= addUrlParameter($gotourl,"description=". UrlEncode($description),true); +} - if ( empty($_POST['short1']) || !isset($_POST['short1']) ) { - $msg .= sprintf($lang['Err0009'],$lang['BugShort']) ."<br />"; - $gotourl = addBadField($gotourl,'short1',true); - } else { - $short = StripSlashes($_POST['short1']); - $gotourl= addUrlParameter($gotourl,"short1=". UrlEncode($short),true); - } +if ( empty($_POST['short1']) || !isset($_POST['short1']) ) { + $msg .= sprintf($lang['Err0009'],$lang['BugShort']) ."<br />"; + $gotourl = addBadField($gotourl,'short1',true); +} else { + $short = StripSlashes($_POST['short1']); + $gotourl= addUrlParameter($gotourl,"short1=". UrlEncode($short),true); +} - if ( empty($_POST['medium']) || !isset($_POST['medium']) ) { - $msg .= sprintf($lang['Err0009'],$lang['BugMedium']) ."<br />"; - } else { - $medium = $_POST['medium']; - $gotourl= addUrlParameter($gotourl,"medium=". $medium,true); - } +if ( empty($_POST['medium']) || !isset($_POST['medium']) ) { + $msg .= sprintf($lang['Err0009'],$lang['BugMedium']) ."<br />"; +} else { + $medium = $_POST['medium']; + $gotourl= addUrlParameter($gotourl,"medium=". $medium,true); +} if ( isset($_POST['pid']) && is_numeric($_POST['pid']) ) { - $gotourl= addUrlParameter($gotourl,"pid=". $_POST['pid'],true); - $oldparent = $b->parent; - $newparent = getObject($dbconn,$_POST['pid']); - $b->setParent($newparent); - $b->parent->readroles(); - } else { - $msg .= sprintf($lang['Err0009'],$lang['BugReference']) ."<br />"; - $gotourl = addBadField($gotourl,'pid',true); - } + $gotourl= addUrlParameter($gotourl,"pid=". $_POST['pid'],true); + $oldparent = $b->parent; + $newparent = getObject($dbconn,$_POST['pid']); + $b->setParent($newparent); + if($b->parent->getType() == 'product') { + $b->parent->readroles(); + } +} else { + $msg .= sprintf($lang['Err0009'],$lang['BugReference']) ."<br />"; + $gotourl = addBadField($gotourl,'pid',true); +} - if ( isset($_POST['tid']) ) { - $gotourl= addUrlParameter($gotourl,"tid=". $_POST['tid'],true); - $oldtarget = $b->target; - $newtarget = getObject($dbconn,$_POST['tid']); - $b->setTarget($newtarget); - } +if ( isset($_POST['tid']) ) { + $gotourl= addUrlParameter($gotourl,"tid=". $_POST['tid'],true); + $oldtarget = $b->target; + $newtarget = getObject($dbconn,$_POST['tid']); + $b->setTarget($newtarget); +} - if ( empty($_POST['state']) || !isset($_POST['state']) ) { - $msg .= sprintf($lang['Err0009'],$lang['BugState']) ."<br />"; - $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 />"; - $gotourl = addBadField($gotourl,'class',true); - } else { - $class = $_POST['class']; - $gotourl= addUrlParameter($gotourl,"class=". $class,true); - } +if ( empty($_POST['state']) || !isset($_POST['state']) ) { + $msg .= sprintf($lang['Err0009'],$lang['BugState']) ."<br />"; + $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 />"; + $gotourl = addBadField($gotourl,'class',true); +} else { + $class = $_POST['class']; + $gotourl= addUrlParameter($gotourl,"class=". $class,true); +} - if ( empty($_POST['reporterfn']) || !isset($_POST['reporterfn']) ) { - if ( isset($_POST['reporterid']) ) { - $reporter = getObject($dbconn,$_POST['reporterid']); - } else { - #$msg .= sprintf($lang['Err0009'],$lang['BugReportedFrom']) ."<br />"; - $reporter = $current_user; - } - } else { - if ($b->reporter->getFullName() == $_POST['reporterfn']) { - $reporter = $b->reporter; - } else { - $reporter = check_field($_POST['reporterfn'],"reporterfn","reporterl"); - } - } +if ( empty($_POST['reporterfn']) || !isset($_POST['reporterfn']) ) { + if ( isset($_POST['reporterid']) ) { + $reporter = getObject($dbconn,$_POST['reporterid']); + } else { +#$msg .= sprintf($lang['Err0009'],$lang['BugReportedFrom']) ."<br />"; + $reporter = $current_user; + } +} else { + if ($b->reporter->getFullName() == $_POST['reporterfn']) { + $reporter = $b->reporter; + } else { + $reporter = check_field($_POST['reporterfn'],"reporterfn","reporterl"); + } +} - if ( isset($_POST['sid']) && ($_POST['sid'] == "auto") ) { - # Auto set solver to project manager - $b->setSolver($_POST['sid']); - $solver = $b->solver; - } else - if ( empty($_POST['sfn']) || !isset($_POST['sfn']) ) { - if ( isset($_POST['sid']) ) { - $solver = getObject($dbconn,$_POST['sid']); - } else { - $msg .= sprintf($lang['Err0009'],$lang['BugAssignedTo']) ."<br />"; - $gotourl = addBadField($gotourl,'sfn',true); - } - } else { - if ($b->solver->getFullName() == $_POST['sfn']) { - # Keep an existing solver even if we cannot see/use it - $solver = $b->solver; - } else { - $solver = check_field($_POST['sfn'],"sfn","sl"); - } - } +if ( isset($_POST['sid']) && ($_POST['sid'] == "auto") ) { +# Auto set solver to project manager + $b->setSolver($_POST['sid']); + $solver = $b->solver; +} else +if ( empty($_POST['sfn']) || !isset($_POST['sfn']) ) { + if ( isset($_POST['sid']) ) { + $solver = getObject($dbconn,$_POST['sid']); + } else { + $msg .= sprintf($lang['Err0009'],$lang['BugAssignedTo']) ."<br />"; + $gotourl = addBadField($gotourl,'sfn',true); + } +} else { + if ($b->solver->getFullName() == $_POST['sfn']) { +# Keep an existing solver even if we cannot see/use it + $solver = $b->solver; + } else { + $solver = check_field($_POST['sfn'],"sfn","sl"); + } +} - $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 />"; - } +$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 />"; +} - # - # Parse additional custom fields - # - $msg .= parse_custom_fields($b->gettype(),$b); - # other modules - $msg .= module_parseforms($current_user,$b,$gotourl); +# +# Parse additional custom fields +# +$msg .= parse_custom_fields($b->gettype(),$b); +# other modules +$msg .= module_parseforms($current_user,$b,$gotourl); - if ( $msg != "" ) { - $gotourl = addMessage($gotourl,$msg,true); - $gotourl = addSessionKey($gotourl,true); - Header("Status: 302 Moved Temporarily"); - Header("Location:". getBaseUrl() . $gotourl); - return; - } +if ( $msg != "" ) { + $gotourl = addMessage($gotourl,$msg,true); + $gotourl = addSessionKey($gotourl,true); + Header("Status: 302 Moved Temporarily"); + Header("Location:". getBaseUrl() . $gotourl); + return; +} - # - # Old Bug - # - if ( $b->id > 0 ) { - $newlines = ""; - if ( !empty($description) ) { - $newlines = myentities(wordwrap($description,60)); - } - # - # Solver Change - # - if ( $b->solver->id != $solver->id ) { - if ( ($solver->id > 0) && ($b->solver->id > 0 ) ) { - $newlines = sprintf("<b>". $lang['BugAssignedTo'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$b->solver->getFullName(),$solver->getFullName() , $newlines); - } else { - $newlines = sprintf("<b>Solver changed</b>\n%s",$newlines); - } - $b->setSolver($solver); - } - # - # Reporter Change - # - 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); - } else { - $newlines = sprintf("<b>Reporter changed</b>\n%s",$newlines); - } - $b->setReporter($reporter); - } - # - # 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); - } - # - # Target Change - # - if (is_object($oldtarget) && ($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); - } - # - # 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); - } - # - # 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); - } - # - # 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); - } - # - # 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); - } - # - # 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); - } +# +# Old Bug +# +if ( $b->id > 0 ) { + $newlines = ""; + if ( !empty($description) ) { + $newlines = myentities(wordwrap($description,60)); + } +# +# Solver Change +# + if ( $b->solver->id != $solver->id ) { + if ( ($solver->id > 0) && ($b->solver->id > 0 ) ) { + $newlines = sprintf("<b>". $lang['BugAssignedTo'] .": <i>%s</i> → <i>%s</i></b>\n%s" ,$b->solver->getFullName(),$solver->getFullName() , $newlines); + } else { + $newlines = sprintf("<b>Solver changed</b>\n%s",$newlines); + } + $b->setSolver($solver); + } +# +# Reporter Change +# + 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); + } else { + $newlines = sprintf("<b>Reporter changed</b>\n%s",$newlines); + } + $b->setReporter($reporter); + } +# +# 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); + } +# +# Target Change +# + if (is_object($oldtarget) && ($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); + } +# +# 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); + } +# +# 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); + } +# +# 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); + } +# +# 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); + } +# +# 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); + } - $b->newdesc = $newlines; - } else { - # - # New Bug - # - $b->bughist[0] = new bugdata($dbconn); - $b->bughist[0]->description = myentities(wordwrap($description,60)); + $b->newdesc = $newlines; +} else { +# +# New Bug +# + $b->bughist[0] = new bugdata($dbconn); + $b->bughist[0]->description = myentities(wordwrap($description,60)); - if ( $b->parent->getType() == "product" ) { - $b->setSolver($solver); - /***** + if ( $b->parent->getType() == "product" ) { + $b->setSolver($solver); + /***** $b->parent->readroles(); if ( count($b->parent->role[PROD_ROLE_MANAGER]) > 0 ) { $solver = current($b->parent->role[PROD_ROLE_MANAGER]); @@ -258,44 +260,44 @@ } else { $b->setSolver($current_user); } - ****/ - } else if ( $b->parent->getType() == "installation" ) { - $b->parent->product->readroles(); - if ( count($b->parent->product->role[PROD_ROLE_MANAGER]) > 0 ) { - $solver = current($b->parent->product->role[PROD_ROLE_MANAGER]); - $b->setSolver($solver); - } else if ( count($b->parent->product->role[PROD_ROLE_MANAGER2]) > 0 ) { - $solver = current($b->parent->product->role[PROD_ROLE_MANAGER2]); - $b->setSolver($solver); - } else { - $b->setSolver($current_user); - } - } else if ( $b->parent->getType() == "task" ) { - $b->setSolver($solver); - } else { - $b->setSolver($current_user); - } - $b->setReporter($reporter); - } - $b->setName($name); - $b->setShort($short); - $b->setMedium($medium); - $b->setState($state); - $b->setClass($class); - $b->setPlanDate($plandate); - $dbconn->Begin("WORK"); - $msg .= $b->save(); - $dbconn->Commit("WORK"); + ****/ + } else if ( $b->parent->getType() == "installation" ) { + $b->parent->product->readroles(); + if ( count($b->parent->product->role[PROD_ROLE_MANAGER]) > 0 ) { + $solver = current($b->parent->product->role[PROD_ROLE_MANAGER]); + $b->setSolver($solver); + } else if ( count($b->parent->product->role[PROD_ROLE_MANAGER2]) > 0 ) { + $solver = current($b->parent->product->role[PROD_ROLE_MANAGER2]); + $b->setSolver($solver); + } else { + $b->setSolver($current_user); + } + } else if ( $b->parent->getType() == "task" ) { + $b->setSolver($solver); + } else { + $b->setSolver($current_user); + } + $b->setReporter($reporter); +} +$b->setName($name); +$b->setShort($short); +$b->setMedium($medium); +$b->setState($state); +$b->setClass($class); +$b->setPlanDate($plandate); +$dbconn->Begin("WORK"); +$msg .= $b->save(); +$dbconn->Commit("WORK"); - $gotourl = $b->getUrl(); - $gotourl = addMessage($gotourl,$msg,true); - $gotourl = addSessionKey($gotourl,true); +$gotourl = $b->getUrl(); +$gotourl = addMessage($gotourl,$msg,true); +$gotourl = addSessionKey($gotourl,true); - Header("Status: 302 Moved Temporarily"); - Header("Location:". dirname(getBaseUrl()) ."/". $gotourl); - $dbconn->Close(); - /* - * CVS Info: $Id$ - * $Author$ - */ +Header("Status: 302 Moved Temporarily"); +Header("Location:". dirname(getBaseUrl()) ."/". $gotourl); +$dbconn->Close(); +/* + * CVS Info: $Id$ + * $Author$ + */ ?> \ No newline at end of file |
Update of /cvsroot/tutos/tutos/php/localization In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/php/localization Modified Files: ca.p3 cs.p3 de.p3 el.p3 en.p3 es-mx.p3 es-ni.p3 es-ve.p3 es.p3 fr.p3 hu.p3 it.p3 ja.p3 ko.p3 nl.p3 pl.p3 pt-br.p3 pt.p3 ru.p3 sv.p3 tw.p3 vi.p3 zh.p3 Log Message: better mail template handling and documentation Index: tw.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/tw.p3,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- tw.p3 30 Mar 2009 15:48:06 -0000 1.63 +++ tw.p3 31 Jul 2009 09:04:09 -0000 1.64 @@ -466,8 +466,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -690,7 +690,7 @@ $lang['SMSSendTo'] = "ç¼é SMS 給 %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "è«æ³¨æ: %s ææè°"; +$lang['EmailRememberApp'] = "è«æ³¨æ: @APPTIME@ ææè°"; $lang['EmailFax'] = "å³ç"; # Admin Pages Index: pl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/pl.p3,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- pl.p3 13 Jul 2009 12:53:13 -0000 1.72 +++ pl.p3 31 Jul 2009 09:04:09 -0000 1.73 @@ -471,8 +471,8 @@ $lang['SearchForTask'] = "Przeszukiwanie zadaÅ"; $lang['SearchForTaskExt'] = "Rozszerzone przeszukiwanie zadaÅ"; $lang['TaskBetween'] = "Czas pomiÄdzy"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -708,7 +708,7 @@ $lang['SMSSendTo'] = "WyÅlij SMSa do %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "PamiÄtaj: spotkanie o %s"; +$lang['EmailRememberApp'] = "PamiÄtaj: spotkanie o @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: pt-br.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/pt-br.p3,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- pt-br.p3 13 Jul 2009 12:53:13 -0000 1.61 +++ pt-br.p3 31 Jul 2009 09:04:09 -0000 1.62 @@ -464,8 +464,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -701,7 +701,7 @@ $lang['SMSSendTo'] = "Enviar um SMS para %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Remember: Appointment at %s"; +$lang['EmailRememberApp'] = "Remember: Appointment at @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/en.p3,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- en.p3 13 Jul 2009 11:27:39 -0000 1.77 +++ en.p3 31 Jul 2009 09:04:08 -0000 1.78 @@ -469,8 +469,8 @@ $lang['SearchForTask'] = 'Task Search'; $lang['SearchForTaskExt'] = 'Extended Task Search'; $lang['TaskBetween'] = 'Time between'; -$lang['EmailNewTask'] = 'New task: %s (%s)'; -$lang['EmailChangesTask'] = 'Changes in task: %s (%s)'; +$lang['EmailNewTask'] = 'New task: @NAME@ (@STATE@)'; +$lang['EmailChangesTask'] = 'Changes in task: @NAME@ (@STATE@)'; $lang['TaskNumber'] = 'Number'; $lang['TaskAutoName'] = 'Automatically created'; $lang['TaskViewNormal'] = 'Default Overview'; @@ -706,7 +706,7 @@ $lang['SMSSendTo'] = 'Send a SMS to %s'; #Email Subject Lines -$lang['EmailRememberApp'] = 'Remember: Appointment at %s'; +$lang['EmailRememberApp'] = 'Remember: Appointment at @APPTIME@'; $lang['EmailFax'] = 'FAX'; # Admin Pages Index: pt.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/pt.p3,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- pt.p3 13 Jul 2009 12:53:13 -0000 1.35 +++ pt.p3 31 Jul 2009 09:04:09 -0000 1.36 @@ -470,8 +470,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -707,7 +707,7 @@ $lang['SMSSendTo'] = "Enviar um SMS para %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Lembrete: Compromisso em %s"; +$lang['EmailRememberApp'] = "Lembrete: Compromisso em @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: fr.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/fr.p3,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- fr.p3 13 Jul 2009 12:53:13 -0000 1.68 +++ fr.p3 31 Jul 2009 09:04:08 -0000 1.69 @@ -466,8 +466,8 @@ $lang['SearchForTask'] = 'Task Search'; $lang['SearchForTaskExt'] = 'Extended Task Search'; $lang['TaskBetween'] = 'Time between'; -$lang['EmailNewTask'] = 'New task: %s (%s)'; -$lang['EmailChangesTask'] = 'Changes in task: %s (%s)'; +$lang['EmailNewTask'] = 'New task: @NAME@ (@STATE@)'; +$lang['EmailChangesTask'] = 'Changes in task: @NAME@ (@STATE@)'; $lang['TaskNumber'] = 'Number'; $lang['TaskAutoName'] = 'Automatically created'; $lang['TaskViewNormal'] = 'Default Overview'; @@ -703,7 +703,7 @@ $lang['SMSSendTo'] = 'Envoyer un SMS à %s'; #Email Subject Lines -$lang['EmailRememberApp'] = 'Rappel: rendez-vous à %s'; +$lang['EmailRememberApp'] = 'Rappel: rendez-vous à @APPTIME@'; $lang['EmailFax'] = 'FAX'; # Admin Pages Index: ru.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/ru.p3,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- ru.p3 26 Feb 2009 09:48:08 -0000 1.64 +++ ru.p3 31 Jul 2009 09:04:09 -0000 1.65 @@ -465,8 +465,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -689,7 +689,7 @@ $lang['SMSSendTo'] = "ÐÑпÑавиÑÑ SMS Ð´Ð»Ñ %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Ðопоминание: ÐÑÑÑеÑа в %s"; +$lang['EmailRememberApp'] = "Ðопоминание: ÐÑÑÑеÑа в @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: nl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/nl.p3,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- nl.p3 13 Jul 2009 12:53:13 -0000 1.71 +++ nl.p3 31 Jul 2009 09:04:09 -0000 1.72 @@ -478,8 +478,8 @@ $lang['SearchForTask'] = "Taak Zoeken"; $lang['SearchForTaskExt'] = "Uitgebreid Taak Zoeken"; $lang['TaskBetween'] = "Tijd tussen"; -$lang['EmailNewTask'] = "Nieuwe taak: %s (%s)"; -$lang['EmailChangesTask'] = "Wijzigingen in taak: %s (%s)"; +$lang['EmailNewTask'] = "Nieuwe taak: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Wijzigingen in taak: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Nummer"; $lang['TaskAutoName'] = "Automatisch aangemaakt"; $lang['TaskViewNormal'] = "Standaard Overzicht"; @@ -715,7 +715,7 @@ $lang['SMSSendTo'] = "Stuur een SMS naar %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Herinnering: Afspraak bij %s"; +$lang['EmailRememberApp'] = "Herinnering: Afspraak bij @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: it.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/it.p3,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- it.p3 13 Jul 2009 12:53:13 -0000 1.67 +++ it.p3 31 Jul 2009 09:04:09 -0000 1.68 @@ -464,8 +464,8 @@ $lang['SearchForTask'] = "Ricerca task"; $lang['SearchForTaskExt'] = "Ricerca estesa task"; $lang['TaskBetween'] = "Tempo fra"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -701,7 +701,7 @@ $lang['SMSSendTo'] = "Invia un SMS a %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Ricorda: Appuntamento %s"; +$lang['EmailRememberApp'] = "Ricorda: Appuntamento @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: ko.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/ko.p3,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- ko.p3 26 Feb 2009 09:48:08 -0000 1.60 +++ ko.p3 31 Jul 2009 09:04:09 -0000 1.61 @@ -465,8 +465,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -689,7 +689,7 @@ $lang['SMSSendTo'] = "Send a SMS to %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Remember: Appointment at %s"; +$lang['EmailRememberApp'] = "Remember: Appointment at @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: es-ve.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/es-ve.p3,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- es-ve.p3 13 Jul 2009 12:53:13 -0000 1.36 +++ es-ve.p3 31 Jul 2009 09:04:08 -0000 1.37 @@ -466,8 +466,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -703,7 +703,7 @@ $lang['SMSSendTo'] = "Enviar un SMS a %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Recuerde: Cita acordada %s"; +$lang['EmailRememberApp'] = "Recuerde: Cita acordada @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: es-mx.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/es-mx.p3,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- es-mx.p3 13 Jul 2009 12:53:13 -0000 1.60 +++ es-mx.p3 31 Jul 2009 09:04:08 -0000 1.61 @@ -466,8 +466,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -703,7 +703,7 @@ $lang['SMSSendTo'] = "Enviar un SMS a %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Recuerde: Cita acordada %s"; +$lang['EmailRememberApp'] = "Recuerde: Cita acordada @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: ca.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/ca.p3,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- ca.p3 13 Jul 2009 12:53:13 -0000 1.61 +++ ca.p3 31 Jul 2009 09:04:08 -0000 1.62 @@ -465,8 +465,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -702,7 +702,7 @@ $lang['SMSSendTo'] = "Enviar missatge curt a %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Recuerda: Cita concertada %s"; +$lang['EmailRememberApp'] = "Recuerda: Cita concertada @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: cs.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/cs.p3,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- cs.p3 13 Jul 2009 12:53:13 -0000 1.61 +++ cs.p3 31 Jul 2009 09:04:08 -0000 1.62 @@ -468,8 +468,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -705,7 +705,7 @@ $lang['SMSSendTo'] = "Poslat SMS zprávu pro %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "PÅipomÃnka : schůzka %s"; +$lang['EmailRememberApp'] = "PÅipomÃnka : schůzka @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: ja.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/ja.p3,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- ja.p3 26 Feb 2009 09:48:08 -0000 1.61 +++ ja.p3 31 Jul 2009 09:04:09 -0000 1.62 @@ -461,8 +461,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -685,7 +685,7 @@ $lang['SMSSendTo'] = "%s ã«SMSãéã"; #Email Subject Lines -$lang['EmailRememberApp'] = "注æ: %s ã®äºç´"; +$lang['EmailRememberApp'] = "注æ: @APPTIME@ ã®äºç´"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: es-ni.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/es-ni.p3,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- es-ni.p3 13 Jul 2009 12:53:13 -0000 1.60 +++ es-ni.p3 31 Jul 2009 09:04:08 -0000 1.61 @@ -467,8 +467,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -704,7 +704,7 @@ $lang['SMSSendTo'] = "Enviar SMS a %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Recuerde: Cita acordada %s"; +$lang['EmailRememberApp'] = "Recuerde: Cita acordada @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: vi.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/vi.p3,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- vi.p3 26 Feb 2009 09:48:10 -0000 1.36 +++ vi.p3 31 Jul 2009 09:04:09 -0000 1.37 @@ -469,8 +469,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -693,7 +693,7 @@ $lang['SMSSendTo'] = "Gá»i 1 SMS Äến %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Nhắc nhỼ: có cuá»c hừp lúc %s"; +$lang['EmailRememberApp'] = "Nhắc nhỼ: có cuá»c hừp lúc @APPTIME@"; $lang['EmailFax'] = "FAX"; Index: es.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/es.p3,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- es.p3 13 Jul 2009 12:53:13 -0000 1.65 +++ es.p3 31 Jul 2009 09:04:08 -0000 1.66 @@ -466,8 +466,8 @@ $lang['SearchForTask'] = "Búsqueda de tareas"; $lang['SearchForTaskExt'] = "Búsqueda avanzada de tareas"; $lang['TaskBetween'] = "Tiempo entre"; -$lang['EmailNewTask'] = "Nueva tarea: %s (%s)"; -$lang['EmailChangesTask'] = "Cambios en tarea: %s (%s)"; +$lang['EmailNewTask'] = "Nueva tarea: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Cambios en tarea: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Número"; $lang['TaskAutoName'] = "Creada automáticamente"; $lang['TaskViewNormal'] = "Vista por defecto"; @@ -703,7 +703,7 @@ $lang['SMSSendTo'] = "Enviar mensaje corto a %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Recuerde: Cita acordada %s"; +$lang['EmailRememberApp'] = "Recuerde: Cita acordada @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: hu.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/hu.p3,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- hu.p3 13 Jul 2009 12:53:13 -0000 1.71 +++ hu.p3 31 Jul 2009 09:04:09 -0000 1.72 @@ -470,8 +470,8 @@ $lang['SearchForTask'] = "Feladat keresése"; $lang['SearchForTaskExt'] = "Feladat bÅvÃtett keresése"; $lang['TaskBetween'] = "IdÅben közte"; -$lang['EmailNewTask'] = "Ãj feladat: %s (%s)"; -$lang['EmailChangesTask'] = "Változott feladat: %s (%s)"; +$lang['EmailNewTask'] = "Ãj feladat: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Változott feladat: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Szám"; $lang['TaskAutoName'] = "Automatikusan létrehozott"; $lang['TaskViewNormal'] = "Alapértelmezett áttekintés"; @@ -707,7 +707,7 @@ $lang['SMSSendTo'] = "SMS küldés %s-nak"; #Email Subject Lines -$lang['EmailRememberApp'] = "EmlékeztetÅ: idÅpont %s-kor"; +$lang['EmailRememberApp'] = "EmlékeztetÅ: idÅpont @APPTIME@-kor"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: el.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/el.p3,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- el.p3 26 Feb 2009 09:48:03 -0000 1.62 +++ el.p3 31 Jul 2009 09:04:08 -0000 1.63 @@ -467,8 +467,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -691,7 +691,7 @@ $lang['SMSSendTo'] = "ÎÏοÏÏολή SMS Ïε %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Remember: Appointment at %s"; +$lang['EmailRememberApp'] = "Remember: Appointment at @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: zh.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/zh.p3,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- zh.p3 30 Mar 2009 15:48:06 -0000 1.63 +++ zh.p3 31 Jul 2009 09:04:09 -0000 1.64 @@ -467,8 +467,8 @@ $lang['SearchForTask'] = "Task Search"; $lang['SearchForTaskExt'] = "Extended Task Search"; $lang['TaskBetween'] = "Time between"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -691,7 +691,7 @@ $lang['SMSSendTo'] = "Send a SMS to %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Remember: Appointment at %s"; +$lang['EmailRememberApp'] = "Remember: Appointment at @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages Index: de.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/de.p3,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- de.p3 13 Jul 2009 11:27:39 -0000 1.83 +++ de.p3 31 Jul 2009 09:04:08 -0000 1.84 @@ -469,8 +469,8 @@ $lang['SearchForTask'] = 'Suche nach Aufgaben'; $lang['SearchForTaskExt'] = 'Erweiterte Suche nach Aufgaben'; $lang['TaskBetween'] = 'Zeitraum zwischen'; -$lang['EmailNewTask'] = 'Neue Aufgabe: %s (%s)'; -$lang['EmailChangesTask'] = 'Ãnderungen an der Aufgabe: %s (%s)'; +$lang['EmailNewTask'] = 'Neue Aufgabe: @NAME@ (@STATE@)'; +$lang['EmailChangesTask'] = 'Ãnderungen an der Aufgabe: @NAME@ (@STATE@)'; $lang['TaskNumber'] = 'Aufgaben-Nr.'; $lang['TaskAutoName'] = 'Wird automatisch vergeben'; $lang['TaskViewNormal'] = 'Standardübersicht'; @@ -706,7 +706,7 @@ $lang['SMSSendTo'] = 'Eine SMS an %s senden'; #Email Subject Lines -$lang['EmailRememberApp'] = 'Erinnerung: Termin am %s'; +$lang['EmailRememberApp'] = 'Erinnerung: Termin am @APPTIME@'; $lang['EmailFax'] = 'FAX'; # Admin Pages Index: sv.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/sv.p3,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- sv.p3 13 Jul 2009 12:53:13 -0000 1.66 +++ sv.p3 31 Jul 2009 09:04:09 -0000 1.67 @@ -461,8 +461,8 @@ $lang['SearchForTask'] = "Sök uppgift"; $lang['SearchForTaskExt'] = "Utäkad sökning"; $lang['TaskBetween'] = "Tid mellan"; -$lang['EmailNewTask'] = "New task: %s (%s)"; -$lang['EmailChangesTask'] = "Changes in task: %s (%s)"; +$lang['EmailNewTask'] = "New task: @NAME@ (@STATE@)"; +$lang['EmailChangesTask'] = "Changes in task: @NAME@ (@STATE@)"; $lang['TaskNumber'] = "Number"; $lang['TaskAutoName'] = "Automatically created"; $lang['TaskViewNormal'] = "Default Overview"; @@ -698,7 +698,7 @@ $lang['SMSSendTo'] = "Skicka ett SMS till %s"; #Email Subject Lines -$lang['EmailRememberApp'] = "Kom ihÃ¥g: Mötet %s"; +$lang['EmailRememberApp'] = "Kom ihÃ¥g: Mötet @APPTIME@"; $lang['EmailFax'] = "FAX"; # Admin Pages |
From: Gero K. <gok...@us...> - 2009-07-31 09:04:26
|
Update of /cvsroot/tutos/tutos/homepage In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/homepage Modified Files: index.html Log Message: better mail template handling and documentation Index: index.html =================================================================== RCS file: /cvsroot/tutos/tutos/homepage/index.html,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- index.html 20 Aug 2008 12:29:14 -0000 1.14 +++ index.html 31 Jul 2009 09:04:07 -0000 1.15 @@ -11,6 +11,6 @@ <p /> <p /> <img border="0" src="../html/tutos.gif" alt="TUTOS" /> -<br /><b><font size="3">LATEST RELEASE IS 1.4.20080820</font></b> +<br /><b><font size="3">LATEST RELEASE IS 1.5.20090629</font></b> </center> <!--#include file="foot1.html.inc" --> |
From: Gero K. <gok...@us...> - 2009-07-31 09:04:25
|
Update of /cvsroot/tutos/tutos/php/note In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/php/note Modified Files: ca.p3 cs.p3 de.p3 el.p3 en.p3 es-mx.p3 es-ni.p3 es-ve.p3 es.p3 fr.p3 hu.p3 it.p3 ja.p3 ko.p3 nl.p3 note.pinc pl.p3 pt-br.p3 pt.p3 ru.p3 sv.p3 tw.p3 vi.p3 zh.p3 Log Message: better mail template handling and documentation Index: tw.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/tw.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- tw.p3 24 Jan 2008 15:24:00 -0000 1.7 +++ tw.p3 31 Jul 2009 09:04:09 -0000 1.8 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "åèå稱"; $lang['NoteBetween'] = "å»ºç«æ¼"; $lang['NotesOverview'] = "åå¿éä¸è¦½"; -$lang['EmailRememberNote'] = "æéæ¨: TUTOS åå¿é: %s"; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- æéæ¨ åå¿é @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); @@ -47,4 +47,4 @@ $lang['perm'][usenotes] = "use notes"; $lang['note'] = &$lang['Note']; -?> \ No newline at end of file +?> Index: pl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/pl.p3,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- pl.p3 24 Jan 2008 09:31:30 -0000 1.10 +++ pl.p3 31 Jul 2009 09:04:09 -0000 1.11 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Nazwa odniesienia"; $lang['NoteBetween'] = "Utworzone pomiÄdzy"; $lang['NotesOverview'] = "PrzeglÄ d notatek"; -$lang['EmailRememberNote'] = "PamiÄtaj: Notatka: %s w TUTOSIE "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- PamiÄtaj Notatka @NAME@"; $lang['NoteEventType'] = "Typ zdarzenia"; $lang['NoteEventTypes'] = array(); Index: pt-br.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/pt-br.p3,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- pt-br.p3 24 Jan 2008 10:28:33 -0000 1.8 +++ pt-br.p3 31 Jul 2009 09:04:09 -0000 1.9 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Nome de referência"; $lang['NoteBetween'] = "criado entre"; $lang['NotesOverview'] = "Sumário da Nota"; -$lang['EmailRememberNote'] = "Lembrar: Nota: %s no TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Lembrar Nota: @NAME@"; $lang['NoteEventType'] = "Tipo de Evento"; $lang['NoteEventTypes'] = array(); @@ -50,4 +50,4 @@ ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/en.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- en.p3 1 Jun 2004 08:42:10 -0000 1.7 +++ en.p3 31 Jul 2009 09:04:09 -0000 1.8 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Reference name"; $lang['NoteBetween'] = "created between"; $lang['NotesOverview'] = "Note Overview"; -$lang['EmailRememberNote'] = "Remember: Note: %s in TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Remember Note: @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); Index: pt.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/pt.p3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- pt.p3 24 Jan 2008 10:28:33 -0000 1.5 +++ pt.p3 31 Jul 2009 09:04:09 -0000 1.6 @@ -35,7 +35,7 @@ $lang['NoteRefName'] = "Nome da Referência"; $lang['NoteBetween'] = "criada entre"; $lang['NotesOverview'] = "Visão Geral de Notas"; -$lang['EmailRememberNote'] = "Lembrar: Nota: %s em TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Lembrar Nota @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); @@ -52,4 +52,4 @@ ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: note.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/note.pinc,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- note.pinc 27 Jun 2009 17:51:12 -0000 1.78 +++ note.pinc 31 Jul 2009 09:04:09 -0000 1.79 @@ -202,32 +202,46 @@ return $info; } /** + * make a mail subject line or body (replacing some tags) + * s = input string + * lg = language array to use (for multilang mails) + * return modified subject line + */ + function replace_mail_tags($s,$lg) { + + + $s = preg_replace("/@REF@/",$this->ref->getFullName(),$s); + $s = preg_replace("/@REFTYPE@/",$lg[$this->ref->getType()],$s); + $s = preg_replace("/@NOTE@/",$this->note,$s); + $s = preg_replace("/@REMEMBER@/",$this->remember->getDateTime(),$s); + + $s = parent::replace_mail_tags($s,$lg); + + return $s; + } + /** * Replaces the strings in the mail body */ - function make_mail_body(&$body) { + function make_mail_body(&$body,&$to) { global $lang,$current_user; $url = getBaseURL(true) . $this->getUrl(); - $body = eregi_replace("@NAME@",$this->name,$body); - $body = eregi_replace("@NOTE@",$this->note,$body); - $body = eregi_replace("@CREATOR@",$this->creator->getFullName(),$body); - $body = eregi_replace("@CREATED@",$this->creation->getDateTime(),$body); - $body = eregi_replace("@REMEMBER@",$this->remember->getDateTime(),$body); + $body = $this->replace_mail_tags($body,$to->lg); + $body = eregi_replace("@URL@",$url,$body); - $body = eregi_replace("@REFERENZ@",$this->ref->getFullName(),$body); } /** * Return a link to this note */ function getURL() { - return "note/note_show.php?id=".$this->id; + return 'note/note_show.php?id='.$this->id; } /** * Return a link to modify this note */ function getModURL() { - return "note/note_new.php?id=".$this->id; + return 'note/note_new.php?id='.$this->id; } /** * the url where we go after deleting this object @@ -611,7 +625,7 @@ $msg = ""; $d = new TUTOS_Date_Time(); - $notemailtxt = "note_remember.proto"; + $notemailtxt = 'note_remember.proto'; $q = "SELECT * FROM ". $user->dbconn->prefix ."notes WHERE remember < ". $user->dbconn->DateTime($d) ." "; $r = $user->dbconn->Exec($q); $n = $r->numrows(); @@ -625,17 +639,21 @@ $m->addTo($x->creator); $body = ''; $mformat = 'text/plain'; + $m->setSubject($this->replace_mail_tags($lang['EmailRememberNote'],$lang)); if ( ! findMailTemplate($notemailtxt,$x->creator,$body,'/php/note/templates',$mformat) ) { $msg .= sprintf($lang['Err0037'],$m->subject,$body) ."<br />\n"; continue; } - $m->setSubject(sprintf($x->creator->lg['EmailRememberNote'],$x->name)); + $m->setSubject($this->replace_mail_tags($x->creator->lg['EmailRememberNote'],$x->creator->lg)); - $x->make_mail_body($body); + $x->make_mail_body($body,$x->creator); + $count1 = 0; + $body = preg_replace('/@ATTACH_NOTE@/','',$body,-1,$count1); $m->addBody($body,$mformat,$lang['Note'],"",$x->creator->lg['content_encoding']); - $m->addBody($x->note,"text/plain",$lang['NoteDescription'],"",$x->creator->lg['content_encoding']); - + if ($count1 > 0) { + $m->addBody($x->note,"text/plain",$lang['NoteDescription'],"",$x->creator->lg['content_encoding']); + } $msg .= $m->send(); $x->remember = new TUTOS_Date_Time(0); $x->save(); Index: fr.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/fr.p3,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- fr.p3 5 Apr 2007 16:14:58 -0000 1.9 +++ fr.p3 31 Jul 2009 09:04:09 -0000 1.10 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Nom de référence"; $lang['NoteBetween'] = "Créé entre"; $lang['NotesOverview'] = "Résumé des notes"; -$lang['EmailRememberNote'] = "Rappel: Note: %s dans TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Rappel Note: @NAME@"; $lang['NoteEventType'] = "Type d'évènement"; $lang['NoteEventTypes'] = array(); @@ -52,4 +52,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: ru.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/ru.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ru.p3 24 Jan 2008 08:46:00 -0000 1.7 +++ ru.p3 31 Jul 2009 09:04:09 -0000 1.8 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Ðазвание ÑÑÑлки"; $lang['NoteBetween'] = "СоздаÑÑ Ð¼ÐµÐ¶Ð´Ñ"; $lang['NotesOverview'] = "ÐÐ±Ð·Ð¾Ñ Ð·Ð°Ð¼ÐµÑок"; -$lang['EmailRememberNote'] = "Remember: Note: %s in TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Remember ÐамеÑка @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); Index: nl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/nl.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- nl.p3 5 Apr 2007 16:14:58 -0000 1.7 +++ nl.p3 31 Jul 2009 09:04:09 -0000 1.8 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Referentienaam"; $lang['NoteBetween'] = "aangemaakt tussen"; $lang['NotesOverview'] = "Notitie Overzicht"; -$lang['EmailRememberNote'] = "Herinnering: Notitie: %s in TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Herinnering Notitie @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); @@ -52,4 +52,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: it.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/it.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- it.p3 5 Apr 2007 16:14:58 -0000 1.7 +++ it.p3 31 Jul 2009 09:04:09 -0000 1.8 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Nome referenza"; $lang['NoteBetween'] = "creata tra il"; $lang['NotesOverview'] = "Overview delle note"; -$lang['EmailRememberNote'] = "Remember: Note: %s in TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Remember Nota @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); @@ -52,4 +52,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: ko.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/ko.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ko.p3 24 Jan 2008 15:41:37 -0000 1.6 +++ ko.p3 31 Jul 2009 09:04:09 -0000 1.7 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "참조 ì´ë¦"; $lang['NoteBetween'] = "ìì± ê¸°ê°"; $lang['NotesOverview'] = "ë©ëª¨ ì 체보기"; -$lang['EmailRememberNote'] = "Remember: Note: %s in TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Remember ë©ëª¨ @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); Index: es-ve.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/es-ve.p3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- es-ve.p3 17 Jun 2008 19:29:50 -0000 1.5 +++ es-ve.p3 31 Jul 2009 09:04:09 -0000 1.6 @@ -36,7 +36,7 @@ $lang['NoteRefName'] = "Nombre de referencia"; $lang['NoteBetween'] = "Creado entre"; $lang['NotesOverview'] = "Resumen de Nota"; -$lang['EmailRememberNote'] = "Recuerde: Nota: %s en TUTOS"; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Recuerde Nota: @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); Index: es-mx.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/es-mx.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- es-mx.p3 17 Jun 2008 19:29:50 -0000 1.7 +++ es-mx.p3 31 Jul 2009 09:04:09 -0000 1.8 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Nombre de referencia"; $lang['NoteBetween'] = "creado entre"; $lang['NotesOverview'] = "Resumen de Nota"; -$lang['EmailRememberNote'] = "Recuerde: Nota: %s eb TUTOS"; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Recuerde Nota: @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); Index: ca.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/ca.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ca.p3 24 Jan 2008 14:58:36 -0000 1.7 +++ ca.p3 31 Jul 2009 09:04:09 -0000 1.8 @@ -37,7 +37,7 @@ $lang['NoteRefName'] = "Nom Referència"; $lang['NoteBetween'] = "Creat entre"; $lang['NotesOverview'] = "Notes"; -$lang['EmailRememberNote'] = "Recordi: Nota: %s Web TUTOS"; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Recordi Nota: @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); @@ -55,4 +55,4 @@ ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: cs.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/cs.p3,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- cs.p3 24 Jan 2008 09:08:28 -0000 1.10 +++ cs.p3 31 Jul 2009 09:04:09 -0000 1.11 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Název odkazu"; $lang['NoteBetween'] = "vytvoÅeno mezi"; $lang['NotesOverview'] = "PÅehled poznámek"; -$lang['EmailRememberNote'] = "Pozor: Poznámka %s v systému TUTOS"; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Pozor Poznámka @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); @@ -50,4 +50,4 @@ ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: ja.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/ja.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ja.p3 24 Jan 2008 15:49:54 -0000 1.6 +++ ja.p3 31 Jul 2009 09:04:09 -0000 1.7 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "åç §å"; $lang['NoteBetween'] = "å³ã®éã«ä½æ"; $lang['NotesOverview'] = "ãã¼ãæ¦è¦"; -$lang['EmailRememberNote'] = "Remember: Note: %s in TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Remember ãã¼ã @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); Index: es-ni.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/es-ni.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- es-ni.p3 17 Jun 2008 19:29:50 -0000 1.7 +++ es-ni.p3 31 Jul 2009 09:04:09 -0000 1.8 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Nombre de Referencia"; $lang['NoteBetween'] = "Creada entre"; $lang['NotesOverview'] = "Vista General de Nota"; -$lang['EmailRememberNote'] = "Recuerde: Nota: %s eb TUTOS"; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Recuerde Nota: @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); Index: vi.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/vi.p3,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vi.p3 1 Jun 2004 08:42:10 -0000 1.4 +++ vi.p3 31 Jul 2009 09:04:09 -0000 1.5 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Tên tham chiếu"; $lang['NoteBetween'] = "ÄÆ°á»£c láºp giữa"; $lang['NotesOverview'] = "Tá»ng quan vá» báo cáo"; -$lang['EmailRememberNote'] = "Nhắc nhá»: Ghi chú: %s trong TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Nhắc nhá»: Ghi chú: @NAME@ trong TUTOS "; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); Index: es.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/es.p3,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- es.p3 5 Apr 2007 16:14:58 -0000 1.8 +++ es.p3 31 Jul 2009 09:04:09 -0000 1.9 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Nombre Referencia"; $lang['NoteBetween'] = "Creado entre"; $lang['NotesOverview'] = "Notas"; -$lang['EmailRememberNote'] = "Recuerde nota %s en TUTOS"; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Recuerde nota @NAME@"; $lang['NoteEventType'] = "Tipo del evento"; $lang['NoteEventTypes'] = array(); @@ -52,4 +52,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: hu.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/hu.p3,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- hu.p3 16 Apr 2007 15:30:41 -0000 1.14 +++ hu.p3 31 Jul 2009 09:04:09 -0000 1.15 @@ -32,7 +32,7 @@ $lang['NoteRefName'] = "Hivatkozás neve"; $lang['NoteBetween'] = "létrehozva között"; $lang['NotesOverview'] = "Jegyzet áttekintés"; -$lang['EmailRememberNote'] = "Emlékeztetõ: %s jegyzet TUTOS-ban"; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Emlékeztetõ: @NAME@ jegyzet"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); @@ -51,4 +51,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: el.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/el.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- el.p3 24 Jan 2008 09:45:07 -0000 1.7 +++ el.p3 31 Jul 2009 09:04:09 -0000 1.8 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Îνομα αναÏοÏάÏ"; $lang['NoteBetween'] = "Î´Î·Î¼Î¹Î¿Ï Ïγήθηκε μεÏαξÏ"; $lang['NotesOverview'] = "ÎÏιÏκÏÏηÏη ΣημείÏÏηÏ"; -$lang['EmailRememberNote'] = "Remember: Note: %s in TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Remember Note: @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); Index: zh.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/zh.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- zh.p3 24 Jan 2008 15:34:00 -0000 1.6 +++ zh.p3 31 Jul 2009 09:04:09 -0000 1.7 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Reference name"; $lang['NoteBetween'] = "created between"; $lang['NotesOverview'] = "Note Overview"; -$lang['EmailRememberNote'] = "Remember: Note: %s in TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Remember å¤å¿å½ @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); Index: de.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/de.p3,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- de.p3 5 Apr 2007 16:14:58 -0000 1.8 +++ de.p3 31 Jul 2009 09:04:09 -0000 1.9 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Referenzname"; $lang['NoteBetween'] = "Erzeugt zwischen"; $lang['NotesOverview'] = "Notizübersicht"; -$lang['EmailRememberNote'] = "Erinnerung: Notiz %s in TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Erinnerung Notiz @NAME@"; $lang['NoteEventType'] = "Vorgangsart"; $lang['NoteEventTypes'] = array(); @@ -52,4 +52,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: sv.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/sv.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- sv.p3 5 Apr 2007 16:14:58 -0000 1.7 +++ sv.p3 31 Jul 2009 09:04:09 -0000 1.8 @@ -33,7 +33,7 @@ $lang['NoteRefName'] = "Referensnamn"; $lang['NoteBetween'] = "skapad mellan"; $lang['NotesOverview'] = "Notering Ãverblick"; -$lang['EmailRememberNote'] = "Remember: Note: %s in TUTOS "; +$lang['EmailRememberNote'] = "@REFTYPE@ @REF@ -- Remember Notering @NAME@"; $lang['NoteEventType'] = "Event Type"; $lang['NoteEventTypes'] = array(); @@ -52,4 +52,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> |
From: Gero K. <gok...@us...> - 2009-07-31 09:04:22
|
Update of /cvsroot/tutos/tutos/php/watchlist In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/php/watchlist Modified Files: watchlist.pinc Log Message: better mail template handling and documentation Index: watchlist.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/watchlist/watchlist.pinc,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- watchlist.pinc 8 Jul 2009 07:39:24 -0000 1.66 +++ watchlist.pinc 31 Jul 2009 09:04:09 -0000 1.67 @@ -375,8 +375,8 @@ function getHelpIndex () { global $lang; - $r = ""; - $r .= "<h3>". makelink("help.php?p=glossary#watchlist",$lang['WatchOverview'],$lang['WatchOverview']) ."</h3><br /><ul>\n"; + $r = ''; + $r .= '<h3>'. makelink("help.php?p=glossary#watchlist",$lang['WatchOverview'],$lang['WatchOverview']) ."</h3><br /><ul>\n"; $r .= "</ul>\n"; return $r; } |
From: Gero K. <gok...@us...> - 2009-07-31 09:04:22
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/php Modified Files: appointment.pinc base.pinc mail.pinc product.pinc task.pinc webelements.p3 Log Message: better mail template handling and documentation Index: base.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/base.pinc,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- base.pinc 27 Jun 2009 17:51:12 -0000 1.126 +++ base.pinc 31 Jul 2009 09:04:08 -0000 1.127 @@ -80,9 +80,9 @@ $this->acl[$current_user->id] = $tutos[modok]; } -# -# initialize custom database fields -# + // + // initialize custom database fields + // $this->init_custom($this->gettype()); } /** @@ -134,7 +134,7 @@ if ( !isset($tutos['nohash']) && isset($g_hash[$id]) ) { // check if we have the corrct objecttype if ($g_hash[$id]->getTypeId() != $obj->getTypeId()) return -1; -# Hashed + // Hashed $g_hash['hits']++; $obj = &$g_hash[$id]; # echo $obj.' *<br>'; @@ -761,8 +761,12 @@ $s = preg_replace("/@NAME@/",$this->getFullName(),$s); $s = preg_replace("/@TYPE@/",$lg[$this->getType()],$s); $s = preg_replace("/@CURRENT@/",$current_user->getFullName(),$s); - $s = preg_replace("/@CREATOR@/",$this->creator->getFullName(),$s); - $s = preg_replace("/@CREATED@/",$this->creation->getDateTime(),$s); + if (is_object($this->creator)) { + $s = preg_replace("/@CREATOR@/",$this->creator->getFullName(),$s); + } + if (is_object($this->creation)) { + $s = preg_replace("/@CREATED@/",$this->creation->getDateTime(),$s); + } return $s; } Index: appointment.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/appointment.pinc,v retrieving revision 1.216 retrieving revision 1.217 diff -u -d -r1.216 -r1.217 --- appointment.pinc 29 Jun 2009 12:12:28 -0000 1.216 +++ appointment.pinc 31 Jul 2009 09:04:07 -0000 1.217 @@ -570,6 +570,29 @@ return $msg; } /** + * make a mail subject line or body (replacing some tags) + * s = input string + * lg = language array to use (for multilang mails) + * return modified subject line + */ + function replace_mail_tags($s,$lg) { + + $s = parent::replace_mail_tags($s,$lg); + + $s = preg_replace("/@DESC@/",$this->descr,$s); + if ( $this->t_ignore == 0) { + $s = preg_replace("/@START@/",$this->start->getDateTime(),$s); + $s = preg_replace("/@END@/",$this->end->getDateTime(),$s); + } else { + $s = preg_replace("/@START@/",$this->start->getDate(),$s); + $s = preg_replace("/@END@/",$this->end->getDate(),$s); + } + $ts = $this->getTimespan(); + $s = preg_replace("/@APPTIME@/",$ts['desc'],$s); + + return $s; + } + /** * Replaces the strings in the mail body */ function make_mail_body(&$body,&$to) { @@ -577,9 +600,8 @@ $url = getBaseURL(true). $this->getURL(); + $body = $this->replace_mail_tags($body,$to->lg); - $body = eregi_replace("@CREATOR@",$this->creator->getFullName(),$body); - $body = eregi_replace("@DESC@",$this->descr,$body); $body = eregi_replace("@URL@",$url,$body); if ( $to->gettype() == "team" ) { @@ -588,18 +610,10 @@ $body = eregi_replace("</TEAM>",'',$body); } else { $body = eregi_replace("@TO@",$to->getFullName(),$body); -# Remove the TEAM part + // Remove the TEAM part $body = eregi_replace("<TEAM>.*</TEAM>",'',$body); } - if ( $this->t_ignore == 0) { - $body = eregi_replace("@START@",$this->start->getDateTime(),$body); - $body = eregi_replace("@END@",$this->end->getDateTime(),$body); - } else { - $body = eregi_replace("@START@",$this->start->getDate(),$body); - $body = eregi_replace("@END@",$this->end->getDate(),$body); - } - if ( ($this->trace == 1) && ($to->gettype() != "team") ) { $urlv = getBaseURL(true) ."app_vote.php?id=". $this->id ."&adr_id=".$to->id; @@ -607,7 +621,7 @@ $body = eregi_replace("<VOTE>",'',$body); $body = eregi_replace("</VOTE>",'',$body); } else { -# Remove the VOTE part + // Remove the VOTE part $body = eregi_replace("<VOTE>.*</VOTE>",'',$body); } } @@ -843,17 +857,16 @@ $pl = $this->participant; - @reset($pl); - while ( list ($i,$f) = @each ($pl) ) { + foreach($pl as $i => $f) { $mformat = 'text/plain'; $m->addTo($pl[$i]); $body = ''; - $m->setSubject($lang['Invitation']); + $m->setSubject($this->replace_mail_tags($lang['Invitation'],$lang)); if ( ! findMailTemplate("app_new.proto",$f,$body,'/html',$mformat) ) { $msg .= sprintf($lang['Err0037'],$m->subject,$body) ."<br />\n"; continue; } - $m->setSubject($f->lg['Invitation']); + $m->setSubject($this->replace_mail_tags($f->lg['Invitation'],$f->lg)); $this->make_mail_body($body,$f); $m->addBody($body,$mformat,$f->lg['NewAppoint'],'',$f->lg['content_encoding']); @@ -1760,17 +1773,16 @@ $m->addHeader("priority","urgent"); $pl = $app->participant; - @reset($pl); - while ( list ($i,$f) = @each ($pl) ) { + foreach($pl as $i => $f) { $mformat = 'text/plain'; $m->addTo($f); $body = ''; + $m->setSubject($app->replace_mail_tags($lang['EmailRememberApp'],$lang)); if ( ! findMailTemplate("app_remember.proto",$f,$body,'/html',$mformat) ) { $msg .= sprintf($lang['Err0037'],$m->subject,$body) ."<br />\n"; continue; } - $ts = $app->getTimespan(); - $m->setSubject(sprintf($f->lg['EmailRememberApp'], $ts['desc'])); + $m->setSubject($app->replace_mail_tags($f->lg['EmailRememberApp'],$f->lg)); $app->make_mail_body($body,$f); $m->addBody($body,$mformat,$f->lg['NewAppoint'],"",$f->lg['content_encoding']); Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.372 retrieving revision 1.373 diff -u -d -r1.372 -r1.373 --- webelements.p3 28 Jul 2009 18:34:50 -0000 1.372 +++ webelements.p3 31 Jul 2009 09:04:08 -0000 1.373 @@ -737,6 +737,13 @@ } } /** + * remove html + */ +function removehtml($s) { + $s = preg_replace("/<[\/]?[bui]+>/i","",$s); + return $s; +} +/** * substitute image tags with links */ Function imgReplace($n,&$obj) { Index: product.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/product.pinc,v retrieving revision 1.193 retrieving revision 1.194 diff -u -d -r1.193 -r1.194 --- product.pinc 23 Jul 2009 13:03:53 -0000 1.193 +++ product.pinc 31 Jul 2009 09:04:08 -0000 1.194 @@ -1212,7 +1212,7 @@ $r .= ' <th>'. $lang['ProdFunc'] ."</th>\n"; $r .= ' <th>'. $lang['created'] ."</th>\n"; $r .= " </tr>\n"; - $s = array(); + $s = array(); while ( ($a < $n) and (count($s) < 2* $tutos[maxshort]) ) { $f = new product($user->dbconn); $f->read_result($res,$a); Index: mail.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/mail.pinc,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- mail.pinc 24 Mar 2009 20:56:14 -0000 1.96 +++ mail.pinc 31 Jul 2009 09:04:08 -0000 1.97 @@ -23,585 +23,584 @@ * a mail body part including a parser */ class mail_body { - function mail_body() { - global $lang; - - $this->contenttype = "text/plain"; - $this->contentdesc = ""; - $this->contentdispotype = ""; - $this->contentdisponame = ""; - $this->contentencoding = "8bit"; [...3004 lines suppressed...] + } + return $msg; + } + /** + * write to a file + */ + function save_to_file($fname) { + return $this->send($fname); } - return $msg; - } - /** - * write to a file - */ - function save_to_file($fname) { - return $this->send($fname); - } } ?> \ No newline at end of file Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.236 retrieving revision 1.237 diff -u -d -r1.236 -r1.237 --- task.pinc 30 Jul 2009 09:26:13 -0000 1.236 +++ task.pinc 31 Jul 2009 09:04:08 -0000 1.237 @@ -756,22 +756,25 @@ /** * get current state of this timetrack as HTML */ - function getState ($s = "") { + function getState ($s = "",$html = true) { global $tutos,$lang; $r = ''; if ( empty($s) ) { $s = $this->state; } - $r .= '<span class="taskstate'. $s .'">'; - + if ($html) { + $r .= '<span class="taskstate'. $s .'">'; + } $stc = getObject($this->dbconn,$tutos['task_state_stc']); if (!is_object($stc)) { $stc = new stc(null); $stc->initByArray('TaskStates',null); } $r .= $stc->getState($s); - $r .= '</span>'; + if ($html) { + $r .= '</span>'; + } return $r; } /** @@ -877,17 +880,33 @@ return; } /** + * make a mail subject line or body (replacing some tags) + * s = input string + * lg = language array to use (for multilang mails) + * return modified subject line + */ + function replace_mail_tags($s,$lg) { + + $s = parent::replace_mail_tags($s,$lg); + + $s = preg_replace("/@STATE@/",$this->getState('',false),$s); + $s = preg_replace("/@SHORT@/",$this->name,$s); + $s = preg_replace("/@DESC@/",$this->desc,$s); + $s = preg_replace("/@START@/",$this->s_start->getDateTime(),$s); + $s = preg_replace("/@END@/",$this->s_end->getDateTime(),$s); + + return $s; + } + /** * Replaces the strings in the mail body */ function make_mail_body(&$body,&$to) { global $lang; $url = getBaseURL(true). $this->getURL(); + $body = $this->replace_mail_tags($body,$to->lg); + - $body = eregi_replace("@CREATOR@",$this->creator->getFullName(),$body); - $body = eregi_replace("@SHORT@",$this->name,$body); - $body = eregi_replace("@DESC@",$this->desc,$body); - $body = eregi_replace("@STATE@",$to->lg['TaskStates'][$this->state],$body); // make sure that $this->volume is type string settype($this->volume,"string"); $body = eregi_replace("@VOLUME@",$this->volume,$body); @@ -916,8 +935,6 @@ $body = eregi_replace("<TEAM>.*</TEAM>","",$body); } - $body = eregi_replace("@START@",$this->s_start->getDateTime(),$body); - $body = eregi_replace("@END@",$this->s_end->getDateTime(),$body); } /** * Save Task to DB @@ -1020,24 +1037,26 @@ foreach ($this->worker as $i => $f) { $m = new mail($current_user); - $m->setFrom($this->creator); + $m->setFrom($current_user); $m->addTo($f); $body = ""; $mformat = 'text/plain'; if ( $task_is_new ) { + $m->setSubject($this->replace_mail_tags($lang['EmailNewTask'],$lang)); if ( ! findMailTemplate("task_new.proto",$f,$body,'/html',$mformat) ) { $msg .= sprintf($lang['Err0037'],$m->subject,$body) ."<br />\n"; continue; } - $m->setSubject(sprintf($f->lg['EmailNewTask'],$this->getFullName(),sprintf($f->lg['TaskStates'][$this->state]))); + $m->setSubject($this->replace_mail_tags($f->lg['EmailNewTask'],$f->lg)); $m->addHeader("X-PRIORITY","1"); $m->addHeader("priority","urgent"); } else { + $m->setSubject($this->replace_mail_tags($lang['EmailChangesTask'],$lang)); if ( ! findMailTemplate("task_mod.proto",$f,$body,'/html',$mformat) ) { $msg .= sprintf($lang['Err0037'],$m->subject,$body) ."<br />\n"; continue; } - $m->setSubject(sprintf($f->lg['EmailChangesTask'],$this->getFullName(),sprintf($f->lg['TaskStates'][$this->state]))); + $m->setSubject($this->replace_mail_tags($f->lg['EmailChangesTask'],$f->lg)); } $this->make_mail_body($body,$f); |
Update of /cvsroot/tutos/tutos/php/bugtracking/templates In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/php/bugtracking/templates Modified Files: bug_mod.proto.ca bug_mod.proto.cs bug_mod.proto.de bug_mod.proto.el bug_mod.proto.en bug_mod.proto.es bug_mod.proto.fr bug_mod.proto.hu bug_mod.proto.nl bug_mod.proto.ru bug_new.proto.ca bug_new.proto.cs bug_new.proto.de bug_new.proto.el bug_new.proto.en bug_new.proto.es bug_new.proto.fr bug_new.proto.hu bug_new.proto.nl bug_new.proto.ru Added Files: README Log Message: better mail template handling and documentation Index: bug_new.proto.es =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_new.proto.es,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bug_new.proto.es 27 Jun 2009 10:55:22 -0000 1.3 +++ bug_new.proto.es 31 Jul 2009 09:04:08 -0000 1.4 @@ -33,3 +33,7 @@ Este mensaje esta siendo enviado también a (en el idioma preferido): @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_mod.proto.cs =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_mod.proto.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_mod.proto.cs 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_mod.proto.cs 31 Jul 2009 09:04:08 -0000 1.3 @@ -31,3 +31,7 @@ Tento dopis byl také poslán: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_new.proto.ru =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_new.proto.ru,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_new.proto.ru 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_new.proto.ru 31 Jul 2009 09:04:08 -0000 1.3 @@ -34,3 +34,7 @@ ÐÑо пиÑÑмо Ñакже оÑпÑавлено (в ÑооÑвеÑÑÑвÑÑÑем пеÑеводе): @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_new.proto.ca =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_new.proto.ca,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_new.proto.ca 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_new.proto.ca 31 Jul 2009 09:04:08 -0000 1.3 @@ -33,3 +33,7 @@ Aquest missatge estÅ essent enviat a (en l'idioma escollit): @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_mod.proto.ru =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_mod.proto.ru,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_mod.proto.ru 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_mod.proto.ru 31 Jul 2009 09:04:08 -0000 1.3 @@ -32,3 +32,7 @@ ÐÑо пиÑÑмо Ñакже оÑпÑавлено(в ÑооÑвеÑÑÑвÑÑÑем пеÑеводе): @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_new.proto.nl =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_new.proto.nl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_new.proto.nl 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_new.proto.nl 31 Jul 2009 09:04:08 -0000 1.3 @@ -31,3 +31,7 @@ Dit bericht is ook (in de gewenste taal) verzonden naar: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_mod.proto.el =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_mod.proto.el,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_mod.proto.el 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_mod.proto.el 31 Jul 2009 09:04:08 -0000 1.3 @@ -31,3 +31,7 @@ ÎÏ ÏÏ Ïο mail αÏοÏÏÎλλεÏαι εÏίÏÎ·Ï (ÏÏη γλÏÏÏα ÏÎ·Ï ÏÏοÏίμηÏÎ·Ï ÏÎ¿Ï ) Ïε: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_mod.proto.es =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_mod.proto.es,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bug_mod.proto.es 27 Jun 2009 10:55:22 -0000 1.3 +++ bug_mod.proto.es 31 Jul 2009 09:04:08 -0000 1.4 @@ -31,3 +31,7 @@ Este mensaje está siendo enviado a (en el lenguaje preferido): @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_new.proto.de =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_new.proto.de,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bug_new.proto.de 27 Jun 2009 10:55:22 -0000 1.3 +++ bug_new.proto.de 31 Jul 2009 09:04:08 -0000 1.4 @@ -30,3 +30,7 @@ Diese Mail geht in der jeweils bevorzugten Sprache auch an: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_mod.proto.nl =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_mod.proto.nl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_mod.proto.nl 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_mod.proto.nl 31 Jul 2009 09:04:08 -0000 1.3 @@ -32,3 +32,7 @@ Dit bericht is ook (in de gewenste taal) verzonden naar: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_mod.proto.en =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_mod.proto.en,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_mod.proto.en 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_mod.proto.en 31 Jul 2009 09:04:08 -0000 1.3 @@ -31,3 +31,8 @@ This mail is also send (in the preferred language) to: @CC@ </CC> + + +-------------------- +@HISTORY@ +-------------------- \ No newline at end of file Index: bug_new.proto.cs =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_new.proto.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_new.proto.cs 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_new.proto.cs 31 Jul 2009 09:04:08 -0000 1.3 @@ -31,3 +31,7 @@ Tento dopis byl také poslán: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_new.proto.hu =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_new.proto.hu,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bug_new.proto.hu 27 Jun 2009 10:55:22 -0000 1.3 +++ bug_new.proto.hu 31 Jul 2009 09:04:08 -0000 1.4 @@ -30,3 +30,7 @@ Ezt a levelet (a megadott nyelven) megkapja még: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_mod.proto.hu =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_mod.proto.hu,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bug_mod.proto.hu 27 Jun 2009 10:55:22 -0000 1.3 +++ bug_mod.proto.hu 31 Jul 2009 09:04:08 -0000 1.4 @@ -30,3 +30,7 @@ Ezt a levelet (a megadott nyelven) megkapja még: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_mod.proto.fr =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_mod.proto.fr,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bug_mod.proto.fr 27 Jun 2009 10:55:22 -0000 1.3 +++ bug_mod.proto.fr 31 Jul 2009 09:04:08 -0000 1.4 @@ -32,3 +32,7 @@ Ce mail est également envoyé à : @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- --- NEW FILE: README --- How to customize ---------------- In this directory TUTOS is looking for email templates (prototypes) for mails sent out by the bugmanagement it tries the follwing names and use the first match 1) FILE.XX_custom.html 2) FILE.XX_custom 3) FILE.en_custom.html 4) FILE.en_custom 5) FILE.XX.html 6) FILE.XX 7) FILE.en.html 8) FILE.en where XX is the preffered language of the address where we send the mail and FILE is either bug_new.proto (subject is $lang['EmailNewBug'] or bug_mod.proto (subject is $lang['EmailChangesBug']) or bug_remember.proto (subject is $lang['EmailStillOpen']) .html files are sent as text/html oter files as text/plain In addition the follwing replacements will happen in the body @TO@ the adressees full name @URL@ the url of the bug @CC@ info about other people informed if @CC@ is empty the whole part between <cc> and </cc> is deleted the follwing replacements will happen in body and subject @REF@ the pbject where the bug occured @REFTYPE@ the type of object (Project Task etc) @STATE@ the state @SHORT@ the short info @CLASS@ the classs @SOLVER@ the desired solver ( - if empty) @HISTORY@ the History formatted as txt @HTML_HISTORY@ the html formatted history @ADD_HISTORY@ mail will have an attachment with history txt formatted @ADD_HTML_HISTORY@ mail will have an attachment with history as html formatted @NAME@ the name of the bug @CREATOR@ the name of the creator @CREATED@ the datetim eof creation $Id: README,v 1.1 2009/07/31 09:04:08 gokohnert Exp $ Index: bug_mod.proto.de =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_mod.proto.de,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bug_mod.proto.de 27 Jun 2009 10:55:22 -0000 1.3 +++ bug_mod.proto.de 31 Jul 2009 09:04:08 -0000 1.4 @@ -30,3 +30,7 @@ Diese Mail geht in der jeweils bevorzugten Sprache auch an: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_new.proto.en =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_new.proto.en,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_new.proto.en 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_new.proto.en 31 Jul 2009 09:04:08 -0000 1.3 @@ -33,3 +33,7 @@ This mail is also send (in the preferred language) to: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_new.proto.fr =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_new.proto.fr,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bug_new.proto.fr 27 Jun 2009 10:55:22 -0000 1.3 +++ bug_new.proto.fr 31 Jul 2009 09:04:08 -0000 1.4 @@ -32,3 +32,7 @@ Ce mail est également envoyé à : @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_new.proto.el =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_new.proto.el,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_new.proto.el 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_new.proto.el 31 Jul 2009 09:04:08 -0000 1.3 @@ -33,3 +33,7 @@ ÎÏ ÏÏ Ïο mail αÏοÏÏÎλλεÏαι εÏίÏÎ·Ï (ÏÏην γλÏÏÏα ÏÎ·Ï ÏÏοÏίμηÏÎ·Ï ÏÎ¿Ï ) Ïε: @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- Index: bug_mod.proto.ca =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/templates/bug_mod.proto.ca,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_mod.proto.ca 27 Jun 2009 10:55:22 -0000 1.2 +++ bug_mod.proto.ca 31 Jul 2009 09:04:08 -0000 1.3 @@ -31,3 +31,7 @@ Aquest missatge estÅ essent enviat a (en l'idioma escollit): @CC@ </CC> + +-------------------- +@HISTORY@ +-------------------- |
From: Gero K. <gok...@us...> - 2009-07-31 09:04:21
|
Update of /cvsroot/tutos/tutos/php/reminder/templates In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/php/reminder/templates Added Files: README Log Message: better mail template handling and documentation --- NEW FILE: README --- How to customize ---------------- In this directory TUTOS is looking for email templates (prototypes) for mails sent out by the reminder it tries the follwing names and use the first match 1) FILE.XX_custom.html 2) FILE.XX_custom 3) FILE.en_custom.html 4) FILE.en_custom 5) FILE.XX.html 6) FILE.XX 7) FILE.en.html 8) FILE.en where XX is the preffered language of the address where we send the mail and FILE is either remind_new.proto (subject is $lang['EmailReminder'] or birthday_remember.proto (subject is $lang['EmailBirthday']) .html files are sent as text/html oter files as text/plain In addition the follwing replacements will happen in the body @TO@ the adressees full name @URL@ the url of the bug @BIRTHDAY@ the birthday if the reference is a adress the follwing replacements will happen in body and subject @REF@ the object name @REFTYPE@ the object (Project Task etc) @DESCRIPTION@ the description text @NAME@ the name of the reminder @CREATOR@ the name of the creator @CREATED@ the datetim eof creation $Id: README,v 1.1 2009/07/31 09:04:09 gokohnert Exp $ |
From: Gero K. <gok...@us...> - 2009-07-31 09:04:21
|
Update of /cvsroot/tutos/tutos/php/note/templates In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/php/note/templates Modified Files: note_remember.proto.ca note_remember.proto.cs note_remember.proto.de note_remember.proto.el note_remember.proto.en note_remember.proto.es note_remember.proto.fr note_remember.proto.hu note_remember.proto.nl note_remember.proto.pl Added Files: README Log Message: better mail template handling and documentation Index: note_remember.proto.es =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/templates/note_remember.proto.es,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- note_remember.proto.es 30 Dec 2007 22:13:25 -0000 1.2 +++ note_remember.proto.es 31 Jul 2009 09:04:09 -0000 1.3 @@ -6,7 +6,7 @@ creado por: @CREATOR@ recordar el: @REMEMBER@ -Referencia: @REFERENZ@ +Referencia: @REFTYPE@ @REF@ Nombre: @NAME@ Texto: Index: note_remember.proto.hu =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/templates/note_remember.proto.hu,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- note_remember.proto.hu 30 Dec 2007 22:13:25 -0000 1.2 +++ note_remember.proto.hu 31 Jul 2009 09:04:09 -0000 1.3 @@ -6,9 +6,9 @@ Létrehozta: @CREATOR@ Emlékeztetõ: @REMEMBER@ -Hivatkozás: @REFERENZ@ +Hivatkozás: @REFTYPE@ @REF@ -Név: @NAME@ +Név: @NAME@ Szöveg: ------------------------------------------------------------------------ @NOTE@ Index: note_remember.proto.cs =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/templates/note_remember.proto.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- note_remember.proto.cs 27 Mar 2004 16:37:56 -0000 1.1 +++ note_remember.proto.cs 31 Jul 2009 09:04:09 -0000 1.2 @@ -6,7 +6,7 @@ Vytvoøil: @CREATOR@ Pøipomenout: @REMEMBER@ -Reference: @REFERENZ@ +Reference: @REFTYPE@ @REF@ Název: @NAME@ Text: Index: note_remember.proto.nl =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/templates/note_remember.proto.nl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- note_remember.proto.nl 27 Mar 2004 16:37:56 -0000 1.1 +++ note_remember.proto.nl 31 Jul 2009 09:04:09 -0000 1.2 @@ -6,7 +6,7 @@ Gemaakt door: @CREATOR@ Herrinner op: @REMEMBER@ -Referentie: @REFERENZ@ +Referentie: @REFTYPE@ @REF@ Naam: @NAME@ Tekst: Index: note_remember.proto.fr =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/templates/note_remember.proto.fr,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- note_remember.proto.fr 30 Dec 2007 22:13:25 -0000 1.2 +++ note_remember.proto.fr 31 Jul 2009 09:04:09 -0000 1.3 @@ -6,7 +6,7 @@ Créée par: @CREATOR@ Rappele le: @REMEMBER@ -Référence: @REFERENZ@ +Référence: @REFTYPE@ @REF@ Nom: @NAME@ Texte: Index: note_remember.proto.pl =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/templates/note_remember.proto.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- note_remember.proto.pl 27 Mar 2004 16:37:56 -0000 1.1 +++ note_remember.proto.pl 31 Jul 2009 09:04:09 -0000 1.2 @@ -6,7 +6,7 @@ przez: @CREATOR@ przypomnij o: @REMEMBER@ -Powi±zania: @REFERENZ@ +Powi±zania: @REFTYPE@ @REF@ Nazwa: @NAME@ Tre¶æ: Index: note_remember.proto.ca =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/templates/note_remember.proto.ca,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- note_remember.proto.ca 27 Mar 2004 16:37:56 -0000 1.1 +++ note_remember.proto.ca 31 Jul 2009 09:04:09 -0000 1.2 @@ -6,7 +6,7 @@ creada per: @CREATOR@ recordar el: @REMEMBER@ -Referència: @REFERENZ@ +Referència: @REFTYPE@ @REF@ Nom: @NAME@ Texte: Index: note_remember.proto.de =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/templates/note_remember.proto.de,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- note_remember.proto.de 30 Dec 2007 22:13:25 -0000 1.2 +++ note_remember.proto.de 31 Jul 2009 09:04:09 -0000 1.3 @@ -6,7 +6,7 @@ Erzeugt von: @CREATOR@ Erinnern am: @REMEMBER@ -Referenz: @REFERENZ@ +Referenz: @REFTYPE@ @REF@ Name: @NAME@ Text: @@ -17,6 +17,6 @@ Die entsprechende Webseite im TUTOS ist: @URL@ -Viele Grüsse und viel Erfolg +Viele Grüsse und viel Erfolg TUTOS Notizverwaltung --- NEW FILE: README --- How to customize ---------------- In this directory TUTOS is looking for email templates (prototypes) for mails sent out by the notes management it tries the follwing names and use the first match 1) FILE.XX_custom.html 2) FILE.XX_custom 3) FILE.en_custom.html 4) FILE.en_custom 5) FILE.XX.html 6) FILE.XX 7) FILE.en.html 8) FILE.en where XX is the preffered language of the address where we send the mail and FILE is note_remember.protobug_new.proto (subject is $lang['EmailRememberNote'] .html files are sent as text/html oter files as text/plain In addition the follwing replacements will happen in the body @URL@ the url of the note the follwing replacements will happen in body and subject @REF@ the pbject where the bug occured @REFTYPE@ the type of object (Project Task etc) @NOTE@ the note @REMEMBER@ the remember datetime @NAME@ the name of the note @CREATOR@ the name of the creator @CREATED@ the datetim eof creation @ATTACH_NOTE@ attach the note to the mail (as attachment) $Id: README,v 1.1 2009/07/31 09:04:09 gokohnert Exp $ Index: note_remember.proto.el =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/templates/note_remember.proto.el,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- note_remember.proto.el 27 Mar 2004 16:37:56 -0000 1.1 +++ note_remember.proto.el 31 Jul 2009 09:04:09 -0000 1.2 @@ -1,23 +1,23 @@ -Ãåéá @CREATOR@, - -¸÷åéò æçôÞóåé áðü ôï TUTOS íá óïõ õðåíèõìßóåé ôçí áêüëïõèç óçìåßùóç. - -äçìéïõñãÞèçêå óôéò: @CREATED@ -äçìéïõñãÞèçêå áðü: @CREATOR@ -Ýãéíå õðåíèýìéóç óôéò: @REMEMBER@ - -ÁíáöïñÜ: @REFERENZ@ - -¼íïìá: @NAME@ -Êåßìåíï: --------------------------------------------------- -@NOTE@ --------------------------------------------------- - -Ç óåëßäá óôï TUTOS åßíáé óôï: -@URL@ - -öéëéêÜ - - -óýóôçìá TUTOS +Ãåéá @CREATOR@, + +¸÷åéò æçôÞóåé áðü ôï TUTOS íá óïõ õðåíèõìßóåé ôçí áêüëïõèç óçìåßùóç. + +äçìéïõñãÞèçêå óôéò: @CREATED@ +äçìéïõñãÞèçêå áðü: @CREATOR@ +Ýãéíå õðåíèýìéóç óôéò: @REMEMBER@ + +ÁíáöïñÜ: @REFTYPE@ @REF@ + +¼íïìá: @NAME@ +Êåßìåíï: +-------------------------------------------------- +@NOTE@ +-------------------------------------------------- + +Ç óåëßäá óôï TUTOS åßíáé óôï: +@URL@ + +öéëéêÜ + + +óýóôçìá TUTOS Index: note_remember.proto.en =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/templates/note_remember.proto.en,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- note_remember.proto.en 27 Mar 2004 16:37:56 -0000 1.1 +++ note_remember.proto.en 31 Jul 2009 09:04:09 -0000 1.2 @@ -6,7 +6,7 @@ created by: @CREATOR@ remember at: @REMEMBER@ -Reference: @REFERENZ@ +Reference: @REFTYPE@ @REF@ Name: @NAME@ Text: |
From: Gero K. <gok...@us...> - 2009-07-31 09:04:20
|
Update of /cvsroot/tutos/tutos/php/reminder In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/php/reminder Modified Files: reminder.pinc Log Message: better mail template handling and documentation Index: reminder.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/reminder/reminder.pinc,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- reminder.pinc 21 Jul 2009 14:18:00 -0000 1.34 +++ reminder.pinc 31 Jul 2009 09:04:09 -0000 1.35 @@ -170,7 +170,7 @@ $this->plist = array(); if (is_object($this->ref) && $this->ref->id != -1) { - // Read possible new parents + // Read possible new parents $this->plist = $this->ref->getNeighbours(); } } @@ -421,7 +421,7 @@ function setRemindDate(&$value) { $x = $this->setDateTimeField("remind_date",$value,"ReminderAt"); if ($x == true) { - // reset the fired flag + // reset the fired flag $this->fired_at = null; } return $x; |
From: Gero K. <gok...@us...> - 2009-07-31 09:04:20
|
Update of /cvsroot/tutos/tutos/php/watchlist/templates In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/php/watchlist/templates Modified Files: watch.proto.de Added Files: README Log Message: better mail template handling and documentation --- NEW FILE: README --- How to customize ---------------- In this directory TUTOS is looking for email templates (prototypes) for mails sent out by the watchlist module it tries the follwing names and use the first match 1) FILE.XX_custom.html 2) FILE.XX_custom 3) FILE.en_custom.html 4) FILE.en_custom 5) FILE.XX.html 6) FILE.XX 7) FILE.en.html 8) FILE.en where XX is the preffered language of the address where we send the mail and FILE is either watch.proto (subject is $lang['EmailChanged'] or watch_del.proto (subject is $lang['EmailDeleted']) .html files are sent as text/html oter files as text/plain In addition the follwing replacements will happen in the body @TO@ the adressees full name @URL@ the url of the watched object the following replacements will happen in body and subject @TYPE@ the type of the watched object @NAME@ the name of the object @CREATOR@ the name of the creator @CREATED@ the datetime of creation @CURRENT@ the current user $Id: README,v 1.1 2009/07/31 09:04:09 gokohnert Exp $ Index: watch.proto.de =================================================================== RCS file: /cvsroot/tutos/tutos/php/watchlist/templates/watch.proto.de,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- watch.proto.de 30 Dec 2007 22:10:30 -0000 1.2 +++ watch.proto.de 31 Jul 2009 09:04:09 -0000 1.3 @@ -2,12 +2,12 @@ Sie haben @NAME@ auf Ihrer Beobachtungsliste. -@CURRENT@ hat eine Ãnderung an @NAME@ vorgenommen. +@CURRENT@ hat eine Änderung an @NAME@ vorgenommen. Der aktuelle Status befindet sich hier: @URL@ -Dort können Sie diesen Beobachtungsdienst auch abschalten. +Dort können Sie diesen Beobachtungsdienst auch abschalten. -Mit freundlichen Grüssen +Mit freundlichen Grüssen TUTOS Beobachtungssystem |
From: Gero K. <gok...@us...> - 2009-07-31 09:04:19
|
Update of /cvsroot/tutos/tutos/html In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408/html Modified Files: classic_layout.css new2_layout.css new_layout.css nuke.css Log Message: better mail template handling and documentation Index: classic_layout.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/classic_layout.css,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- classic_layout.css 26 Jul 2003 08:15:17 -0000 1.1 +++ classic_layout.css 31 Jul 2009 09:04:07 -0000 1.2 @@ -1,14 +1,21 @@ /* - * Copyright 2003 by Gero Kohnert - * ant...@ma... - * - * Nuke Theme for TUTOS + * Copyright 2003 - 2009 by Gero Kohnert * * CVS Info: $Id$ * $Author$ * */ +#tutosversion { + font-size: 6pt; + color: #666; +} + +.debug { + font-size: 5pt; + color: gray; +} + #maintable { width: 100%; height: 90%; Index: new2_layout.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/new2_layout.css,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- new2_layout.css 22 Jul 2009 14:04:41 -0000 1.2 +++ new2_layout.css 31 Jul 2009 09:04:07 -0000 1.3 @@ -11,9 +11,13 @@ * $Author$ * */ +#tutosversion { + font-size: 6pt; + color: #666; +} .debug { - font-size: 6pt; + font-size: 5pt; color: gray; } Index: nuke.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/nuke.css,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- nuke.css 23 Jul 2009 07:42:44 -0000 1.36 +++ nuke.css 31 Jul 2009 09:04:07 -0000 1.37 @@ -452,7 +452,8 @@ text-align: center; padding-left: 5px; padding-right: 5px; - font-size: 10pt; + font-size: 9pt; + font-weight: normal; } INPUT,TEXTAREA,SELECT { Index: new_layout.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/new_layout.css,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- new_layout.css 22 Jul 2009 14:04:41 -0000 1.11 +++ new_layout.css 31 Jul 2009 09:04:07 -0000 1.12 @@ -11,9 +11,13 @@ * $Author$ * */ +#tutosversion { + font-size: 6pt; + color: #666; +} .debug { - font-size: 6pt; + font-size: 5pt; color: gray; } @@ -75,4 +79,4 @@ SPAN.required { color: red; -} +} \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-07-31 09:04:15
|
Update of /cvsroot/tutos/tutos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19408 Modified Files: Makefile Log Message: better mail template handling and documentation Index: Makefile =================================================================== RCS file: /cvsroot/tutos/tutos/Makefile,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- Makefile 15 Jul 2009 20:12:52 -0000 1.108 +++ Makefile 31 Jul 2009 09:04:07 -0000 1.109 @@ -15,6 +15,9 @@ # # # $Log$ +# Revision 1.109 2009/07/31 09:04:07 gokohnert +# better mail template handling and documentation +# # Revision 1.108 2009/07/15 20:12:52 gokohnert # updates # @@ -463,6 +466,7 @@ PHP_BUG_HLP = php/bugtracking/help/.htaccess \ $(wildcard php/bugtracking/help/*.html) PHP_BUG_TPL = php/bugtracking/templates/.htaccess \ + php/bugtracking/templates/README \ $(wildcard php/bugtracking/templates/*.proto.*) # Counter Module (nonstandard , need extra download) @@ -536,6 +540,7 @@ PHP_NOTE_HLP = php/note/help/.htaccess \ $(wildcard php/note/help/*.html) PHP_NOTE_TPL = php/note/templates/.htaccess \ + php/note/templates/README \ $(wildcard php/note/templates/*.proto.*) # Reminder Module @@ -546,6 +551,7 @@ PHP_REMINDER_HLP = $(wildcard php/reminder/help/*.html) \ php/reminder/help/.htaccess PHP_REMINDER_TPL = $(wildcard php/reminder/templates/*.proto.*) \ + php/reminder/templates/README \ php/reminder/templates/.htaccess # Resource Module @@ -606,6 +612,7 @@ PHP_WATCH_HLP = php/watchlist/help/.htaccess \ $(wildcard php/watchlist/help/*.html) PHP_WATCH_TPL = php/watchlist/templates/.htaccess \ + php/watchlist/templates/README \ $(wildcard php/watchlist/templates/*.proto.*) # Xml Import Module @@ -763,6 +770,7 @@ $(wildcard html/*gif) TEMPLATES = \ + html/README \ $(wildcard html/*.proto.*) OTHER_HTML = html/.htaccess \ |
From: Gero K. <gok...@us...> - 2009-07-30 09:26:22
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18743 Modified Files: task.pinc Log Message: fix Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.235 retrieving revision 1.236 diff -u -d -r1.235 -r1.236 --- task.pinc 30 Jul 2009 09:02:20 -0000 1.235 +++ task.pinc 30 Jul 2009 09:26:13 -0000 1.236 @@ -1417,7 +1417,7 @@ $max_end = max($parent->max_end->ts,$t); $min_start = min($parent->min_start->ts,$t); $p = ( ($max_end - $min_start) / $w); - if ( $p == 0 ) { + if ( $p == 0 || ($s_start->notime == 1) || ($s_end->notime == 1)) { # $p = 1; // from earliest to start $x1 = 1; @@ -1447,14 +1447,14 @@ if ( $x1a + $x1b > 0 ) { if ( $x1b < 0 ) { - $r .= '<img border="0" height="'. $h .'" width="'.( $x1a + $x1b) .'" src="'. $tutos['base'] ."/html/gray.png\" alt=\"\" />"; + $r .= '<img border="0" height="'. $h .'" width="'.( $x1a + $x1b) .'" src="'. $tutos['base'] .'/html/gray.png" alt="" />'; } else { if ( $x1a > 0 ) { - $r .= '<img border="0" height="'. $h .'" width="'. $x1a .'" src="'. $tutos['base'] ."/html/gray.png\" alt=\"\" />"; + $r .= '<img border="0" height="'. $h .'" width="'. $x1a .'" src="'. $tutos['base'] .'/html/gray.png" alt="" />'; } } if ( $x1b > 0 ) { - $r .= '<img border="0" height="'. $h .'" width="'. $x1b.'" src="'. $tutos['base'] ."/html/white.png\" alt=\"\" />"; + $r .= '<img border="0" height="'. $h .'" width="'. $x1b.'" src="'. $tutos['base'] .'/html/white.png" alt="" />'; } } if ( $x2 == 0 ) $x2=1; |
From: Gero K. <gok...@us...> - 2009-07-30 09:03:38
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15916 Modified Files: gantt_png.php Log Message: gantt charts and task overviews for multiple projects selected by mass selection in project overview Index: gantt_png.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/gantt_png.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- gantt_png.php 25 Feb 2009 19:12:36 -0000 1.26 +++ gantt_png.php 30 Jul 2009 09:03:28 -0000 1.27 @@ -30,20 +30,26 @@ load_jpgraph( array("jpgraph_gantt.php") ); -if ( isset($_GET['id']) ) { - $obj = GetObject($dbconn,$_GET['id']); - $stop = 0; -} else { - $msg = $lang['Err0048']; - $stop = 1; - $obj = $id; +if ( ! isset($_GET['id']) ) { + echo $lang['Err0048']; + exit; } -if ($stop == 0) { - gantt_draw($obj); + +if (! is_array($_GET['id'])) { + $id[] = $_GET['id']; } else { - echo $msg; + $id = $_GET['id']; } +$parents = array(); +foreach($id as $i) { + $p = GetObject($dbconn,$i); + if (is_object($p)) { + $parents[] = &$p; + } + unset($p); +} +gantt_draw($parents); $dbconn->Close(); ?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-07-30 09:03:04
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15805 Modified Files: timetrack.pinc Log Message: set the real start of task to workday of timefraction Index: timetrack.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack.pinc,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- timetrack.pinc 29 Mar 2009 18:25:41 -0000 1.96 +++ timetrack.pinc 30 Jul 2009 09:02:51 -0000 1.97 @@ -60,29 +60,29 @@ * Read a summary of times for given object */ function readTimetrackSum (&$obj) { - global $table; + global $table; - $obj->timetracksum = 0; - $q = "SELECT SUM(volume) as XX, SUM(distance) as YY FROM ". $obj->dbconn->prefix .$table['timetrack'][name]; - $pre = " WHERE "; - if ( $obj->getType() == "address" ) { - $q .= $pre . " adr_id =". $obj->id ; [...1406 lines suppressed...] + $f->read_result($res,$a); + $r .= " <tr>\n"; + $r .= ' <td>' . $f->ref->getLink() ."</td>\n"; + $r .= ' <td>' . $f->wday->getDateTime() ."</td>\n"; + $r .= ' <td align="right">' . hour_format($f->volume) ."</td>\n"; + $r .= " </tr>\n"; + $a++; + unset($f); + } + $r .= info_table_end(); + $res->free(); + return $r; } - $r .= info_table_end(); - $res->free(); - return $r; - } } ?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-07-30 09:02:31
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15738 Modified Files: product_overview.php task.pinc task_gantt.php task_overview.php task_show.php Log Message: gantt charts and task overviews for multiple projects selected by mass selection in project overview Index: task_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_overview.php,v retrieving revision 1.123 retrieving revision 1.124 diff -u -d -r1.123 -r1.124 --- task_overview.php 21 Jul 2009 14:18:52 -0000 1.123 +++ task_overview.php 30 Jul 2009 09:02:20 -0000 1.124 @@ -40,8 +40,6 @@ $this->parent->min_start = new TUTOS_Date_Time(); $this->parent->max_end = new TUTOS_Date_Time(0); - $this->parent->sum['volume'] = 0.0; - $this->parent->sum['volume_done'] = 0.0; $this->parent->tasklist = array(); $max_end = $this->parent->max_end->ts; $min_start = $this->parent->min_start->ts; @@ -120,8 +118,8 @@ $max_end = max($this->parent->max_end->ts,$t->s_end->ts); $min_start = min($this->parent->min_start->ts,$t->s_start->ts); - $this->parent->sum['volume_done'] += $t->timetracksum; - $this->parent->sum['volume'] += $t->volume; + $this->sum['volume_done'] += $t->timetracksum; + $this->sum['volume'] += $t->volume; unset($t); $this->parent->min_start->setDateTimeTS($min_start); $this->parent->max_end->setDateTimeTS($max_end); @@ -193,8 +191,14 @@ } if( $this->start->notime == 1) { - $this->start = $this->parent->min_start; - $this->end = $this->parent->max_end; + $max_end = $this->parent[0]->max_end->ts; + $min_start = $this->parent[0]->min_start->ts; + foreach ($this->parent as $p) { + $min_start = min($p->min_start->ts,$min_start); + $max_end = max($p->max_end->ts,$max_end); + } + $this->start->setDateTimeTS($min_start); + $this->end->setDateTimeTS($max_end); } @@ -228,58 +232,60 @@ $r .= $lang['forphrase'].' '.$this->searchargs; } - $r .= '<span id="levelcontrol">Display Level: <span id="levelinfo">max</span> <b><a ><span style="font-size:16pt;display:inline;"> + </span></a> <a ><span style="font-size:16pt;display:inline;"> - </span></a></b></span>'; + $r .= '<span id="levelcontrol">Display Level: <span id="levelinfo">max</span> <b><a ><span style="font-size:16pt;display:inline;"> + </span></a> <a ><span style="font-size:16pt;display:inline;"> - </span></a></b></span>'; $r .= $this->OverviewTableStart(); - $r .= "<script type=\"text/javascript\" language=\"JavaScript\">\n"; - $r .= "var leveltext = 'max';\n"; - $r .= "var max_level = 4;\n"; - $r .= "var cur_level = max_level + 1;\n"; - $r .= "function tasklevel(diff) {\n"; - $r .= " cur_level = cur_level + diff;\n"; - $r .= " if (cur_level > max_level) {\n"; - $r .= " cur_level = max_level + 1;\n"; - $r .= " leveltext = 'max';\n"; - $r .= " } else {\n"; - $r .= " leveltext = ''+ cur_level;\n"; - $r .= " }\n"; - $r .= " if (cur_level < 0) {\n"; - $r .= " cur_level = 0;\n"; - $r .= " leveltext = ''+ cur_level;\n"; - $r .= " }\n"; + $r .= "<script type=\"text/javascript\" language=\"JavaScript\">\n"; + $r .= "var leveltext = 'max';\n"; + $r .= "var max_level = 4;\n"; + $r .= "var cur_level = max_level + 1;\n"; + $r .= "function tasklevel(diff) {\n"; + $r .= " cur_level = cur_level + diff;\n"; + $r .= " if (cur_level > max_level) {\n"; + $r .= " cur_level = max_level + 1;\n"; + $r .= " leveltext = 'max';\n"; + $r .= " } else {\n"; + $r .= " leveltext = ''+ cur_level;\n"; + $r .= " }\n"; + $r .= " if (cur_level < 0) {\n"; + $r .= " cur_level = 0;\n"; + $r .= " leveltext = ''+ cur_level;\n"; + $r .= " }\n"; - $r .= " var search = /tasklevel_(\d+)/g;\n"; - $r .= " rows = document.getElementById('datafield').getElementsByTagName('tr');\n"; - $r .= " for (var I2 = 0 ; I2 < rows.length ; I2++) {\n"; - // get the level -# $r .= " leveltext += ' '+ I2;\n"; - $r .= " res = null;\n"; - $r .= " if (rows[I2].className == null) { continue; };"; - // reset - $r .= " res = search.exec('');\n"; - $r .= " res = search.exec(rows[I2].className);\n"; -# $r .= " leveltext += ' '+ rows[I2].className;\n"; -# $r .= " leveltext += ' '+ res + '<br>';\n"; - $r .= " if (res == null) { continue; };"; - $r .= " if (res[1] > cur_level) {"; - $r .= " rows[I2].style.display = \"none\";\n"; - $r .= " } else {\n"; - $r .= " rows[I2].style.display = \"\";\n"; - $r .= " }\n"; - $r .= " }\n"; - $r .= " el = document.getElementById('levelinfo');\n"; - $r .= " el.innerHTML = leveltext;\n"; - $r .= "}\n"; - $r .= "</script>\n"; + $r .= " var search = /tasklevel_(\d+)/g;\n"; + $r .= " rows = document.getElementById('datafield').getElementsByTagName('tr');\n"; + $r .= " for (var I2 = 0 ; I2 < rows.length ; I2++) {\n"; + // get the level + $r .= " res = null;\n"; + $r .= " if (rows[I2].className == null) { continue; };"; + // reset + $r .= " res = search.exec('');\n"; + $r .= " res = search.exec(rows[I2].className);\n"; + $r .= " if (res == null) { continue; };"; + $r .= " if (res[1] > cur_level) {"; + $r .= " rows[I2].style.display = \"none\";\n"; + $r .= " } else {\n"; + $r .= " rows[I2].style.display = \"\";\n"; + $r .= " }\n"; + $r .= " }\n"; + $r .= " el = document.getElementById('levelinfo');\n"; + $r .= " el.innerHTML = leveltext;\n"; + $r .= "}\n"; + $r .= "</script>\n"; $r .= " <thead>\n"; $r .= " <tr>\n"; $r .= ' <th colspan="'. $cols .'" width="100%">'; $r .= $lang['TaskOverview']; - if ( ($this->search == "") && ($this->parent->getType() != 'base') ) { - $r .= ' '. $lang['forphrase'] .' '; - $r .= menulink($this->parent->getURL(),myentities($this->parent->getFullName())); + if ( ($this->search == "") && ($this->parent[0]->getType() != 'base') ) { + if (count($this->parent) == 1) { + $r .= ' '. $lang['forphrase'] .' '; + $r .= menulink($this->parent[0]->getURL(),myentities($this->parent[0]->getFullName())); + } else { + $r .= ' '. $lang['forphrase'] .' '; + $r .= count($this->parent); + } } else if ($this->search != ''){ $r .= ' '. $lang['forphrase'] .' '; $r .= '"'. $this->search .'"'; @@ -289,19 +295,19 @@ $r .= " <tr>\n"; $r .= ' <td colspan="2" class="desc" nowrap="nowrap"> '. $lang['TaskVolumeFull'] ." </td>\n"; - $r .= ' <td colspan="2"> '. number_format($this->parent->sum['volume'],2) .' '. $lang['hours'] ."</td>\n"; + $r .= ' <td colspan="2"> '. number_format($this->sum['volume'],2) .' '. $lang['hours'] ."</td>\n"; if ( $this->small == 0 ) { $r .= ' <th colspan="1" rowspan="2" nowrap="nowrap">'. $lang['AppStart']; $r .= '<br />'. $this->start->getDate() ."</th>\n"; $r .= ' <th colspan="1" rowspan="2" nowrap="nowrap">'. $lang['AppEnd']; $r .= '<br />'. $this->end->getDate() ."</th>\n"; } - if ( $this->parent->sum['volume'] != 0 ) { - $c = ( 100.0 * ( $this->parent->sum['volume_done'] / $this->parent->sum['volume'] )); + if ( $this->sum['volume'] != 0 ) { + $c = ( 100.0 * ( $this->sum['volume_done'] / $this->sum['volume'] )); } else { $c = 0.0; } - $r .= ' <td colspan="2" rowspan="3" align="right" class="desc"> '. ($this->small == 0 ? $lang['Completed'].': ':'') .'<font size="+2">'. sprintf("%3.2f %%",$c) ."</font></td>\n"; + $r .= ' <td colspan="2" rowspan="3" align="right" class="desc"> '. ($this->small == 0 ? $lang['Completed'].': ':'') .'<font size="+2">'. sprintf("%3.2f %%",$c) ."</font></td>\n"; // Info about connected docs and bugs if ($tutos[task_show_fileinfo] == 1) { @@ -329,7 +335,7 @@ $r .= " <tr>\n"; $r .= ' <td colspan="2" rowspan="2" class="desc" nowrap="nowrap"> '. $lang['TaskVolumeDone'] ." </td>\n"; - $r .= ' <td colspan="2" rowspan="2"> '. sprintf("%3.2f",$this->parent->sum['volume_done']) .' '. $lang['hours'] ."</td>\n"; + $r .= ' <td colspan="2" rowspan="2"> '. sprintf("%3.2f",$this->sum['volume_done']) .' '. $lang['hours'] ."</td>\n"; $r .= " </tr>\n"; $a = 0; @@ -343,17 +349,19 @@ $skipped = 0; $this->line = 0; - if ( $this->parent->getType() == "task" ) { - $x = $this->parent->printRow($this,0,$this->small,$this->parent,$this->fld, $this->start, $this->end); - $skipped = $x[0]; - $r .= $x[1]; - } else { - foreach ($this->parent->tasklist as $i => $f) { -# $r .= 'XXX '.$this->start->getDateTime().' '.$this->end->getDateTime().'<br>'; - $x = $this->parent->tasklist[$i]->printRow($this,0,$this->small,$this->parent,$this->fld, $this->start, $this->end); + foreach($this->parent as $p) { + if ( $p->getType() == "task" ) { + $x = $p->printRow($this,0,$this->small,$p,$this->fld, $this->start, $this->end); $skipped = $x[0]; $r .= $x[1]; - $a++; + } else { + foreach ($p->tasklist as $i => $f) { +# $r .= 'XXX '.$this->start->getDateTime().' '.$this->end->getDateTime().'<br>'; + $x = $p->tasklist[$i]->printRow($this,0,$this->small,$p,$this->fld, $this->start, $this->end); + $skipped = $x[0]; + $r .= $x[1]; + $a++; + } } } if ( $tutos[massupdate] == 1 ) { @@ -559,12 +567,15 @@ $this->searchargs = ""; // textual info about search $this->state = -2; $this->worker = -1; - $this->parent = -1; + $this->parent = array(); $this->small = 0; $this->extsearch = false; $this->link = 'task_overview.php'; $this->headlineinfo = ''; + $this->sum['volume'] = 0.0; + $this->sum['volume_done'] = 0.0; + $classic_search = true; if ( ! $this->user->feature_ok(usetaskmanagement,PERM_SEE) ) { @@ -575,11 +586,11 @@ // State if ( isset($_REQUEST['state']) ) { - $tutos[task_skip_finished] = 0; # no need/sense when selecting state - if (false == is_numeric($_REQUEST['state'])) { - $msg .= sprintf($lang['Err0012'],"state",$_REQUEST['state']); - $this->stop = true; - } + $tutos[task_skip_finished] = 0; // no need/sense when selecting state + if (false == is_numeric($_REQUEST['state'])) { + $msg .= sprintf($lang['Err0012'],"state",$_REQUEST['state']); + $this->stop = true; + } $this->state = $_REQUEST['state']; if ($this->state != -2) { $this->searchargs .= $lang['TaskState'] .' = '. $t->getState($this->state).' '; @@ -642,47 +653,59 @@ // Call via other object if ( isset($_REQUEST['id']) ) { // TODO multiple project references - if (is_array($_REQUEST['id'])) { - } - // We show everything that belongs to id (no other filter apply) - if (false == is_numeric($_REQUEST['id'])) { - $msg .= sprintf($lang['Err0012'],"id",$_REQUEST['id']); - $this->stop = true; - return; + if (! is_array($_REQUEST['id'])) { + $id[] = $_REQUEST['id']; + } else { + $id = $_REQUEST['id']; } - $this->parent = GetObject($this->dbconn,$_REQUEST['id']); - if (!is_object($this->parent)) { - $msg .= $lang['Err0048']; - $this->stop = true; - return; + + foreach($id as $i) { + if (false == is_numeric($i)) { + $msg .= sprintf($lang['Err0012'],"id",$i); + $this->stop = true; + return; + } + $p = GetObject($this->dbconn,$i); + if (!is_object($p)) { + $msg .= $lang['Err0048']; + $this->stop = true; + return; + } + $this->link = addUrlParameter($this->link,'id[]='.$p->id); + $this->addHidden("id[]",$p->id); + if (! $p->see_ok()) { + $msg .= sprintf($lang['Err0022'],"'".$p->getFullName()."'"); + $this->stop = true; + return; + } + task_calc($p); + $this->sum['volume'] += $p->sum['volume']; + $this->sum['volume_done'] += $p->sum['volume_done']; + $this->parent[] = &$p; + unset($p); } - $this->link = addUrlParameter($this->link,'id='.$this->parent->id); - if (! $this->parent->see_ok()) { - $msg .= sprintf($lang['Err0022'],"'".$this->parent->getFullName()."'"); - $this->stop = true; - return; + + if (count($this->parent) == 1) { + $this->name .= " : ". $this->parent[0]->getFullName(); + $x = task::getaddlink($this->user,$this->parent[0],$lang['NewEntry']); + $this->addMenu($x); } - $this->addHidden("id",$this->parent->id); - $this->name .= " : ". $this->parent->getFullName(); if ( isset($_REQUEST['fld']) ) { $this->fld = $_REQUEST['fld']; } - task_calc($this->parent); - $x = task::getaddlink($this->user,$this->parent,$lang['NewEntry']); - $this->addMenu($x); $classic_search = false; } else if ( isset($_REQUEST['name']) ) { // Classical Search - $this->parent = new dummy($this->dbconn); + $this->parent[] = new dummy($this->dbconn); $this->fld = "worker"; $this->select_by_name(); $classic_search = true; } else { - $this->parent = new dummy($this->dbconn); - $this->parent->min_start = new TUTOS_Date_Time(); - $this->parent->max_end = new TUTOS_Date_Time(0); + $this->parent[] = new dummy($this->dbconn); + $this->parent[0]->min_start = new TUTOS_Date_Time(); + $this->parent[0]->max_end = new TUTOS_Date_Time(0); $classic_search = true; } @@ -711,7 +734,11 @@ // The PNG Gantt functionality, using JpGraph Tools, to be installed if( $tutos[usejpgraph] && !$classic_search ) { - $x = array( url => "task_gantt.php?id=". $this->parent->id, + $url = 'task_gantt.php'; + foreach ($this->parent as $p) { + $url = addUrlParameter($url,"id[]=".$p->id); + } + $x = array( url => $url, text => $lang['TaskGantt'], info => $lang['TaskGantt'], category => array("task","view") Index: task_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_show.php,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- task_show.php 24 Jul 2009 12:57:12 -0000 1.92 +++ task_show.php 30 Jul 2009 09:02:20 -0000 1.93 @@ -321,6 +321,7 @@ $this->addMenu($x); $x = task::getaddlink($this->user,$this->obj->parent,$lang['NewEntry']); + $x[category][] = 'obj'; $this->addMenu($x); $x = task::getaddlink($this->user, $this->obj, $lang['TaskNewSubtask']); Index: product_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_overview.php,v retrieving revision 1.140 retrieving revision 1.141 diff -u -d -r1.140 -r1.141 --- product_overview.php 29 Jun 2009 08:55:51 -0000 1.140 +++ product_overview.php 30 Jul 2009 09:02:20 -0000 1.141 @@ -443,6 +443,7 @@ if (class_exists('watchlist')) { $r .= watchlist::action_options(); } + $r .= " <option value=\"-5\">". $lang['TaskOverview'] ."</option>\n"; $r .= "</select>\n"; $r .= $this->UpdateRowEnd(1); } @@ -769,6 +770,15 @@ $this->redirect = acl_action(); return; } + // redirect to Task Overview + if ( $_GET['action'] == -5 ) { + $url = 'task_overview.php'; + foreach ($_GET['mark'] as $key => $val) { + $url = addUrlParameter($url,'id[]='.$val,true); + } + $this->redirect = $url; + return; + } if (class_exists('watchlist')) { watchlist::parse_action($this->user); Index: task_gantt.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_gantt.php,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- task_gantt.php 29 Mar 2009 18:25:41 -0000 1.23 +++ task_gantt.php 30 Jul 2009 09:02:20 -0000 1.24 @@ -34,7 +34,7 @@ $r .= $this->DataTableStart(); $r .= "<tr><td>"; if ($tutos[jpgraph_old] == 0) { - gantt_draw($this->obj); + gantt_draw($this->parents); } else { $r .= "<img src=\"". addsessionkey("gantt_png.php?id=".$this->obj->id) ."\" />"; } @@ -50,12 +50,16 @@ $r = ''; $r .= "<tr><td>"; - $r .= menulink("task_overview.php?id=". $this->obj->id, $lang['TaskOverview']); + $url = 'task_overview.php'; + foreach ($this->parents as $p) { + $url = addUrlParameter($url,'id[]='.$p->id); + } + $r .= menulink($url, $lang['TaskOverview']); $r .= "<br />\n"; - if( is_object($this->obj) ) { + foreach ($this->parents as $p) { $r .= "<br />\n"; - $r .= $lang[$this->obj->getType()]." ".menulink($this->obj->getURL(), myentities($this->obj->getFullName())); + $r .= $lang[$p->getType()]." ".menulink($p->getURL(), myentities($p->getFullName())); $r .= "<br />\n"; } $r .= "</td></tr>"; @@ -68,17 +72,33 @@ global $msg,$lang; $this->name = $lang['TaskGantt']; - if ( isset($_GET['id']) ) { - $this->obj = GetObject($this->dbconn,$_GET['id']); - task::obj_read($this->obj); - if (count ($this->obj->tasklist) == 0 ) { - $msg .= $lang['Err0048']; - $this->stop = true; - } - } else { + + if ( ! isset($_GET['id']) ) { $msg .= $lang['Err0048']; $this->stop = true; $this->obj = $this->user; + return; + } + + if (! is_array($_GET['id'])) { + $id[] = $_GET['id']; + } else { + $id = $_GET['id']; + } + $count = 0; + $this->parents = array(); + foreach($id as $i) { + $p = GetObject($this->dbconn,$i); + if (!is_object($p)) continue; + task::obj_read($p); + $count += count($p->tasklist); + $this->parents[] = &$p; + unset($p); + } + if ($count == 0 ) { + $msg .= $lang['Err0048']; + $this->stop = true; + return; } } } @@ -90,6 +110,6 @@ $dbconn->Close(); ?> <!-- - CVS Info: $Id$ +CVS Info: $Id$ $Author$ --> \ No newline at end of file Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.234 retrieving revision 1.235 diff -u -d -r1.234 -r1.235 --- task.pinc 19 Jul 2009 19:21:56 -0000 1.234 +++ task.pinc 30 Jul 2009 09:02:20 -0000 1.235 @@ -143,7 +143,10 @@ return $graph; } -Function gantt_draw(&$parent) { +/* + * draw a gantt chart + */ +Function gantt_draw(array $parents) { global $lang, $msg, $font, $tutos; // @@ -155,15 +158,31 @@ $font = FF_FONT1; } - task_calc($parent); - if (count ($parent->tasklist) == 0 ) { + $max_end = 0; + $min_start = 0; + $count = 0; + foreach($parents as $p) { + task_calc($p); + if ($max_end == 0) { + $max_end = $p->max_end->ts; + $min_start = $p->min_start->ts; + } else { + $max_end = max($p->max_end->ts,$max_end); + $min_start = min($p->min_start->ts,$min_start); + } + $count += count($p->tasklist); + } + + if ($count == 0 ) { return; } -# echo 'Max '.$parent->max_end->getDateTime().'<br>'; -# echo 'Min '.$parent->min_start->getDateTime().'<br>'; - $length = ($parent->max_end->ts - $parent->min_start->ts)/3600.0; -# echo 'diff '. $length.'h<br>'; -# die( $length ); + +// $mint = new TUTOS_Date_Time(); +// $maxt = new TUTOS_Date_Time(); +// $mint->setDateTimeTS($min_start); +// $maxt->setDateTimeTS($max_end); + + $length = ($max_end - $min_start)/3600.0; // Standard calls to create a new graph $graph = new GanttGraph(); $graph->SetMarginColor('white'); @@ -171,8 +190,13 @@ //$graph->SetShadow(); // $graph->SetBox(); // Titles for chart - $graph->title->Set($lang['TaskGantt']." ". $lang['forphrase'] ." " . - html_entity_decode($parent->getFullName()) ); + if (count($parents) == 1) { + $graph->title->Set($lang['TaskGantt']." ". $lang['forphrase'] ." " . + html_entity_decode($parents[0]->getFullName()) ); + } else { + $graph->title->Set($lang['TaskGantt']." ". $lang['forphrase'] ." " . + count($parents).' '. $lang['Projects'] ); + } $graph->title->SetFont($font,FS_BOLD,12); @@ -265,7 +289,9 @@ $count = 0; - $graph = gantt_addTasks($parent, $graph, $count, 0); + foreach($parents as $p) { + $graph = gantt_addTasks($p, $graph, $count, 0); + } // Add a vertical line for the current day // $vline = new GanttVLine(strftime("%Y-%m-%d", time())); @@ -278,7 +304,7 @@ } } -/* --------------------------------------------------------------------------- +/** * get the latest and earliest datetimes */ function task_calc (&$obj) { @@ -1068,10 +1094,10 @@ $t =myentities($this->name); $t =str_replace("'","\'",$t); - $info = ""; - $info .= "<html>"; - $info .= "<body>"; - $info .= "<table class=\"popupinfo\">"; + $info = ''; + $info .= '<html>'; + $info .= '<body>'; + $info .= '<table class="popupinfo">'; $x = $this->parent; if( !is_object($x) ) unset($x); @@ -1091,7 +1117,8 @@ $info .= "<tr><th>". $name ."</th></tr>"; if ( ($this->s_start->notime != 1) || ($this->s_end->notime != 1) ) { $info .= "<tr><td><font size=\"-2\">"; - $info .= $this->s_start->getDate() ." - ". $this->s_end->getDate(); + $info .= $this->s_start->getDate() .' - '. $this->s_end->getDate(); + $info .= ' '. $this->getState(); $info .= "</font></td></tr>"; } if ( $this->volume != 0 ) { @@ -1375,7 +1402,11 @@ $volume_done = $this->volume_done; } - $r .= ' <td align="right" valign="top" nowrap="nowrap">'.sprintf("%3.2f %%",$c ) .' <br /> ' .hour_format($volume_done,2) .' / '. hour_format($volume,2) .' '. $lang['hours'] ." </td>\n"; + $r .= ' <td align="right" valign="top" nowrap="nowrap">'; + $r .= sprintf("%3.2f %%",$c ) .' '; + $r .= '<br /> ' .hour_format($volume_done,2) .' / '. hour_format($volume,2) .' '. $lang['hours']; + $r .= '<br /> '.$this->getState(); + $r .= " </td>\n"; $r .= ' <td valign="top" align="right">' .$this->s_start->getDate() ." </td>\n"; @@ -1458,7 +1489,7 @@ } $r .= " </td>\n"; - // Info about connected docs and bugs + // Info about connected docs and bugs if ($tutos[task_show_fileinfo] == 1) { tutos_file::obj_read($this); $r .= '<td>'.tutos_file::summary($this).' </td>'; @@ -1468,13 +1499,13 @@ $r .= '<td>'.bug::summary($this).' </td>'; } - // Custom fields + // Custom fields if ($small == 0) { $r .= show_custom_overview_data($this,'task',$this); } $r .= " <td align=\"center\"> "; if ( $tutos[massupdate] == 1 ) { - // Checkbox column for massupdate + // Checkbox column for massupdate if ( $this->mod_ok() ) { $r .= "<input name=\"mark[]\" type=\"checkbox\" value=\"". $this->id ."\" />"; } else { |
From: Gero K. <gok...@us...> - 2009-07-29 11:34:55
|
Update of /cvsroot/tutos/tutos/php/file In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19953 Modified Files: file.pinc Log Message: fix Index: file.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file.pinc,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- file.pinc 22 Jun 2009 20:17:10 -0000 1.88 +++ file.pinc 29 Jul 2009 11:34:44 -0000 1.89 @@ -384,32 +384,34 @@ if ( ($this->filetype == "image/jpeg") ) { $r .= "EXIF:<br />\n"; $exif = exif_read_data ($fname,"ANY_TAG",true,true); - foreach($exif as $key => $val) { - if (gettype($val) == "array") { - $r .= "\t". $key ."<br />\n"; - foreach($val as $k2 => $v2) { - if ($k2 == "MakerNote") { - $r .= "\t\t". $k2 ." => ". gettype($v2)."<br />\n"; - } else if ($k2 == "UserComment") { - $r .= "\t\t". $k2 ." => ". chop($v2)."<br />\n"; - } else if ($k2 == "THUMBNAIL") { - $r .= "\t\t". $k2 ." => <img alt=\"". $this->getFullName() ."\" align=\"top\" border=\"1\" src=\"". dirname(getBaseUrl()) ."/". addSessionKey($this->getUrl()."&format=thumbnail") ."\">\n\n"; - } else if (gettype($v2) == "string") { - $r .= "\t\t". $k2 ." => ". chop($v2)."<br />\n"; - } else if (gettype($v2) == "integer") { - $r .= "\t\t". $k2 ." => ". $v2."<br />\n"; - } else if (gettype($v2) == "array") { - $r .= "\t\t". $k2 ." => "; - foreach ($v2 as $x) { - $r .= "(". $x .")"; + if (is_array($exif)) { + foreach($exif as $key => $val) { + if (gettype($val) == "array") { + $r .= "\t". $key ."<br />\n"; + foreach($val as $k2 => $v2) { + if ($k2 == "MakerNote") { + $r .= "\t\t". $k2 ." => ". gettype($v2)."<br />\n"; + } else if ($k2 == "UserComment") { + $r .= "\t\t". $k2 ." => ". chop($v2)."<br />\n"; + } else if ($k2 == "THUMBNAIL") { + $r .= "\t\t". $k2 ." => <img alt=\"". $this->getFullName() ."\" align=\"top\" border=\"1\" src=\"". dirname(getBaseUrl()) ."/". addSessionKey($this->getUrl()."&format=thumbnail") ."\">\n\n"; + } else if (gettype($v2) == "string") { + $r .= "\t\t". $k2 ." => ". chop($v2)."<br />\n"; + } else if (gettype($v2) == "integer") { + $r .= "\t\t". $k2 ." => ". $v2."<br />\n"; + } else if (gettype($v2) == "array") { + $r .= "\t\t". $k2 ." => "; + foreach ($v2 as $x) { + $r .= "(". $x .")"; + } + $r .= "<br />\n"; + } else { + $r .= "\t\t". $k2 ." => [". gettype($v2)."]<br />\n"; } - $r .= "<br />\n"; - } else { - $r .= "\t\t". $k2 ." => [". gettype($v2)."]<br />\n"; } + } else { + $r .= "\t". $key ." => ". chop($val) ."<br />\n"; } - } else { - $r .= "\t". $key ." => ". chop($val) ."<br />\n"; } } } |
From: Gero K. <gok...@us...> - 2009-07-28 20:19:00
|
Update of /cvsroot/tutos/tutos/php/testmanager In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12963 Modified Files: testrun_show.php Log Message: fix prefix Index: testrun_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testrun_show.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- testrun_show.php 25 Jun 2009 15:10:39 -0000 1.3 +++ testrun_show.php 28 Jul 2009 20:18:51 -0000 1.4 @@ -118,7 +118,7 @@ // show the whole thing if(is_object($this->obj->run)) { - $r .= $this->obj->printrow($this->obj->run,4,0); + $r .= $this->obj->printrow($this->obj->run,4,1); } $r .= $this->DataTableEnd(); return $r; @@ -127,7 +127,7 @@ * prepare */ Function prepare() { - global $msg,$lang,$tutos; + global $msg,$lang,$tutos; $this->name = $lang['TestrunDetail']; $this->obj = new testrun($this->dbconn); @@ -177,15 +177,15 @@ $this->addMenu($x); } - if ($tutos[fpdfpath] != "") { - $l = addUrlParameter($this->obj->getUrl(),"format=pdf"); - $x = array( url => $l, - text => 'PDF', - info => 'PDF', - category => array("view","team") - ); - $this->addMenu($x); - } + if ($tutos[fpdfpath] != "") { + $l = addUrlParameter($this->obj->getUrl(),"format=pdf"); + $x = array( url => $l, + text => 'PDF', + info => 'PDF', + category => array("view","team") + ); + $this->addMenu($x); + } add_module_addlinks($this,$this->obj); // add this page to the browsehistory of the users session @@ -198,6 +198,6 @@ $dbconn->Close(); ?> <!-- - CVS Info: $Id$ - $Author$ ---> \ No newline at end of file +CVS Info: $Id$ + $Author$ + --> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-07-28 18:41:21
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30846/php/bugtracking Modified Files: bug_overview.php bug_select.php Log Message: know about extended search Index: bug_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_overview.php,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- bug_overview.php 28 Jul 2009 13:38:52 -0000 1.49 +++ bug_overview.php 28 Jul 2009 18:41:03 -0000 1.50 @@ -669,6 +669,11 @@ $this->stop = true; } + if (isset($_GET['ext'])) { + $this->ext = $_GET['ext']; + } else { + $this->ext = 0; + } $this->link1 = "bugtracking/bug_overview.php"; $this->link1 = addUrlParameter($this->link1,"format=".UrlEncode($this->format)); @@ -726,7 +731,7 @@ $this->filter['name'] = $name; // on non extended search look also for references - if ($_GET['ext'] == 0 && $_GET['name'] != '') { + if ($this->ext == 0 && $_GET['name'] != '') { $arr = search_by_name($_GET['name'],"atdcp",0); $l = ''; $lpre = ''; Index: bug_select.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_select.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- bug_select.php 29 Jun 2009 08:55:51 -0000 1.17 +++ bug_select.php 28 Jul 2009 18:41:03 -0000 1.18 @@ -34,6 +34,7 @@ $r = ''; $r .= "<form id=\"bugsearch\" name=\"bugsearch\" method=\"get\" action=\"bug_overview.php\">\n"; + $this->addHidden('ext',$this->ext); $r .= DoubleTableStart(); $r .= "<tr>\n"; |
From: Gero K. <gok...@us...> - 2009-07-28 18:41:11
|
Update of /cvsroot/tutos/tutos/php/doctracker In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30846/php/doctracker Modified Files: doc_overview.php doc_select.php Log Message: know about extended search Index: doc_select.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/doctracker/doc_select.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- doc_select.php 26 Jun 2009 12:43:11 -0000 1.3 +++ doc_select.php 28 Jul 2009 18:41:03 -0000 1.4 @@ -33,6 +33,7 @@ $r = ''; $r .= "<form id=\"docsearch\" name=\"docsearch\" method=\"get\" action=\"doc_overview.php\">\n"; + $this->addHidden('ext',$this->ext); $r .= DoubleTableStart(); $r .= "<tr>\n"; $r .= '<th colspan="3">'. $lang['SearchForDocTrack'] ."</th>\n"; Index: doc_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/doctracker/doc_overview.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- doc_overview.php 21 Jul 2009 14:18:52 -0000 1.5 +++ doc_overview.php 28 Jul 2009 18:41:03 -0000 1.6 @@ -314,6 +314,11 @@ global $tutos,$msg,$lang,$current_user,$table; $this->layout_id = usedoctracker; + if (isset($_GET['ext'])) { + $this->ext = $_GET['ext']; + } else { + $this->ext = 0; + } $this->header = ''; $hpre = ''; @@ -342,7 +347,7 @@ $this->q .= ' or '. $this->dbconn->Like("path",$_GET['name']); $this->q .= ' or '. $this->dbconn->Like("shortdesc",$_GET['name']); $this->filter['shortdesc'] = $_GET['name']; - if ($_GET['ext'] == 0) { + if ($this->ext == 0) { // also search the custom ascii fields // also search referenced names in atdcp $arr = search_by_name($_GET['name'],"atdcp",0); |
From: Gero K. <gok...@us...> - 2009-07-28 18:35:01
|
Update of /cvsroot/tutos/tutos/php/testmanager In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29911/php/testmanager Modified Files: testmanager.pinc testrun_ins.php testrun_overview.php testrun_select.php Log Message: better testmanger handling / bugfix Index: testrun_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testrun_overview.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- testrun_overview.php 27 Jul 2009 19:27:29 -0000 1.6 +++ testrun_overview.php 28 Jul 2009 18:34:51 -0000 1.7 @@ -159,6 +159,12 @@ $this->layout_id = usetestrun; + if (isset($_GET['ext'])) { + $this->ext = $_GET['ext']; + } else { + $this->ext = 0; + } + $this->header = ''; $hpre = ''; $this->head['refid'] = true; @@ -185,7 +191,7 @@ $this->link1 = addUrlParameter($this->link1,"name=".UrlEncode($name)); // on non extended search look also for references - if ($_GET['ext'] == 0 && $name != '') { + if ($this->ext == 0 && $name != '') { $arr = search_by_name($name,"p",0); $l = ''; $lpre = ''; Index: testrun_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testrun_ins.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- testrun_ins.php 27 Jul 2009 15:04:53 -0000 1.2 +++ testrun_ins.php 28 Jul 2009 18:34:51 -0000 1.3 @@ -44,7 +44,7 @@ $dbconn->Begin("WORK"); $msg .= $obj->parse_input($obj->run); $dbconn->Commit("WORK"); - +# echo $msg."<br> ".$gotourl; leave_insert($dbconn,'../'.$gotourl,$msg); exit; } Index: testmanager.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testmanager.pinc,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- testmanager.pinc 27 Jul 2009 19:27:29 -0000 1.28 +++ testmanager.pinc 28 Jul 2009 18:34:51 -0000 1.29 @@ -207,21 +207,21 @@ * set the name */ function setName($value) { - return $this->setStrField('name',trim($value),'TestcaseName'); + return $this->setStrField('name',trim($value),'TestcaseName'); } /** * set the steps */ function setSteps($value) { - return $this->setStrField('steps',trim($value),'TestcaseSteps'); + return $this->setStrField('steps',trim($value),'TestcaseSteps'); } /** * set the expected result */ function setExpected($value) { - return $this->setStrField('expected',trim($value),'TestcaseExpected'); + return $this->setStrField('expected',trim($value),'TestcaseExpected'); } /** @@ -513,16 +513,16 @@ switch ($f['field']) { case 'TestcaseResult': $x['field'] = $lang[$f['field']]; - $x['new'] = (empty($f['new']) ? '':$lang['TestcaseResults'][$f['new']]); - $x['old'] = (empty($f['old']) ? '':$lang['TestcaseResults'][$f['old']]); - return $x; + $x['new'] = (empty($f['new']) ? '':$lang['TestcaseResults'][$f['new']]); + $x['old'] = (empty($f['old']) ? '':$lang['TestcaseResults'][$f['old']]); + return $x; case 'TestcaseRef': $x['field'] = $lang[$f['field']]; - $a = getObject($this->dbconn,$f['old']); - $b = getObject($this->dbconn,$f['new']); - $x['old'] = (is_object($a) ? $a->getLink():''); - $x['new'] = (is_object($b) ? $b->getLink():''); - return $x; + $a = getObject($this->dbconn,$f['old']); + $b = getObject($this->dbconn,$f['new']); + $x['old'] = (is_object($a) ? $a->getLink():''); + $x['new'] = (is_object($b) ? $b->getLink():''); + return $x; } } @@ -604,9 +604,9 @@ if (isset($this->lastmod[0])) { $i = $this->lastmod[0]; $n .= "\r\n\r\n".sprintf($lang['TestrunLastMod'], - $lang['TestcaseResults'][$i['new']], - $i['date']->getDateTime(), - $i['user']->getFullName()); + $lang['TestcaseResults'][$i['new']], + $i['date']->getDateTime(), + $i['user']->getFullName()); } $pdf->MultiCell(40,$h,$n,'TLR','C'); $maxy = max($maxy,$pdf->y); @@ -627,7 +627,7 @@ /** * a inputrow to enter a tc */ - function printinputrow($baseobj,&$prefix,&$cnt) { + function printinputrow($baseobj,$prefix,$cnt) { global $lang,$current_user; if ($this->activ != 1) { @@ -657,7 +657,7 @@ $r .= $this->comment; $r .= "</textarea>\n"; $r .= '</td>'; - $r .= '</tr>'; + $r .= '</tr>'."\n"; // second row $r .= '<tr>'; // last modificator @@ -695,8 +695,7 @@ } } $r .= ' </td>'; - $r .= '</tr>'; - $cnt++; + $r .= '</tr>'."\n"; return $r; } @@ -1133,7 +1132,7 @@ * set the description the TS */ function setDesc($value) { - return $this->setStrField('desc',trim($value),'TestsuiteDesc'); + return $this->setStrField('desc',trim($value),'TestsuiteDesc'); } /** @@ -1354,11 +1353,11 @@ $s = ''; $sum = 0; foreach($arr as $f) { - $sum += $f; + $sum += $f; } foreach($arr as $i => $f) { - $m .= $s.' '.testcase::getResultColor($i).' '.$f .' '.sprintf('%.2f %%',100.0 * $f/$sum); - $s = $sep; + $m .= $s.' '.testcase::getResultColor($i).' '.$f .' '.sprintf('%.2f %%',100.0 * $f/$sum); + $s = $sep; } return $m; } @@ -1374,17 +1373,17 @@ case 'TestcaseCreate': case 'TestsuiteCreate': $x['field'] = $lang[$f['field']]; - $b = getObject($this->dbconn,$f['new']); - $x['old'] = null; - $x['new'] = (is_object($b) ? $b->getLink():''); - return $x; + $b = getObject($this->dbconn,$f['new']); + $x['old'] = null; + $x['new'] = (is_object($b) ? $b->getLink():''); + return $x; case 'TestsuiteRef': $x['field'] = $lang[$f['field']]; - $a = getObject($this->dbconn,$f['old']); - $b = getObject($this->dbconn,$f['new']); - $x['old'] = (is_object($a) ? $a->getLink():''); - $x['new'] = (is_object($b) ? $b->getLink():''); - return $x; + $a = getObject($this->dbconn,$f['old']); + $b = getObject($this->dbconn,$f['new']); + $x['old'] = (is_object($a) ? $a->getLink():''); + $x['new'] = (is_object($b) ? $b->getLink():''); + return $x; } } @@ -1588,25 +1587,25 @@ * read the linked object */ function read_reference () { - if ( $this->ref_id != -1 && !empty($this->ref_id) ) { - $this->ref = getObject($this->dbconn,$this->ref_id); - if ( ! is_object($this->ref) ) { - $this->ref = null; - } - } - if ( $this->test_id != -1 && !empty($this->test_id) ) { - $this->suite = getObject($this->dbconn,$this->test_id); - if ( ! is_object($this->suite) ) { - $this->suite = null; - } - } - if ( $this->run_id != -1 && !empty($this->run_id) ) { - $this->run = getObject($this->dbconn,$this->run_id); - if ( ! is_object($this->run) ) { - $this->run = null; - } - } - return; + if ( $this->ref_id != -1 && !empty($this->ref_id) ) { + $this->ref = getObject($this->dbconn,$this->ref_id); + if ( ! is_object($this->ref) ) { + $this->ref = null; + } + } + if ( $this->test_id != -1 && !empty($this->test_id) ) { + $this->suite = getObject($this->dbconn,$this->test_id); + if ( ! is_object($this->suite) ) { + $this->suite = null; + } + } + if ( $this->run_id != -1 && !empty($this->run_id) ) { + $this->run = getObject($this->dbconn,$this->run_id); + if ( ! is_object($this->run) ) { + $this->run = null; + } + } + return; } /** @@ -1648,7 +1647,7 @@ * set the name */ function setName($value) { - return $this->setStrField('name',trim($value),'TestrunName'); + return $this->setStrField('name',trim($value),'TestrunName'); } /** @@ -1672,7 +1671,7 @@ $m = 'missing STATISTICS'; $this->read_reference(); if (!is_object($this->run)) { - return $m.'|'.$this->run.'|'; + return $m.'|'.$this->run.'|'; } return $this->run->getStats($sep); } @@ -1771,9 +1770,9 @@ $this->read_reference(); // check for existance of target XXX if ($this->run != null) { - return sprintf($lang['Testmanager_Err002'],$this->getFullName()); + return sprintf($lang['Testmanager_Err002'],$this->getFullName()); } else { - $r .= sprintf($lang['Testmanager_Err003'],$this->suite->getFullName(),$this->getFullName()); + $r .= sprintf($lang['Testmanager_Err003'],$this->suite->getFullName(),$this->getFullName()); } $obj = $this->suite; $obj->name = 'COPY of '.$obj->name; @@ -1871,11 +1870,11 @@ $r .= '<tr>'; $r .= '<td colspan="'.($cols-1).'"><pre>'; if ($obj->getType() == 'testsuite') { - $r .= $obj->getDesc(); + $r .= $obj->getDesc(); } else { } $r .= '</pre></td>'; - $r .= '</tr>'; + $r .= '</tr>'."\n"; $cnt = 1; if ($obj->getType() == 'testcase' || count($obj->list[usetestcase]) > 0) { $r .= '<tr>'; @@ -1885,17 +1884,17 @@ $r .= '<th>'.$lang['TestcaseExpected'].'</th>'; $r .= '<th>'.$lang['TestcaseResult'].'</th>'; $r .= '<th>'.$lang['TestcaseComment'].'</th>'; - $r .= '</tr>'; + $r .= '</tr>'."\n"; } if ($obj->getType() == 'testcase') { - $r .= $obj->printinputrow($baseobj,$prefix,$cnt); + $r .= $obj->printinputrow($baseobj,$prefix,$cnt++); if (is_object($obj->lastuser) && !isset($this->worker[$obj->lastuser->id])) { $this->worker[$obj->lastuser->id] = $obj->lastuser; } } else { foreach($obj->list[usetestcase] as $i) { - $r .= $i->printinputrow($baseobj,$prefix,$cnt); + $r .= $i->printinputrow($baseobj,$prefix,$cnt++); if (is_object($i->lastuser) && !isset($this->worker[$i->lastuser->id])) { $this->worker[$i->lastuser->id] = $i->lastuser; } @@ -1922,7 +1921,7 @@ $rpre1 .= ' <th colspan="1">email</th>'; $rpre1 .= ' <th colspan="2">Signature</th>'; $rpre1 .= ' <th colspan="1">Date</th>'; - $rpre1 .= '</tr>'; + $rpre1 .= '</tr>'."\n"; foreach($this->worker as $i => $j ) { if (is_object($j)) { $r1 .= $rpre1; @@ -1950,7 +1949,7 @@ * TR: recursiv parse input */ function parse_input($obj) { - global $msg,$gotourl,$lang; + global $msg,$gotourl,$lang; $r = ''; if ($this->state == TR_CLOSED) { @@ -1971,24 +1970,25 @@ foreach($obj->list[usetestcase] as $i) { $x = false; if (isset($_REQUEST['comment_'.$i->id])) { - $x = $x || $i->setComment(StripSlashes($_REQUEST['comment_'.$i->id])); + $x = $i->setComment(StripSlashes($_REQUEST['comment_'.$i->id])) || $x; } if (isset($_REQUEST['result_'.$i->id])) { - $x = $x || $i->setResult($_REQUEST['result_'.$i->id]); + $x = $i->setResult($_REQUEST['result_'.$i->id]) || $x; } if (isset($_REQUEST['OK_'.$i->id])) { $gotourl = $gotourl.'#id'.$i->id; } if ($x) { $r .= $i->save(); - $r .= ' saved '.$i; + $r .= ' saved '.$i->getFullName().'<br />'; } else { - $r .= 'not saved '.$i; +# $r .= 'not saved '.$i->getFullName().'<br />'; } } foreach($obj->list[usetestsuite] as $i) { $r .= $this->parse_input($i); } + return $r; } /** @@ -2005,7 +2005,7 @@ $url = addUrlParameter($base,'rid='.$obj->id); $r .= makelink($url,$obj->getFullName()); $r .= '</td>'; - $r .= '</tr>'; + $r .= '</tr>'."\n"; $cnt = 1; foreach($obj->list[usetestcase] as $i) { $r .= '<tr>'; @@ -2034,7 +2034,7 @@ $this->run->collectStats($arr); $sum = 0; foreach($arr as $f) { - $sum += $f; + $sum += $f; } $pdf->Cell(35,12,myiconv($lang['TestrunStats'].':')); @@ -2066,9 +2066,9 @@ switch ($f['field']) { case 'TestrunState': $x['field'] = $lang[$f['field']]; - $x['new'] = (empty($f['new']) ? '':$lang['TestrunStates'][$f['new']]); - $x['old'] = (empty($f['old']) ? '':$lang['TestrunStates'][$f['old']]); - return $x; + $x['new'] = (empty($f['new']) ? '':$lang['TestrunStates'][$f['new']]); + $x['old'] = (empty($f['old']) ? '':$lang['TestrunStates'][$f['old']]); + return $x; } } Index: testrun_select.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testrun_select.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- testrun_select.php 27 Jul 2009 19:27:29 -0000 1.2 +++ testrun_select.php 28 Jul 2009 18:34:51 -0000 1.3 @@ -33,6 +33,7 @@ $r = ''; $r .= "<form id=\"testrunsearch\" name=\"testrunsearch\" method=\"get\" action=\"testrun_overview.php\">\n"; + $this->addHidden('ext',$this->ext); $r .= DoubleTableStart(); $r .= "<tr>\n"; $r .= '<th colspan="3">'. $lang['TestrunSearch'] ."</th>\n"; |
From: Gero K. <gok...@us...> - 2009-07-28 18:35:01
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29911/php Modified Files: webelements.p3 Log Message: better testmanger handling / bugfix Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.371 retrieving revision 1.372 diff -u -d -r1.371 -r1.372 --- webelements.p3 24 Jul 2009 12:57:12 -0000 1.371 +++ webelements.p3 28 Jul 2009 18:34:50 -0000 1.372 @@ -847,7 +847,15 @@ $pre = ini_get('arg_separator.output'); } } + $x = strpos($href,'#'); + if (false !== $x) { + $loc = substr($href,$x); + $href = substr($href,0,$x); + } $href .= $pre . $key; + if (false !== $x) { + $href .= $loc; + } return $href; } /** @@ -1324,9 +1332,9 @@ $a = new installation($dbconn); $a->read_result($r6,0); } elseif ( $n7 == 1 ) { - foreach($r7 as $a) { - break; - } + foreach($r7 as $a) { + break; + } } if ( strstr($mode,"a") != FALSE ) { |
From: Gero K. <gok...@us...> - 2009-07-28 13:39:06
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20844 Modified Files: bug_overview.php Log Message: fix Index: bug_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_overview.php,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- bug_overview.php 28 Jul 2009 11:39:07 -0000 1.48 +++ bug_overview.php 28 Jul 2009 13:38:52 -0000 1.49 @@ -655,6 +655,8 @@ $this->head['class'] = true; $this->head['refid'] = true; + $ref = null; + if ( $this->format == "stat") { $this->name = $lang['BugStatsTitle']; } else { @@ -1015,7 +1017,12 @@ $this->addmenu($x); if ( $this->user->feature_ok(usebugtracking,PERM_NEW) ) { - $x = array( url => "bugtracking/bug_new.php", + $url = 'bugtracking/bug_new.php'; + if (is_object($ref)) { + $url = addUrlParameter($url,"pid=".$ref->id); + } + + $x = array( url => $url, text => $lang['NewEntry'], info => $lang['CreateNewBug'], category => array("bug","new","obj") |
From: Gero K. <gok...@us...> - 2009-07-28 11:39:25
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4780 Modified Files: bug_overview.php Log Message: fix Index: bug_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_overview.php,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- bug_overview.php 22 Jul 2009 14:04:41 -0000 1.47 +++ bug_overview.php 28 Jul 2009 11:39:07 -0000 1.48 @@ -647,6 +647,10 @@ $this->header = ''; $hpre = ''; + $this->filter = array(); + $this->filter['refname'] = ''; + $this->filter['name'] = ''; + $this->head['state'] = true; $this->head['class'] = true; $this->head['refid'] = true; @@ -664,7 +668,6 @@ } $this->link1 = "bugtracking/bug_overview.php"; - $this->filter = array(); $this->link1 = addUrlParameter($this->link1,"format=".UrlEncode($this->format)); @@ -702,7 +705,6 @@ } else { $name = ""; } - $this->filter['name'] = ""; |