tutos-commits Mailing List for TUTOS (Page 22)
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <gok...@us...> - 2012-09-22 15:31:06
|
Revision: 790 http://tutos.svn.sourceforge.net/tutos/?rev=790&view=rev Author: gokohnert Date: 2012-09-22 15:31:00 +0000 (Sat, 22 Sep 2012) Log Message: ----------- fix IE/Opera Modified Paths: -------------- trunk/html/default.css Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2012-09-22 15:01:30 UTC (rev 789) +++ trunk/html/default.css 2012-09-22 15:31:00 UTC (rev 790) @@ -360,14 +360,23 @@ } option[selected] { - text-decoration: underline; + text-decoration: underline; } -input[type=checkbox], input[type=radio] { - border: 0px none; - background: transparent; +input[type=checkbox] { + border-width: 1px; + padding: 1px; + margin: 1px; +// background: transparent; } +input[type=radio] { + border-width: 0px; + padding: 1px; + margin: 1px; + background: transparent; +} + /* EOF */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-22 15:01:36
|
Revision: 789 http://tutos.svn.sourceforge.net/tutos/?rev=789&view=rev Author: gokohnert Date: 2012-09-22 15:01:30 +0000 (Sat, 22 Sep 2012) Log Message: ----------- fix for IE Modified Paths: -------------- trunk/html/default.css Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2012-09-22 14:04:23 UTC (rev 788) +++ trunk/html/default.css 2012-09-22 15:01:30 UTC (rev 789) @@ -363,5 +363,11 @@ text-decoration: underline; } +input[type=checkbox], input[type=radio] { + border: 0px none; + background: transparent; +} + + /* EOF */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-22 14:04:29
|
Revision: 788 http://tutos.svn.sourceforge.net/tutos/?rev=788&view=rev Author: gokohnert Date: 2012-09-22 14:04:23 +0000 (Sat, 22 Sep 2012) Log Message: ----------- fix for IE9 Modified Paths: -------------- trunk/php/webelements.p3 Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2012-09-22 13:54:19 UTC (rev 787) +++ trunk/php/webelements.p3 2012-09-22 14:04:23 UTC (rev 788) @@ -2809,11 +2809,14 @@ * leave a insert script */ function leave_insert($dbconn,$gotourl,$msg,$info = '') { + global $lang; + $gotourl = addMessage($gotourl,$msg,true,$info); $gotourl = addSessionKey($gotourl,true); // go to a better place Header("Content-Description: TUTOS Redirect" ); + Header('Content-Type: text/html;charset='. $lang['content_encoding']); Header("Expires: -1"); // required by google chrome Header('Cache-Control: no-store, no-cache, must-revalidate'); Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-22 13:54:25
|
Revision: 787 http://tutos.svn.sourceforge.net/tutos/?rev=787&view=rev Author: gokohnert Date: 2012-09-22 13:54:19 +0000 (Sat, 22 Sep 2012) Log Message: ----------- fix for IE9 Modified Paths: -------------- trunk/html/js/tutos.js Modified: trunk/html/js/tutos.js =================================================================== --- trunk/html/js/tutos.js 2012-09-18 10:50:16 UTC (rev 786) +++ trunk/html/js/tutos.js 2012-09-22 13:54:19 UTC (rev 787) @@ -416,7 +416,7 @@ var all = TUTOSxml.getElementsByTagName("tutos")[0]; - $('#'+name+'-popup').html('...'+all+'...'); +// $('#'+name+'-popup').html('...'+all+'...'); $('#'+name).attr('autocomplete','off'); $('#'+name+'fn').attr('autocomplete','off'); // document.getElementById(name+"-popup").innerHTML = name +"..."+ all + "..."; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-18 10:50:27
|
Revision: 786 http://tutos.svn.sourceforge.net/tutos/?rev=786&view=rev Author: gokohnert Date: 2012-09-18 10:50:16 +0000 (Tue, 18 Sep 2012) Log Message: ----------- utf8 fix Modified Paths: -------------- trunk/php/report-engine/rep_index/en.p3 Modified: trunk/php/report-engine/rep_index/en.p3 =================================================================== --- trunk/php/report-engine/rep_index/en.p3 2012-09-18 10:38:04 UTC (rev 785) +++ trunk/php/report-engine/rep_index/en.p3 2012-09-18 10:50:16 UTC (rev 786) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2004 by Gero Kohnert + * Copyright 2004 - 2012 by Gero Kohnert * * * SVN Info $Id$ @@ -36,17 +36,17 @@ $lang['folder_info'][3] = array("management","Fachabteilungen","VReg/LG","andere Bereiche"); $lang['folder_info'][4] = array("project meetings","status reports"); -$lang['folder_info'][5] = array("Schriftverkehr Unterlieferanten","Angebote Unterlieferanten","Bestellungen","Auftragsbest\xE4tigungen"); -$lang['folder_info'][6] = array("Interne/Externe Lieferscheine","R\xFCckwaren","Bestellungen","SW Lizenznachweise"); -$lang['folder_info'][7] = array("WA/MA Berichte","T\xE4tigkeitsnachweise"); +$lang['folder_info'][5] = array("Schriftverkehr Unterlieferanten","Angebote Unterlieferanten","Bestellungen","Auftragsbestätigungen"); +$lang['folder_info'][6] = array("Interne/Externe Lieferscheine","Rückwaren","Bestellungen","SW Lizenznachweise"); +$lang['folder_info'][7] = array("WA/MA Berichte","Tätigkeitsnachweise"); $lang['folder_info'][8] = array("Gestellte CRs","Genehmigte CRs"); $lang['folder_info'][10] = array("preaqcceptance protocol","acceptance protocol"); $lang['folder_info'][11] = array("Kalkulation","Einzelkostenkalkulation","Mitkalkulation"); -$lang['folder_info'][12] = array("Projektgr\xFCndung","contacts","export control"); +$lang['folder_info'][12] = array("Projektgründung","contacts","export control"); $lang['folder_info'][13] = array("schedule","Personaleinsatzplan"); $lang['folder_info'][14] = array("Abschlussbreicht","Abschlusskalkulation"); -$lang['folder_info'][15] = array("Lasten-/Pflichtenheft","Zeichnungen","Schaltpl\xE4ne","Berechnungen"); -$lang['folder_info'][19] = array("Pr\xE4sentationen / Folien","Ver\xF6ffentlichungen","Referenzblatt"); -$lang['folder_info'][20] = array("Auftrag","Auftragsbest\xE4tigungen","Bonit\xE4tspr\xFCfung Kunde"); +$lang['folder_info'][15] = array("Lasten-/Pflichtenheft","Zeichnungen","Schaltpläne","Berechnungen"); +$lang['folder_info'][19] = array("Präsentationen / Folien","Veröffentlichungen","Referenzblatt"); +$lang['folder_info'][20] = array("Auftrag","Auftragsbestätigungen","Bonitätsprüfung Kunde"); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-18 10:38:15
|
Revision: 785 http://tutos.svn.sourceforge.net/tutos/?rev=785&view=rev Author: gokohnert Date: 2012-09-18 10:38:04 +0000 (Tue, 18 Sep 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/php/report-engine/rep_bug_state_duration/rep_bug_state_duration.pinc Modified: trunk/php/report-engine/rep_bug_state_duration/rep_bug_state_duration.pinc =================================================================== --- trunk/php/report-engine/rep_bug_state_duration/rep_bug_state_duration.pinc 2012-09-14 13:01:40 UTC (rev 784) +++ trunk/php/report-engine/rep_bug_state_duration/rep_bug_state_duration.pinc 2012-09-18 10:38:04 UTC (rev 785) @@ -18,6 +18,8 @@ function rep_bug_state_duration($dbconn,$report) { global $tutos; + loadmodule('bugtracking'); + $this->init($dbconn,$report); $this->format = "html"; $this->obj = -1; @@ -28,7 +30,7 @@ } $this->from->setDateTimeF('f'); $this->to->setDateTimeF('t'); -# echo $this->from->getYYYYMMDD(). $this->from->notime; + # echo $this->from->getYYYYMMDD(). $this->from->notime; $this->bugclass = array(); if (isset($_GET['bugclass'])) { @@ -81,14 +83,14 @@ } $x = new TUTOS_Date_Time(); -# calc the last state only if not CLOSED -# if (($lastState != BUG_STATE_CLOSED) && ($lastState != BUG_STATE_SOLVED)) { - if ($lastState != BUG_STATE_CLOSED) { - $stat[$lastState] += ($x->ts - $lastChange); - } - $lastChange = $x->ts; + # calc the last state only if not CLOSED + # if (($lastState != BUG_STATE_CLOSED) && ($lastState != BUG_STATE_SOLVED)) { + if ($lastState != BUG_STATE_CLOSED) { + $stat[$lastState] += ($x->ts - $lastChange); + } + $lastChange = $x->ts; - return $r; + return $r; } function show() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-14 13:01:51
|
Revision: 784 http://tutos.svn.sourceforge.net/tutos/?rev=784&view=rev Author: gokohnert Date: 2012-09-14 13:01:40 +0000 (Fri, 14 Sep 2012) Log Message: ----------- fix session decode / resolve ID searches in overview headlines Modified Paths: -------------- trunk/php/admin_show.php trunk/php/webelements.p3 Modified: trunk/php/admin_show.php =================================================================== --- trunk/php/admin_show.php 2012-09-13 14:02:24 UTC (rev 783) +++ trunk/php/admin_show.php 2012-09-14 13:01:40 UTC (rev 784) @@ -32,9 +32,8 @@ { // not entirely foolproof, but replace the pipe with something obscure $replacer = chr(254).chr(254).chr(254); - $repRegex = '/(")([A-Za-z0-9_]*?)(\|)/'; - $val = preg_replace($repRegex, '$1$2'.$replacer, $val); - + $repRegex = '/(")([[:alnum:]!_ #]*?)(\|)([[:alnum:]!_ #]*?)(")/'; + $val = preg_replace($repRegex, '$1$2'.$replacer.'$4$5', $val); // split the semi-serialized data into keys and values $splitRegex = '/([^;}][A-Za-z0-9_]*?)\|/'; $splitArray = preg_split($splitRegex, $val, -1, PREG_SPLIT_DELIM_CAPTURE); @@ -46,7 +45,6 @@ while ($var = array_shift($splitArray)) { $val = array_shift($splitArray); $val = str_replace($replacer, '|', $val); - $usefulArray[$var] = unserialize($val); } return $usefulArray; Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2012-09-13 14:02:24 UTC (rev 783) +++ trunk/php/webelements.p3 2012-09-14 13:01:40 UTC (rev 784) @@ -207,7 +207,7 @@ Function ReadLang1(array &$lang,$path,&$user) { global $tutos,$dbconn; - # error_log($_SERVER["REQUEST_URI"] ." > ReadLang1:".count($lang)." ". $path ." ". $user->f_name ." ". $user->l_name ." ". $user->lang ."<br />\n",3,$tutos[errlog]); +# error_log($_SERVER["REQUEST_URI"] ." > ReadLang1:".count($lang)." ". $path ." ". $user->f_name ." ". $user->l_name ." ". $user->lang ."<br />\n",3,$tutos[errlog]); if (! isset($user) ) { $user = new tutos_user($dbconn); @@ -819,8 +819,8 @@ /** * format a value for use with csv files from * "http://de2.php.net/manual/en/function.fputcsv.php#87120" - * output is always converted to target_enc encoding - */ +* output is always converted to target_enc encoding +*/ function txt2csv ($val,$delimiter = '',$enclosure = '') { global $tutos; @@ -920,7 +920,7 @@ $text = preg_replace('#</([BIU])>#im' ,'</$1>',$text); // $text = preg_replace('#"#m' ,'"',$text); if ($ureplace) - $text = urlReplace($text,0); + $text = urlReplace($text,0); if ($ireplace) $text = ImgReplace($text,$obj); @@ -1576,7 +1576,7 @@ foreach ($res as $i => $j) { $gotourl = addUrlParameter($gotourl,$field2."[]=".$i,true); - #echo 'found:'.$j ."<br />"; +#echo 'found:'.$j ."<br />"; } return 0; } @@ -1595,7 +1595,7 @@ return 0; } } - #echo 'RETURN:'.$a."<br />"; +#echo 'RETURN:'.$a."<br />"; return $a; } @@ -1901,7 +1901,7 @@ if ( ! is_object($ref) && $type != 0) { $g_hash[$id] = -1; $g_hash['fail2']++; - // save for future use that this is menwhile deleted + // save for future use that this is meanwhile deleted if($tutos['memcache'] != null) { $memid = $dbconn->db->systemid.'_TT'.$id; $tutos['memcache']->set($memid,0,0,$tutos['timetolive']*360); @@ -1909,7 +1909,7 @@ $memid = $dbconn->db->systemid.'_TT'.$id; apc_store($memid,0,$tutos['timetolive']*360); } - error_log('getObject failed for '.$id .' '.TUTOS_backtrace()."\n",3,$tutos[errlog]); + //error_log('getObject failed for '.$id .' '.TUTOS_backtrace()."\n",3,$tutos[errlog]); } if (is_object($current_user) && ($current_user->id != $save_cu)) { Fatal_Error('user escalation!','OLD:'.$save_cu.' -> '.$current_user); @@ -2472,7 +2472,7 @@ $r .= $d['comp_method']." "; $r .= '</td>'."\r\n"; $r .= '</tr>'; - # print_r($d); +# print_r($d); } $r .= DoubleTableEnd(); $za->close(); @@ -2838,7 +2838,7 @@ } Header("Expires: -1"); Header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); - # Header("Pragma: no-cache"); // won't work with IE7 +# Header("Pragma: no-cache"); // won't work with IE7 Header("Pragma: public"); Header("Content-Description: Upload from TUTOS" ); Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); @@ -3293,12 +3293,30 @@ $obj->header .= ' = '; $pre = ''; foreach ($s as $sn) { + $sn = trim($sn); if ( (substr($sn,0,1) == "!") ) { - $obj->header .= $pre.'<span class="missing">'. htmlentities(substr($sn,1)).'</span>'; + $negate = true; } else { - $obj->header .= $pre.htmlentities($sn); + $negate = false; } - $pre = ','; + // check ID search + $snid = array(); + if (preg_match('/#([0-9]*)/',$sn,$snid)) { + $snobj = getObject($obj->dbconn,$snid[1]); + if (is_object($snobj)) { + $sn = $snobj->getLink(); + } else { + $sn = htmlentities($sn); + } + } else { + $sn = htmlentities($sn); + } + if ( $negate ) { + $obj->header .= $pre.'<span class="missing">'. $sn.'</span>'; + } else { + $obj->header .= $pre.$sn; + } + $pre = ', '; } } @@ -3406,11 +3424,11 @@ // split the source text into arrays of lines $t1 = explode("\n",$old); $x=array_pop($t1); - # if ($x>'') $t1[]="$x\n\\ No newline at end of file"; +# if ($x>'') $t1[]="$x\n\\ No newline at end of file"; if ($x>'') $t1[]="$x\n"; $t2 = explode("\n",$new); $x=array_pop($t2); - # if ($x>'') $t2[]="$x\n\\ No newline at end of file"; +# if ($x>'') $t2[]="$x\n\\ No newline at end of file"; if ($x>'') $t2[]="$x\n"; // build a reverse-index array using the line as key and line number as value This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-13 14:02:35
|
Revision: 783 http://tutos.svn.sourceforge.net/tutos/?rev=783&view=rev Author: gokohnert Date: 2012-09-13 14:02:24 +0000 (Thu, 13 Sep 2012) Log Message: ----------- permissions from projects Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2012-09-13 13:16:49 UTC (rev 782) +++ trunk/php/testmanager/testmanager.pinc 2012-09-13 14:02:24 UTC (rev 783) @@ -1802,6 +1802,38 @@ } /** + * get a short formatted stat for testrun + */ + function getStats($sep = '') { + $this->collectStats(); + + $m = ''; + $sum = 0; + foreach($this->statarr[0] as $f) { + $sum += $f; + } + if ($sep == '') { + foreach($this->statarr[0] as $i => $f) { + $m .= '<tr>'; + $m .= ' <td>'.testcase::getResultColor($i).'</td>'; + $m .= ' <td align="right">'.sprintf('%5s',$f).'</td>'; + $m .= ' <td align="right">'.sprintf('%.2f %%',100.0 * $f/$sum).'</td>'; + $m .= '</tr>'; + } + if ($m == '') + return $m; + return '<table border="0" cellpadding="0" cellspacing="0">'. $m ."</table>\n"; + } else { + $m .= $sep; + foreach($this->statarr[0] as $i => $f) { + $m .= ' '.testcase::getResultColor($i); + $m .= ' '.sprintf('%5s',$f).' = '.sprintf('%.2f %%',100.0 * $f/$sum).$sep; + } + } + return $m; + } + + /** * get the earliest mod in a testsuite */ function getEarliestMod() { @@ -1846,6 +1878,52 @@ return $x; } + /** + * get a array with virtual groups + */ + function getObjectGroups() { + global $lang,$tutos; + + $x = parent::getObjectGroups(); + + $x[$this->getTypeId()][8] = $lang[$this->getType()].':'.$lang['BugReference'].' '.$lang['ProdRoles']; + foreach ($lang['ProdRole'] as $role => $f) { + if ( $tutos[rolecheck][$role] != "p") { + $x[$this->getTypeId()][10+$role] = $lang[$this->getType()].':'.$lang['BugReference'].' '.$f; + } + } + return $x; + } + + /** + * get a array with virtual groups members + */ + function getObjectGroupList($id) { + global $lang,$tutos; + + if ($id < 0) { + $id2 = -($id - ($this->getTypeId() << ACLSHIFT)); + } else { + $id2 = $id; + } + + $x = parent::getObjectGroupList($id); + + if (is_object($this->ref) && ($this->ref->getTypeId() == useprojects) ) { + $this->ref->readroles(); + if ($id2 == 8) { + $x = $this->ref->getObjectGroupList(8); + } + foreach ($lang['ProdRole'] as $role => $f) { + if ( $tutos[rolecheck][$role] == "p") continue; + if ($role+10 == $id2) { + $x = $this->ref->getObjectGroupList($role+128); + } + } + } + return $x; + } + /* --------------------------------------------------------------------------- * The following methods are abstract factory functions for groups * which handle the membership list of an object @@ -2382,6 +2460,9 @@ $this->acl = $this->ref->acl; acl_default($this,$this->creator); + if ( $this->ref->getType() == "product" ) { + acl_raise($this,$this->getObjectGroupId(8),$tutos[modok]); + } // Prepare the history $this->modified[] = array ( "field" => "TestrunCreate" , "old" => "-1" , @@ -2469,7 +2550,7 @@ if ( $obj->result == TC_SKIP ) { $obj->result = TC_SKIP; // pass and skip will be skipped } else if ( $obj->result == TC_PASS ) { - $obj->result = TC_PASS; // pass + $obj->result = TC_PASS; // pass } else if ( $obj->result == TC_FAIL ) { $obj->result = TC_PREVFAIL; // prevoisly failed } else if ( $obj->result == TC_PREVFAIL ) { @@ -2933,6 +3014,52 @@ return $data; } + /** + * get a array with virtual groups + */ + function getObjectGroups() { + global $lang,$tutos; + + $x = parent::getObjectGroups(); + + $x[$this->getTypeId()][8] = $lang[$this->getType()].':'.$lang['BugReference'].' '.$lang['ProdRoles']; + foreach ($lang['ProdRole'] as $role => $f) { + if ( $tutos[rolecheck][$role] != "p") { + $x[$this->getTypeId()][10+$role] = $lang[$this->getType()].':'.$lang['BugReference'].' '.$f; + } + } + return $x; + } + + /** + * get a array with virtual groups members + */ + function getObjectGroupList($id) { + global $lang,$tutos; + + if ($id < 0) { + $id2 = -($id - ($this->getTypeId() << ACLSHIFT)); + } else { + $id2 = $id; + } + + $x = parent::getObjectGroupList($id); + + if (is_object($this->ref) && ($this->ref->getTypeId() == useprojects) ) { + $this->ref->readroles(); + if ($id2 == 8) { + $x = $this->ref->getObjectGroupList(8); + } + foreach ($lang['ProdRole'] as $role => $f) { + if ( $tutos[rolecheck][$role] == "p") continue; + if ($role+10 == $id2) { + $x = $this->ref->getObjectGroupList($role+128); + } + } + } + return $x; + } + /* --------------------------------------------------------------------------- * The following methods are abstract factory functions for groups * which handle the membership list of an object @@ -3180,4 +3307,4 @@ $tutos['classes'][usetestsuite] = 'Testsuite'; $tutos['classes'][usetestcase] = 'Testcase'; $tutos['classes'][usetestrun] = 'Testrun'; -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-13 13:16:58
|
Revision: 782 http://tutos.svn.sourceforge.net/tutos/?rev=782&view=rev Author: gokohnert Date: 2012-09-13 13:16:49 +0000 (Thu, 13 Sep 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/php/timetrack/timetrack_new.php Modified: trunk/php/timetrack/timetrack_new.php =================================================================== --- trunk/php/timetrack/timetrack_new.php 2012-09-11 13:29:24 UTC (rev 781) +++ trunk/php/timetrack/timetrack_new.php 2012-09-13 13:16:49 UTC (rev 782) @@ -87,7 +87,7 @@ $r .= "<tr>\n"; $r .= $this->showfield($lang['TimetrackRef']); $r .= " <td colspan=\"5\">\n"; - if ( ($this->obj->ref->getType() == 'task') || ($this->obj->ref->getType() == 'task') ) { + if ( ($this->obj->ref->getType() == 'task') || ($this->obj->ref->getType() == 'product') ) { $r .= "<select id=\"lid\" name=\"lid\">\n"; foreach ($this->obj->plist as $i => $f) { $r .= '<option value="'. $i .'"'. ($i == $this->obj->ref->id ? ' selected="selected">* ':'>') . $lang[$f->getType()] .': '. myentities($f->getFullName()) ."</option>\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-11 13:29:35
|
Revision: 781 http://tutos.svn.sourceforge.net/tutos/?rev=781&view=rev Author: gokohnert Date: 2012-09-11 13:29:24 +0000 (Tue, 11 Sep 2012) Log Message: ----------- show menu in diff pages Modified Paths: -------------- trunk/php/subversion/svn_show.php Modified: trunk/php/subversion/svn_show.php =================================================================== --- trunk/php/subversion/svn_show.php 2012-09-11 13:13:42 UTC (rev 780) +++ trunk/php/subversion/svn_show.php 2012-09-11 13:29:24 UTC (rev 781) @@ -38,8 +38,7 @@ $this->width = 3; $r = ''; - if ($this->format == 'diff') { - $this->obj->getLocalRepoPath(); + if ($this->iformat == 'diff') { $r .= '<pre>'; $r .= $this->obj->retrieve_diff($this->path); $r .= '</pre>'; @@ -200,6 +199,11 @@ $this->format = 'html'; } } + if ($this->format == 'diff') { + $this->obj->getLocalRepoPath(); + $this->iformat = 'diff'; + $this->format = 'html'; + } // menu # $m = svn::getSelectLink($this->user, $lang['Search']); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-11 13:13:53
|
Revision: 780 http://tutos.svn.sourceforge.net/tutos/?rev=780&view=rev Author: gokohnert Date: 2012-09-11 13:13:42 +0000 (Tue, 11 Sep 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/php/subversion/svn_show.php Modified: trunk/php/subversion/svn_show.php =================================================================== --- trunk/php/subversion/svn_show.php 2012-09-11 12:08:26 UTC (rev 779) +++ trunk/php/subversion/svn_show.php 2012-09-11 13:13:42 UTC (rev 780) @@ -42,7 +42,7 @@ $this->obj->getLocalRepoPath(); $r .= '<pre>'; $r .= $this->obj->retrieve_diff($this->path); - $r .= '/<pre>'; + $r .= '</pre>'; return $r; } if ($this->iformat == 'show') { @@ -233,4 +233,4 @@ $l = new Svn_show($current_user); $l->display(); $dbconn->Close(); -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-11 12:08:35
|
Revision: 779 http://tutos.svn.sourceforge.net/tutos/?rev=779&view=rev Author: gokohnert Date: 2012-09-11 12:08:26 +0000 (Tue, 11 Sep 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/php/subversion/svn.pinc Modified: trunk/php/subversion/svn.pinc =================================================================== --- trunk/php/subversion/svn.pinc 2012-09-11 11:35:10 UTC (rev 778) +++ trunk/php/subversion/svn.pinc 2012-09-11 12:08:26 UTC (rev 779) @@ -27,10 +27,10 @@ $d->sec = (integer)$regs[6]; $OFF = $regs[7]; $d->format = 17; -# echo '|'.$str.'|'.$OFF.'|'.$current_user->offset; + # echo '|'.$str.'|'.$OFF.'|'.$current_user->offset; return; } - } +} $tutos['dateformat'][] = 'svnformat1'; /* --------------------------------------------------------------------------- @@ -435,7 +435,7 @@ $url .= 'bugtracking/bug_overview.php?name='; - $log = preg_replace('#('.Bug::get_bug_regex().')#m' ,'<a href="'.normalize_url($url).'$1">$1</a>',$log); + $log = preg_replace('#'.Bug::get_bug_regex().'#m' ,'$1<a href="'.normalize_url($url).'$2">$2</a>$3',$log); return $log; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-11 11:35:16
|
Revision: 778 http://tutos.svn.sourceforge.net/tutos/?rev=778&view=rev Author: gokohnert Date: 2012-09-11 11:35:10 +0000 (Tue, 11 Sep 2012) Log Message: ----------- notfound does not require login Modified Paths: -------------- trunk/php/notfound.php trunk/php/permission.p3 Modified: trunk/php/notfound.php =================================================================== --- trunk/php/notfound.php 2012-09-11 10:43:23 UTC (rev 777) +++ trunk/php/notfound.php 2012-09-11 11:35:10 UTC (rev 778) @@ -1,9 +1,9 @@ <?php /** - * Copyright 1999 - 2009 by Gero Kohnert + * Copyright 1999 - 2012 by Gero Kohnert * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * */ @@ -46,6 +46,6 @@ $dbconn->Close(); ?> <!-- - SVN Info $Id$ - $Author$ +SVN Info $Id$ +$Author$ --> \ No newline at end of file Modified: trunk/php/permission.p3 =================================================================== --- trunk/php/permission.p3 2012-09-11 10:43:23 UTC (rev 777) +++ trunk/php/permission.p3 2012-09-11 11:35:10 UTC (rev 778) @@ -218,19 +218,30 @@ Function free_login (tutos_db $dbconn) { global $current_user, $tutos, $lang; - if ($tutos[help_need_login] == 1) { - return 0; - } + // check against help.php $x = strpos($_SERVER['SCRIPT_NAME'],"help.php"); - if ( $x != (strlen($_SERVER['SCRIPT_NAME']) - 8) ) { - return 0; + if ( $x == (strlen($_SERVER['SCRIPT_NAME']) - 8) ) { + // calling help script + if ($tutos[help_need_login] != 1) { + // create a default user + $current_user= new tutos_user($dbconn); + ReadLang($lang); + return true; + } + return false; } - // create a default user - $current_user= new tutos_user($dbconn); - ReadLang($lang); - return 1; + // check against notfound.php + $x = strpos($_SERVER['SCRIPT_NAME'],"notfound.php"); + if ( $x == (strlen($_SERVER['SCRIPT_NAME']) - 12) ) { + // create a default user + $current_user= new tutos_user($dbconn); + ReadLang($lang); + return true; + } + return false; } + /** * log a debug/info message to the DB */ @@ -440,7 +451,7 @@ $current_user= new tutos_user($dbconn); // For login we use default language (via browser settings) - if ( free_login($dbconn) == 1 ) { + if ( free_login($dbconn) ) { ReadLang($lang); return $current_user; } @@ -465,7 +476,7 @@ if ( $auth[0]->getuname() == "" || $auth[0]->getpw() == "" ) { /* No Username or no password supplied */ - if ( free_login($dbconn) == 1 ) { + if ( free_login($dbconn) ) { return $current_user; } // logmessage("missing uname or pw "); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-11 10:43:34
|
Revision: 777 http://tutos.svn.sourceforge.net/tutos/?rev=777&view=rev Author: gokohnert Date: 2012-09-11 10:43:23 +0000 (Tue, 11 Sep 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/php/permission.p3 Modified: trunk/php/permission.p3 =================================================================== --- trunk/php/permission.p3 2012-09-11 09:38:22 UTC (rev 776) +++ trunk/php/permission.p3 2012-09-11 10:43:23 UTC (rev 777) @@ -73,15 +73,15 @@ foreach($tutos[modules] as $m) { if ($m[name] == $class) { loadmodule($m['perm']); -# error_log('autoloaded '.$class."\n",3,$tutos[errlog]); -# echo 'loaded module '.$m[Desc].' <br />'; + # error_log('autoloaded '.$class."\n",3,$tutos[errlog]); + # echo 'loaded module '.$m[Desc].' <br />'; return; # } else { -# echo 'check '.$m[name].' <br />'; + # echo 'check '.$m[name].' <br />'; } } -# error_log('Look for '.$class."\n",3,$tutos[errlog]); -# error_log(TUTOS_backtrace()."\n",3,$tutos[errlog]); + # error_log('Look for '.$class."\n",3,$tutos[errlog]); + # error_log(TUTOS_backtrace()."\n",3,$tutos[errlog]); } spl_autoload_register('tutos_autoloader'); @@ -118,7 +118,7 @@ } # We do that ourself -@ini_set("session.use_trans_sid","off"); + @ini_set("session.use_trans_sid","off"); @ini_set("session.bug_compat_warn","off"); # use files to save session data @@ -127,27 +127,27 @@ @ini_set('mbstring.func_overload','1'); # # On Server Clusters (LoadBalancing) you should -# change savepath to some path all your servers share -# -session_save_path($tutos[sessionpath]); -session_name('TUTOS'); + # change savepath to some path all your servers share + # + session_save_path($tutos[sessionpath]); + session_name('TUTOS'); -include_once 'mail.pinc'; + include_once 'mail.pinc'; -#ini_set("output_handler",""); -#ini_set("zlib.output_compression_level","5"); -# Compress Output -ini_set('zlib.output_compression','On'); + #ini_set("output_handler",""); + #ini_set("zlib.output_compression_level","5"); + # Compress Output + ini_set('zlib.output_compression','On'); -# Cookie lifetime is double lifetime of login seesion -ini_set("session.cookie_lifetime",(2 * 60 * $tutos['timetolive'])); -ini_set("session.gc_maxlifetime",(2 * 60 * $tutos['timetolive'])); -ini_set("session.gc_probability",50); + # Cookie lifetime is double lifetime of login seesion + ini_set("session.cookie_lifetime",(2 * 60 * $tutos['timetolive'])); + ini_set("session.gc_maxlifetime",(2 * 60 * $tutos['timetolive'])); + ini_set("session.gc_probability",50); -$max_vars1 = ini_get('suhosin.post.max_vars'); -if (isset($max_vars1) && is_numeric($max_vars1) && $max_vars1 < 250) { - die('ini value suhosin.post.max_vars '. $max_vars1 ." is to low set it to >= 250 in php.ini\r\n"); -} + $max_vars1 = ini_get('suhosin.post.max_vars'); + if (isset($max_vars1) && is_numeric($max_vars1) && $max_vars1 < 250) { + die('ini value suhosin.post.max_vars '. $max_vars1 ." is to low set it to >= 250 in php.ini\r\n"); + } $max_vars2 = ini_get('suhosin.request.max_vars'); if (isset($max_vars2) && is_numeric($max_vars2) && $max_vars2 < 250) { die('ini value suhosin.request.max_vars '. $max_vars2 ." is to low set it to >= 250 in php.ini\r\n"); @@ -429,9 +429,9 @@ $tutos['SESSID'] = session_id(); $userid = -1; - if ( isset($_POST['dbnr']) ) { + if ( isset($_POST['dbnr']) && $_POST['dbnr'] != '' ) { $dbnr = $_POST['dbnr']; - } elseif ( isset($_GET['dbnr']) ) { + } elseif ( isset($_GET['dbnr']) && $_GET['dbnr'] != '' ) { $dbnr = $_GET['dbnr']; } else { $dbnr = 0; // default @@ -502,7 +502,7 @@ remove_sessionfiles(); } else { $initial_auth = false; -# echo "UID:" .$userid ."<br />\n"; + # echo "UID:" .$userid ."<br />\n"; if ($dbconn == null) { $auth[0]->login_form($_SERVER['SCRIPT_NAME'],'No such database'); } @@ -557,7 +557,7 @@ $_SESSION['client'] = "?"; } -# logmessage($current_user->tz ." ". getenv("TZ")); + # logmessage($current_user->tz ." ". getenv("TZ")); $x = Date("Z"); // this happens in Default TZ $dbconn->TimeZone($current_user->tz); @@ -569,7 +569,7 @@ $current_user->offset = 0; } -# logmessage($y ." - ". $x ." ". $current_user->tz ." ". getenv("TZ")); + # logmessage($y ." - ". $x ." ". $current_user->tz ." ". getenv("TZ")); if ( session_id() == "" ) { $auth[0]->login_form($_SERVER['SCRIPT_NAME'],"No Session"); @@ -711,7 +711,7 @@ if ($age < 60) { continue; } -#echo $filename." ". $age ."<br>"; + #echo $filename." ". $age ."<br>"; unlink($filename); } closedir($handle); @@ -730,7 +730,7 @@ if ($tutos[use_check_dbacl] != 1) return; if ($current_user->isadmin()) return; -# return; + # return; $t1 = ''; $t2 = ''; if ( count($current_user->teamlist) > 0 ) { @@ -739,9 +739,9 @@ $t2 = ' OR (t.adr_id='.$user_id.')'; } $query = 'SELECT DISTINCT i.* FROM ('.$query.') AS i' - .' left join '.$dbconn->prefix .'acl a on (i.'.$id_name.' = a.obj_id) ' - .$t1 - . 'WHERE (a.perm is null OR a.perm>='.$tutos[seeok].')' - .' AND ((a.adr_id is null) OR (a.adr_id='.$user_id.') OR (a.adr_id=0) OR (a.adr_id < 0)'. $t2 .' )'; + .' left join '.$dbconn->prefix .'acl a on (i.'.$id_name.' = a.obj_id) ' + .$t1 + . 'WHERE (a.perm is null OR a.perm>='.$tutos[seeok].')' + .' AND ((a.adr_id is null) OR (a.adr_id='.$user_id.') OR (a.adr_id=0) OR (a.adr_id < 0)'. $t2 .' )'; } ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-09-11 09:38:31
|
Revision: 776 http://tutos.svn.sourceforge.net/tutos/?rev=776&view=rev Author: gokohnert Date: 2012-09-11 09:38:22 +0000 (Tue, 11 Sep 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/php/login.pinc Modified: trunk/php/login.pinc =================================================================== --- trunk/php/login.pinc 2012-08-23 10:21:31 UTC (rev 775) +++ trunk/php/login.pinc 2012-09-11 09:38:22 UTC (rev 776) @@ -62,7 +62,7 @@ $r .= "\n<!-- PHP Version CHECK OK -->"; $r .= "\n<!-- ". phpversion() ." ". PHP_OS ." -->\n"; - $r .= '<form id="loginform" name="loginform" action="'. $this->gotourl ."\" method=\"post\">\n"; + $r .= '<form id="loginform" name="loginform" action="'. htmlentities($this->gotourl) ."\" method=\"post\">\n"; $r .= $this->SelectTableStart(); @@ -232,7 +232,7 @@ $this->center = true; if ( !isset($this->gotourl) ) { - $this->gotourl = $_SERVER['HTTP_REFERER']; + $this->gotour = $_SERVER['HTTP_REFERER']; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-08-23 10:21:43
|
Revision: 775 http://tutos.svn.sourceforge.net/tutos/?rev=775&view=rev Author: gokohnert Date: 2012-08-23 10:21:31 +0000 (Thu, 23 Aug 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/php/testmanager/testrun_show.php Modified: trunk/php/testmanager/testrun_show.php =================================================================== --- trunk/php/testmanager/testrun_show.php 2012-08-23 10:14:55 UTC (rev 774) +++ trunk/php/testmanager/testrun_show.php 2012-08-23 10:21:31 UTC (rev 775) @@ -41,7 +41,7 @@ $to = $this->obj->getLatestMod()->getTimeStamp(); $cntx = GB_WIDTH-100; - $cnt = array_sum($this->obj->run->statarr[0]); + $cnt = array_sum($this->obj->statarr[0]); $data = array(); $datax = array(); $step = round(($to - $from) / $cntx); @@ -63,8 +63,8 @@ // final state $datax[] = $to + ($cntx * 0.08 * $step); foreach($lang['TestcaseResults'] as $i2 => $f2) { - if (isset($this->obj->run->statarr[0][$i2])) { - $data[$i2][] = $this->obj->run->statarr[0][$i2]; + if (isset($this->obj->statarr[0][$i2])) { + $data[$i2][] = $this->obj->statarr[0][$i2]; } else { $data[$i2][] = 0; } @@ -72,7 +72,7 @@ // now walk through the testcases - foreach ($this->obj->run->statarr[3] as $id) { + foreach ($this->obj->statarr[3] as $id) { $x = getObject($this->dbconn,$id); if ($x->getTypeID() != usetestcase) continue; $x->read_last_mod(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-08-23 10:15:01
|
Revision: 774 http://tutos.svn.sourceforge.net/tutos/?rev=774&view=rev Author: gokohnert Date: 2012-08-23 10:14:55 +0000 (Thu, 23 Aug 2012) Log Message: ----------- start with a history search Added Paths: ----------- trunk/php/history_select.php Added: trunk/php/history_select.php =================================================================== --- trunk/php/history_select.php (rev 0) +++ trunk/php/history_select.php 2012-08-23 10:14:55 UTC (rev 774) @@ -0,0 +1,130 @@ +<?php +/** + * Copyright 1999 - 2012 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * + * @modulegroup BASE + * @module history_select + * @package BASE + */ +require_once 'webelements.p3'; +require_once 'permission.p3'; + +// Check if user is allowed to use it +check_user(); +loadmodules('history','select'); +loadlayout(); + +/** + * display a appointment selection form + */ +class History_select extends layout { + /** + * + */ + Function info() { + global $lang,$tutos; + + $this->width = 3; + $r = ''; + $r .= '<form id="hsearch" name="hsearch" action="history_show.php" method="get">'."\n"; + $r.= $this->SelectTableStart(); + $this->addHidden("ext",0); + $r .= $this->headline($lang['History']); + + $r .= "<tr>\n"; + $r .= $this->showfieldc($lang['AdrName'],0,'name'); + $r .= " <td><input id=\"name\" type=\"text\" value=\"\" name=\"name\" /></td>\n"; + $r .= ' <td><input type="submit" value="'. $lang['Search'] .'" title="'.$lang['SearchForApp']."\" /></td>\n"; + + $r .= "</tr><tr>\n"; + $r .= ' <td colspan="3" align="right"><span style="text-align:right;" id="toggler">'. $lang['extended'] ."</span></td>\n"; + $tutos['pagescript'] .= " +$( \"#toggler\" ).click(function() { + $(\".ext\").toggle(); + if ( $(\"#h_ext\").val() == 0 ) { + $(\"#h_ext\").val(1); + } else { + $(\"#h_ext\").val(0); + } + return; + }); +\n"; + if ( $this->ext == 0 ) { + $tutos['pagescript'] .= " + $(\".ext\").hide(); +\n"; + } + + $r .= "</tr><tr class=\"ext\">\n"; + $r .= ' <td rowspan="2" class="desc">'. $lang['TaskBetween'] ."</td>\n"; + $r .= ' <td colspan="2">'; + $r .= $this->hsfd->EnterDate("f",1); + $r .= "</td>\n"; + + $r .= "</tr><tr class=\"ext\">\n"; + $r .= ' <td colspan="2">'; + $r .= $this->hstd->EnterDate("t",1); + $r .= "</td>\n"; + + $r .= "</tr><tr class=\"ext\">\n"; + $r .= "</tr>\n"; + + $r.= $this->SelectTableEnd(); + $r .= hiddenFormElements(); + $r .= $this->getHidden(); + $r .= "</form>\n"; + + // shortcuts with urls + if (class_exists('url')) { + $r .= url::getFastSelect($this); + } + + $r .= $this->setfocus('hsearch.name'); + return $r; + } + + /** + * prepare + */ + Function prepare() { + global $msg,$lang; + + $this->layout_id = usehistory; + $this->name = $lang['History']; + $this->center = true; + $this->css_class = 'selectbox'; + + if ( ! $this->user->feature_ok(usehistory,PERM_SEE) ) { + $msg .= sprintf($lang['Err0022'],$this->name); + $this->stop = true; + } + // Defaults for search + $this->hsfd = new TUTOS_Date_Time(0); + $this->hstd = new TUTOS_Date_Time(0); + + if ( isset($_SESSION['hsearchfrom']) ) { + $this->hsfd->setDateTime($_SESSION['hsearchfrom']); + } + if ( isset($_SESSION['hsearchto']) ) { + $this->hstd->setDateTime($_SESSION['hsearchto']); + } + if ( isset($_GET['ext']) ) { + $this->ext = $_GET['ext']; + } else { + $this->ext = false; + } + } +} + +$l = new History_select($current_user); +$l->display(); +$dbconn->Close(); +?> +<!-- +SVN Info $Id: app_select.php 564 2012-03-28 20:38:20Z gokohnert $ +$Author: gokohnert $ +--> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-08-23 10:14:29
|
Revision: 773 http://tutos.svn.sourceforge.net/tutos/?rev=773&view=rev Author: gokohnert Date: 2012-08-23 10:14:20 +0000 (Thu, 23 Aug 2012) Log Message: ----------- show diff only in long string changes Modified Paths: -------------- trunk/php/base.pinc trunk/php/history.pinc Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2012-08-23 06:31:41 UTC (rev 772) +++ trunk/php/base.pinc 2012-08-23 10:14:20 UTC (rev 773) @@ -660,11 +660,13 @@ * @param String $histfield the label of the field in the history table */ function setStrField ($fld,$value,$histfield) { + global $table; + if ( !isset($this->$fld) ) { // echo "Internal Error: Unknown field in '". $this->gettype() ."' Object :|". $fld ."| Value:|". $value ."|<br />\n"; } if ( $this->$fld != $value ) { - if (!empty($this->$fld)) + if (!empty($this->$fld) && (mb_strlen($this->$fld) > $table['history']['val_old'][size]) ) $this->modified[] = array ( "field" => $histfield , "old" => $this->$fld , "new" => "DIFF:\r\n".PHPDiff($this->$fld,$value) ); else $this->modified[] = array ( "field" => $histfield , "old" => $this->$fld , "new" => $value ); Modified: trunk/php/history.pinc =================================================================== --- trunk/php/history.pinc 2012-08-23 06:31:41 UTC (rev 772) +++ trunk/php/history.pinc 2012-08-23 10:14:20 UTC (rev 773) @@ -99,10 +99,10 @@ /** * Save the history */ -function history_save (&$obj) { +function history_save (tutos_base $obj) { global $tutos, $lang, $current_user, $table; - $msg = ""; + $msg = ''; if ( !isset($obj->modified) || (count($obj->modified) < 1) ) { return; } @@ -153,7 +153,7 @@ /** * get the datetime of last modification */ -function history_get_lastmod (&$obj) { +function history_get_lastmod (tutos_base $obj) { global $table; $q = 'SELECT m_time FROM '. $obj->dbconn->prefix.$table['history'][name].' WHERE obj_id = '. $obj->id ." ORDER BY m_time desc"; @@ -169,7 +169,7 @@ /** * Remove the history of the given object */ -function history_delete (&$obj) { +function history_delete (tutos_base $obj) { global $table; $msg = ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-08-23 06:31:47
|
Revision: 772 http://tutos.svn.sourceforge.net/tutos/?rev=772&view=rev Author: gokohnert Date: 2012-08-23 06:31:41 +0000 (Thu, 23 Aug 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/php/scrum/log_new.php trunk/php/scrum/log_overview.php Modified: trunk/php/scrum/log_new.php =================================================================== --- trunk/php/scrum/log_new.php 2012-08-22 11:43:01 UTC (rev 771) +++ trunk/php/scrum/log_new.php 2012-08-23 06:31:41 UTC (rev 772) @@ -14,12 +14,15 @@ ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; -require_once 'appointment.pinc'; -// Check if user is allowed to use it check_user(); loadmodules('scrumlog','new'); loadmodule('scrumlog'); + +require_once 'appointment.pinc'; +require_once 'task.pinc'; + +// Check if user is allowed to use it loadlayout(); /** @@ -198,10 +201,10 @@ if ( $o->is_moveable() && ($o->w_id > 0) && ($o->start_dt->ts >= $this->sprint->start_dt->ts) ) { -# echo $o->start_dt->ts .'-'. $this->sprint->start_dt->ts .'<br>'; + # echo $o->start_dt->ts .'-'. $this->sprint->start_dt->ts .'<br>'; $day = $o->start_dt->ts - $this->sprint->start_dt->ts; $day = round($day / 86400); -# echo $day .'<br>'; + # echo $day .'<br>'; $this->xarr[$o->w_id][$day][$o->id] = &$o; } else { $this->xarr[-2][-1][$o->id] = &$o; Modified: trunk/php/scrum/log_overview.php =================================================================== --- trunk/php/scrum/log_overview.php 2012-08-22 11:43:01 UTC (rev 771) +++ trunk/php/scrum/log_overview.php 2012-08-23 06:31:41 UTC (rev 772) @@ -590,9 +590,6 @@ $this->result = $this->dbconn->Exec($this->q); - $this->addHidden('xo',$_REQUEST['xo']); - $this->addHidden('xf',$_REQUEST['xf']); - if ($this->head['capacity']) { $this->head['booked'] = true; } @@ -644,4 +641,4 @@ $l = new Log_overview($current_user); $l->display(); $dbconn->Close(); -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-08-22 11:43:12
|
Revision: 771 http://tutos.svn.sourceforge.net/tutos/?rev=771&view=rev Author: gokohnert Date: 2012-08-22 11:43:01 +0000 (Wed, 22 Aug 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2012-08-22 11:34:33 UTC (rev 770) +++ trunk/php/testmanager/testmanager.pinc 2012-08-22 11:43:01 UTC (rev 771) @@ -2294,8 +2294,10 @@ $this->run->collectStats(); $this->statarr = array(); $this->statarr[0] = $this->run->statarr[0]; - $this->statarr[1] = $this->run->statarr[1]->getYYYYMMDDHHMMSS(); - $this->statarr[2] = $this->run->statarr[2]->getYYYYMMDDHHMMSS(); + if (is_object($this->run->statarr[1])) + $this->statarr[1] = $this->run->statarr[1]->getYYYYMMDDHHMMSS(); + if (is_object($this->run->statarr[1])) + $this->statarr[2] = $this->run->statarr[2]->getYYYYMMDDHHMMSS(); $this->statarr[3] = $this->run->statarr[3]; $this->statarr[4] = array_unique($this->run->statarr[4]); // save @@ -2464,8 +2466,10 @@ $obj->comment = $lang['TestrunOldComment']."\n".$obj->comment; } } - if ( $obj->result == TC_PASS || $obj->result == TC_SKIP ) { + if ( $obj->result == TC_SKIP ) { $obj->result = TC_SKIP; // pass and skip will be skipped + } else if ( $obj->result == TC_PASS ) { + $obj->result = TC_PASS; // pass } else if ( $obj->result == TC_FAIL ) { $obj->result = TC_PREVFAIL; // prevoisly failed } else if ( $obj->result == TC_PREVFAIL ) { @@ -3176,4 +3180,4 @@ $tutos['classes'][usetestsuite] = 'Testsuite'; $tutos['classes'][usetestcase] = 'Testcase'; $tutos['classes'][usetestrun] = 'Testrun'; -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-08-22 11:34:39
|
Revision: 770 http://tutos.svn.sourceforge.net/tutos/?rev=770&view=rev Author: gokohnert Date: 2012-08-22 11:34:33 +0000 (Wed, 22 Aug 2012) Log Message: ----------- testrun will cache stats Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2012-08-22 11:27:17 UTC (rev 769) +++ trunk/php/testmanager/testmanager.pinc 2012-08-22 11:34:33 UTC (rev 770) @@ -2292,7 +2292,6 @@ $this->read_reference(); if ($this->statarr == null) { $this->run->collectStats(); - echo 'XX'; $this->statarr = array(); $this->statarr[0] = $this->run->statarr[0]; $this->statarr[1] = $this->run->statarr[1]->getYYYYMMDDHHMMSS(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-08-22 11:27:28
|
Revision: 769 http://tutos.svn.sourceforge.net/tutos/?rev=769&view=rev Author: gokohnert Date: 2012-08-22 11:27:17 +0000 (Wed, 22 Aug 2012) Log Message: ----------- json fields Modified Paths: -------------- trunk/php/db/db.pinc Modified: trunk/php/db/db.pinc =================================================================== --- trunk/php/db/db.pinc 2012-08-22 11:26:30 UTC (rev 768) +++ trunk/php/db/db.pinc 2012-08-22 11:27:17 UTC (rev 769) @@ -423,6 +423,13 @@ } /** + * get a result entry via JSON + */ + function getJSON($pos,$fld) { + return json_decode($this->get($pos,$fld),true); + } + + /** * get the number of rows returned */ function numrows() { @@ -567,6 +574,8 @@ $this->flds[$fld] = sprintf("%F",$val); } else if ( $type == 'INT' ) { $this->flds[$fld] = sprintf("%d",$val); + } else if ( $type == 'JSON' ) { + $this->flds[$fld] = $this->dbconn->String(json_encode($val)); } else if ( $type == 'OBJ' ) { if (is_object($val)) { $this->flds[$fld] = sprintf("%d",$val->id); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-08-22 11:26:37
|
Revision: 768 http://tutos.svn.sourceforge.net/tutos/?rev=768&view=rev Author: gokohnert Date: 2012-08-22 11:26:30 +0000 (Wed, 22 Aug 2012) Log Message: ----------- testrun will cache stats Modified Paths: -------------- trunk/php/testmanager/mtable.pinc trunk/php/testmanager/testmanager.pinc trunk/php/testmanager/testrun_ins.php trunk/php/testmanager/testrun_new.php trunk/php/testmanager/testrun_show.php Modified: trunk/php/testmanager/mtable.pinc =================================================================== --- trunk/php/testmanager/mtable.pinc 2012-08-21 11:59:46 UTC (rev 767) +++ trunk/php/testmanager/mtable.pinc 2012-08-22 11:26:30 UTC (rev 768) @@ -56,7 +56,7 @@ $table['testrun']['test_id'] = array(type => 'ID_TYPE', constraints => '', Desc => 'testsuite base reference'); $table['testrun']['run_id'] = array(type => 'ID_TYPE', constraints => '', Desc => 'testsuite run reference'); $table['testrun']['tr_base_id'] = array(type => 'ID_TYPE', constraints => '', Desc => 'id of a testrun (for retest)'); - +$table['testrun']['stats'] = array(type => 'TX_TYPE', constraints => '', Desc => 'statistics'); $table['testrun']['t_state'] = array(type => 'ID_TYPE', constraints => 'NN', Desc => 'state'); $table['testrun']['creator'] = array(type => "ID_TYPE", constraints => "NN", Desc => "creator ID"); $table['testrun']['creation'] = array(type => "TS_TYPE", constraints => "NN", Desc => "creation date"); Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2012-08-21 11:59:46 UTC (rev 767) +++ trunk/php/testmanager/testmanager.pinc 2012-08-22 11:26:30 UTC (rev 768) @@ -720,13 +720,17 @@ $style = ''; if ($this->activ == 1) { $n = $lang['TestcaseResults'][$this->result]; - if ($this->result == 0) { + if ($this->result == TC_FAIL) { // fail - $style = ' style="background-color:#DAA"'; + $style = ' style="border:1px solid black; background-color:#DAA"'; } - if ($this->result == 1) { + if ($this->result == TC_PREVFAIL) { + // failed previously + $style = ' style="border:1px solid black; background-color:#D88"'; + } + if ($this->result == TC_PASS) { // pass - $style = ' style="background-color:#ADA"'; + $style = ' style="border:1px solid black; background-color:#ADA"'; } if (isset($this->lastmod[0])) { @@ -748,12 +752,12 @@ $c = preg_replace('#\n#','<br />',myentities($this->comment)); $tbl = ' <tr> -<td width="50" align="right">'.$precnt.'</td> -<td width="130">'.$name.'</td> -<td width="140">'.$s.'</td> -<td width="140">'.$e.'</td> -<td width="100" align="center"'.$style.'>'.$n.'</td> -<td width="140">'.$c.'</td> +<td width="45" align="right"><b>'.$precnt.'</b></td> +<td style="border:1px solid black;" width="110">'.$name.'</td> +<td style="border:1px solid black;" width="160">'.$s.'</td> +<td style="border:1px solid black;" width="160">'.$e.'</td> +<td style="border:1px solid black;" width="90" align="center"'.$style.'>'.$n.'</td> +<td style="border:1px solid black;" width="140">'.$c.'</td> </tr> '; return $tbl; @@ -1676,8 +1680,6 @@ function fillPDF(tutospdf $pdf,$precnt = '') { global $lang; - $cnt = 1; - if ($precnt == '') $precnt = $cnt; $pdf->SetFont('times', '', 10); @@ -1689,48 +1691,53 @@ $desc = imgReplace($desc,$this,true); $tbl = ' -<table border ="0" cellpadding="2"> +<table border="0" cellpadding="2"> <tr> - <td width="50" align="right"><h2><b>'.$precnt.'</b></h2></td> + <td width="45" align="right"><h2><b>'.$precnt.'</b></h2></td> <td width="650" align="left"><h2><b>'.$name.'</b></h2></td> </tr> <tr> - <td width="50" align="right"> </td> + <td width="45" align="right"> </td> <td width="650">'.$desc.'</td> </tr> </table> '; $pdf->writeHTML($tbl, true, false, false, false, ''); - $tbl = '<table border ="1" cellpadding="2">'; + $tbl = '<table border="0" cellpadding="2">'; if (count($this->list[usetestcase][0]) > 0) { // header $tbl .= ' <thead> <tr> -<th align="center" width="50"></th> -<th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseName'].'</b></th> -<th style="background-color:#BBB" align="center" width="140"><b>'.$lang['TestcaseSteps'].'</b></th> -<th style="background-color:#BBB" align="center" width="140"><b>'.$lang['TestcaseExpected'].'</b></th> -<th style="background-color:#BBB" align="center" width="100"><b>'.$lang['TestcaseResult'].'</b></th> -<th style="background-color:#BBB" align="center" width="140"><b>'.$lang['TestcaseComment'].'</b></th> +<th align="center" width="45"></th> +<th style="border:1px solid black; background-color:#BBB;" align="center" width="110"><b>'.$lang['TestcaseName'].'</b></th> +<th style="border:1px solid black; background-color:#BBB;" align="center" width="160"><b>'.$lang['TestcaseSteps'].'</b></th> +<th style="border:1px solid black; background-color:#BBB" align="center" width="160"><b>'.$lang['TestcaseExpected'].'</b></th> +<th style="border:1px solid black; background-color:#BBB" align="center" width="90"><b>'.$lang['TestcaseResult'].'</b></th> +<th style="border:1px solid black; background-color:#BBB" align="center" width="140"><b>'.$lang['TestcaseComment'].'</b></th> </tr> </thead> '; } + + $cnt = 1; + if ($precnt != '') $precnt = $precnt.'.'; + + foreach($this->list[usetestcase][0] as $tc) { - $tbl .= $tc->fillPDF($pdf,$precnt.'.'.$cnt); + $tbl .= $tc->fillPDF($pdf,$precnt.$cnt); $cnt++; } if (count($this->list[usetestcase][0]) > 0) { $tbl .= '</table>'; - $pdf->SetFont('times', '', 9); + $pdf->SetFont('times', '', 8); $pdf->writeHTML($tbl, true, false, false, false, ''); $pdf->ln(3); } testsuite::obj_read($this); foreach($this->list[usetestsuite][0] as $ts) { - $ts->fillPDF($pdf,$precnt.'.'.$cnt); + $ts->fillPDF($pdf,$precnt.$cnt); $cnt++; } } @@ -1749,8 +1756,9 @@ } return $r; } + /** - *m collect statistics for a testsuite + * collect statistics for a testsuite */ function collectStats() { @@ -1761,7 +1769,7 @@ $this->statarr[2] = null; // latest $this->statarr[3] = array(); // flat list of obj ids (cases and suites) $this->statarr[3][] = $this->id; - $this->statarr[4] = array(); // worker + $this->statarr[4] = array(); // worker ids testcase::obj_read($this); foreach($this->list[usetestcase][0] as $tc) { @@ -1774,7 +1782,7 @@ $this->statarr[2] = TUTOS_Date_Time::max($this->statarr[2],$tc->lastmod[0]['date']); $x = end($tc->lastmod); $this->statarr[1] = TUTOS_Date_Time::min($this->statarr[1],$x['date']); - $this->statarr[4][$tc->lastmod[0]['user']->id] = $tc->lastmod[0]['user']; + $this->statarr[4][] = $tc->lastmod[0]['user']->id; } $this->statarr[3][] = $tc->id; } @@ -1794,7 +1802,7 @@ } /** - * get the earliest mod + * get the earliest mod in a testsuite */ function getEarliestMod() { $this->collectStats(); @@ -1805,7 +1813,7 @@ } /** - * get the latest mod + * get the latest mod in a testsuite */ function getLatestMod() { $this->collectStats(); @@ -1816,38 +1824,6 @@ } /** - * - */ - function getStats($sep = '') { - $this->collectStats(); - - $m = ''; - $sum = 0; - foreach($this->statarr[0] as $f) { - $sum += $f; - } - if ($sep == '') { - foreach($this->statarr[0] as $i => $f) { - $m .= '<tr>'; - $m .= ' <td>'.testcase::getResultColor($i).'</td>'; - $m .= ' <td align="right">'.sprintf('%5s',$f).'</td>'; - $m .= ' <td align="right">'.sprintf('%.2f %%',100.0 * $f/$sum).'</td>'; - $m .= '</tr>'; - } - if ($m == '') - return $m; - return '<table border="0" cellpadding="0" cellspacing="0">'. $m ."</table>\n"; - } else { - $m .= $sep; - foreach($this->statarr[0] as $i => $f) { - $m .= ' '.testcase::getResultColor($i); - $m .= ' '.sprintf('%5s',$f).' = '.sprintf('%.2f %%',100.0 * $f/$sum).$sep; - } - } - return $m; - } - - /** * resolve a history Tag in this testsuite (to be called from history_show) */ function resolveHistoryTag ($f) { @@ -2090,7 +2066,7 @@ $this->run = null; $this->state = TR_UNDEF; $this->desc = ''; - $this->worker = array(); + $this->statarr = null; $this->tablename = $this->dbconn->prefix .$table['testrun'][name]; $this->run_postinit_hook(); @@ -2110,9 +2086,9 @@ $this->name = $r->get($pos, 'name'); $this->state = $r->get($pos, 't_state'); $this->desc = $r->get($pos, 'description'); + $this->statarr = $r->getJSON($pos,'stats'); + $this->creator = $r->getObject($pos, "creator"); - $this->creator = getObject($this->dbconn,$r->get($pos, "creator")); - parent::read_result($r,$pos); return; } @@ -2233,6 +2209,7 @@ * set the Base Testsuite */ function setTestId($value) { + $this->statarr = array(); return $this->setIntField('test_id',$value,'TestrunSuiteB'); } @@ -2240,6 +2217,7 @@ * set the Run Testsuite */ function setRunId($value) { + $this->statarr = array(); return $this->setIntField('run_id',$value,'TestrunSuiteR'); } @@ -2247,6 +2225,7 @@ * set the State */ function setState($value) { + $this->statarr = array(); return $this->setIntField('state',$value,'TestrunState'); } @@ -2284,24 +2263,26 @@ } /** - * get the earliest mod + * get the earliest mod in a testrun */ function getEarliestMod() { - $this->read_reference(); - if (!is_object($this->run)) { - return new TUTOS_Date_Time(0); + $this->collectStats(); + + if (is_array($this->statarr) && isset($this->statarr[1])) { + return new TUTOS_Date_Time($this->statarr[1]); } - return $this->run->getEarliestMod(); + return new TUTOS_Date_Time(0); } /** - * get the latest mod + * get the latest mod in a testrun */ function getLatestMod() { - $this->read_reference(); - if (!is_object($this->run)) { - return new TUTOS_Date_Time(0); + $this->collectStats(); + + if (is_array($this->statarr) && isset($this->statarr[2])) { + return new TUTOS_Date_Time($this->statarr[2]); } - return $this->run->getLatestMod(); + return new TUTOS_Date_Time(0); } /** @@ -2309,7 +2290,18 @@ */ function collectStats() { $this->read_reference(); - $this->run->collectStats(); + if ($this->statarr == null) { + $this->run->collectStats(); + echo 'XX'; + $this->statarr = array(); + $this->statarr[0] = $this->run->statarr[0]; + $this->statarr[1] = $this->run->statarr[1]->getYYYYMMDDHHMMSS(); + $this->statarr[2] = $this->run->statarr[2]->getYYYYMMDDHHMMSS(); + $this->statarr[3] = $this->run->statarr[3]; + $this->statarr[4] = array_unique($this->run->statarr[4]); + // save + $this->save(); + } } /** @@ -2321,7 +2313,32 @@ if (!is_object($this->run)) { return $m.'|'.$this->run.'|'; } - return $this->run->getStats($sep); + $this->collectStats(); + + $m = ''; + $sum = 0; + foreach($this->statarr[0] as $f) { + $sum += $f; + } + if ($sep == '') { + foreach($this->statarr[0] as $i => $f) { + $m .= '<tr>'; + $m .= ' <td>'.testcase::getResultColor($i).'</td>'; + $m .= ' <td align="right">'.sprintf('%5s',$f).'</td>'; + $m .= ' <td align="right">'.sprintf('%.2f %%',100.0 * $f/$sum).'</td>'; + $m .= '</tr>'; + } + if ($m == '') + return $m; + return '<table border="0" cellpadding="0" cellspacing="0">'. $m ."</table>\n"; + } else { + $m .= $sep; + foreach($this->statarr[0] as $i => $f) { + $m .= ' '.testcase::getResultColor($i); + $m .= ' '.sprintf('%5s',$f).' = '.sprintf('%.2f %%',100.0 * $f/$sum).$sep; + } + } + return $m; } /** @@ -2350,6 +2367,7 @@ $q->addFV('t_state',$this->state,'INT'); $q->addFV('tr_base_id',$this->trbase_id,'INT'); $q->addFV('description',$this->desc,'TEXT'); + $q->addFV('stats',$this->statarr,'JSON'); $this->save_custom_fields($q); if ( $this->id < 0 ) { @@ -2527,7 +2545,7 @@ testcase::obj_read($obj); if (count($obj->list[usetestsuite][0]) == 0) { - # $r .= '<div style="page-break-before:always">'; + // $r .= '<div style="page-break-before:always">'; } // a hidden new chapter @@ -2643,34 +2661,34 @@ if ($prefix == null) { $r1 = ''; - if (0 < count($this->worker)) { - $rpre1 = '<tr>'; - $rpre1 .= ' <th style="width:15em;"> </th><th width="95%" colspan="'.($cols-1).'">Testers</th>'; - $rpre1 .= '</tr>'; - $rpre1 .= '<tr>'; - $rpre1 .= ' <th> </th>'; - $rpre1 .= ' <th>'.$lang['AdrName'].'</th>'; - $rpre1 .= ' <th>'.$lang['AdrEmail'].'</th>'; - $rpre1 .= ' <th colspan="2">'.$lang['TestrunSignature'].'</th>'; - $rpre1 .= ' <th>'.$lang['Date'].'</th>'; - $rpre1 .= '</tr>'."\n"; - foreach($this->worker as $i => $j ) { - if (is_object($j)) { - $r1 .= $rpre1; - $r1 .= '<tr>'; - $r1 .= ' <th style="width:15em;"> </th>'; - $r1 .= ' <td align="center" colspan="1">'.$j->getLink().'</td>'; - $r1 .= ' <td align="center" colspan="1">'.$j->default_email().'</td>'; - $r1 .= ' <td align="center" colspan="2"><br />___________________________________</td>'; - $r1 .= ' <td align="center" colspan="1"><br />____.____.____</td>'; - $r1 .= '</tr>'."\n"; - $rpre1 = ''; + if ($this->state == TR_CLOSED) { + if (0 < count($this->worker)) { + $rpre1 = '<tr>'; + $rpre1 .= ' <th style="width:15em;"> </th><th width="95%" colspan="'.($cols-1).'">Testers</th>'; + $rpre1 .= '</tr>'; + $rpre1 .= '<tr>'; + $rpre1 .= ' <th> </th>'; + $rpre1 .= ' <th>'.$lang['AdrName'].'</th>'; + $rpre1 .= ' <th>'.$lang['AdrEmail'].'</th>'; + $rpre1 .= ' <th colspan="2">'.$lang['TestrunSignature'].'</th>'; + $rpre1 .= ' <th>'.$lang['Date'].'</th>'; + $rpre1 .= '</tr>'."\n"; + foreach($this->worker as $i => $j ) { + if (is_object($j)) { + $r1 .= $rpre1; + $r1 .= '<tr>'; + $r1 .= ' <th style="width:15em;"> </th>'; + $r1 .= ' <td align="center" colspan="1">'.$j->getLink().'</td>'; + $r1 .= ' <td align="center" colspan="1">'.$j->default_email().'</td>'; + $r1 .= ' <td align="center" colspan="2"><br />___________________________________</td>'; + $r1 .= ' <td align="center" colspan="1"><br />____.____.____</td>'; + $r1 .= '</tr>'."\n"; + $rpre1 = ''; + } } } - } - $r1 .= '<tr><th style="width:15em;">'.$lang['URL'].'</th><td colspan="'.($cols-1).'">'.dirname(getBaseUrl()).'/'.$this->getUrl().'</td></tr>'."\n"; - $r1 .= '<tr><th>'.$lang['TestrunStats'].'</th><td colspan="'.($cols-1).'">'.$this->getStats().'</td></tr>'."\n"; - if ($this->state == TR_CLOSED) { + $r1 .= '<tr><th style="width:15em;">'.$lang['URL'].'</th><td colspan="'.($cols-1).'">'.dirname(getBaseUrl()).'/'.$this->getUrl().'</td></tr>'."\n"; + $r1 .= '<tr><th>'.$lang['TestrunStats'].'</th><td colspan="'.($cols-1).'">'.$this->getStats().'</td></tr>'."\n"; $r = $r1.$r; } $r1 = "<tr>\n"; @@ -2692,10 +2710,11 @@ /** * TR: recursiv parse input */ - function parse_input($obj) { + function parse_input(tutos_base $obj,Testrun $tr_obj) { global $msg,$gotourl,$lang; $r = ''; + $trvalid = true; if ($this->state == TR_CLOSED) { $msg = addLine($msg,sprintf($lang['Testmanager_Err001'],$this->getLink(),$lang['TestrunStates'][TR_CLOSED])); return; @@ -2718,7 +2737,12 @@ $x = $i->setComment($_REQUEST['comment_'.$i->id]) || $x; } if (isset($_REQUEST['result_'.$i->id])) { - $x = $i->setResult($_REQUEST['result_'.$i->id]) || $x; + $xx = $i->setResult($_REQUEST['result_'.$i->id]); + if ($xx) { + // invalidate result calc + $trvalid = false; + } + $x = $xx || $x; } if (isset($_REQUEST['OK_'.$i->id])) { $gotourl = $gotourl.'#id'.$i->id; @@ -2727,12 +2751,16 @@ $r .= $i->save(); $r .= ' saved '.$i->getFullName().'<br />'; } else { - # $r .= 'not saved '.$i->getFullName().'<br />'; + // $r .= 'not saved '.$i->getFullName().'<br />'; } } foreach($obj->list[usetestsuite][0] as $i) { - $r .= $this->parse_input($i); + $r .= $this->parse_input($i,$tr_obj); } + if (!$trvalid && $tr_obj->statarr != null) { + $tr_obj->statarr = null; + $tr_obj->save(); + } return $r; } @@ -2779,9 +2807,9 @@ global $lang; $arr = array(); - $this->run->collectStats(); + $this->collectStats(); $sum = 0; - foreach($this->run->statarr[0] as $f) { + foreach($this->statarr[0] as $f) { $sum += $f; } @@ -2807,10 +2835,11 @@ $pdf->Cell(45,0,$lang['Date']); $pdf->ln(5); $pdf->SetFont('times','',8); - foreach(array_unique($this->run->statarr[4]) as $i => $j ) { - if (is_object($j)) { - $pdf->Cell(45,0,myentities($j->getFullName())); - $pdf->Cell(45,0,myentities($j->default_email())); + foreach(array_unique($this->statarr[4]) as $j ) { + $w = getObject($this->dbconn,$j); + if (is_object($w)) { + $pdf->Cell(45,0,myentities($w->getFullName())); + $pdf->Cell(45,0,myentities($w->default_email())); $pdf->Cell(65,0,'________________________'); $pdf->Cell(45,0,'___.___._______'); $pdf->ln(4); @@ -2823,7 +2852,7 @@ $pdf->Cell(35,0,$lang['TestrunStats'].':'); $pdf->ln(5); $pdf->SetFont('times','',7); - foreach($this->run->statarr[0] as $i => $f) { + foreach($this->statarr[0] as $i => $f) { $pdf->Cell(45,0,$lang['TestcaseResults'][$i]); $pdf->Cell(15,0,$f); $pdf->Cell(45,0,sprintf('%.2f %%',100.0 * $f/$sum)); @@ -2836,12 +2865,10 @@ $pdf->ln(2); - testsuite::obj_read($this); - $cnt = 1; - $pdf->ln(3); - foreach($this->list[usetestsuite][0] as $ts) { - $ts->fillPDF($pdf,$precnt.$cnt); - $cnt++; + // show the whole thing + if(is_object($this->run)) { + $pdf->ln(3); + $this->run->fillPDF($pdf,''); } } Modified: trunk/php/testmanager/testrun_ins.php =================================================================== --- trunk/php/testmanager/testrun_ins.php 2012-08-21 11:59:46 UTC (rev 767) +++ trunk/php/testmanager/testrun_ins.php 2012-08-22 11:26:30 UTC (rev 768) @@ -50,9 +50,8 @@ $obj->read_reference(); $dbconn->Begin("WORK"); - $msg = addLine($msg,$obj->parse_input($obj->run)); + $msg = addLine($msg,$obj->parse_input($obj->run,$obj)); $dbconn->Commit("WORK"); -# echo $msg."<br> ".$gotourl; leave_insert($dbconn,'../'.$gotourl,$msg); exit; } Modified: trunk/php/testmanager/testrun_new.php =================================================================== --- trunk/php/testmanager/testrun_new.php 2012-08-21 11:59:46 UTC (rev 767) +++ trunk/php/testmanager/testrun_new.php 2012-08-22 11:26:30 UTC (rev 768) @@ -121,8 +121,18 @@ $r .= "<tr>\n"; $r .= $this->showfieldc($lang['TestrunRef'],0,'ref'); $r .= " <td colspan=\"5\">\n"; - $r .= $lang[$this->obj->ref->getType()].' '.$this->obj->ref->getLink(); - $this->addhidden("ref_id",$this->obj->ref_id); + if (($this->obj->id == -1) || ($this->obj->state == TR_CLOSED)) { + $r .= $lang[$this->obj->ref->getType()].' '.$this->obj->ref->getLink(); + $this->addhidden("ref_id",$this->obj->ref_id); + } else { + // Read possible new parents + $this->obj->plist = $this->obj->ref->getNeighbours(); + $r .= " <select name=\"ref_id\">\n"; + foreach ($this->obj->plist as $i => $f) { + $r .= ' <option value="'. $i .'"'. ($i == $this->obj->ref_id ? ' selected="selected">* ':'>') . $lang[$f->getType()] .': '. myentities($f->getFullName()) ."</option>\n"; + } + $r .= " </select>\n"; + } $r .= " </td>\n"; $r .= "</tr>\n"; Modified: trunk/php/testmanager/testrun_show.php =================================================================== --- trunk/php/testmanager/testrun_show.php 2012-08-21 11:59:46 UTC (rev 767) +++ trunk/php/testmanager/testrun_show.php 2012-08-22 11:26:30 UTC (rev 768) @@ -297,7 +297,7 @@ unset ($this->obj->list[usebugtracking][1][$i]); } else { $found = false; - foreach($this->obj->run->statarr[3] as $f2) { + foreach($this->obj->statarr[3] as $f2) { if ($f2 == $f->_fld_testcase->id) { $found = true; break; @@ -386,7 +386,7 @@ $this->addMenu($x); } - if ($tutos[fpdfpath] != "") { + if ($tutos[tcpdfpath] != "") { $l = addUrlParameter($this->obj->getUrl(),'format=pdf'); $x = array( url => $l, text => 'PDF', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-08-21 11:59:57
|
Revision: 767 http://tutos.svn.sourceforge.net/tutos/?rev=767&view=rev Author: gokohnert Date: 2012-08-21 11:59:46 +0000 (Tue, 21 Aug 2012) Log Message: ----------- more bug regocnition as regex Modified Paths: -------------- trunk/php/bugtracking/bug.pinc Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2012-08-21 11:55:02 UTC (rev 766) +++ trunk/php/bugtracking/bug.pinc 2012-08-21 11:59:46 UTC (rev 767) @@ -2217,7 +2217,7 @@ $reg = preg_replace("/&Y/",'[\d]+',$reg); // $reg = preg_replace("/&Z/",'.*',$reg); - return '(\s|^)('.$reg.')(\s|$)'; + return '(\s|^|"|\')('.$reg.')("|\'|:|\s|$)'; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2012-08-21 11:55:14
|
Revision: 766 http://tutos.svn.sourceforge.net/tutos/?rev=766&view=rev Author: gokohnert Date: 2012-08-21 11:55:02 +0000 (Tue, 21 Aug 2012) Log Message: ----------- allow $ in file urls Modified Paths: -------------- trunk/php/webelements.p3 Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2012-08-21 11:44:40 UTC (rev 765) +++ trunk/php/webelements.p3 2012-08-21 11:55:02 UTC (rev 766) @@ -207,7 +207,7 @@ Function ReadLang1(array &$lang,$path,&$user) { global $tutos,$dbconn; -# error_log($_SERVER["REQUEST_URI"] ." > ReadLang1:".count($lang)." ". $path ." ". $user->f_name ." ". $user->l_name ." ". $user->lang ."<br />\n",3,$tutos[errlog]); + # error_log($_SERVER["REQUEST_URI"] ." > ReadLang1:".count($lang)." ". $path ." ". $user->f_name ." ". $user->l_name ." ". $user->lang ."<br />\n",3,$tutos[errlog]); if (! isset($user) ) { $user = new tutos_user($dbconn); @@ -452,9 +452,9 @@ $sep = ''; foreach( $s['args'] as $a) { $t = gettype($a); -# if ( $t == 'object' && method_exists($a,'gettype')) { - # $t = $a->getType(); - # } + // if ( $t == 'object' && method_exists($a,'gettype')) { + // $t = $a->getType(); + // } $r .= $sep;# ."<". gettype($t) .">".$a; switch($t) { case 'string': @@ -601,8 +601,6 @@ if ( ! headers_sent() ) { # @ob_end_clean(); loadlayout(); - # $l = new error_layout($current_user); -# echo $l->PrintHeader("FATAL ERROR"); } else { /* End possible Tables ... */ echo "</table>"; @@ -821,8 +819,8 @@ /** * format a value for use with csv files from * "http://de2.php.net/manual/en/function.fputcsv.php#87120" -* output is always converted to target_enc encoding -*/ + * output is always converted to target_enc encoding + */ function txt2csv ($val,$delimiter = '',$enclosure = '') { global $tutos; @@ -852,7 +850,6 @@ * remove html */ function removehtml($s) { -# return html_entity_decode($s); $s = preg_replace("/<[\/]?[bui]+>/i","",$s); $s = preg_replace('#<SPAN ([a-z,0-9=_"]*)>#im','',$s); $s = preg_replace("#</SPAN>#i","",$s); @@ -921,7 +918,7 @@ $text = myentities($text); $text = preg_replace('#<([BIU])>#im' ,'<$1>',$text); $text = preg_replace('#</([BIU])>#im' ,'</$1>',$text); - # $text = preg_replace('#"#m' ,'"',$text); + // $text = preg_replace('#"#m' ,'"',$text); if ($ureplace) $text = urlReplace($text,0); if ($ireplace) @@ -954,7 +951,7 @@ // $b = preg_replace('#</([BIU])>#im' ,'</$1>',$b); $b = preg_replace('#(ftp|http|https):(//([.]?[a-z,0-9_\#/+-?&%=:])*)#im','<a href="$1:$2" target="_blank">$1:$2</a>',$b); - $b = preg_replace('#(file:/[a-z,0-9_\#:/?&=_.+-]*)#im','<a href="$1" target="_blank">$1</a>',$b); + $b = preg_replace('#(file:/[\$a-z,0-9_\#:/?&=_.+-]*)#im','<a href="$1" target="_blank">$1</a>',$b); return $b; } @@ -1317,7 +1314,6 @@ $f = 0.0; list($f) = sscanf($x,"%f"); -# echo $value ." => ". $x ."=". $f ." using " .$lang['ThousandPoint'] ."<br />"; if (!is_double($f)) { return false; } @@ -1333,8 +1329,6 @@ Function search_by_name($name,$types = "at",$mode = 1) { global $tutos,$current_user,$dbconn; -# error_log('sbn: '.$name.' | '.$types.' | '.$mode."\r\n",3,$tutos[errlog]); - $arr = array(); $ma = array(); @@ -1378,7 +1372,6 @@ foreach ($ma as $c) { if ($c == noobject) continue; -# error_log('sbn: '.$c."\r\n",3,$tutos[errlog]); if ($c == usetaskmanagement && ! class_exists ('task') ) { require_once 'task.pinc'; } @@ -1388,7 +1381,6 @@ // walk over pipe seperated search parts foreach ($narr as $sn) { $sn = trim($sn); -# error_log('sbn: sn='.$sn."\r\n",3,$tutos[errlog]); // Search departments by company (i.e. type company name to get all deps) if ( $c == "D") { $pos = strpos($sn," / "); @@ -1404,7 +1396,6 @@ if (isset($tutos['classes'][$c])) { $x = new $tutos['classes'][$c]($dbconn); $cnt = $x->search_by_name($arr,$current_user,$sn,$mode); -# error_log('sbn: '.$sn.' | '.$c.' | ='.$cnt.' | '.$tutos['classes'][$c]."\r\n",3,$tutos[errlog]); } else { Fatal_Error('search_by_name: unknown class !',$c.' '.$name ); } @@ -1436,7 +1427,6 @@ // trim white spaces $name = trim($name); -# echo $name .'|'.$field.'|'.$field2.'|'.$mode."<br />"; $gotourl= addUrlParameter($gotourl,$field."=".UrlEncode($name),true); if ( empty($name) ) { return 0; @@ -1517,7 +1507,6 @@ } $nullmsg = addLine($nullmsg,sprintf($lang['Err0012'],$sobj->getFullName().':'.$lang['ProdRoles'],$name)); unset($sobj); -# echo ' = '.$cnt."<br />"; continue; } if ($c == 'R') { @@ -1532,10 +1521,8 @@ } $nullmsg = addLine($nullmsg,sprintf($lang['Err0012'],$sobj->getFullName().':'.$lang['ProdRoles'],$name)); unset($sobj); -# echo ' = '.$cnt."<br />"; continue; } -# echo 'CHECK:'.$c.' '.$lang[$c].'<br>'; if ($c == 'D') { // special handling of department search by D $cnt = department::search_by_name($res,$current_user,$name,1); @@ -1566,7 +1553,6 @@ } } -# echo ' = '.$cnt."<br />"; $n += $cnt; unset($x); } @@ -1590,7 +1576,7 @@ foreach ($res as $i => $j) { $gotourl = addUrlParameter($gotourl,$field2."[]=".$i,true); -#echo 'found:'.$j ."<br />"; + #echo 'found:'.$j ."<br />"; } return 0; } @@ -1609,7 +1595,7 @@ return 0; } } -#echo 'RETURN:'.$a."<br />"; + #echo 'RETURN:'.$a."<br />"; return $a; } @@ -1714,7 +1700,6 @@ $q = 'SELECT id from '. $dbconn->prefix . $i .' where id ='. $id; $r = $dbconn->Exec($q,1); $n = $r->numrows(); -# echo $q ." ". $n ."<br />"; $r->free(); if ( 0 != $n) { $found = true; @@ -2046,13 +2031,10 @@ $r .= "</select>\n"; } else { // AJAX stuff - # $me = base64_encode(json_encode($mods)); - # $ma = base64_encode(json_encode($ma)); $me = base64_encode(serialize($mods)); $ma = base64_encode(serialize($ma)); if (!isset($obj->search_id)) $obj->search_id = -1; $js = ' '; - # $js .= " "clearme('".$name."-popup')\""; $js .= " "EnableInputField('".$name."')\""; if ( is_object($sobj) && isset($sobj->id) && $sobj->id > 0 ) { // a field that represents a TUTOS object @@ -2151,7 +2133,6 @@ foreach($ref->fulltasklist as $i => $f) { $q .= $sep . $i; $sep = ","; -# echo "[". $f->id ."]"; add_bugs_ids($f,$q,$sep); } } @@ -2187,7 +2168,6 @@ foreach($ref->list[useinstmanagement] as $i => $f) { $q .= $sep . $i; $sep = ","; -# echo "[". $f->id ."]"; add_bugs_ids($f,$q,$sep); } } @@ -2215,7 +2195,6 @@ $u = $u->read($to->id,$u); ReadLang1($to->lg,$tutos['base'] ."/php/localization",$u); load_module_langfiles($u,$to->lg); - # $to->lg = &$lang; $fn = $p ."/". $name .".". $u->lang; } else if ( $to->getType() == "user" ) { $to->lg = $lang; @@ -2434,7 +2413,7 @@ } else { $dir = ''; } -# set_include_path( '../..'. PATH_SEPARATOR .get_include_path() ); + // set_include_path( '../..'. PATH_SEPARATOR .get_include_path() ); if ($dir != '') { require_once $path. $dir.'/jpgraph.php'; foreach($arr as $i) { @@ -2493,7 +2472,7 @@ $r .= $d['comp_method']." "; $r .= '</td>'."\r\n"; $r .= '</tr>'; -# print_r($d); + # print_r($d); } $r .= DoubleTableEnd(); $za->close(); @@ -2654,7 +2633,7 @@ } else { $val = 1; } - $info = addLine($info,'set:'.$fld.' to '.$val); + // $info = addLine($info,'set:'.$fld.' to '.$val); break; case 'int': $val = $_REQUEST[$fld]; @@ -2677,11 +2656,11 @@ } else { $val = $_REQUEST[$fld]; } - $info = addLine($info,'set:'.$fld.' to '.$val); + // $info = addLine($info,'set:'.$fld.' to '.$val); break; case 'stc': $val = implode(',',$_REQUEST[$fld]); - $info = addLine($info,'set:'.$fld.' to '.$val); + // $info = addLine($info,'set:'.$fld.' to '.$val); break; default: $info = addLine($info,'unknown:'.$fld.' '.$tutos['cfg'][$fld][type]); @@ -2734,7 +2713,6 @@ while ( $x < $n ) { $cname = $r->get($x, 'cname'); $cvalue = $r->get($x, 'cvalue'); -# echo '<br>'.$cname.' = '. $cvalue .' '. gettype($cvalue); $tutos[$cname] = $cvalue; $x++; } @@ -2860,7 +2838,7 @@ } Header("Expires: -1"); Header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); -# Header("Pragma: no-cache"); // won't work with IE7 + # Header("Pragma: no-cache"); // won't work with IE7 Header("Pragma: public"); Header("Content-Description: Upload from TUTOS" ); Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); @@ -3387,38 +3365,38 @@ } /** - Diff implemented in pure php, written from scratch. - Copyright (C) 2003 Daniel Unterberger <dif...@ho...> - Copyright (C) 2005 Nils Knappmeier next version + * Diff implemented in pure php, written from scratch. + * Copyright (C) 2003 Daniel Unterberger <dif...@ho...> + * Copyright (C) 2005 Nils Knappmeier next version + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * http://www.gnu.org/licenses/gpl.html + * + * About: + * I searched a function to compare arrays and the array_diff() + * was not specific enough. It ignores the order of the array-values. + * So I reimplemented the diff-function which is found on unix-systems + * but this you can use directly in your code and adopt for your needs. + * Simply adopt the formatline-function. with the third-parameter of arr_diff() + * you can hide matching lines. Hope someone has use for this. + * + * Contact: d.u...@ho... <daniel unterberger> + **/ - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - http://www.gnu.org/licenses/gpl.html - - About: - I searched a function to compare arrays and the array_diff() - was not specific enough. It ignores the order of the array-values. - So I reimplemented the diff-function which is found on unix-systems - but this you can use directly in your code and adopt for your needs. - Simply adopt the formatline-function. with the third-parameter of arr_diff() - you can hide matching lines. Hope someone has use for this. - - Contact: d.u...@ho... <daniel unterberger> -**/ - - /** * PHPDiff returns the differences between $old and $new, formatted * in the standard diff(1) output format. @@ -3428,11 +3406,11 @@ // split the source text into arrays of lines $t1 = explode("\n",$old); $x=array_pop($t1); -# if ($x>'') $t1[]="$x\n\\ No newline at end of file"; + # if ($x>'') $t1[]="$x\n\\ No newline at end of file"; if ($x>'') $t1[]="$x\n"; $t2 = explode("\n",$new); $x=array_pop($t2); -# if ($x>'') $t2[]="$x\n\\ No newline at end of file"; + # if ($x>'') $t2[]="$x\n\\ No newline at end of file"; if ($x>'') $t2[]="$x\n"; // build a reverse-index array using the line as key and line number as value @@ -3470,13 +3448,13 @@ } $s1++; $s2++; } - while ($a1<$best1) { $actions[]=1; $a1++; } # deleted elements - while ($a2<$best2) { $actions[]=2; $a2++; } # added elements + while ($a1<$best1) { $actions[]=1; $a1++; } // deleted elements + while ($a2<$best2) { $actions[]=2; $a2++; } // added elements } // we've reached the end of one list, now walk to the end of the other - while($a1<count($t1)) { $actions[]=1; $a1++; } # deleted elements - while($a2<count($t2)) { $actions[]=2; $a2++; } # added elements + while($a1<count($t1)) { $actions[]=1; $a1++; } // deleted elements + while($a2<count($t2)) { $actions[]=2; $a2++; } // added elements // and this marks our ending point $actions[]=8; @@ -3494,10 +3472,10 @@ $ystr = ($y1==($y0+1)) ? $y1 : ($y0+1).",$y1"; if ($op==1) $out[] = "{$xstr}d{$y1}"; elseif ($op==3) $out[] = "{$xstr}c{$ystr}"; - while ($x0<$x1) { $out[] = '< '.$t1[$x0]; $x0++; } # deleted elems + while ($x0<$x1) { $out[] = '< '.$t1[$x0]; $x0++; } // deleted elems if ($op==2) $out[] = "{$x1}a{$ystr}"; elseif ($op==3) $out[] = '---'; - while ($y0<$y1) { $out[] = '> '.$t2[$y0]; $y0++; } # added elems + while ($y0<$y1) { $out[] = '> '.$t2[$y0]; $y0++; } // added elems } $x1++; $x0=$x1; $y1++; $y0=$y1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |