tutos-commits Mailing List for TUTOS (Page 14)
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...> - 2013-03-14 09:41:39
|
Revision: 1017 http://sourceforge.net/p/tutos/code/1017 Author: gokohnert Date: 2013-03-14 09:41:37 +0000 (Thu, 14 Mar 2013) Log Message: ----------- fix IE download problems pragma: no-cache Modified Paths: -------------- trunk/php/layout/classic_base.pinc trunk/php/layout/new_base.pinc trunk/php/webelements.p3 Modified: trunk/php/layout/classic_base.pinc =================================================================== --- trunk/php/layout/classic_base.pinc 2013-03-13 11:59:14 UTC (rev 1016) +++ trunk/php/layout/classic_base.pinc 2013-03-14 09:41:37 UTC (rev 1017) @@ -65,7 +65,7 @@ } else { $r .= "<html dir=\"ltr\">\n"; } - $r .= "<!-- Copyright 1999 - 2010 by Gero Kohnert gok...@us... -->\n"; + $r .= "<!-- Copyright 1999 - 2013 by Gero Kohnert gok...@us... -->\n"; $r .= "<!-- all rights reserved -->\n"; $r .= "<head>\n"; // $r .= ' <base href="'.getBaseUrl().'"'.$c; Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2013-03-13 11:59:14 UTC (rev 1016) +++ trunk/php/layout/new_base.pinc 2013-03-14 09:41:37 UTC (rev 1017) @@ -154,7 +154,7 @@ * end a overview headline */ function OverviewHeadLineEnd() { - return '</tr>'; + return '</tr>'."\n"; } /** Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-03-13 11:59:14 UTC (rev 1016) +++ trunk/php/webelements.p3 2013-03-14 09:41:37 UTC (rev 1017) @@ -2968,11 +2968,18 @@ Fatal_Error('Some data has already been output to browser, can\'t send data'); } Header('Expires: -1'); + // Header("Pragma: no-cache"); // won't work with IE7 + // Header("Pragma: public"); + if (strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 5") + || strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 6") + || strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 7") + || strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 8") ) { + Header('Pragma:'); + } else { + Header('Pragma: no-cache'); + } Header('Cache-Control: no-store, no-cache, must-revalidate'); Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); - // Header("Pragma: no-cache"); // won't work with IE7 - // Header("Pragma: public"); - Header('Pragma: no-cache'); Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-13 11:59:17
|
Revision: 1016 http://sourceforge.net/p/tutos/code/1016 Author: gokohnert Date: 2013-03-13 11:59:14 +0000 (Wed, 13 Mar 2013) Log Message: ----------- fix wron arg call Modified Paths: -------------- trunk/html/default.css trunk/php/admin/main_config.php trunk/php/bugtracking/bug_config.php trunk/php/doctracker/doc_config.php trunk/php/file/file_config.php trunk/php/invoice/invoice_config.php trunk/php/layout/new_base.pinc trunk/php/module_template/AAA_config.php trunk/php/scrum/scrum_config.php trunk/php/stuff/stuff_config.php trunk/php/subversion/svn_config.php trunk/php/testmanager/testmanager_config.php trunk/php/timetrack/timetrack_config.php Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/html/default.css 2013-03-13 11:59:14 UTC (rev 1016) @@ -342,7 +342,7 @@ vertical-align: top; } -.overviewbox { +.overviewbox, .configbox { padding-left: 5px; padding-top: 5px; padding-right: 5px; Modified: trunk/php/admin/main_config.php =================================================================== --- trunk/php/admin/main_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/admin/main_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -53,9 +53,9 @@ $r .= '<div id="tutos" class="ui-tabs-hide">'; $line = 0; $r .= $this->DataTableStart(); - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">Main</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // time to live $r .= $this->OverviewRowStart($line); $r .= $this->showfield('timetolive'); @@ -77,9 +77,9 @@ $line = 0; $r .= $this->DataTableStart(); // Network - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">Network</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // ProxyHost $r .= $this->OverviewRowStart($line); @@ -112,9 +112,9 @@ $line = 0; $r .= $this->DataTableStart(); // Fiscal - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">Fiscal</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // fiscal year start month $r .= $this->OverviewRowStart($line); @@ -142,9 +142,9 @@ $line = 0; $r .= $this->DataTableStart(); // LAYOUT - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">'.$lang['UserLayout'].'</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // LOGO $r .= $this->OverviewRowStart($line); @@ -180,9 +180,9 @@ $line = 0; $r .= $this->DataTableStart(); // MAIL - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">'.$lang['MailboxEmail'].'</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // Preffered mail format $r .= config_field_input($this,'pref_mail',null,$line++); @@ -253,9 +253,9 @@ $line = 0; $r .= $this->DataTableStart(); // PRODUCT / PROJECT - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">'.$lang['ProductP'].'</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // PRODUCT STATE $r .= $this->OverviewRowStart($line); @@ -321,9 +321,9 @@ $line = 0; $r .= $this->DataTableStart(); // TASK - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">'.$lang['Task'].'</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // Task State $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_state_stc'); @@ -423,9 +423,9 @@ $line = 0; $r .= $this->DataTableStart(); // PASSWORD - $r .= $this->OverviewRowStart($line); + $r .= $this->OverviewHeadLineStart($line); $r .= '<th colspan="4">'.$lang['Password'].'</th>'; - $r .= $this->OverviewRowEnd($line++); + $r .= $this->OverviewHeadLineEnd($line++); // maximum password age (days) $r .= $this->OverviewRowStart($line); Modified: trunk/php/bugtracking/bug_config.php =================================================================== --- trunk/php/bugtracking/bug_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/bugtracking/bug_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -36,9 +36,9 @@ $r .= "<form id=\"bugconfig\" name=\"bugconfig\" action=\"bug_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); // long detailed popups $r .= $this->OverviewRowStart($line); Modified: trunk/php/doctracker/doc_config.php =================================================================== --- trunk/php/doctracker/doc_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/doctracker/doc_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -33,9 +33,9 @@ $r .= "<form id=\"docconfig\" name=\"docconfig\" action=\"doc_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('doctrack_numberformat'); Modified: trunk/php/file/file_config.php =================================================================== --- trunk/php/file/file_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/file/file_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -34,9 +34,9 @@ $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('file_fileperm'); Modified: trunk/php/invoice/invoice_config.php =================================================================== --- trunk/php/invoice/invoice_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/invoice/invoice_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -36,9 +36,9 @@ $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('inv_autoname'); Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/layout/new_base.pinc 2013-03-13 11:59:14 UTC (rev 1016) @@ -161,7 +161,7 @@ * start a overview row */ function OverviewRowStart($line,$title = '',$class = '') { - return '<tr title="'. myentities($title) .'" class="line'. ($line % 2 +1) .' '.$class."\">\n"; + return '<tr'.($title != '' ? ' title="'. myentities($title) .'"':'').' class="line'. ($line % 2 +1) .' '.$class."\">\n"; } /** Modified: trunk/php/module_template/AAA_config.php =================================================================== --- trunk/php/module_template/AAA_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/module_template/AAA_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2009 by Gero Kohnert + * Copyright 2009 - 2013 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 @@ -41,9 +41,9 @@ $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); // first Config Variable $r .= $this->OverviewRowStart($line); @@ -86,4 +86,8 @@ $l = new AAA_config($current_user); $l->display(); $dbconn->close(); -?> \ No newline at end of file +?> +<!-- +SVN Info $Id$ +$Author$ +--> \ No newline at end of file Modified: trunk/php/scrum/scrum_config.php =================================================================== --- trunk/php/scrum/scrum_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/scrum/scrum_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -9,9 +9,9 @@ * SVN Info $Id$ * $Author$ * - * @modulegroup AAA - * @module AAA_config - * @package AAA + * @modulegroup scrum + * @module scrum_config + * @package scrum */ $tutos['files'][__FILE__] = '$Rev$'; @@ -42,9 +42,9 @@ $r .= "<form id=\"scrumconfig\" name=\"scrumconfig\" action=\"scrum_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLIneEnd(); // first Config Variable $r .= $this->OverviewRowStart($line); Modified: trunk/php/stuff/stuff_config.php =================================================================== --- trunk/php/stuff/stuff_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/stuff/stuff_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -9,6 +9,8 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -30,15 +32,14 @@ function info() { global $lang,$table,$tutos; - $r = ''; $r .= "<form id=\"stuffconfig\" name=\"stuffconfig\" action=\"stuff_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('stuff_autoname'); Modified: trunk/php/subversion/svn_config.php =================================================================== --- trunk/php/subversion/svn_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/subversion/svn_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -33,9 +33,9 @@ $r .= "<form id=\"svnconfig\" name=\"svnconfig\" action=\"svn_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('svn_url2path'); Modified: trunk/php/testmanager/testmanager_config.php =================================================================== --- trunk/php/testmanager/testmanager_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/testmanager/testmanager_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -37,9 +37,9 @@ $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); // long detailed popups $r .= $this->OverviewRowStart($line); Modified: trunk/php/timetrack/timetrack_config.php =================================================================== --- trunk/php/timetrack/timetrack_config.php 2013-03-13 10:19:07 UTC (rev 1015) +++ trunk/php/timetrack/timetrack_config.php 2013-03-13 11:59:14 UTC (rev 1016) @@ -40,9 +40,9 @@ $r .= "<form id=\"timetrackconfig\" name=\"timetrackconfig\" action=\"timetrack_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); $line = 0; - $r .= $this->OverviewRowStart(); + $r .= $this->OverviewHeadLineStart(); $r .= '<th colspan="4">'.$this->name.'</th>'; - $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewHeadLineEnd(); // TIMETRACK STATE $r .= $this->OverviewRowStart($line); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-13 10:19:12
|
Revision: 1015 http://sourceforge.net/p/tutos/code/1015 Author: gokohnert Date: 2013-03-13 10:19:07 +0000 (Wed, 13 Mar 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/admin/main_config.php Modified: trunk/php/admin/main_config.php =================================================================== --- trunk/php/admin/main_config.php 2013-03-13 09:32:02 UTC (rev 1014) +++ trunk/php/admin/main_config.php 2013-03-13 10:19:07 UTC (rev 1015) @@ -430,7 +430,7 @@ // maximum password age (days) $r .= $this->OverviewRowStart($line); $r .= $this->showfield('password_max_age'); - $r .= '<td><input name="password_max_age" size="3" value="'.$tutos['password_max_age'] .'">'; + $r .= '<td><input name="password_max_age" size="3" value="'.$tutos['password_max_age'] .'" /></td>'; $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPassMaxAge']).'</td>'; $r .= $this->OverviewRowEnd($line++); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-13 09:32:08
|
Revision: 1014 http://sourceforge.net/p/tutos/code/1014 Author: gokohnert Date: 2013-03-13 09:32:02 +0000 (Wed, 13 Mar 2013) Log Message: ----------- formatting of pre fields modified Modified Paths: -------------- trunk/html/blue.css trunk/html/default.css trunk/html/nuke.css trunk/html/red.css trunk/html/white.css trunk/php/admin/admin.pinc trunk/php/admin/main_config.php trunk/php/admin_show.php trunk/php/bugtracking/bug_config.php trunk/php/checklist/checkfield_show.php trunk/php/custom.pinc trunk/php/doctracker/doc_config.php trunk/php/doctracker/doc_show.php trunk/php/file/file_config.php trunk/php/history_show.php trunk/php/invoice/invoice_config.php trunk/php/invoice/invoice_new.php trunk/php/invoice/invoice_show.php trunk/php/module_template/AAA_config.php trunk/php/note/note_show.php trunk/php/reminder/reminder_show.php trunk/php/scrum/log_show.php trunk/php/scrum/scrum_config.php trunk/php/stuff/stuff_config.php trunk/php/stuff/stuff_show.php trunk/php/subversion/svn_config.php trunk/php/subversion/svn_show.php trunk/php/testmanager/testcase_show.php trunk/php/testmanager/testmanager_config.php trunk/php/testmanager/testrun_show.php trunk/php/testmanager/testsuite_overview.php trunk/php/testmanager/testsuite_show.php trunk/php/timetrack/timetrack_config.php trunk/php/webelements.p3 Modified: trunk/html/blue.css =================================================================== --- trunk/html/blue.css 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/html/blue.css 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,5 +1,5 @@ /* - * Copyright 1999 - 2012 by Gero Kohnert + * Copyright 1999 - 2013 by Gero Kohnert * * example theme * Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/html/default.css 2013-03-13 09:32:02 UTC (rev 1014) @@ -94,6 +94,16 @@ border-style: solid; } +/* preformatted text */ +.pre { + font-family: monospace; + white-space: pre; +} + +.configbox tr td.pre { + border-top: 1px solid lightgrey; +} + .dropable, .dragable { list-style-type: none; padding: 0; Modified: trunk/html/nuke.css =================================================================== --- trunk/html/nuke.css 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/html/nuke.css 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,5 +1,5 @@ /* - * Copyright 2002 by Antonio Romero + * Copyright 2002 - 2013 by Antonio Romero & Gero Kohnert * ant...@ma... * * Nuke Theme for TUTOS @@ -92,7 +92,6 @@ /* preformatted text */ pre, .pre { - font-family: monospace; background: #F5F5F5; color: black; } Modified: trunk/html/red.css =================================================================== --- trunk/html/red.css 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/html/red.css 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,5 +1,5 @@ /** - * Copyright 1999 - 2011 by Gero Kohnert + * Copyright 1999 - 2013 by Gero Kohnert * * example theme * Modified: trunk/html/white.css =================================================================== --- trunk/html/white.css 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/html/white.css 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,5 +1,5 @@ -/* - * Copyright 1999 - 2011 by Gero Kohnert +/** + * Copyright 1999 - 2013 by Gero Kohnert * * black/white theme * Modified: trunk/php/admin/admin.pinc =================================================================== --- trunk/php/admin/admin.pinc 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/admin/admin.pinc 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,10 +1,15 @@ <?php /** - * Copyright 1999 - 2012 by Gero Kohnert + * Copyright 1999 - 2013 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. + * * SVN Info $Id: admin.pinc 735 2012-07-27 13:32:33Z gokohnert $ * $Author: gokohnert $ */ +$tutos['files'][__FILE__] = '$Rev: 984 $'; // type,length,min,max,help Modified: trunk/php/admin/main_config.php =================================================================== --- trunk/php/admin/main_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/admin/main_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2009 - 2012 by Gero Kohnert + * Copyright 2009 - 2013 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 @@ -9,6 +9,8 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -36,37 +38,43 @@ $r = ''; $r .= "<form id=\"mainconfig\" name=\"mainconfig\" action=\"main_config.php\" method=\"post\">\n"; - $line = 0; $r .= '<div id="mytab" class="ui-tabs">'; $r .= '<ul>'; - $r .= '<li><a href="#tutos">TUTOS</a></li>'; - $r .= '<li><a href="#network">Network</a></li>'; - $r .= '<li><a href="#fiscal">Fiscal</a></li>'; - $r .= '<li><a href="#layout">'.$lang['UserLayout'].'</a></li>'; - $r .= '<li><a href="#mail">'.$lang['MailboxEmail'].'</a></li>'; - $r .= '<li><a href="#product">'.$lang['ProductP'].'</a></li>'; - $r .= '<li><a href="#task">'.$lang['Task'].'</a></li>'; - $r .= '<li><a href="#password">'.$lang['Password'].'</a></li>'; + $r .= ' <li><a href="#tutos">TUTOS</a></li>'; + $r .= ' <li><a href="#network">Network</a></li>'; + $r .= ' <li><a href="#fiscal">Fiscal</a></li>'; + $r .= ' <li><a href="#layout">'.$lang['UserLayout'].'</a></li>'; + $r .= ' <li><a href="#mail">'.$lang['MailboxEmail'].'</a></li>'; + $r .= ' <li><a href="#product">'.$lang['ProductP'].'</a></li>'; + $r .= ' <li><a href="#task">'.$lang['Task'].'</a></li>'; + $r .= ' <li><a href="#password">'.$lang['Password'].'</a></li>'; $r .= '</ul>'; $r .= '<div id="tutos" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); + $r .= $this->OverviewRowStart($line); + $r .= '<th colspan="4">Main</th>'; + $r .= $this->OverviewRowEnd($line++); // time to live $r .= $this->OverviewRowStart($line); $r .= $this->showfield('timetolive'); $r .= '<td><input name="timetolive" value="'.$tutos['timetolive'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTimeToLive']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTimeToLive']).'</td>'; $r .= $this->OverviewRowEnd($line++); // CSV delimiter $r .= config_field_input($this,'CSV_delimiter',null,$line); + $line++; // CSV enclosure $r .= config_field_input($this,'CSV_enclosure',null,$line); + $line++; $r .= $this->DataTableEnd(); $r .= '</div>'; $r .= '<div id="network" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // Network $r .= $this->OverviewRowStart($line); @@ -77,14 +85,14 @@ $r .= $this->OverviewRowStart($line); $r .= $this->showfield('proxy_host'); $r .= '<td><input name="proxy_host" value="'.$tutos['proxy_host'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpProxyHost']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpProxyHost']).'</td>'; $r .= $this->OverviewRowEnd($line++); // ProxyPort $r .= $this->OverviewRowStart($line); $r .= $this->showfield('proxy_port'); $r .= '<td><input name="proxy_port" value="'.$tutos['proxy_port'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpProxyPort']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpProxyPort']).'</td>'; $r .= $this->OverviewRowEnd($line++); // resolve hostnames @@ -95,12 +103,13 @@ $r .= ' <option value="1"'.($tutos['resolve_host'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].' (DNS)</option>'."\n"; $r .= ' <option value="2"'.($tutos['resolve_host'] == 2 ? ' selected="selected"':'').'>'.$lang['yes'].' (GeoIP)</option>'."\n"; $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpResolveHost']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpResolveHost']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); $r .= '</div>'; $r .= '<div id="fiscal" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // Fiscal $r .= $this->OverviewRowStart($line); @@ -115,7 +124,7 @@ $r .= ' <option value="'.$i.'"'.($tutos['fiscal_start_month'] == $i ? ' selected="selected"':'').'>'.$i.'</option>'."\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpFiscalStartMonth']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpFiscalStartMonth']).'</td>'; $r .= $this->OverviewRowEnd($line++); @@ -123,13 +132,14 @@ $r .= $this->OverviewRowStart($line); $r .= $this->showfield('vat_list'); $r .= '<td><input name="vat_list" value="'.$tutos['vat_list'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpVatList']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpVatList']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); $r .= '</div>'; $r .= '<div id="layout" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // LAYOUT $r .= $this->OverviewRowStart($line); @@ -140,14 +150,14 @@ $r .= $this->OverviewRowStart($line); $r .= $this->showfield('logo'); $r .= '<td><input name="logo" value="'.$tutos['logo'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpLogo']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpLogo']).'</td>'; $r .= $this->OverviewRowEnd($line++); // LogoLink $r .= $this->OverviewRowStart($line); $r .= $this->showfield('logolink'); $r .= '<td><input name="logolink" value="'.$tutos['logolink'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpLogolink']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpLogolink']).'</td>'; $r .= $this->OverviewRowEnd($line++); // maxshow @@ -157,7 +167,7 @@ $r .= $this->OverviewRowStart($line); $r .= $this->showfield('maxselect'); $r .= '<td><input name="maxselect" value="'.$tutos['maxselect'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpMaxSelect']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpMaxSelect']).'</td>'; $r .= $this->OverviewRowEnd($line++); // maxshort @@ -167,6 +177,7 @@ $r .= '</div>'; $r .= '<div id="mail" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // MAIL $r .= $this->OverviewRowStart($line); @@ -184,61 +195,62 @@ $r .= ' <option value="'.$j.'" '.($tutos['mailmode'] == $j ? 'selected="selected"':'').'>'.$f.'</option>'; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpMailMode']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpMailMode']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('sendmail'); $r .= '<td><input name="sendmail" value="'.$tutos['sendmail'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpSendmail']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpSendmail']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('smtphost'); $r .= '<td><input name="smtphost" value="'.$tutos['smtphost'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpSmtpHost']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpSmtpHost']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('smtpport'); $r .= '<td><input name="smtpport" value="'.$tutos['smtpport'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpSmtpPort']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpSmtpPort']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('smtp_username'); $r .= '<td><input name="smtp_username" value="'.$tutos['smtp_username'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpSmtpUser']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpSmtpUser']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('smtp_password'); $r .= '<td><input name="smtp_password" value="'.$tutos['smtp_password'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpSmtpPass']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpSmtpPass']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('popbeforesmtp'); $r .= '<td><input type="checkbox" name="popbeforesmtp" '.($tutos['popbeforesmtp'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPopBeforeSmtp']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPopBeforeSmtp']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('popbeforesmtp_user'); $r .= '<td><input name="popbeforesmtp_user" value="'.$tutos['popbeforesmtp_user'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPopSmtpUser']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPopSmtpUser']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('popbeforesmtp_pass'); $r .= '<td><input name="popbeforesmtp_pass" value="'.$tutos['popbeforesmtp_pass'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPopSmtpPass']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPopSmtpPass']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); $r .= '</div>'; $r .= '<div id="product" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // PRODUCT / PROJECT $r .= $this->OverviewRowStart($line); @@ -257,7 +269,7 @@ $r .= '</select>'; $r .= '<br />'.makelink('stc/stc_new.php?lgarr=ProdStates','Create a new STC'); $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['ConfigHelpProdStateSTC'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['ConfigHelpProdStateSTC'].'</td>'; $r .= $this->OverviewRowEnd($line++); // activ product states @@ -278,7 +290,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['ConfigHelpProdActivStates'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['ConfigHelpProdActivStates'].'</td>'; $r .= $this->OverviewRowEnd($line++); // Product automatic state when finished @@ -293,19 +305,20 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpProdFinishState']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpProdFinishState']).'</td>'; $r .= $this->OverviewRowEnd($line++); // classify products $r .= $this->OverviewRowStart($line); $r .= $this->showfield('prod_classify'); $r .= '<td><input type="checkbox" name="prod_classify" '.($tutos['prod_classify'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpProdClassify']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpProdClassify']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); $r .= '</div>'; $r .= '<div id="task" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); // TASK $r .= $this->OverviewRowStart($line); @@ -323,7 +336,7 @@ $r .= '</select>'; $r .= '<br />'.makelink('stc/stc_new.php?lgarr=TaskStates','Create a new STC'); $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['ConfigHelpTaskStateSTC'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['ConfigHelpTaskStateSTC'].'</td>'; $r .= $this->OverviewRowEnd($line++); // TASK automatic state when book @@ -343,7 +356,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskBookState']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskBookState']).'</td>'; $r .= $this->OverviewRowEnd($line++); // TASK automatic state when finished @@ -358,48 +371,48 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskFinishState']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskFinishState']).'</td>'; $r .= $this->OverviewRowEnd($line++); // TASK AUTONAME $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_autoname'); $r .= '<td><input name="task_autoname" value="'.$tutos['task_autoname'] .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskAutoname']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskAutoname']).'</td>'; $r .= $this->OverviewRowEnd($line++); // tasks in calendar $r .= $this->OverviewRowStart($line); $r .= $this->showfield('tasksincalendar'); $r .= '<td><input type="checkbox" name="tasksincalendar" '.($tutos['tasksincalendar'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskCalendar']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskCalendar']).'</td>'; $r .= $this->OverviewRowEnd($line++); // tasks show fileinfo $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_show_fileinfo'); $r .= '<td><input type="checkbox" name="task_show_fileinfo" '.($tutos['task_show_fileinfo'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskFileInfo']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskFileInfo']).'</td>'; $r .= $this->OverviewRowEnd($line++); // tasks show buginfo $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_show_buginfo'); $r .= '<td><input type="checkbox" name="task_show_buginfo" '.($tutos['task_show_buginfo'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskBugInfo']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskBugInfo']).'</td>'; $r .= $this->OverviewRowEnd($line++); // tasks skip finished $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_skip_finished'); $r .= '<td><input type="checkbox" name="task_skip_finished" '.($tutos['task_skip_finished'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskSkipFinished']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskSkipFinished']).'</td>'; $r .= $this->OverviewRowEnd($line++); // tasks exact planned $r .= $this->OverviewRowStart($line); $r .= $this->showfield('task_exact'); $r .= '<td><input type="checkbox" name="task_exact" '.($tutos['task_exact'] == 1 ? 'checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpTaskExact']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpTaskExact']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); @@ -407,13 +420,18 @@ // password rules $r .= '<div id="password" class="ui-tabs-hide">'; + $line = 0; $r .= $this->DataTableStart(); + // PASSWORD + $r .= $this->OverviewRowStart($line); + $r .= '<th colspan="4">'.$lang['Password'].'</th>'; + $r .= $this->OverviewRowEnd($line++); // maximum password age (days) $r .= $this->OverviewRowStart($line); $r .= $this->showfield('password_max_age'); $r .= '<td><input name="password_max_age" size="3" value="'.$tutos['password_max_age'] .'">'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPassMaxAge']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPassMaxAge']).'</td>'; $r .= $this->OverviewRowEnd($line++); // minial password length (characters) @@ -424,7 +442,7 @@ $r .= ' <option value="'.$i.'"'.($tutos['password_min_length'] == $i ? ' selected="selected"':'').'>'.$i.'</option>'."\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPassMinLength']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPassMinLength']).'</td>'; $r .= $this->OverviewRowEnd($line++); // minial required special characters in password @@ -435,7 +453,7 @@ $r .= ' <option value="'.$i.'"'.($tutos['password_need_special'] == $i ? ' selected="selected"':'').'>'.$i.'</option>'."\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['ConfigHelpPassNeedSpecial']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['ConfigHelpPassNeedSpecial']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->DataTableEnd(); @@ -471,7 +489,8 @@ function prepare() { global $lang,$msg,$info,$tutos; - $this->name = $lang['AdminMainConfig']; + $this->name = $lang['AdminMainConfig']; + $this->css_class = 'configbox'; if ( ! $this->user->isAdmin() ) { $msg = addLine($msg,$this->error("Only admins are allowed to see this")); Modified: trunk/php/admin_show.php =================================================================== --- trunk/php/admin_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/admin_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2012 by Gero Kohnert + * Copyright 2001 - 2013 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 @@ -425,10 +425,12 @@ $y = array(); $x = $tutos['memcache']->get($this->dbconn->db->systemid.'_sessions'); $d = $tutos['memcache']->get(array_keys($x)); - foreach ($d as $key => $data) { - $r .= $this->Sessions_Line(unserialize_session($data),$key); - unset($x[$key]); - $y[$key] = $data; + if (is_array($d) && count($d) > 0) { + foreach ($d as $key => $data) { + $r .= $this->Sessions_Line(unserialize_session($data),$key); + unset($x[$key]); + $y[$key] = $data; + } } foreach ($x as $key => $data) { $d = $tutos['memcache']->delete($key); Modified: trunk/php/bugtracking/bug_config.php =================================================================== --- trunk/php/bugtracking/bug_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/bugtracking/bug_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -10,6 +10,7 @@ * $Author$ */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -34,8 +35,10 @@ $r = ''; $r .= "<form id=\"bugconfig\" name=\"bugconfig\" action=\"bug_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); - $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); // long detailed popups $r .= $this->OverviewRowStart($line); @@ -44,20 +47,20 @@ $r .= ' <option value="1"'.($tutos['bug_long_pop'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].'</option>'; $r .= ' <option value="0"'.($tutos['bug_long_pop'] == 0 ? ' selected="selected"':'').'>'.$lang['no'].'</option>'; $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpLongPop'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['BugConfigHelpLongPop'].'</td>'; $r .= $this->OverviewRowEnd($line++); // automated remember $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_remember'); $r .= '<td><input name="remember" value="'.myentities($tutos['bug_remember']).'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.myentities($lang['BugConfigHelpRemember']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.myentities($lang['BugConfigHelpRemember']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_autoname'); $r .= '<td><input name="autoname" value="'.myentities($tutos['bug_autoname']) .'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.myentities($lang['BugConfigHelpAutoname']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.myentities($lang['BugConfigHelpAutoname']).'</td>'; $r .= $this->OverviewRowEnd($line++); // allow deletion of bugs @@ -67,7 +70,7 @@ $r .= ' <option value="1"'.($tutos['bug_delete'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].'</option>'."\n"; $r .= ' <option value="0"'.($tutos['bug_delete'] == 0 ? ' selected="selected"':'').'>'.$lang['no'].'</option>'."\n"; $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.myentities($lang['BugConfigHelpDelete']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.myentities($lang['BugConfigHelpDelete']).'</td>'; $r .= $this->OverviewRowEnd($line++); // STC @@ -82,14 +85,14 @@ $r .= '</select>'; $r .= '<br />'.makelink('stc/stc_new.php?lgarr=BugStates&mod=bugtracking','Create a new STC'); $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.myentities($lang['BugConfigHelpStateSTC']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.myentities($lang['BugConfigHelpStateSTC']).'</td>'; $r .= $this->OverviewRowEnd($line++); // free selection of target $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_free_target'); $r .= '<td><input type="checkbox" name="bug_free_target"'.($tutos['bug_free_target'] == 1 ? ' checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpFreeTarget']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpFreeTarget']).'</td>'; $r .= $this->OverviewRowEnd($line++); // states that need a target @@ -110,14 +113,14 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpNeedTarget']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpNeedTarget']).'</td>'; $r .= $this->OverviewRowEnd($line++); // use & show revision $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_use_revision'); $r .= '<td><input type="checkbox" name="bug_use_revision"'.($tutos['bug_use_revision'] == 1 ? ' checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpUseRevision']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpUseRevision']).'</td>'; $r .= $this->OverviewRowEnd($line++); // states that need a revision @@ -138,7 +141,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpNeedRevision']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpNeedRevision']).'</td>'; $r .= $this->OverviewRowEnd($line++); // states that are like closed @@ -159,7 +162,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpClosedStates'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['BugConfigHelpClosedStates'].'</td>'; $r .= $this->OverviewRowEnd($line++); // state to set on auto finish @@ -174,7 +177,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpFinishState'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['BugConfigHelpFinishState'].'</td>'; $r .= $this->OverviewRowEnd($line++); // states that are like open (i.e. you can get warned) @@ -190,7 +193,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpWarnStates'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['BugConfigHelpWarnStates'].'</td>'; $r .= $this->OverviewRowEnd($line++); @@ -206,7 +209,7 @@ $r .= ' <option value="'.$i.'"'.(in_array($i,$x) ? ' selected="selected"':'').'>'.myentities($j).'</option>'."\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpProdNewMail']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpProdNewMail']).'</td>'; $r .= $this->OverviewRowEnd($line++); // Product Roles that get informed by modified bugs @@ -221,21 +224,21 @@ $r .= ' <option value="'.$i.'"'.(in_array($i,$x) ? ' selected="selected"':'').'>'.myentities($j).'</option>'."\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpProdModMail']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpProdModMail']).'</td>'; $r .= $this->OverviewRowEnd($line++); // No Mail flag $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_no_mail'); $r .= '<td><input type="checkbox" name="bug_no_mail"'.($tutos['bug_no_mail'] == 1 ? ' checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpNoMail']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpNoMail']).'</td>'; $r .= $this->OverviewRowEnd($line++); // Show Stateage $r .= $this->OverviewRowStart($line); $r .= $this->showfield('bug_state_age'); $r .= '<td><input type="checkbox" name="bug_state_age"'.($tutos['bug_state_age'] == 1 ? ' checked="checked"':'').' value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.urlReplace($lang['BugConfigHelpStateAge']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.urlReplace($lang['BugConfigHelpStateAge']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->submit_reset_row(0,1,1,1,1,0); @@ -254,7 +257,8 @@ function prepare() { global $lang,$msg,$info,$tutos; - $this->name = $lang['BugConfig']; + $this->name = $lang['BugConfig']; + $this->css_class = 'configbox'; // default if (!isset($tutos['bug_long_pop'])) $tutos['bug_long_pop'] = 0; Modified: trunk/php/checklist/checkfield_show.php =================================================================== --- trunk/php/checklist/checkfield_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/checklist/checkfield_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -11,6 +11,8 @@ * $Author$ * */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -66,7 +68,7 @@ $r .= "</tr><tr>\n"; $r .= $this->showfield($lang['CheckfieldComment']); - $r .= $this->showdata('<pre>'.urlreplace($this->obj->comment).'</pre>',3); + $r .= $this->showdata(urlreplace($this->obj->comment),3,'pre'); $r .= "</tr>\n"; $r .= checkfield::infolist($this->user,$this->obj,4,$this->format); Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/custom.pinc 2013-03-13 09:32:02 UTC (rev 1014) @@ -139,7 +139,7 @@ */ function get_line() { $r = ''; -# if (true) return 'XXX'; + # if (true) return 'XXX'; if ($this->hidden) return ''; $data = $this->get(); @@ -404,7 +404,7 @@ if (count($this->obj->relations[$rid]) > 0) foreach ($this->obj->relations[$rid] as $i => $o) { if (!isset($xx[$i])) { -# echo $i.' |'.$o->id.'| '.$o.'|<br>'; + # echo $i.' |'.$o->id.'| '.$o.'|<br>'; $o = getObject($this->obj->dbconn,$i); if(is_object($o)) $xx[$i] = $o; @@ -866,7 +866,7 @@ global $lang; if ($this->x['hideempty'] && (trim($this->content) == '') ) return ''; - return '<pre class="pre">'.format_txt($this->obj,$this->content).'</pre>'; + return '<span class="pre">'.format_txt($this->obj,$this->content).'</span>'; } /** @@ -883,7 +883,7 @@ if ( isset($this->x['growonly']) && ($this->x['growonly'] == true) ) { $r .= $this->layout->textarea($this->get_parsename(),0,$size,''); if ($this->content != '') { - $r .= '<pre class="pre">'.format_txt($this->obj,$this->content).'</pre>'; + $r .= '<span class="pre">'.format_txt($this->obj,$this->content).'</span>'; } } else { if (isset($this->x['rows'])) { Modified: trunk/php/doctracker/doc_config.php =================================================================== --- trunk/php/doctracker/doc_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/doctracker/doc_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,14 +1,16 @@ <?php /** - * Copyright 2009 by Gero Kohnert + * Copyright 2009 - 2013 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. * * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -26,17 +28,20 @@ class Doc_config extends layout { function info() { global $lang,$table,$tutos; - + $r = ''; $r .= "<form id=\"docconfig\" name=\"docconfig\" action=\"doc_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); - $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewRowStart($line); $r .= $this->showfield('doctrack_numberformat'); $r .= '<td><input name="format" size="30" value="'.$tutos['doctrack_numberformat'].'">'; $r .= '</input></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['DocTrackConfigHelpFormat'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['DocTrackConfigHelpFormat'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); @@ -49,14 +54,14 @@ $r .= ' <option value="version"'.($tutos['doctrack_projectid'] == 'version' ?' selected="selected"':'') .'>'.$lang['ProductP'] .':'. $lang['ProdVersion'].'</option>'; $r .= ' <option value="id"'.($tutos['doctrack_projectid'] == 'version' ?' selected="selected"':'') .'>'.$lang['ProductP'] .':ID</option>'; $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['DocTrackConfigHelpProjectId'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['DocTrackConfigHelpProjectId'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= '<tr>'; $r .= submit_reset(0,1,1,1,1,0); $r .= '</tr>'; - + $r .= $this->DataTableEnd(); $this->addHidden("save", 1); $r .= hiddenFormElements(); @@ -64,17 +69,19 @@ $r .= "</form>\n"; return $r; } + /** * */ function prepare() { global $lang,$msg,$tutos; - - $this->name = $lang['DocTrackConfig']; - - // default + + $this->name = $lang['DocTrackConfig']; + $this->css_class = 'configbox'; + + // default if (!isset($tutos['doctrack_numberformat'])) $tutos['doctrack_numberformat'] = '&ORG-&PNUM-&TYPE-&PCNT-&REV'; - + if (!isset($tutos['doctrack_projectid'])) $tutos['doctrack_projectid'] = 'desc2'; if ( ! $this->user->isAdmin() ) { @@ -99,6 +106,6 @@ $dbconn->close(); ?> <!-- - SVN Info $Id$ - $Author$ +SVN Info $Id$ +$Author$ --> \ No newline at end of file Modified: trunk/php/doctracker/doc_show.php =================================================================== --- trunk/php/doctracker/doc_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/doctracker/doc_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2010 by Gero Kohnert + * Copyright 1999 - 2013 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 @@ -10,6 +10,8 @@ * @module doc_show * @package doctracker */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -87,7 +89,7 @@ $r .= "<tr>\n"; $r .= $this->showfield($lang['DocTrackDesc']); - $r .= ' <td colspan="4" class="pre"><pre>'. wordwrap(urlReplace($this->obj->description),80) ."</pre></td>"; + $r .= ' <td colspan="4" class="pre">'. wordwrap(urlReplace($this->obj->description),80) .'</td>'; $r .= "</tr>\n"; @@ -104,6 +106,7 @@ $r .= $this->DataTableEnd(); return $r; } + /** * prepare */ @@ -198,5 +201,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> \ No newline at end of file +$Author$ +--> \ No newline at end of file Modified: trunk/php/file/file_config.php =================================================================== --- trunk/php/file/file_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/file/file_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -10,6 +10,7 @@ * $Author$ */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -33,6 +34,10 @@ $r .= $this->DataTableStart(); $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewRowStart($line); $r .= $this->showfield('file_fileperm'); $r .= '<td><select name="file_fileperm">'; @@ -41,7 +46,7 @@ $r .= '<option value="'.$p.'" '.($tutos['file_fileperm'] == $p ? 'selected="selected"':'').'>'.$p.'</option>'; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['FileConfigHelpFilePerm'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['FileConfigHelpFilePerm'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); @@ -52,19 +57,19 @@ $r .= '<option value="'.$p.'" '.($tutos['file_fileperm'] == $p ? 'selected="selected"':'').'>'.$p.'</option>'; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['FileConfigHelpDirPerm'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['FileConfigHelpDirPerm'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('file_local_allow'); $r .= '<td><input type="checkbox" name="file_local_allow" '.($tutos['file_local_allow'] == 1 ? 'checked="checked"':'').'value="1" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['FileConfigHelpLocalAllow'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['FileConfigHelpLocalAllow'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); $r .= $this->showfield('file_local_searchpath'); $r .= '<td><input name="file_local_searchpath" value="'.$tutos['file_local_searchpath'].'" /></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['FileConfigHelpLocalSearchPath'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['FileConfigHelpLocalSearchPath'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= '<tr>'; @@ -78,13 +83,15 @@ $r .= "</form>\n"; return $r; } + /** * */ function prepare() { global $lang,$msg,$tutos; - $this->name = $lang['FileConfig']; + $this->name = $lang['FileConfig']; + $this->css_class = 'configbox'; // default if (!isset($tutos['file_fileperm'])) $tutos['file_fileperm'] = 0600; Modified: trunk/php/history_show.php =================================================================== --- trunk/php/history_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/history_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -193,21 +193,19 @@ if ($j == null) { $r .= $this->OverviewRowBlock('<b>'.(isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']).'</b>','over_l'); $r .= $this->OverviewRowBlock(myentities($f['old']),'over_ml'); + $cl = 'overml'; if (substr($f['new'],0,5) == 'DIFF:') { - $x = '<pre>'. myentities($f['new']).'</pre>'; - } else { - $x = myentities($f['new']); + $cl .= ' pre'; } - $r .= $this->OverviewRowBlock($x,'over_ml'); + $r .= $this->OverviewRowBlock(myentities($f['new']),$cl); } else { $r .= $this->OverviewRowBlock('<b>'.myentities($j['field']).'</b>','over_l'); $r .= $this->OverviewRowBlock($j['old'],'over_ml'); + $cl = 'overml'; if (substr($j['new'],0,5) == 'DIFF:') { - $x = '<pre>'. $j['new'].'</pre>'; - } else { - $x = $j['new']; + $cl .= ' pre'; } - $r .= $this->OverviewRowBlock($x,'over_ml'); + $r .= $this->OverviewRowBlock($j['new'],$cl'over_ml'); } } if ( $this->adr_id == -1 ) { Modified: trunk/php/invoice/invoice_config.php =================================================================== --- trunk/php/invoice/invoice_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/invoice/invoice_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -9,6 +9,8 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -34,11 +36,15 @@ $r .= $this->DataTableStart(); $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); + $r .= $this->OverviewRowStart($line); $r .= $this->showfield('inv_autoname'); $r .= '<td><input name="autoname" value="'.$tutos['inv_autoname'] .'" />'; $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.myentities($lang['InvoiceConfigHelpAutoname']).'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.myentities($lang['InvoiceConfigHelpAutoname']).'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); @@ -52,7 +58,7 @@ $r .= '</select>'; $r .= '<br />'.makelink('stc/stc_new.php?lgarr=InvoiceStates','Create a new STC'); $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['InvoiceConfigHelpStateSTC'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['InvoiceConfigHelpStateSTC'].'</td>'; $r .= $this->OverviewRowEnd($line++); @@ -74,7 +80,7 @@ $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['InvoiceConfigHelpBillableTT'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['InvoiceConfigHelpBillableTT'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= '<tr>'; @@ -95,7 +101,8 @@ function prepare() { global $lang,$msg,$tutos; - $this->name = $lang['InvoiceConfig']; + $this->name = $lang['InvoiceConfig']; + $this->css_class = 'configbox'; // default if (!isset($tutos['inv_autoname'])) $tutos['inv_autoname'] = '%Y-%m-&X'; Modified: trunk/php/invoice/invoice_new.php =================================================================== --- trunk/php/invoice/invoice_new.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/invoice/invoice_new.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -58,7 +58,7 @@ $r .= TAX_select("T-".$f->id,$f->tax); $r .= ' </td>'; } else { - $r .= ' <td valign="top"><pre>'. $f->description .'</pre></td>'; + $r .= ' <td valign="top" class="pre">'. $f->description .'</td>'; $r .= ' <td align="right" valign="top">'. my_number_format($f->sum_single ,2) ."</td>"; $r .= ' <td align="right" valign="top">'. my_number_format($f->tax ,2) ."</td>"; } @@ -77,10 +77,10 @@ $r .= ' <td valign="top"><label for="add_'. $f->ref_id .'">'. $f->ref->getLink() ."</label></td>"; $r .= ' <td align="right" valign="top">'. my_number_format($f->items,2) ." </td>"; $r .= ' <td align="right" valign="top">'. $f->itype ." </td>"; - $r .= ' <td valign="top"><pre>'. myentities($f->description) ."</pre></td>"; - $r .= ' <td align="right" valign="top">'. my_number_format($f->sum_single,2) ."</td>"; - $r .= ' <td align="right" valign="top">'.($f->tax > 0 ? $f->tax."%":"") ."</td>"; - $r .= ' <td align="right" valign="top">'. my_number_format($f->getTotal(),2) ."</td>"; + $r .= ' <td valign="top" class="pre">'. myentities($f->description) .'</td>'; + $r .= ' <td align="right" valign="top">'. my_number_format($f->sum_single,2) .'</td>'; + $r .= ' <td align="right" valign="top">'.($f->tax > 0 ? $f->tax."%":"") .'</td>'; + $r .= ' <td align="right" valign="top">'. my_number_format($f->getTotal(),2) .'</td>'; $r .= ' <td align="left" valign="top">'. $f->currency ." </td>"; $x = preg_split('#,#',$tutos['invoice_billable_tt']); Modified: trunk/php/invoice/invoice_show.php =================================================================== --- trunk/php/invoice/invoice_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/invoice/invoice_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -49,7 +49,7 @@ } $r .= ' <td align="right" valign="top">'. number_format($f->items,2,$lang['DecPoint'],$lang['ThousandPoint']) ." </td>"; $r .= ' <td align="right" valign="top">'. $f->itype ." </td>"; - $r .= ' <td valign="top"><pre>'. myentities($f->description) ."</pre></td>"; + $r .= ' <td valign="top" class="pre">'. myentities($f->description) .'</td>'; $r .= ' <td align="right" valign="top">'. number_format($f->sum_single ,2,$lang['DecPoint'],$lang['ThousandPoint']) ."</td>"; $r .= ' <td align="right" valign="top">'. number_format($f->tax ,2,$lang['DecPoint'],$lang['ThousandPoint']) ."</td>"; $r .= ' <td align="right" valign="top">'. number_format($f->getTotal(),2,$lang['DecPoint'],$lang['ThousandPoint']) ."</td>"; Modified: trunk/php/module_template/AAA_config.php =================================================================== --- trunk/php/module_template/AAA_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/module_template/AAA_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -13,6 +13,7 @@ * @module AAA_config * @package AAA */ +$tutos['files'][__FILE__] = '$Rev$'; $tutos['base'] = "../.."; ini_set("include_path",".."); @@ -40,6 +41,9 @@ $r .= $this->DataTableStart(); $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); // first Config Variable $r .= $this->OverviewRowStart($line); @@ -64,7 +68,8 @@ function prepare() { global $lang,$msg,$tutos; - $this->name = $lang['AAAConfig']; + $this->name = $lang['AAAConfig']; + $this->css_class = 'configbox'; if ( ! $this->user->isAdmin() ) { $msg .= $this->error("Only admins are allowed to see this"); Modified: trunk/php/note/note_show.php =================================================================== --- trunk/php/note/note_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/note/note_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -64,7 +64,7 @@ $r .= $this->ContentRowEnd(); } $r .= $this->ContentRowStart(); - $r .= $this->showdata('<pre>'. format_txt($this->obj,$this->obj->note) .'</pre>',$this->width,'pre'); + $r .= $this->showdata(format_txt($this->obj,$this->obj->note),$this->width,'pre'); $r .= $this->ContentRowEnd(); // Show additional custom fields Modified: trunk/php/reminder/reminder_show.php =================================================================== --- trunk/php/reminder/reminder_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/reminder/reminder_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -10,6 +10,8 @@ * @module reminder_show * @package reminder */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -41,52 +43,52 @@ $r .= $this->ContentRowStart(); $r .= $this->showfield($lang['ReminderReference']); - $r .= $this->showdata($lang[$this->obj->ref->getType()]." ". $this->obj->ref->getLink(),3); + $r .= $this->showdata($lang[$this->obj->ref->getType()]." ". $this->obj->ref->getLink(),$this->width -1); $r .= $this->ContentRowEnd(); $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderTo']); - $r .= $this->showdata( (is_object($this->obj->to) ? $this->obj->to->getLink(): $lang['HistoryDeleted']),3); + $r .= $this->showdata( (is_object($this->obj->to) ? $this->obj->to->getLink(): $lang['HistoryDeleted']),$this->width -1); $r .= $this->ContentRowEnd(); $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderAt']); - $r .= $this->showdata($this->obj->remind_date->getLinkDateTime(),3); + $r .= $this->showdata($this->obj->remind_date->getLinkDateTime(),$this->width -1); $r .= $this->ContentRowEnd(); if ($this->obj->type != REMINDER_SIMPLE) { $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderType']); - $r .= $this->showdata($lang[$this->obj->ref->getType()] ." ". $this->obj->ref->getLink() .": ". $this->obj->getEventName(false),3); + $r .= $this->showdata($lang[$this->obj->ref->getType()] ." ". $this->obj->ref->getLink() .": ". $this->obj->getEventName(false),$this->width -1); $r .= $this->ContentRowEnd(); if ($this->obj->offset != 0) { $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderOffset']); - $r .= $this->showdata(reminder_offset_format($this->obj->offset),3); + $r .= $this->showdata(reminder_offset_format($this->obj->offset),$this->width -1); $r .= $this->ContentRowEnd(); } } $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderRepeat']); - $r .= $this->showdata(reminder_offset_format($this->obj->repeat),3); + $r .= $this->showdata(reminder_offset_format($this->obj->repeat),$this->width -1); $r .= $this->ContentRowEnd(); $r .= $this->ContentRowStart(); $r .= $this->showfieldc($lang['ReminderUseMail']); - $r .= $this->showdata( ($this->obj->usemail > 0 ? $lang['yes'] : $lang['no']),3); + $r .= $this->showdata( ($this->obj->usemail > 0 ? $lang['yes'] : $lang['no']),$this->width -1); $r .= $this->ContentRowEnd(); $r .= $this->ContentRowStart(); $r .= $this->showfield($lang['ReminderDesc']); - $r .= $this->showdata('<pre>'.wordwrap(urlReplace($this->obj->desc),80).'</pre>',3); + $r .= $this->showdata(wordwrap(urlReplace($this->obj->desc),80),$this->width -1,'pre'); $r .= $this->ContentRowEnd(); // Show additional custom fields - $r .= show_custom_fields($this,$this->obj->gettype(),$this->obj,4); + $r .= show_custom_fields($this,$this->obj->gettype(),$this->obj,$this->width); // References to modules - $r .= show_module_infolists($this->user,$this->obj,4); + $r .= show_module_infolists($this->user,$this->obj,$this->width); $r .= $this->getHistoryLink(); $r .= $this->DataTableEnd(); Modified: trunk/php/scrum/log_show.php =================================================================== --- trunk/php/scrum/log_show.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/scrum/log_show.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -11,6 +11,7 @@ * @package scrum */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -148,7 +149,7 @@ $r .= $this->ContentRowStart(); $r .= $this->showfield($lang['ScrumLogToDo']); - $r .= $this->showdata('<pre class="pre">'. format_txt($this->obj,$this->obj->todo) .'</pre>',$this->width-1); + $r .= $this->showdata(format_txt($this->obj,$this->obj->todo),$this->width-1,'pre'); $r .= $this->ContentRowEnd(); // Show additional custom fields Modified: trunk/php/scrum/scrum_config.php =================================================================== --- trunk/php/scrum/scrum_config.php 2013-03-12 12:56:03 UTC (rev 1013) +++ trunk/php/scrum/scrum_config.php 2013-03-13 09:32:02 UTC (rev 1014) @@ -41,8 +41,10 @@ $r = ''; $r .= "<form id=\"scrumconfig\" name=\"scrumconfig\" action=\"scrum_config.php\" method=\"post\">\n"; $r .= $this->DataTableStart(); - $line = 0; + $r .= $this->OverviewRowStart(); + $r .= '<th colspan="4">'.$this->name.'</th>'; + $r .= $this->OverviewRowEnd(); // first Config Variable $r .= $this->OverviewRowStart($line); @@ -50,7 +52,7 @@ $r .= '<td><input name="max_hours" value="'.$tutos['scrum_max_hours'] .'" size="2" maxlength="3" />'; $r .= '</td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$lang['ScrumConfigHelpMaxHours'].'</pre></td>'; + $r .= '<td colspan="2" class="pre">'.$lang['ScrumConfigHelpMaxHours'].'</td>'; $r .= $this->OverviewRowEnd($line++); $r .= $this->OverviewRowStart($line); @@ -59,11 +61,9 @@ $r .= ' <option value="1"'.($tutos['scrum_allow_weekend'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].'</option>'; $r .= ' <option value="0"'.($tutos['scrum_allow_weekend'] == 0 ? ' selected="selected"':'').'>'.$lang['no'].'</option>'; $r .= '</select></td>'; - $r .= '<td colspan="2" class="pre"><pre>'.$... [truncated message content] |
From: <gok...@us...> - 2013-03-12 12:56:06
|
Revision: 1013 http://sourceforge.net/p/tutos/code/1013 Author: gokohnert Date: 2013-03-12 12:56:03 +0000 (Tue, 12 Mar 2013) Log Message: ----------- speedup/caching of testcase count Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-03-12 08:28:16 UTC (rev 1012) +++ trunk/php/testmanager/testmanager.pinc 2013-03-12 12:56:03 UTC (rev 1013) @@ -647,7 +647,7 @@ $q->addFV("creator",$this->creator,"OBJ"); $q->addFV("creation",$this->creation,"DATETIME"); $query = $q->getInsert(); - if (is_object($this->ref)) { + if (is_object($this->ref) && ($this->ref->gettypeid() == usetestsuite)) { $this->ref->invalidateTCCount(); // not longer correct } } else { @@ -668,7 +668,7 @@ function delete() { $msg = ''; $this->read_reference(); - if (is_object($this->ref)) { + if (is_object($this->ref) && ($this->ref->gettypeid() == usetestsuite)) { $this->ref->invalidateTCCount(); // not longer correct } $msg = addLine($msg,parent::delete()); @@ -1504,8 +1504,16 @@ */ function setReference($name) { if ( $this->ref_id != $name ) { + $this->read_reference(); + if (is_object($this->ref) && ($this->ref->gettypeid() == usetestsuite)) { + $this->ref->invalidateTCCount(); + } $this->modified[] = array ( 'field' => 'TestsuiteRef', 'old' => $this->ref_id , 'new' => $name ); $this->ref_id = $name; + $this->read_reference(); + if (is_object($this->ref) && ($this->ref->gettypeid() == usetestsuite)) { + $this->ref->invalidateTCCount(); + } } return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-12 08:28:19
|
Revision: 1012 http://sourceforge.net/p/tutos/code/1012 Author: gokohnert Date: 2013-03-12 08:28:16 +0000 (Tue, 12 Mar 2013) Log Message: ----------- speedup/caching of testcase count Modified Paths: -------------- trunk/php/testmanager/mtable.pinc trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/mtable.pinc =================================================================== --- trunk/php/testmanager/mtable.pinc 2013-03-11 09:15:18 UTC (rev 1011) +++ trunk/php/testmanager/mtable.pinc 2013-03-12 08:28:16 UTC (rev 1012) @@ -1,6 +1,6 @@ <?php /* - * Copyright 2003 - 2012 by Gero Kohnert + * Copyright 2003 - 2013 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 @@ -11,8 +11,8 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; - $table['testcase'][name] = 'testcase'; $table['testcase'][Desc] = 'TUTOS testcase'; $table['testcase']['id'] = array(type => 'ID_TYPE', constraints => 'PK', Desc => 'Object ID'); @@ -27,9 +27,9 @@ $table['testcase']['t_result'] = array(type => 'ID_TYPE', constraints => '', Desc => 'result 0=fail 1=ok 2=skipped 3=untested'); $table['testcase']['t_comment'] = array(type => 'TX_TYPE', constraints => '', Desc => 'comment'); -$table['testcase']['t_activ'] = array(type => "ID_TYPE", constraints => '', Desc => "testcase is activ in a run"); -$table['testcase']['creator'] = array(type => "ID_TYPE", constraints => "NN", Desc => "creator ID"); -$table['testcase']['creation'] = array(type => "TS_TYPE", constraints => "NN", Desc => "creation date"); +$table['testcase']['t_activ'] = array(type => 'ID_TYPE', constraints => '', Desc => 'testcase is activ in a run'); +$table['testcase']['creator'] = array(type => 'ID_TYPE', constraints => 'NN', Desc => 'creator ID'); +$table['testcase']['creation'] = array(type => 'TS_TYPE', constraints => 'NN', Desc => 'creation date'); $table['testsuite'][name] = 'testsuite'; @@ -42,10 +42,11 @@ $table['testsuite']['prev_id'] = array(type => 'ID_TYPE', constraints => '', Desc => 'id of previous version'); $table['testsuite']['name'] = array(type => 'VARCHAR', size => 80, constraints => '', Desc => 'testsuite name'); $table['testsuite']['description'] = array(type => 'TX_TYPE', constraints => '', Desc => 'introduction description'); -$table['testsuite']['t_activ'] = array(type => "ID_TYPE", constraints => '', Desc => "testsuite is activ in a run"); +$table['testsuite']['t_activ'] = array(type => 'ID_TYPE', constraints => '', Desc => 'testsuite is activ in a run'); $table['testsuite']['t_state'] = array(type => 'ID_TYPE', constraints => '', Desc => 'state released or not'); -$table['testsuite']['creator'] = array(type => "ID_TYPE", constraints => "NN", Desc => "creator ID"); -$table['testsuite']['creation'] = array(type => "TS_TYPE", constraints => "NN", Desc => "creation date"); +$table['testsuite']['tccount'] = array(type => 'ID_TYPE', constraints => '', Desc => 'number of testcases'); +$table['testsuite']['creator'] = array(type => 'ID_TYPE', constraints => 'NN', Desc => 'creator ID'); +$table['testsuite']['creation'] = array(type => 'TS_TYPE', constraints => 'NN', Desc => 'creation date'); $table['testrun'][name] = 'testrun'; $table['testrun'][Desc] = 'TUTOS testrun'; @@ -58,78 +59,78 @@ $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"); +$table['testrun']['creator'] = array(type => 'ID_TYPE', constraints => 'NN', Desc => 'creator ID'); +$table['testrun']['creation'] = array(type => 'TS_TYPE', constraints => 'NN', Desc => 'creation date'); $tableidx['testcase1'] = array( - name => "testcase_idx1", - table => "testcase", - column => array("ref_id"), - Desc => "objects with testcases", + name => 'testcase_idx1', + table => 'testcase', + column => array('ref_id'), + Desc => 'objects with testcases', ); $tableidx['testcase2'] = array( - name => "testcase_idx2", - table => "testcase", - column => array("orig_id"), - Desc => "originals of testcases", + name => 'testcase_idx2', + table => 'testcase', + column => array('orig_id'), + Desc => 'originals of testcases', ); $tableidx['testcase3'] = array( - name => "testcase_idx3", - table => "testcase", - column => array("prev_id"), - Desc => "previous of testcases", + name => 'testcase_idx3', + table => 'testcase', + column => array('prev_id'), + Desc => 'previous of testcases', ); $tableidx['testsuite1'] = array( - name => "testsuite_idx1", - table => "testsuite", - column => array("ref_id"), - Desc => "objects with testsuites", + name => 'testsuite_idx1', + table => 'testsuite', + column => array('ref_id'), + Desc => 'objects with testsuites', ); $tableidx['testsuite2'] = array( - name => "testsuite_idx2", - table => "testsuite", - column => array("prev_id"), - Desc => "objects with testsuites", + name => 'testsuite_idx2', + table => 'testsuite', + column => array('prev_id'), + Desc => 'objects with testsuites', ); $tableidx['testsuite3'] = array( - name => "testsuite_idx3", - table => "testsuite", - column => array("orig_id"), - Desc => "objects with testsuites", + name => 'testsuite_idx3', + table => 'testsuite', + column => array('orig_id'), + Desc => 'objects with testsuites', ); $tableidx['testrun1'] = array( - name => "testrun_idx1", - table => "testrun", - column => array("ref_id"), - Desc => "objects with testruns", + name => 'testrun_idx1', + table => 'testrun', + column => array('ref_id'), + Desc => 'objects with testruns', ); $tableidx['testrun2'] = array( - name => "testrun_idx2", - table => "testrun", - column => array("test_id"), - Desc => "objects with testruns", + name => 'testrun_idx2', + table => 'testrun', + column => array('test_id'), + Desc => 'objects with testruns', ); $tableidx['testrun3'] = array( - name => "testrun_idx3", - table => "testrun", - column => array("tr_base_id"), - Desc => "base of this testrun", + name => 'testrun_idx3', + table => 'testrun', + column => array('tr_base_id'), + Desc => 'base of this testrun', ); $tableidx['testrun4'] = array( - name => "testrun_idx4", - table => "testrun", - column => array("run_id"), - Desc => "run testsuite id of this testrun", + name => 'testrun_idx4', + table => 'testrun', + column => array('run_id'), + Desc => 'run testsuite id of this testrun', ); // we create a additional column in the bugtracker @@ -142,7 +143,7 @@ 'olist' => array(usetestcase,usetestrun), // allow to enter a testrun in bug search constraints => '', Desc => 'id of testcase where we found the bug', - 'lang' => "Testcase", + 'lang' => 'Testcase', 'hideempty' => true, 'searchable' => true, 'overview' => true, Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-03-11 09:15:18 UTC (rev 1011) +++ trunk/php/testmanager/testmanager.pinc 2013-03-12 08:28:16 UTC (rev 1012) @@ -647,6 +647,9 @@ $q->addFV("creator",$this->creator,"OBJ"); $q->addFV("creation",$this->creation,"DATETIME"); $query = $q->getInsert(); + if (is_object($this->ref)) { + $this->ref->invalidateTCCount(); // not longer correct + } } else { $q->addWC("id",$this->id,""); $query = $q->getUpdate(); @@ -659,6 +662,20 @@ } /** + * Delete testcase from DB (simple default case) otherwise to be overwritten + * returns message to be dispplayed + */ + function delete() { + $msg = ''; + $this->read_reference(); + if (is_object($this->ref)) { + $this->ref->invalidateTCCount(); // not longer correct + } + $msg = addLine($msg,parent::delete()); + return $msg; + } + + /** * resolve a history Tag (to be called from history_show) */ function resolveHistoryTag ($f) { @@ -1217,6 +1234,7 @@ $this->activ = 0; $this->state = TS_WORK; $this->statarr = array(); + $this->tccount = null; $this->tablename = $this->dbconn->prefix .$table['testsuite'][name]; $this->run_postinit_hook(); @@ -1238,6 +1256,7 @@ $this->pos = $r->get($pos, 'pos'); $this->activ = $r->get($pos, 't_activ'); $this->state = $r->get($pos, 't_state'); + $this->tccount = $r->get($pos, 'tccount'); if ($this->state == '') { $this->state = TS_UNDEF; @@ -1561,6 +1580,7 @@ $q->addFV('pos',$this->pos,'INT'); $q->addFV('t_activ',$this->activ,'INT'); $q->addFV('t_state',$this->state,'INT'); + $q->addFV('tccount',$this->tccount,'INT'); $this->save_custom_fields($q); if ( $this->id < 0 ) { @@ -1771,18 +1791,50 @@ } /** + * mark a tccount as invalid + * set to null to force recount + */ + function invalidateTCCount() { + $this->tccount = null; + $q = 'update '.$this->tablename .' set tccount = null where id = '.$this->id; + $r = $this->dbconn->Exec($q); + $r->free(); + // go up + $this->read_reference(); + if (is_object($this->ref) && ($this->ref->gettypeid() == usetestsuite)) { + $this->ref->invalidateTCCount(); + } + + } + + /** + * store the counted testcases + * set to null to force recount + */ + function setTCCount($c) { + $this->tccount = $c; + $q = 'update '.$this->tablename .' set tccount = '.$c . ' where id = '.$this->id; + $r = $this->dbconn->Exec($q); + $r->free(); + } + + /** * count testcases * returns INT */ function countTestcases() { - $r = 0; - testcase::obj_read($this); - $r += count($this->list[usetestcase][0]); - testsuite::obj_read($this); - foreach($this->list[usetestsuite][0] as $ts) { - $r += $ts->countTestCases(); + if ($this->tccount < 1) { + $r = 0; + testcase::obj_read($this); + $r += count($this->list[usetestcase][0]); + testsuite::obj_read($this); + foreach($this->list[usetestsuite][0] as $ts) { + $r += $ts->countTestCases(); + } + $this->setTCCount($r); + return $r; } - return $r; + return $this->tccount; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-11 09:15:24
|
Revision: 1011 http://sourceforge.net/p/tutos/code/1011 Author: gokohnert Date: 2013-03-11 09:15:18 +0000 (Mon, 11 Mar 2013) Log Message: ----------- store sessions tutos instance specific Modified Paths: -------------- trunk/php/admin_show.php trunk/php/permission.p3 Modified: trunk/php/admin_show.php =================================================================== --- trunk/php/admin_show.php 2013-03-11 07:13:57 UTC (rev 1010) +++ trunk/php/admin_show.php 2013-03-11 09:15:18 UTC (rev 1011) @@ -423,7 +423,7 @@ } else if (ini_get('session.save_handler') == 'memcache') { $r .= $this->Sessions_Headline(); $y = array(); - $x = $tutos['memcache']->get('sessions'); + $x = $tutos['memcache']->get($this->dbconn->db->systemid.'_sessions'); $d = $tutos['memcache']->get(array_keys($x)); foreach ($d as $key => $data) { $r .= $this->Sessions_Line(unserialize_session($data),$key); @@ -433,7 +433,7 @@ foreach ($x as $key => $data) { $d = $tutos['memcache']->delete($key); } - $tutos['memcache']->set('sessions',$y); + $tutos['memcache']->set($this->dbconn->db->systemid.'_sessions',$y); $r .= $this->SubTableEnd(); $r .= "</td></tr>\n"; } Modified: trunk/php/permission.p3 =================================================================== --- trunk/php/permission.p3 2013-03-11 07:13:57 UTC (rev 1010) +++ trunk/php/permission.p3 2013-03-11 09:15:18 UTC (rev 1011) @@ -453,15 +453,6 @@ //dterror_log('new session '."\n", 3, $tutos[errlog]); $tutos['SESSID'] = session_id(); $userid = -1; - // store session id - if (ini_get('session.save_handler') == 'memcache') { - $x = $tutos['memcache']->get('sessions'); - if ($x === false) { - $x = array(); - } - $x[session_id()] = 1; - $tutos['memcache']->set('sessions',$x); - } $dbnr = $auth[0]->getDatabaseNr(); $dbconn = DB_Open($dbnr); if ($dbconn == null) { @@ -542,6 +533,15 @@ logmessage("check_user: Logged in ". $current_user->id .":". $current_user->login .":". $current_user->getFullname()); $initial_auth = true; + // store session id + if (ini_get('session.save_handler') == 'memcache') { + $x = $tutos['memcache']->get($dbconn->db->systemid.'_sessions'); + if ($x === false) { + $x = array(); + } + $x[session_id()] = 1; + $tutos['memcache']->set($dbconn->db->systemid.'_sessions',$x); + } // cut debug files short_debugfiles(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-11 07:14:03
|
Revision: 1010 http://sourceforge.net/p/tutos/code/1010 Author: gokohnert Date: 2013-03-11 07:13:57 +0000 (Mon, 11 Mar 2013) Log Message: ----------- change message to info Modified Paths: -------------- trunk/php/testmanager/testsuite_ins.php Modified: trunk/php/testmanager/testsuite_ins.php =================================================================== --- trunk/php/testmanager/testsuite_ins.php 2013-03-10 14:37:42 UTC (rev 1009) +++ trunk/php/testmanager/testsuite_ins.php 2013-03-11 07:13:57 UTC (rev 1010) @@ -48,13 +48,13 @@ * increment == true will increment version numbers */ function copy_tree($fromid,tutos_base $to,$increment) { - global $msg; + global $msg,$info; $from = getObject($to->dbconn,$fromid); if (!is_object($from)||($from->id != $fromid)) die ("no object found: ".$fromid); - $msg = addLine($msg,"Copy from: ".$from->getLink()." to ".$to->getLink()); + $info = addLine($info,"Copy from: ".$from->getLink()." to ".$to->getLink()); testsuite::obj_read($from); foreach($from->list[usetestsuite][0] as $ts) { $newts = new testsuite($to->dbconn); @@ -356,11 +356,11 @@ if ( isset($_POST['state']) ) { $statechange = $obj->setState($_POST['state']); } -# -# Parse additional custom fields -# +// +// Parse additional custom fields +// $msg = addLine($msg,parse_custom_fields($obj->gettype(),$obj)); -# other modules +// other modules $msg = addLine($msg,module_parseforms($current_user,$obj,$gotourl)); $msg = addLine($msg,$obj->run_check_hook()); @@ -382,7 +382,7 @@ if (isset($_REQUEST['ss'])) { $gotourl= addUrlParameter($gotourl,'ss='. $_REQUEST['ss'],true); } -leave_insert($dbconn,'../'.$gotourl,$msg); +leave_insert($dbconn,'../'.$gotourl,$msg,$info); /** * SVN Info $Id$ * $Author$ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-10 14:37:47
|
Revision: 1009 http://sourceforge.net/p/tutos/code/1009 Author: gokohnert Date: 2013-03-10 14:37:42 +0000 (Sun, 10 Mar 2013) Log Message: ----------- fixed related to automated tests Modified Paths: -------------- trunk/php/config_default.pinc trunk/php/installation/installation_new.php trunk/php/invoice/invoice.pinc trunk/php/mail_new.php trunk/php/product_contacts.php trunk/php/scrum/log_new.php Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/config_default.pinc 2013-03-10 14:37:42 UTC (rev 1009) @@ -772,7 +772,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20130306'; +$tutos[version] = '1.9.20130310'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/installation/installation_new.php =================================================================== --- trunk/php/installation/installation_new.php 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/installation/installation_new.php 2013-03-10 14:37:42 UTC (rev 1009) @@ -182,6 +182,11 @@ $this->obj->read_relations(); if ( isset($_GET['pid']) ) { $this->obj->product = getObject($this->dbconn,$_GET['pid']); + if (!is_object($this->obj->product)) { + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Product'])); + $this->stop = true; + return; + } $this->obj->money = $this->obj->product->price; $this->obj->currency = $this->obj->product->currency; } @@ -264,4 +269,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/invoice/invoice.pinc =================================================================== --- trunk/php/invoice/invoice.pinc 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/invoice/invoice.pinc 2013-03-10 14:37:42 UTC (rev 1009) @@ -138,17 +138,18 @@ global $tutos,$table; $this->init($dbconn); - $this->tablename = $this->dbconn->prefix .$table['invpos'][name]; + $this->tablename = $this->dbconn->prefix .$table['invpos'][name]; $this->description = "??"; - $this->currency = $tutos[currencies][0]; - $this->items = 0; - $this->itype = "*"; - $this->inv_id = -1; - $this->ref_id = -1; - $this->ref = -1; - $this->tax = 0; - $this->ADD = false; - $this->DELETE = false; + $this->currency = $tutos[currencies][0]; + $this->items = 0; + $this->sum_single = 0.0; + $this->itype = '*'; + $this->inv_id = -1; + $this->ref_id = -1; + $this->ref = -1; + $this->tax = 0; + $this->ADD = false; + $this->DELETE = false; $this->run_postinit_hook(); } @@ -1174,7 +1175,7 @@ * Read a list of all invoices related to an object */ static function obj_read (tutos_base $obj) { - global $table;; + global $table; if (! is_object($obj) ) return; if ( $obj->id == -1 ) return; Modified: trunk/php/mail_new.php =================================================================== --- trunk/php/mail_new.php 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/mail_new.php 2013-03-10 14:37:42 UTC (rev 1009) @@ -285,7 +285,7 @@ if ( isset($_GET['toid']) ) { $this->to = getObject($this->dbconn,$_GET['toid']); if ( !is_object($this->to) ) { - $msg = addLine($msg,"Unknown toid". $this->to->id ." ". $_GET['toid'] ." ". $this->to->getType()); + $msg = addLine($msg,'Unknown toid:'. $_GET['toid']); $this->stop = true; return; } else if ( $this->to->getType() == "team" ) { Modified: trunk/php/product_contacts.php =================================================================== --- trunk/php/product_contacts.php 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/product_contacts.php 2013-03-10 14:37:42 UTC (rev 1009) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2004 - 2011 by Gero Kohnert + * Copyright 2004 - 2013 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -13,13 +13,16 @@ * @module product_contacts * @package product */ +$tutos['files'][__FILE__] = '$Rev$'; + require_once 'webelements.p3'; require_once 'permission.p3'; +// Check if user is allowed to use it +check_user(); + require_once 'product.pinc'; require_once 'pdf.pinc'; -// Check if user is allowed to use it -check_user(); loadmodules('product','show'); loadlayout(); @@ -366,17 +369,17 @@ $this->obj = $this->obj->read($_GET['id'],$this->obj); } if ( !is_object($this->obj) ) { - $msg .= sprintf($lang['Err0012'],$lang['Address']); + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Address'])); $this->stop = true; $this->format = "html"; return; } else if (!$this->obj->see_ok() ) { - $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]); + $msg = aaddLine($msg,sprintf($lang['Err0022'],$lang[$this->obj->getType()])); $this->stop = true; $this->format = "html"; return; } else if ( $this->obj->id < 0 ) { - $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); + $msg = addLine($msg,sprintf($lang['Err0040'],$lang[$this->obj->getType()])); $this->stop = true; $this->format = "html"; return; Modified: trunk/php/scrum/log_new.php =================================================================== --- trunk/php/scrum/log_new.php 2013-03-10 14:37:05 UTC (rev 1008) +++ trunk/php/scrum/log_new.php 2013-03-10 14:37:42 UTC (rev 1009) @@ -881,7 +881,7 @@ * prepare */ Function prepare() { - global $lang,$msg; + global $lang,$msg,$info; $this->mode = ''; $this->sprint = null; @@ -919,12 +919,12 @@ $this->obj = $this->obj->read($_GET['id'],$this->obj); $this->name = $lang['ScrumLogMod']; if ( !is_object($this->obj) ) { - $msg .= sprintf($lang['Err0040'],$lang['ScrumLogItem']); + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['ScrumLogItem'])); $this->stop = true ; return; } if(!$this->obj->mod_ok()) { - $msg .= sprintf($lang['Err0024'],$lang[$this->obj->getType()]); + $msg = addLine($msg,sprintf($lang['Err0024'],$lang[$this->obj->getType()])); $this->stop = true; return; } @@ -937,14 +937,14 @@ loadmodules('product','show'); $this->name = $lang['ScrumLogManageS']; if (!is_object($this->sprint)) { - $msg .= 'no sprint'; + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Sprint'])); $this->stop = true; return; } $this->name .= ' : '. $this->sprint->getFullName(); $this->sprint->read_reference(); if (!is_object($this->sprint->pref)) { - $msg .= 'no project'; + $msg = addLine($msg,'no project'); $this->stop = true; return; } @@ -955,28 +955,28 @@ loadmodules('product','show'); $this->name = $lang['ScrumLogManageP']; if (!is_object($this->pref)) { - $msg .= 'no product'; + $msg = addLine($msg,'no product'); $this->stop = true; return; } $this->name .= ' : '. $this->pref->getFullName(); ScrumLog::obj_read($this->pref); } else if ($this->mode == 'manage_w') { - $this->nav = null; // do not show nav on top - $this->sprint->read_reference(); - $this->sprint->read_previous(); - loadmodules('product','show'); $this->name = $lang['ScrumLogManageW']; if (!is_object($this->sprint)) { - $msg .= 'no sprint'; + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Sprint'])); $this->stop = true; return; } + $this->nav = null; // do not show nav on top + $this->sprint->read_reference(); + $this->sprint->read_previous(); + loadmodules('product','show'); $this->name .= ' : '. $this->sprint->getFullName(); ScrumLog::obj_read($this->sprint); if ($this->sprint->start_dt->notime) { - $msg .= $lang['Scrum_Err001']; + $msg = addLine($msg,$lang['Scrum_Err001']); $this->stop = true; return; } @@ -1033,4 +1033,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-10 14:37:09
|
Revision: 1008 http://sourceforge.net/p/tutos/code/1008 Author: gokohnert Date: 2013-03-10 14:37:05 +0000 (Sun, 10 Mar 2013) Log Message: ----------- bugfix Modified Paths: -------------- trunk/php/invoice/invoice_new.php Modified: trunk/php/invoice/invoice_new.php =================================================================== --- trunk/php/invoice/invoice_new.php 2013-03-10 13:26:38 UTC (rev 1007) +++ trunk/php/invoice/invoice_new.php 2013-03-10 14:37:05 UTC (rev 1008) @@ -32,7 +32,7 @@ /** * show ONE position */ - Function show_invpos($f) { + Function show_invpos(invpos $f) { global $lang,$tutos; $r = $this->OverviewRowStart($this->line++); @@ -252,7 +252,7 @@ } else foreach ($this->obj->pos as $i => $f) { $f->read_ref(); $showed[$f->ref->id] = 1; - $r .= $this->show_invpos($f,$this->obj); + $r .= $this->show_invpos($f); unset($f); } if ( $this->obj->change_ok() ) { @@ -276,7 +276,7 @@ $p->set($this->obj,$this->obj->ref); $p->read_ref(); if ( ! isset($showed[$p->ref->id]) ) { - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); } // Time directly booked on the parent object @@ -289,7 +289,7 @@ $p->set($this->obj,$f); $p->read_ref(); if ( ! isset($showed[$p->ref->id]) ) { - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); } unset($p); unset($f); @@ -300,7 +300,7 @@ foreach ($this->obj->ref->fulltasklist as $i => $f) { $p = new invpos($this->dbconn); $p->set($this->obj,$f); - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); unset($p); if( $tutos[useexpenses] ) { loadmodule("expense"); @@ -310,10 +310,10 @@ continue; } invoice::obj_read($f2); - if (count($f2->list[useinvoice]) == 0 ) { + if (count($f2->list[useinvoice][2]) == 0 ) { $p = new invpos($this->dbconn); $p->set($this->obj,$f2); - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); unset($p); } } @@ -326,10 +326,10 @@ installation::obj_read($this->obj->ref); foreach ($this->obj->ref->list[useinstmanagement] as $f) { invoice::obj_read($f); - if (count($f->list[useinvoice]) == 0 ) { + if (count($f->list[useinvoice][2]) == 0 ) { $p = new invpos($this->dbconn); $p->set($this->obj,$f); - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); unset($p); } $f->readtimetrack(); @@ -341,7 +341,7 @@ $p->set($this->obj,$f2); $p->read_ref(); if ( ! isset($showed[$p->ref->id]) ) { - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); } unset($p); unset($f2); @@ -354,10 +354,10 @@ bug::obj_read($this->obj->ref); foreach ($this->obj->ref->list[usebugtracking][1] as $f) { invoice::obj_read($f); - if (count($f->list[useinvoice]) == 0 ) { + if (count($f->list[useinvoice][2]) == 0 ) { $p = new invpos($this->dbconn); $p->set($this->obj,$f); - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); unset($p); } $f->readtimetrack(); @@ -369,7 +369,7 @@ $p->set($this->obj,$f2); $p->read_ref(); if ( ! isset($showed[$p->ref->id]) ) { - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); } unset($p); unset($f2); @@ -381,14 +381,12 @@ loadmodule("expense"); expense::obj_read($this->obj->ref); foreach ($this->obj->ref->list[useexpenses] as $f) { - if ( ($f->invoice == $this->obj->id) && ($this->obj->id != -1) ) { - continue; - } invoice::obj_read($f); - if (count($f->list[useinvoice]) == 0 ) { + // has pos + if (count($f->list[useinvoice][2]) == 0 ) { $p = new invpos($this->dbconn); $p->set($this->obj,$f); - $r .= $this->show_invpos($p,$this->obj); + $r .= $this->show_invpos($p); unset($p); } } @@ -462,6 +460,11 @@ $this->obj->link_id = $_GET['link_id']; if ( $this->obj->id == -1 ) { $this->obj->read_ref(); + if (!is_object($this->obj->ref)) { + $msg = addLine($msg,sprintf($lang['Err0012'],$lang['InvoiceReference'],$_GET['link_id'])); + $this->stop = true; + return; + } if ( $this->obj->ref->getType() == "product" ) { // Preset the custumer if possible $this->obj->ref->readroles(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-10 13:26:41
|
Revision: 1007 http://sourceforge.net/p/tutos/code/1007 Author: gokohnert Date: 2013-03-10 13:26:38 +0000 (Sun, 10 Mar 2013) Log Message: ----------- centralized headers generation Modified Paths: -------------- trunk/php/address_show.php trunk/php/app_show.php trunk/php/excel.pinc trunk/php/file/file.pinc trunk/php/file/file_show.php trunk/php/graph_bars.php trunk/php/layout/classic_base.pinc trunk/php/layout/mobile_layout.pinc trunk/php/layout/new2_layout.pinc trunk/php/layout/new_layout.pinc trunk/php/mail.pinc trunk/php/mailbox/mail_show.php trunk/php/url/url_show.php trunk/php/webelements.p3 Modified: trunk/php/address_show.php =================================================================== --- trunk/php/address_show.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/address_show.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -6,12 +6,12 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * - * SVN Info $Id$ - * $Author$ + * SVN Info $Id$ + * $Author$ * - * @modulegroup address - * @module adr_ldap_overview - * @package address + * @modulegroup address + * @module adr_ldap_overview + * @package address */ $tutos['files'][__FILE__] = '$Rev$'; @@ -75,8 +75,7 @@ if ( $this->format == "vcard" ) { $b = $this->obj->getVcard(); - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); // set content to text/calendar if (strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 5") || strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 6") ) { Header("Cache-Control:"); Modified: trunk/php/app_show.php =================================================================== --- trunk/php/app_show.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/app_show.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -9,11 +9,11 @@ * SVN Info $Id$ * $Author$ * - * A four week calendar + * A four week calendar * - * @modulegroup appointment - * @module app_show - * @package appointment + * @modulegroup appointment + * @module app_show + * @package appointment */ $tutos['files'][__FILE__] = '$Rev$'; @@ -43,8 +43,7 @@ $r = ''; if ( $this->format == "ical") { - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); // set content to text/calendar if (strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 5") || strstr($_SERVER["HTTP_USER_AGENT"],"MSIE 6") ) { Header("Cache-Control:"); Modified: trunk/php/excel.pinc =================================================================== --- trunk/php/excel.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/excel.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -1,79 +1,77 @@ <?php /** - * Copyright 2004 - 2009 by Gero Kohnert + * Copyright 2004 - 2013 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. * - * base format for TUTOS excel output + * base format for TUTOS excel output * * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; class Tutos_excel { - function tutos_excel() - { - $this->wb = -1; - $this->ws = array(); - } + function tutos_excel() + { + $this->wb = -1; + $this->ws = array(); + } - function open() - { - global $tutos; + function open() + { + global $tutos; - $this->tmpname = tempnam ($tutos[sessionpath], "excel"); - $this->wb = new Workbook($this->tmpname); - } + $this->tmpname = tempnam ($tutos[sessionpath], "excel"); + $this->wb = new Workbook($this->tmpname); + } - function send($name) - { - $this->wb->close(); - $fh = fopen($this->tmpname, "rb"); - if ($fh == false) { - die("Can't read temporary file."); - } + function send($name) + { + $this->wb->close(); + $fh = fopen($this->tmpname, "rb"); + if ($fh == false) { + die("Can't read temporary file."); + } -#die ($this->tmpname); - header("Content-type: application/vnd.ms-excel"); - header("Content-Disposition: attachment; filename=". $name .".xls"); - header("Expires: 0"); - header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); - header("Pragma: public"); + export_headers_base(); + header("Content-type: application/vnd.ms-excel"); + header("Content-Disposition: attachment; filename=". $name .".xls"); - fpassthru($fh); - fclose($fh); - @unlink($this->tmpname); - return; - } + fpassthru($fh); + fclose($fh); + @unlink($this->tmpname); + return; + } - function add_sheet($name) - { - global $lang; + function add_sheet($name) + { + global $lang; - $id = count($this->ws); - $this->ws[$id] =& $this->wb->add_worksheet($name); - $this->ws[$id]->set_landscape(); - $this->ws[$id]->set_header('TUTOS'); - $this->ws[$id]->set_footer("generated by TUTOS"); + $id = count($this->ws); + $this->ws[$id] =& $this->wb->add_worksheet($name); + $this->ws[$id]->set_landscape(); + $this->ws[$id]->set_header('TUTOS'); + $this->ws[$id]->set_footer("generated by TUTOS"); - return $id; - } + return $id; + } - function add_formats() - { - $this->format_default =& $this->wb->add_format(); - $this->format_default->set_size(10); + function add_formats() + { + $this->format_default =& $this->wb->add_format(); + $this->format_default->set_size(10); - $this->format_header =& $this->wb->add_format(); - $this->format_header->set_bold(1); - $this->format_header->set_align('center'); - $this->format_header->set_fg_color(43); - $this->format_header->set_color(8); - $this->format_header->set_size(12); - $this->format_header->set_pattern(); + $this->format_header =& $this->wb->add_format(); + $this->format_header->set_bold(1); + $this->format_header->set_align('center'); + $this->format_header->set_fg_color(43); + $this->format_header->set_color(8); + $this->format_header->set_size(12); + $this->format_header->set_pattern(); - } - } + } +} ?> \ No newline at end of file Modified: trunk/php/file/file.pinc =================================================================== --- trunk/php/file/file.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/file/file.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -6,7 +6,7 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * - * Class to maintain files their location ,version and history + * Class to maintain files their location ,version and history * * SVN Info $Id$ * $Author$ @@ -738,10 +738,8 @@ die ('no file: '.$fname); return; } - - Header("Expires: 0"); - Header("Cache-Control:"); - Header("Pragma:"); + export_headers_base(); + Header("Content-Description: ". $this->name ); if ( ($v == '') || ($this->vsys == FILE_NOVERS) ) { $this->myreadfile ($fname); return; @@ -797,17 +795,12 @@ * preview this file (for popups) */ function preview($version,$ly) { - $fname = $this->getFilename(); if ( ! file_exists($fname) ) { return; } - - Header("Expires: 0"); - Header("Cache-control:"); - Header("Pragma:"); + export_headers_base(); Header("Content-Description: ". $this->name ); - $info = ''; $url = dirname(getBaseUrl()) .'/'. addSessionKey($this->getUrl().'&format=show'); @@ -842,9 +835,7 @@ return; } //error_log($fname."\n", 3, $tutos[errlog]); - Header("Expires: 0"); - Header("Cache-control:"); - Header("Pragma:"); + export_headers_base(); Header("Content-Description: ". $this->name ); if ( $this->filetype == 'text/plain' || $this->filetype == 'text/x-log' @@ -870,8 +861,6 @@ return; } else if ( preg_match("#\.zip$#i",$this->filename) ) { if (class_exists("ZipArchive")) { - # Header("Content-type: text/html"); - # Header("Content-Disposition: inline; filename=\"". $this->filename .".html\""); echo $ly->HTML_Start(); echo $ly->layout_start(); echo showzip($fname); Modified: trunk/php/file/file_show.php =================================================================== --- trunk/php/file/file_show.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/file/file_show.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -14,6 +14,7 @@ * @package file */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -37,9 +38,7 @@ Function info_thumb() { global $tutos,$lang; - Header("Expires: 0"); - Header("Cache-control:"); - Header("Pragma:"); + export_headers_base(); Header("Content-Description: ". $this->name ); Header("Content-Type: application/octet-stream"); Modified: trunk/php/graph_bars.php =================================================================== --- trunk/php/graph_bars.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/graph_bars.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -1,17 +1,17 @@ <?php -/* - * Copyright 1999 - 2011 by Gero Kohnert +/** + * Copyright 1999 - 2013 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. * - * SVN Info $Id$ - * $Author$ + * SVN Info $Id$ + * $Author$ * */ +$tutos['files'][__FILE__] = '$Rev$'; - require_once 'webelements.p3'; require_once 'permission.p3'; @@ -24,8 +24,7 @@ function basic (&$f,&$t0,&$t1) { global $msg; - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); Header("content-type: image/png"); $x2 = count($f) * 110; Modified: trunk/php/layout/classic_base.pinc =================================================================== --- trunk/php/layout/classic_base.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/layout/classic_base.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -41,26 +41,15 @@ global $tutos,$lang; $r = ''; - # ob_start("ob_gzhandler"); @ob_start(); if ( !isset($this->name) || empty($this->name) ) { $this->name = "TUTOS"; } - Header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - Header("Expires: -1"); - Header("Cache-Control: no-store, no-cache, must-revalidate"); - Header("Cache-Control: max_age=0 ,post-check=0, pre-check=0",false); - Header("Pragma: no-cache"); + export_headers_base(); Header('Content-Description: a TUTOS Page -- '.preg_replace('#\n#',' ',trim($this->name))); Header("Content-Type: text/html;charset=". $lang['content_encoding']); - /** - $r .= "<?xml version=\"1.0\"?>"; - $r .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\""; - $r .= " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"; - */ - if (true) { $r .= "<?xml version=\"1.0\"?>\n"; $r .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; @@ -443,19 +432,19 @@ ); $this->addMenu($x); - # Logout - $x = array( url => "logout.php", - image => $this->theme->getImage(logout,'menu'), - text => $lang['Logout'], - info => $lang['LogoutInfo'], - category => array("logout","admin","default") - ); + // Logout + $x = array( url => "logout.php", + image => $this->theme->getImage(logout,'menu'), + text => $lang['Logout'], + info => $lang['LogoutInfo'], + category => array("logout","admin","default") + ); $this->addMenu($x); - # Team Stuff - if ( ! class_exists ("url") ) { - loadmodule("url"); - } + // Team Stuff + if ( ! class_exists ("url") ) { + loadmodule("url"); + } if ( class_exists ("url") ) { if ( $this->user->feature_ok(useurl,PERM_SEE) ) { Modified: trunk/php/layout/mobile_layout.pinc =================================================================== --- trunk/php/layout/mobile_layout.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/layout/mobile_layout.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -723,12 +723,7 @@ if ( !isset($this->name) || empty($this->name) ) { $this->name = 'TUTOS'; } - Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); - // Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - Header('Expires: -1'); - Header('Cache-Control: no-store, no-cache, must-revalidate'); - Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); - Header('Pragma: no-cache'); + export_headers_base(); Header('Content-Description: a TUTOS Page -- '.preg_replace('#\n#',' ',trim($this->name))); Header('Content-Type: text/html;charset='. $lang['content_encoding']); Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/layout/new2_layout.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -451,12 +451,7 @@ if ( !isset($this->name) || empty($this->name) ) { $this->name = 'TUTOS'; } - Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); - // Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - Header('Expires: -1'); - Header('Cache-Control: no-store, no-cache, must-revalidate'); - Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); - Header('Pragma: no-cache'); + export_headers_base(); Header('Content-Description: a TUTOS Page -- '.preg_replace('#\n#',' ',trim($this->name))); Header('Content-Type: text/html;charset='. $lang['content_encoding']); Modified: trunk/php/layout/new_layout.pinc =================================================================== --- trunk/php/layout/new_layout.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/layout/new_layout.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -363,12 +363,7 @@ if ( !isset($this->name) || empty($this->name) ) { $this->name = 'TUTOS'; } - Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); - // Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - Header('Expires: -1'); - Header('Cache-Control: no-store, no-cache, must-revalidate'); - Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); - Header('Pragma: no-cache'); + export_headers_base(); Header('Content-Description: a TUTOS Page -- '.preg_replace('#\n#',' ',trim($this->name))); Header('Content-Type: text/html;charset='. $lang['content_encoding']); Modified: trunk/php/mail.pinc =================================================================== --- trunk/php/mail.pinc 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/mail.pinc 2013-03-10 13:26:38 UTC (rev 1007) @@ -6,7 +6,7 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * - * Give a good interface to send mail + * Give a good interface to send mail * * SVN Info $Id$ * $Author$ @@ -323,16 +323,14 @@ if(!$skip && ($mformat == "download") ) { $show_raw = true; $show_text = false; - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); Header("Content-type: " . $this->contenttype.';charset='.$this->charset); Header("Content-Disposition: attachment; filename=\"". $this->contentdisponame ."\""); Header("Content-Description: Upload from TUTOS" ); } elseif (!$skip && ($mformat == "show") ) { $show_raw = true; $show_text = false; - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); Header("Content-type: " . $this->contenttype.';charset='.$this->charset); } elseif (!$skip && $show_headline) { if ($mformat == 'reply') { Modified: trunk/php/mailbox/mail_show.php =================================================================== --- trunk/php/mailbox/mail_show.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/mailbox/mail_show.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -17,6 +17,7 @@ * */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -40,8 +41,7 @@ global $lang,$tutos; if (($this->part == 0) && ($this->format == 'download')) { - Header("Expires: 0"); - Header("Pragma: no-cache"); + export_headers_base(); Header("Content-type: message/rfc822"); Header("Content-Disposition: attachment; filename=\"". $this->mno .".eml\""); Header("Content-Description: Upload from TUTOS" ); Modified: trunk/php/url/url_show.php =================================================================== --- trunk/php/url/url_show.php 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/url/url_show.php 2013-03-10 13:26:38 UTC (rev 1007) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2000 - 2012 by Gero Kohnert + * Copyright 2000 - 2013 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 @@ -10,6 +10,8 @@ * @module note_show * @package note */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -69,13 +71,11 @@ if (preg_match("<@BASEURL@>",$this->obj->url)) { leave_insert($this->obj->dbconn,$this->obj->getTargetUrl(),$msg,$info); } else { + export_headers_base(); Header('Status: 302 Moved Temporarily'); Header("Content-Description: TUTOS Redirect" ); - Header("Expires: -1"); // required by google chrome Header('Location: '. $this->obj->url); } - - # $this->redirect = 'http://www.tutos.de'; } } Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-03-09 06:17:14 UTC (rev 1006) +++ trunk/php/webelements.p3 2013-03-10 13:26:38 UTC (rev 1007) @@ -1159,13 +1159,13 @@ } /** - if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { - if ( session_id() != '' ) { - //$href .= $pre . session_name() .'='. session_id(); - $href .= $pre . SID; - $pre = $pre2; - } - } + if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { + if ( session_id() != '' ) { + //$href .= $pre . session_name() .'='. session_id(); + $href .= $pre . SID; + $pre = $pre2; + } + } */ return $href . $add; } @@ -1195,11 +1195,11 @@ $r .= ' <input type="hidden" name="ss" value="'. $_REQUEST['ss'] ."\" />\n"; } /** - if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { - if ( SID != '' ) { - $r .= ' <input type="hidden" name="'. session_name() .'" value="'. session_id() ."\" />\n"; - } - } + if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { + if ( SID != '' ) { + $r .= ' <input type="hidden" name="'. session_name() .'" value="'. session_id() ."\" />\n"; + } + } */ return $r; } @@ -2946,12 +2946,9 @@ $gotourl = addSessionKey($gotourl,true); // go to a better place + export_headers_base(); 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); - Header('Pragma: no-cache'); Header("Status: 302 Moved Temporarily"); if (preg_match('#^http#',$gotourl)) { Header("Location: ". $gotourl ); @@ -2966,16 +2963,29 @@ * HTTP Header for exporting files * do not allow caching */ +function export_headers_base() { + if(headers_sent()) { + Fatal_Error('Some data has already been output to browser, can\'t send data'); + } + Header('Expires: -1'); + Header('Cache-Control: no-store, no-cache, must-revalidate'); + Header('Cache-Control: max_age=0 ,post-check=0, pre-check=0',false); + // Header("Pragma: no-cache"); // won't work with IE7 + // Header("Pragma: public"); + Header('Pragma: no-cache'); + Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); +} + +/** + * HTTP Header for exporting files + * do not allow caching + */ function export_headers($filename = '',$type = '',$attach = true) { if(headers_sent()) { Fatal_Error('Some data has already been output to browser, can\'t send "'.$type.'" file'); } - 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: public"); - Header("Content-Description: Upload from TUTOS" ); - Header('Last-Modified: ' . gmdate('D, d M Y H:i:s') .' GMT'); + export_headers_base(); + Header('Content-Description: '.$filename ); if ($filename != '') { if ($type == 'csv') { $filename .= '_'.date('YmdHis').'.csv'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-09 06:17:17
|
Revision: 1006 http://sourceforge.net/p/tutos/code/1006 Author: gokohnert Date: 2013-03-09 06:17:14 +0000 (Sat, 09 Mar 2013) Log Message: ----------- check size Modified Paths: -------------- trunk/php/user.pinc Modified: trunk/php/user.pinc =================================================================== --- trunk/php/user.pinc 2013-03-07 19:39:00 UTC (rev 1005) +++ trunk/php/user.pinc 2013-03-09 06:17:14 UTC (rev 1006) @@ -169,14 +169,14 @@ $this->birthday = $r->getDateTime($pos, "birthday"); $this->last_seen = $r->getDateTime($pos, "last_seen"); $this->last_host = $r->get($pos, "last_host"); - $this->uid = $r->get($pos,"u_id"); - $this->admin = $r->get($pos,"admin"); - $this->disabled = $r->get($pos,"disabled"); - $this->lang = strtolower($r->get($pos, "lang")); - $this->tz = $r->get($pos, "tz"); - $this->theme = $r->get($pos, "theme"); - $this->ly = $r->get($pos, "layout"); - $this->pw_date = $r->getDateTime($pos, "pw_date"); + $this->uid = $r->get($pos,"u_id"); + $this->admin = $r->get($pos,"admin"); + $this->disabled = $r->get($pos,"disabled"); + $this->lang = strtolower($r->get($pos, "lang")); + $this->tz = $r->get($pos, "tz"); + $this->theme = $r->get($pos, "theme"); + $this->ly = $r->get($pos, "layout"); + $this->pw_date = $r->getDateTime($pos, "pw_date"); if ($this->ly == "") { $this->ly = $tutos[layouts][0]; } @@ -526,7 +526,7 @@ * this project. This will be used from task_new... */ if( is_object($project) && method_exists($project,'readroles') ) { - $project->readroles(); + $project->readroles(); foreach($project->role as $role => $xf) { if( isset($project->role[$role]) && is_array($project->role[$role]) ) { foreach($project->role[$role] as $i => $o) { @@ -761,7 +761,7 @@ * Save entry */ function save() { - global $current_user,$tutos; + global $table,$current_user,$tutos; if ( $tutos[demo] == 1 ) { return "Sorry Demo does not allow change of UserEntry<br />"; @@ -771,7 +771,7 @@ $q = new query($this->dbconn); $q->setTable($this->tablename); - $q->addFV("login",$this->login,"STRING",20); + $q->addFV("login",$this->login,"STRING",$table['people']['login'][size]); if ( $this->updatepw == 1 ) { $x = new TUTOS_Date_Time(); $q->addFV("pw",$this->pw,"PASSWORD"); @@ -780,16 +780,16 @@ $q->addFV("admin",$this->admin,"INT"); $q->addFV("disabled",$this->disabled,"INT"); $q->addFV("lang",$this->lang,"STRING",5); - $q->addFV("tz",$this->tz,"STRING",30); - $q->addFV("theme",$this->theme,"STRING",10); - $q->addFV("layout",$this->ly,"STRING",30); + $q->addFV("tz",$this->tz,"STRING",$table['people']['tz'][size]); + $q->addFV("theme",$this->theme,"STRING",$table['people']['theme'][size]); + $q->addFV("layout",$this->ly,"STRING",$table['people']['layout'][size]); $q->addFV("weekstart",$this->weekstart,"INT"); $h = ''; foreach($this->workday as $i => $f) { $h .= $f .','; } - $q->addFV("workdays",$h,"STRING",60); + $q->addFV("workdays",$h,"STRING",$table['people']['workdays'][size]); $h = ''; foreach ($this->nameday as $i => $f) { @@ -797,7 +797,7 @@ $h .= $i .','; } } - $q->addFV("namedays",$h,"STRING",60); + $q->addFV("namedays",$h,"STRING",$table['people']['namedays'][size]); $h = ''; foreach($this->holiday as $i => $f) { @@ -805,7 +805,7 @@ $h .= $i .','; } } - $q->addFV("holidays",$h,"STRING",60); + $q->addFV("holidays",$h,"STRING",$table['people']['holidays'][size]); $h = ''; foreach($this->rowiconsbefore as $i => $f) { @@ -813,7 +813,7 @@ $h .= $i .','; } } - $q->addFV("rowiconsbefore",$h,"STRING",30); + $q->addFV("rowiconsbefore",$h,"STRING",$table['people']['rowiconsbefore'][size]); $h = ''; foreach($this->rowiconsafter as $i => $f) { @@ -821,7 +821,7 @@ $h .= $i .','; } } - $q->addFV("rowiconsafter",$h,"STRING",30); + $q->addFV("rowiconsafter",$h,"STRING",$table['people']['rowiconsafter'][size]); $this->save_custom_fields($q,"people"); @@ -958,6 +958,7 @@ * per page update */ function update($initial = false) { + global $table; $lh = "not set"; if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) ) { @@ -972,7 +973,7 @@ $q = new query($this->dbconn); $q->setTable($this->tablename); $q->addFV('last_seen',$this->last_seen,'DATETIME'); - $q->addFV('last_host',$this->last_host,"STRING",20); + $q->addFV('last_host',$this->last_host,"STRING",$table['people']['last_host'][size]); # $q->addFV("creator",$this->creator,"OBJ"); # $q->addFV("creation",$this->creation,"DATETIME"); $q->addWC('login',$this->login,'STRING'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-07 19:39:03
|
Revision: 1005 http://sourceforge.net/p/tutos/code/1005 Author: gokohnert Date: 2013-03-07 19:39:00 +0000 (Thu, 07 Mar 2013) Log Message: ----------- more test Modified Paths: -------------- trunk/test.sh Modified: trunk/test.sh =================================================================== --- trunk/test.sh 2013-03-07 19:38:18 UTC (rev 1004) +++ trunk/test.sh 2013-03-07 19:39:00 UTC (rev 1005) @@ -323,9 +323,14 @@ checklist/checkfield_show.php?id=$NOID&lg=$LG counter/counter_overview.php?lg=$LG counter/counter_overview.php?id=$ADR&lg=$LG + counter/counter_overview.php?id=$ADR&format=stat&lg=$LG + counter/counter_overview.php?id=$NOID&lg=$LG + counter/counter_overview.php?id=$NOID&format=stat&lg=$LG counter/counter_show.php?lg=$LG counter/counter_show.php?id=$ADR&lg=$LG counter/counter_show.php?id=$NOID&lg=$LG + counter/counter_show.php?id=$ADR&format=stat&lg=$LG + counter/counter_show.php?id=$NOID&format=stat&lg=$LG doctracker/doc_new.php?lg=$LG doctracker/doc_ins.php?lg=$LG doctracker/doc_show.php?lg=$LG @@ -503,7 +508,10 @@ scrum/sprint_show.php?id=$P_ID&lg=$LG scrum/sprint_select.php?lg=$LG scrum/sprint_overview.php?lg=$LG + scrum/sprint_overview.php?p_id=$NOID&lg=$LG scrum/sprint_overview.php?p_id=$P_ID&lg=$LG + scrum/sprint_overview.php?w_id=$NOID&lg=$LG + scrum/sprint_overview.php?w_id=$ADR&lg=$LG stc/stc_ins.php?lg=$LG stc/stc_new.php?lg=$LG stc/stc_overview.php?lg=$LG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-07 19:38:21
|
Revision: 1004 http://sourceforge.net/p/tutos/code/1004 Author: gokohnert Date: 2013-03-07 19:38:18 +0000 (Thu, 07 Mar 2013) Log Message: ----------- fixed layout issue with opera on login Modified Paths: -------------- trunk/php/layout/layout_base.pinc trunk/php/layout/new_base.pinc trunk/php/login.pinc Modified: trunk/php/layout/layout_base.pinc =================================================================== --- trunk/php/layout/layout_base.pinc 2013-03-07 19:37:47 UTC (rev 1003) +++ trunk/php/layout/layout_base.pinc 2013-03-07 19:38:18 UTC (rev 1004) @@ -831,7 +831,7 @@ $r = ''; if ( isset($tarr['hide']) && ($tarr['hide'] == true) ) return $r; - # if ( isset($tarr['hideempty']) && ($tarr['hideempty'] == true) && ($obj->$tarr['field'] == '') ) return $r; +# if ( isset($tarr['hideempty']) && ($tarr['hideempty'] == true) && ($obj->$tarr['field'] == '') ) return $r; $r .= edit_custom_field_single($this,$tarr['field'],$tarr,0,$obj,$colsd+$colsf); @@ -1048,7 +1048,7 @@ global $lang; $r = $this->ContentRowStart(); - $r .= ' <th colspan="'. $this->width ."\">\n"; + $r .= ' <th'.($this->width > 1 ? ' colspan="'. $this->width.'"':'').'>'; if ($text != -1) { $r .= $text; } else if (is_object($this->obj)) { @@ -1056,7 +1056,7 @@ } else { $r .= ' '; } - $r .= " </th>\n"; + $r .= "</th>\n"; $r .= $this->ContentRowEnd(); return $r; } Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2013-03-07 19:37:47 UTC (rev 1003) +++ trunk/php/layout/new_base.pinc 2013-03-07 19:38:18 UTC (rev 1004) @@ -335,7 +335,7 @@ */ Function showdata($text,$cols = 1,$class = '') { $r = ''; - $r .= '<td colspan="'. $cols .'" class="data'.($class != '' ? ' '.$class:'').'">'; + $r .= ' <td'.($cols > 1 ? ' colspan="'. $cols .'"':'').' class="data'.($class != '' ? ' '.$class:'').'">'; $r .= ( $text == '' ? ' ' : $text); $r .= "</td>\n"; return $r; Modified: trunk/php/login.pinc =================================================================== --- trunk/php/login.pinc 2013-03-07 19:37:47 UTC (rev 1003) +++ trunk/php/login.pinc 2013-03-07 19:38:18 UTC (rev 1004) @@ -196,7 +196,7 @@ $this->width = 1; $r .= $this->SelectTableStart(); $r .= $this->headline($lang['MOTD']); - $r .= $this->ContentRowStart('motd'); + $r .= $this->ContentRowStart(); $xx = ''; if ( function_exists('is_executable') && is_executable(getcwd().'/'.$motd) ) { $p = popen ($motd,'r'); @@ -208,7 +208,7 @@ } else { $xx .= file_get_contents(getcwd().'/'.$motd); } - $r .= $this->showdata($xx); + $r .= $this->showdata($xx,1,'motd'); $r .= $this->ContentRowEnd(); $r .= $this->SelectTableEnd(); $r .= " </div>\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-07 19:37:50
|
Revision: 1003 http://sourceforge.net/p/tutos/code/1003 Author: gokohnert Date: 2013-03-07 19:37:47 +0000 (Thu, 07 Mar 2013) Log Message: ----------- fixed unwanted output in check Modified Paths: -------------- trunk/php/mailbox/mailbox.pinc Modified: trunk/php/mailbox/mailbox.pinc =================================================================== --- trunk/php/mailbox/mailbox.pinc 2013-03-07 09:28:56 UTC (rev 1002) +++ trunk/php/mailbox/mailbox.pinc 2013-03-07 19:37:47 UTC (rev 1003) @@ -395,9 +395,9 @@ } else { reset($f); while (list ($key, $val) = @each($f)) { - # echo imap_utf7_decode($val->name)." '".$val->delimiter."' ".$val->attributes ."<br />\n"; +# echo imap_utf7_decode($val->name)." '".$val->delimiter."' ".$val->attributes ."<br />\n"; $n = substr($val->name,strlen($c),strlen($val->name)); - # echo $key ."|". var_dump($val) ."|".imap_utf7_decode($n) ."<br />\n"; +# echo $key ."|". var_dump($val) ."|".imap_utf7_decode($n) ."<br />\n"; # $nx = eregi_replace("&ANY-","\xD6",$n); # $nx = eregi_replace("&APY-","\xF6",$nx); # $nx = eregi_replace("&AOQ-","\xE4",$nx); @@ -461,8 +461,8 @@ $c = $this->getConnString(); # $this->mbox = @imap_open($c, $this->user, $this->pw,OP_READONLY); $this->mbox = @imap_open($c, $this->user, $this->pw); - # echo $c ." U:". $this->user ." P:". $this->pw ."<br />"; - return $this->errors("open"); +# echo $c ." U:". $this->user ." P:". $this->pw ."<br />"; + $this->errors("open"); } /** @@ -501,7 +501,7 @@ $r = true; $e = imap_errors(); if ( $e ) { - while (list ($key,$val) = each ($e)) { + foreach ($e as $key => $val) { $msg = addLine($msg,"ERROR : ". $where ." ". $this->mbox ." - ". $val . " ". $this->getConnString()); $r = false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-07 09:28:59
|
Revision: 1002 http://sourceforge.net/p/tutos/code/1002 Author: gokohnert Date: 2013-03-07 09:28:56 +0000 (Thu, 07 Mar 2013) Log Message: ----------- allow more move of testsuites Modified Paths: -------------- trunk/php/mail.pinc trunk/php/testmanager/testmanager.pinc trunk/php/testmanager/testsuite_overview.php Modified: trunk/php/mail.pinc =================================================================== --- trunk/php/mail.pinc 2013-03-07 08:24:53 UTC (rev 1001) +++ trunk/php/mail.pinc 2013-03-07 09:28:56 UTC (rev 1002) @@ -762,7 +762,6 @@ $em = $str; } $name = trim($name,"\""); - # echo "N:".$name ." E:".$em ." pre:".myentities($str) ."<br />"; return array($name,$em); } Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-03-07 08:24:53 UTC (rev 1001) +++ trunk/php/testmanager/testmanager.pinc 2013-03-07 09:28:56 UTC (rev 1002) @@ -1288,6 +1288,15 @@ } else if (is_object($this->ref)){ $this->plist = $this->ref->getNeighbours(); $this->plist[$this->ref->id] = &$this->ref; + // other testsuites at the current parent + testsuite::obj_read($this->ref); + foreach ($this->ref->list[usetestsuite][0] as $ts) { + if (($ts->state != TS_WORK) && ($ts->state != TS_UNDEF)) { + continue; + } + $this->plist[$ts->id] = $ts; + unset($ts); + } } unset ($this->plist[$this->id]); } Modified: trunk/php/testmanager/testsuite_overview.php =================================================================== --- trunk/php/testmanager/testsuite_overview.php 2013-03-07 08:24:53 UTC (rev 1001) +++ trunk/php/testmanager/testsuite_overview.php 2013-03-07 09:28:56 UTC (rev 1002) @@ -99,8 +99,8 @@ $b->read_reference(); $r .= $this->OverviewRowStart($line); if ($this->head['pos']) { - $xx = ''; - $linkup = addUrlParameter($this->link2,'up='.$b->id); + $xx = ''; + $linkup = addUrlParameter($this->link2,'up='.$b->id); $linkdown = addUrlParameter($this->link2,'down='.$b->id); if($b->mod_ok() && $this->order_fld == 'pos') { $xx .= makelink($linkup,$this->theme->getImage(up,'list')); @@ -112,9 +112,9 @@ $r .= $this->OverviewRowBlock($xx,'over_l'); } - $x = $this->mark_filter(myentities($b->getFullName()),'name'); + $x = $this->mark_filter(myentities($b->name),'name'); $r .= $this->OverviewRowBlock($b->getLink($x,'ss='.$ss),'title over_l'); - $r .= $this->OverviewRowBlock(makeLink($b->getUrl(),$b->version),'over_l'); + $r .= $this->OverviewRowBlock($b->getLink($b->version,'ss='.$ss),'over_l'); if ($this->head['ref_id']) { $xx = ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-07 08:24:56
|
Revision: 1001 http://sourceforge.net/p/tutos/code/1001 Author: gokohnert Date: 2013-03-07 08:24:53 +0000 (Thu, 07 Mar 2013) Log Message: ----------- log with datetime Modified Paths: -------------- trunk/php/mail.pinc Modified: trunk/php/mail.pinc =================================================================== --- trunk/php/mail.pinc 2013-03-06 19:55:23 UTC (rev 1000) +++ trunk/php/mail.pinc 2013-03-07 08:24:53 UTC (rev 1001) @@ -33,12 +33,12 @@ $this->contentencoding = '8bit'; $this->contentid = ''; $this->contentclass = ''; - $this->charset = $lang['content_encoding']; // default - $this->eoln = "\r\n"; - $this->boundary = "-----------END_OF_TUTOS_MAIL_PART_". Date("Ymd").uniqid() ."------"; - $this->url = "http://\r\n"; - $this->part = 1; - $this->bodies = array(); + $this->charset = $lang['content_encoding']; // default + $this->eoln = "\r\n"; + $this->boundary = '-----------END_OF_TUTOS_MAIL_PART_'. Date("Ymd").uniqid() .'------'; + $this->url = "http://\r\n"; + $this->part = 1; + $this->bodies = array(); } /** @@ -47,9 +47,9 @@ function parse_init() { $this->in_sub_body = false; $this->got_header = false; - $this->parse_in = ''; - $this->ct = ''; - $this->cd = ''; + $this->parse_in = ''; + $this->ct = ''; + $this->cd = ''; $this->references = ''; } @@ -663,12 +663,10 @@ // analyze content dispo if ($this->cd && ($this->parse_in != "Content-Disposition")) { - # $cd = "blabla; filename=\"1231\""; $x = preg_match("#([a-z]*)[\r\n\t ;]*filename=[\"]?([-_=0-9A-Za-z/?.]*)[\"]?#i",$this->cd,$reg); if ($x) { $this->contentdispotype = $reg[1]; $this->contentdisponame = $reg[2]; -# echo "dispo |". $this->contentdisponame ."<br />\n"; } $this->cd = ""; } @@ -764,7 +762,7 @@ $em = $str; } $name = trim($name,"\""); -# echo "N:".$name ." E:".$em ." pre:".myentities($str) ."<br />"; + # echo "N:".$name ." E:".$em ." pre:".myentities($str) ."<br />"; return array($name,$em); } @@ -1837,7 +1835,7 @@ function error_log($info) { global $tutos; if ($tutos['maildebug']) - error_log(trim($info)."\n",3,$tutos[errlog].'.mail'); + dterror_log(trim($info)."\n",3,$tutos[errlog].'.mail'); } } ?> \ 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...> - 2013-03-06 19:55:28
|
Revision: 1000 http://sourceforge.net/p/tutos/code/1000 Author: gokohnert Date: 2013-03-06 19:55:23 +0000 (Wed, 06 Mar 2013) Log Message: ----------- automated tests / related fixes Modified Paths: -------------- trunk/php/admin/customize_show.php trunk/php/config_default.pinc trunk/php/mail_new.php trunk/php/product_new.php trunk/php/product_role_new.php trunk/php/scrum/log_ajax.php trunk/php/scrum/sprint_show.php trunk/php/task_import_csv.php trunk/test.sh Modified: trunk/php/admin/customize_show.php =================================================================== --- trunk/php/admin/customize_show.php 2013-03-06 10:17:01 UTC (rev 999) +++ trunk/php/admin/customize_show.php 2013-03-06 19:55:23 UTC (rev 1000) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2007 - 2012 by Gero Kohnert + * Copyright 2007 - 2013 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-03-06 10:17:01 UTC (rev 999) +++ trunk/php/config_default.pinc 2013-03-06 19:55:23 UTC (rev 1000) @@ -772,7 +772,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20130305'; +$tutos[version] = '1.9.20130306'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/mail_new.php =================================================================== --- trunk/php/mail_new.php 2013-03-06 10:17:01 UTC (rev 999) +++ trunk/php/mail_new.php 2013-03-06 19:55:23 UTC (rev 1000) @@ -139,7 +139,7 @@ $r .= " </td>\n"; $r .= "</tr>\n"; } - + $r .= $this->submit_reset_row(0,1,1,1,1,0); $r .= $this->DataTableEnd(); @@ -284,7 +284,11 @@ if ( isset($_GET['toid']) ) { $this->to = getObject($this->dbconn,$_GET['toid']); - if ( $this->to->getType() == "team" ) { + if ( !is_object($this->to) ) { + $msg = addLine($msg,"Unknown toid". $this->to->id ." ". $_GET['toid'] ." ". $this->to->getType()); + $this->stop = true; + return; + } else if ( $this->to->getType() == "team" ) { // team members are sent in bcc $this->obj->addBcc($this->to); $this->obj->addTo($this->user); @@ -303,8 +307,9 @@ $this->obj->addTo($o[0]); } } else { - $msg .= "Unknown toid". $this->to->id ." ". $_GET['toid'] ." ". $this->to->getType(); + $msg = addLine($msg,"Unknown toid". $this->to->id ." ". $_GET['toid'] ." ". $this->to->getType()); $this->stop = true; + return; } $this->name .= ":". $this->to->getFullName(); } @@ -345,4 +350,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/product_new.php =================================================================== --- trunk/php/product_new.php 2013-03-06 10:17:01 UTC (rev 999) +++ trunk/php/product_new.php 2013-03-06 19:55:23 UTC (rev 1000) @@ -286,9 +286,10 @@ } else if ( isset($_GET['tplid']) ) { $this->obj = $this->obj->read($_GET['tplid'],$this->obj); $this->template = true; - if ( $this->obj->id < 0 ) { - $msg = addLine($msg,sprintf($lang['Err0040'],$lang[$this->obj->getType()])); + if ( !is_object($this->obj) ) { + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Product'])); $this->stop = true; + return; } $this->name = sprintf($lang['ProdCloneT'],myentities($this->obj->getFullName())); Modified: trunk/php/product_role_new.php =================================================================== --- trunk/php/product_role_new.php 2013-03-06 10:17:01 UTC (rev 999) +++ trunk/php/product_role_new.php 2013-03-06 19:55:23 UTC (rev 1000) @@ -162,6 +162,7 @@ if ( $this->obj->id < 0 ) { $msg = addLine($msg,sprintf($lang['Err0040'],$lang[$this->obj->getType()])); $this->stop = true; + return; } $this->name = sprintf($lang['ProdRoleAddT'],$this->obj->getFullName()); $this->obj->readroles(); @@ -171,6 +172,7 @@ if ( $this->obj->id < 0 ) { $msg = addLine($msg,sprintf($lang['Err0040'],$lang[$this->obj->getType()])); $this->stop = true; + return; } $this->name = sprintf($lang['ProdCloneT'],myentities($this->obj->getFullName()));; $this->obj->readroles(); Modified: trunk/php/scrum/log_ajax.php =================================================================== --- trunk/php/scrum/log_ajax.php 2013-03-06 10:17:01 UTC (rev 999) +++ trunk/php/scrum/log_ajax.php 2013-03-06 19:55:23 UTC (rev 1000) @@ -38,8 +38,9 @@ $item = new ScrumLog($dbconn); if (! isset($_REQUEST['item'])) { - error_log("DIE NO ITEM defined : \r\n",3,$tutos[errlog]); - die ("NO ITEM "); + dterror_log("log_ajax DIE NO ITEM defined : \r\n",3,$tutos[errlog]); + echo "NO ITEM "; + echo '</tutos>'."\n"; } $item = $item->read($_REQUEST['item'],$item); if (! is_object($item)) { @@ -50,7 +51,7 @@ if (isset($_REQUEST['diff']) && ($_REQUEST['diff'] != 0) ) { $diff = $_REQUEST['diff']; - # error_log("DIFF: ". $diff."\r\n",3,$tutos[errlog]); +# error_log("DIFF: ". $diff."\r\n",3,$tutos[errlog]); } if (isset($_REQUEST['add']) && isset($_REQUEST['del']) ) { @@ -61,13 +62,13 @@ if ($add == -3) { // next sprint $item->setSprint($item->sprint->next_id); - # error_log("SetSprint : ". $item->sprint->next_id ."\r\n",3,$tutos[errlog]); +# error_log("SetSprint : ". $item->sprint->next_id ."\r\n",3,$tutos[errlog]); } else { $item->setSprint($_REQUEST['sid']); - # error_log("SetSprint : ". $_REQUEST['sid'] ."\r\n",3,$tutos[errlog]); +# error_log("SetSprint : ". $_REQUEST['sid'] ."\r\n",3,$tutos[errlog]); } $item->setWorker($add); - # error_log("SetWorker : ". $add ."\r\n",3,$tutos[errlog]); +# error_log("SetWorker : ". $add ."\r\n",3,$tutos[errlog]); } } @@ -75,7 +76,7 @@ if (isset($_REQUEST['startts']) && ($_REQUEST['startts'] != 0) ) { $v1 = new TUTOS_Date_Time(0); $v1->setDateTimeTS($_REQUEST['startts']); - # error_log("Fixed Start : ". $v1->getDateTime() ."\r\n",3,$tutos[errlog]); +# error_log("Fixed Start : ". $v1->getDateTime() ."\r\n",3,$tutos[errlog]); $item->setStart($v1); $diff -= 1; unset($v1); @@ -86,19 +87,19 @@ if (isset($_REQUEST['park']) ) { # $task->setIntField('_fld_parked',1,$table['task']['parked']['lang']); # $task->setIntField('_fld_dormant',0,$table['task']['dormant']['lang']); - # error_log("Parked: \r\n",3,$tutos[errlog]); +# error_log("Parked: \r\n",3,$tutos[errlog]); } else if (isset($_REQUEST['dormant']) ) { // park a task in dormant slot for a FY $d = $_REQUEST['dormant']; # $task->setIntField('_fld_dormant',$d,$table['task']['dormant']['lang']); # $task->setIntField('_fld_parked',0,$table['task']['parked']['lang']); - # error_log("Dormant for:". $d ." \r\n",3,$tutos[errlog]); +# error_log("Dormant for:". $d ." \r\n",3,$tutos[errlog]); } else if ($diff != 0) { // move a item $v1 = $item->start_dt; $v1->addDays($diff); $item->setStart($v1); - # error_log("Moved Start : ". $item->start_dt->getDateTime() ."\r\n",3,$tutos[errlog]); +# error_log("Moved Start : ". $item->start_dt->getDateTime() ."\r\n",3,$tutos[errlog]); unset($v1); } @@ -110,7 +111,7 @@ # $task->setName($task->name . ".".$diff); if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'mod')) { $item->save(); - # error_log("-----\t ITEM saved \r\n",3,$tutos[errlog]); +# error_log("-----\t ITEM saved \r\n",3,$tutos[errlog]); } echo ' <task id="'. $item->id.'">'."\n"; Modified: trunk/php/scrum/sprint_show.php =================================================================== --- trunk/php/scrum/sprint_show.php 2013-03-06 10:17:01 UTC (rev 999) +++ trunk/php/scrum/sprint_show.php 2013-03-06 19:55:23 UTC (rev 1000) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2004 - 2012 by Gero Kohnert + * Copyright 2004 - 2013 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -15,6 +15,8 @@ * @module sprint_show * @package scrum */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; Modified: trunk/php/task_import_csv.php =================================================================== --- trunk/php/task_import_csv.php 2013-03-06 10:17:01 UTC (rev 999) +++ trunk/php/task_import_csv.php 2013-03-06 19:55:23 UTC (rev 1000) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2006 - 2012 by Gero Kohnert + * Copyright 2006 - 2013 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 @@ -19,6 +19,8 @@ * @module task_import_csv * @package task */ +$tutos['files'][__FILE__] = '$Rev$'; + require_once 'webelements.p3'; require_once 'permission.p3'; @@ -49,6 +51,7 @@ } return $t; } + /** * import */ @@ -252,6 +255,7 @@ echo "</form>"; } } + /** * The date format I had here is the one used by french version of MSProject. * As I'm not sure the format DD/MM/YY is widely used, i've prefered not to @@ -268,12 +272,14 @@ return $d; } + /** * display the form */ Function info() { global $tutos, $lang; + $r = ''; if( isset($_POST['valid']) || isset($_POST['import']) ) { $this->import($this->obj); return; @@ -352,54 +358,52 @@ echo hiddenFormElements(); echo $this->getHidden(); echo "</form>\n"; + + return $r; } + /** * prepare */ Function prepare() { global $tutos,$msg,$lang; - $this->name = $lang['TaskImport']; - $this->import = false; - $this->fld_name = ""; - $this->fld_index = ""; + $this->name = $lang['TaskImport']; + $this->import = false; + $this->fld_name = ""; + $this->fld_index = ""; $this->fld_volume = ""; - $this->fld_start = ""; - $this->fld_end = ""; + $this->fld_start = ""; + $this->fld_end = ""; - if ( isset($_POST['p_id']) ) { - $this->obj = GetObject($this->dbconn, $_POST['p_id']); - } else if ( isset($_GET['p_id']) ) { - $this->obj = GetObject($this->dbconn, $_GET['p_id']); + if ( isset($_REQUEST['p_id']) ) { + $this->obj = GetObject($this->dbconn, $_REQUEST['p_id']); } else { $msg .= $lang['Err0048']; $this->stop = true; } - if ( isset($_POST['name']) ) { - $this->fld_name = $_POST['name']; - } else if ( isset($_GET['name']) ) { - $this->fld_name = $_GET['name']; + + if (!is_object($this->obj)) { + $msg .= $lang['Err0048']; + $this->stop = true; + return; } - if ( isset($_POST['index']) ) { - $this->fld_index = $_POST['index']; - } else if ( isset($_GET['index']) ) { - $this->fld_index = $_GET['index']; + + if ( isset($_REQUEST['name']) ) { + $this->fld_name = $_REQUEST['name']; } - if ( isset($_POST['volume']) ) { - $this->fld_volume = $_POST['volume']; - } else if ( isset($_GET['volume']) ) { - $this->fld_volume = $_GET['volume']; + if ( isset($_REQUEST['index']) ) { + $this->fld_index = $_REQUEST['index']; } - if ( isset($_POST['s_start']) ) { - $this->fld_start = $_POST['s_start']; - } else if ( isset($_GET['s_start']) ) { - $this->fld_start = $_GET['s_start']; + if ( isset($_REQUEST['volume']) ) { + $this->fld_volume = $_REQUEST['volume']; } - if ( isset($_POST['s_end']) ) { - $this->fld_end = $_POST['s_end']; - } else if ( isset($_GET['s_end']) ) { - $this->fld_end = $_GET['s_end']; + if ( isset($_REQUEST['s_start']) ) { + $this->fld_start = $_REQUEST['s_start']; } + if ( isset($_REQUEST['s_end']) ) { + $this->fld_end = $_REQUEST['s_end']; + } if ( isset($_POST['import']) ) { $this->import = true; @@ -410,4 +414,4 @@ $l = new Task_import($current_user); $l->display(); $dbconn->Close(); -?> +?> \ No newline at end of file Modified: trunk/test.sh =================================================================== --- trunk/test.sh 2013-03-06 10:17:01 UTC (rev 999) +++ trunk/test.sh 2013-03-06 19:55:23 UTC (rev 1000) @@ -12,7 +12,7 @@ # # Author: Gero Kohnert # -# $Header: /cvsroot/tutos/tutos/test.sh,v 1.25 2011/01/19 19:54:59 gokohnert Exp $ +# $Id$ # if [ "X$1" = "X" ]; then @@ -142,9 +142,20 @@ SID=`cat $COOKIES | tail -1 | cut -f 7` SNAP="CutyCapt --min-width=1024 --header=COOKIE:TUTOS=$SID" +# Create product +wget --load-cookies=$COOKIES --save-cookies=$COOKIES -a $OUT -O $OUT2 \ + --post-data "name=automated_TEST&version=test&description=http://www.tutos.org&r1fn=Super+User&product_sel=1&state=1&role1=1&role2=&path=NIX&desc1=A&desc2=B¤cy=EUR&r2desc=&r1desc=testtest" $URL/product_ins.php +N=`grep -o -E "product_new.php\?id=[0-9]*" $OUT2` +P_ID=`echo $N| grep -o -E "([0-9]*)" | head -1` +check_output product_ins.php $OUT2 +echo "PRODUCT: $P_ID" + + + URLS=" acl_overview.php?lg=$LG acl_new.php?id=$ADR&lg=$LG + acl_new.php?id=$NOID&lg=$LG acl_show.php?id=$ADR&lg=$LG acl_show.php?id=$NOID&lg=$LG acl_ins.php?lg=$LG @@ -176,6 +187,8 @@ app_show.php?id=$NOID&lg=$LG calendar.php?lg=$LG calendar.php?team[]=$ADR&lg=$LG + calendar.php?team[]=$NOID&lg=$LG + calendar.php?team[]=$P_ID&lg=$LG calendar_week.php?lg=$LG calendar_day.php?lg=$LG company_ins.php?lg=$LG @@ -209,7 +222,11 @@ module_overview.php?lg=$LG mytutos.php?lg=$LG mytutos.php?id=$NOID&lg=$LG + mytutos.php?id=$ADR&lg=$LG mail_new.php?subject=TEST&watch=$ADR&lg=$LG + mail_new.php?subject=TEST&toid=$ADR&lg=$LG + mail_new.php?subject=TEST&toid=$NOID&lg=$LG + mail_new.php?subject=TEST&toid=$P_ID&lg=$LG product_ins.php?lg=$LG product_select.php?lg=$LG product_select.php?ext=1&lg=$LG @@ -218,8 +235,15 @@ product_role_new.php?id=$NOID&lg=$LG product_new.php?lg=$LG product_new.php?id=$NOID&lg=$LG + product_new.php?id=$P_ID&lg=$LG + product_new.php?tplid=$NOID&lg=$LG + product_new.php?tplid=$P_ID&lg=$LG product_show.php?lg=$LG product_show.php?id=$NOID&lg=$LG + product_show.php?id=$P_ID&lg=$LG + product_contacts.php?lg=$LG + product_contacts.php?id=$NOID&lg=$LG + product_contacts.php?id=$P_ID&lg=$LG product_overview.php?name=t&lg=$LG product_overview.php?format=stat&lg=$LG product_overview.php?rid[]=$ADR&lg=$LG @@ -231,10 +255,18 @@ task_select.php?lg=$LG task_new.php?lg=$LG task_new.php?id=$NOID&lg=$LG + task_new.php?pid=$NOID&lg=$LG + task_new.php?pid=$P_ID&lg=$LG task_show.php?lg=$LG task_show.php?id=$NOID&lg=$LG + task_gantt.php?id=$NOID&lg=$LG + task_gantt.php?id=$P_ID&lg=$LG task_overview.php?id=$ADR&lg=$LG task_overview.php?id=$NOID&lg=$LG + task_overview.php?id=$P_ID=&lg=$LG + task_overview.php?id=$P_ID=&lg=$LG&fld=worker + task_import_csv.php?p_id=$NOID&lg=$LG + task_import_csv.php?p_id=$P_ID&lg=$LG team_ins.php?lg=$LG team_select.php?lg=$LG team_overview.php?name=&lg=$LG @@ -264,6 +296,8 @@ bugtracking/bug_select.php?ext=1&lg=$LG bugtracking/bug_new.php?lg=$LG bugtracking/bug_new.php?id=$NOID&lg=$LG + bugtracking/bug_new.php?pid=$NOID&lg=$LG + bugtracking/bug_new.php?pid=$P_ID&lg=$LG bugtracking/bug_show.php?lg=$LG bugtracking/bug_show.php?id=$NOID&lg=$LG bugtracking/bug_overview.php?name=&lg=$LG @@ -271,11 +305,16 @@ bugtracking/bug_overview.php?format=excel&lg=$LG bugtracking/bug_overview.php?solverid=$ADR&lg=$LG bugtracking/bug_overview.php?solverid=$NOID&lg=$LG + bugtracking/bug_overview.php?pid=$P_ID&lg=$LG bugtracking/bug_config.php?lg=$LG checklist/checklist_ins.php?lg=$LG checklist/checklist_overview.php?lg=$LG checklist/checklist_new.php?lg=$LG checklist/checklist_new.php?id=$NOID&lg=$LG + checklist/checklist_new.php?link_id=$NOID&type=2&lg=$LG + checklist/checklist_new.php?link_id=$P_ID&type=2&lg=$LG + checklist/checklist_new.php?link_id=$NOID&type=3&lg=$LG + checklist/checklist_new.php?link_id=$P_ID&type=3&lg=$LG checklist/checklist_show.php?lg=$LG checklist/checklist_show.php?id=$NOID&lg=$LG checklist/checkfield_new.php?lg=$LG @@ -299,10 +338,13 @@ expense/expense_select.php?lg=$LG expense/expense_new.php?lg=$LG expense/expense_new.php?id=$NOID&lg=$LG + expense/expense_new.php?link_id=$NOID&lg=$LG expense/expense_new.php?link_id=$ADR&lg=$LG + expense/expense_new.php?link_id=$P_ID&lg=$LG expense/expense_show.php?lg=$LG expense/expense_show.php?id=$NOID&lg=$LG expense/expense_overview.php?name=&reftype=0&lg=$LG + expense/expense_overview.php?link_id=$P_ID&lg=$LG fax/fax_new.php?a=$ADR&nr=123;&lg=$LG fax/fax_new.php?a=$NOID;&lg=$LG file/file_config.php?lg=$LG @@ -315,8 +357,10 @@ file/file_new.php?lg=$LG file/file_new.php?id=$NOID&lg=$LG file/file_new.php?link_id=$ADR&lg=$LG + file/file_new.php?link_id=$P_ID&lg=$LG file/file_new.php?link_id=$NOID&lg=$LG file/file_overview.php?lg=$LG + file/file_overview.php?link_id=$P_ID&lg=$LG group/group_ins.php?lg=$LG group/group_select.php?lg=$LG group/group_overview.php @@ -330,19 +374,28 @@ installation/installation_select.php?lg=$LG installation/installation_new.php?lg=$LG installation/installation_new.php?id=$NOID&lg=$LG + installation/installation_new.php?pid=$NOID&lg=$LG + installation/installation_new.php?pid=$ADR&lg=$LG + installation/installation_new.php?pid=$P_ID&lg=$LG installation/installation_show.php?lg=$LG installation/installation_show.php?id=$NOID&lg=$LG installation/installation_overview.php?lg=$LG + installation/installation_overview.php?pid=$P_ID&lg=$LG invoice/invoice_ins.php?lg=$LG invoice/invoice_select.php?lg=$LG invoice/invoice_select.php?ext=1&lg=$LG - invoice/invoice_overview.php?lg=$LG invoice/invoice_show.php?lg=$LG invoice/invoice_show.php?id=$NOID&lg=$LG invoice/invoice_new.php?lg=$LG invoice/invoice_new.php?id=$NOID&lg=$LG + invoice/invoice_new.php?link_id=$ADR&lg=$LG + invoice/invoice_new.php?link_id=$NOID&lg=$LG + invoice/invoice_new.php?link_id=$P_D&lg=$LG invoice/invoice_config.php?lg=$LG + invoice/invoice_overview.php?lg=$LG + invoice/invoice_overview.php?link_id=$P_ID&lg=$LG mailbox/mailbox_new.php?parent=$ADR&lg=$LG + mailbox/mailbox_new.php?parent=$NOID&lg=$LG mailbox/mailbox_ins.php?lg=$LG mailbox/mailbox_show.php?lg=$LG mailbox/mail_show.php?lg=$LG @@ -352,6 +405,8 @@ module_template/AAA_show.php?lg=$LG module_template/AAA_show.php?lg=$LG&id=$NOID module_template/AAA_new.php?lg=$LG + module_template/AAA_new.php?link_id=$NOID&lg=$LG + module_template/AAA_new.php?link_id=$P_ID&lg=$LG module_template/AAA_show.php?lg=$LG&id=$NOID module_template/AAA_ins.php?lg=$LG module_template/AAA_config.php?lg=$LG @@ -370,6 +425,8 @@ rate/rate_show.php?id=$NOID&lg=$LG rate/rate_new.php?lg=$LG rate/rate_new.php?link_id=$ADR&lg=$LG + rate/rate_new.php?link_id=$P_ID&lg=$LG + rate/rate_new.php?link_id=$NOID&lg=$LG rate/rate_new.php?id=$NOID&lg=$LG rate/rate_overview.php?name=&reftype=0&lg=$LG reminder/reminder_ins.php?lg=$LG @@ -380,17 +437,25 @@ reminder/reminder_new.php?link_id=$NOID&lg=$LG reminder/reminder_new.php?id=$NOID&lg=$LG reminder/reminder_new.php?lg=$LG + reminder/reminder_overview.php?lg=$LG + reminder/reminder_overview.php?refid=$P_ID&lg=$LG + reminder/reminder_overview.php?toid=$ADR&lg=$LG report-engine/report_select.php?lg=$LG report-engine/report_overview.php?class=address&type=show&id=$ADR&lg=$LG report-engine/report_overview.php?class=address&type=show&id=$NOID&lg=$LG + report-engine/report_overview.php?class=product&type=show&id=$P_ID&lg=$LG + report-engine/report_overview.php?class=product&type=show&id=$NOID&lg=$LG requirements/req_new.php?lg=$LG requirements/req_new.php?id=$NOID&lg=$LG + requirements/req_new.php?link_id=$NOID&lg=$LG + requirements/req_new.php?link_id=$P_ID&lg=$LG requirements/req_ins.php?lg=$LG requirements/req_show.php?lg=$LG requirements/req_show.php?id=$NOID&lg=$LG requirements/req_select.php?lg=$LG requirements/req_select.php?ext=1&lg=$LG requirements/req_overview.php?lg=$LG + requirements/req_overview.php?link_id=$P_ID&lg=$LG resource/resource_new.php?lg=$LG resource/resource_new.php?id=$NOID&lg=$LG resource/resource_ins.php?lg=$LG @@ -400,12 +465,15 @@ resource/resource_overview.php?name=&lg=$LG riskmanagement/risk_new.php?lg=$LG riskmanagement/risk_new.php?id=$NOID&lg=$LG + riskmanagement/risk_new.php?link_id=$NOID&lg=$LG + riskmanagement/risk_new.php?link_id=$P_ID&lg=$LG riskmanagement/risk_ins.php?lg=$LG riskmanagement/risk_show.php?lg=$LG riskmanagement/risk_show.php?id=NOID&lg=$LG riskmanagement/risk_select.php?lg=$LG riskmanagement/risk_select.php?ext=1&lg=$LG riskmanagement/risk_overview.php?lg=$LG + riskmanagement/risk_overview.php?link_id=$P_ID&lg=$LG rss/rss_ins.php?lg=$LG rss/rss_new.php?lg=$LG rss/rss_overview.php?lg=$LG @@ -417,6 +485,8 @@ scrum/log_new.php?lg=$LG scrum/log_new.php?mode=manage_s&lg=$LG scrum/log_new.php?mode=manage_p&lg=$LG + scrum/log_new.php?mode=manage_p&p_id=$NOID&lg=$LG + scrum/log_new.php?mode=manage_p&p_id=$P_ID&lg=$LG scrum/log_new.php?mode=manage_w&lg=$LG scrum/log_show.php?lg=$LG scrum/log_show.php?id=$NOID&lg=$LG @@ -424,10 +494,16 @@ scrum/log_overview.php?lg=$LG scrum/sprint_ins.php?lg=$LG scrum/sprint_new.php?lg=$LG + scrum/sprint_new.php?id=$NOID&lg=$LG + scrum/sprint_new.php?id=$P_ID&lg=$LG + scrum/sprint_new.php?link_id=$NOID&lg=$LG + scrum/sprint_new.php?link_id=$P_ID&lg=$LG scrum/sprint_show.php?lg=$LG scrum/sprint_show.php?id=$NOID&lg=$LG + scrum/sprint_show.php?id=$P_ID&lg=$LG scrum/sprint_select.php?lg=$LG scrum/sprint_overview.php?lg=$LG + scrum/sprint_overview.php?p_id=$P_ID&lg=$LG stc/stc_ins.php?lg=$LG stc/stc_new.php?lg=$LG stc/stc_overview.php?lg=$LG @@ -445,6 +521,8 @@ stuff/stuff_config.php?lg=$LG subversion/svn_config.php?lg=$LG subversion/svn_new.php?lg=$LG + subversion/svn_new.php?link_id=$NOID&lg=$LG + subversion/svn_new.php?link_id=$P_ID&lg=$LG subversion/svn_ins.php?lg=$LG subversion/svn_show.php?lg=$LG subversion/svn_overview.php?lg=$LG @@ -456,13 +534,18 @@ testmanager/testcase_select.php?ext=1&lg=$LG testmanager/testcase_overview.php?lg=$LG testmanager/testsuite_new.php?lg=$LG + testmanager/testsuite_new.php?ref_id=$NOID&lg=$LG + testmanager/testsuite_new.php?ref_id=$P_ID&lg=$LG testmanager/testsuite_ins.php?lg=$LG testmanager/testsuite_show.php?lg=$LG testmanager/testsuite_show.php?id=$NOID&lg=$LG testmanager/testsuite_select.php?lg=$LG testmanager/testsuite_select.php?ext=1&lg=$LG testmanager/testsuite_overview.php?lg=$LG + testmanager/testsuite_overview.php?refid=$P_ID&lg=$LG testmanager/testrun_new.php?lg=$LG + testmanager/testrun_new.php?ref_id=$NOID&lg=$LG + testmanager/testrun_new.php?ref_id=$P_ID&lg=$LG testmanager/testrun_ins.php?lg=$LG testmanager/testrun_show.php?lg=$LG testmanager/testrun_show.php?id=$NOID&lg=$LG @@ -475,15 +558,19 @@ timetrack/timetrack_new.php?id=$NOID&lg=$LG timetrack/timetrack_new.php?lid=$NOID&lg=$LG timetrack/timetrack_new.php?mode=1&lid=$NOID&lg=$LG + timetrack/timetrack_new.php?mode=1&lid=$P_ID&lg=$LG timetrack/timetrack_select.php?lg=$LG timetrack/timetrack_overview.php?worker=$ADR&lg=$LG timetrack/timetrack_overview.php?worker=$NOID&lg=$LG + timetrack/timetrack_overview.php?link_id=$P_ID&lg=$LG + timetrack/timetrack_overview.php?link_id=$NOID&lg=$LG timetrack/timetrack_config.php?lg=$LG url/url_ins.php?lg=$LG url/url_select.php?lg=$LG url/url_overview.php?name=&lg=$LG url/url_overview.php?link_id=-2&lg=$LG url/url_new.php?link_id=$ADR&lg=$LG + url/url_new.php?link_id=$NOID&lg=$LG url/url_new.php?id=$NOID&lg=$LG url/urlcat_show.php?lg=$LG url/urlcat_show.php?id=NOID&lg=$LG @@ -505,6 +592,7 @@ rss/news.php?lg=$LG " + for U in $URLS; do touch $OUT2 wget --load-cookies=$COOKIES --save-cookies=$COOKIES -a $OUT -O $OUT2 $URL/$U @@ -519,7 +607,8 @@ # wget -a $OUT -O $OUT2 "$CHECKURI$URL2/$U&uname=$USER&pw=$PW&dbnr=$DBNR" # grep -i congrat $OUT2 # $SNAP --url="$URL/$U&uname=$USER&pw=$PW&dbnr=$DBNR" --out="tmp/$U.png" - $SNAP --url="$URL/$U" --out="tmp/$U.png" + BU=`basename $U` + $SNAP --url="$URL/$U" --out="tmp/$BU.png" rm -f $OUT2 done @@ -542,13 +631,6 @@ SID=`cat $COOKIES | tail -1 | cut -f 7` SNAP="CutyCapt --min-width=1024 --header=COOKIE:TUTOS=$SID" -# Create product -wget --load-cookies=$COOKIES --save-cookies=$COOKIES -a $OUT -O $OUT2 \ - --post-data "name=automated_TEST&version=test&description=http://www.tutos.org&r1fn=Super+User&product_sel=1&state=1&role1=1&role2=&path=NIX&desc1=A&desc2=B¤cy=EUR&r2desc=&r1desc=testtest" $URL/product_ins.php -N=`grep -o -E "product_new.php\?id=[0-9]*" $OUT2` -P_ID=`echo $N| grep -o -E "([0-9]*)" | head -1` -check_output product_ins.php $OUT2 -echo "PRODUCT: $P_ID" # Create and delete note wget --load-cookies=$COOKIES --save-cookies=$COOKIES -a $OUT -O $OUT2 \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-06 10:17:04
|
Revision: 999 http://sourceforge.net/p/tutos/code/999 Author: gokohnert Date: 2013-03-06 10:17:01 +0000 (Wed, 06 Mar 2013) Log Message: ----------- speedup of timetrack summaries Modified Paths: -------------- trunk/php/timetrack/timetrack.pinc Modified: trunk/php/timetrack/timetrack.pinc =================================================================== --- trunk/php/timetrack/timetrack.pinc 2013-03-06 10:03:32 UTC (rev 998) +++ trunk/php/timetrack/timetrack.pinc 2013-03-06 10:17:01 UTC (rev 999) @@ -953,26 +953,42 @@ ||($obj->getType() == "user" ) ||($obj->getType() == "team" ) ) { - $link = addUrlParameter($link,'adr_id='.$obj->id); + $link = addUrlParameter($link,'worker='.$obj->id); + $nolink = true; } else { $link = addUrlParameter($link,'link_id='.$obj->id); + $nolink = false; } if (method_exists($obj,'readTimetrackSum')) { $cnt = 0; - $d .= '<div align="right" style="width:10em;display:inline;float:left">'; - $d .= makelink($link ,hour_format($obj->timetracksum),$lang['TimetrackOverview']).'</div>'; - $d .= ' '.$lang['hours'] ."\n"; $timesum += $obj->timetracksum; + + $dx = ''; if (isset($obj->tsum) && is_array($obj->tsum)) foreach ($obj->tsum as $i => $f) { if ( $obj->tsum[$i] > 0 ) { - $d .= '<br/><div align="right" style="width:10em;display:inline;float:left">'; - $d .= makelink(addUrlParameter($link,'show='.$i),hour_format($obj->tsum[$i]),$lang['TimetrackOverview']).'</div>'; - $d .= ' '.$lang['hours'].' ('.$lang[$i].")\n"; + $dx .= '<br/><div align="right" style="width:10em;display:inline;float:left">'; + if ($nolink) { + $dx .= hour_format($obj->tsum[$i]).'</div>'; + } else { + $dx .= makelink(addUrlParameter($link,'show='.$i),hour_format($obj->tsum[$i]),$lang['TimetrackOverview']).'</div>'; + } + $dx .= ' '.$lang['hours'].' ('.$lang[$i].")\n"; $timesum += $obj->tsum[$i]; $cnt++; } } + + $d .= '<div align="right" style="width:10em;display:inline;float:left">'; + if ($cnt > 0 && $nolink) { + $d .= hour_format($obj->timetracksum).'</div>'; + } else { + $d .= makelink($link ,hour_format($obj->timetracksum),$lang['TimetrackOverview']).'</div>'; + } + $d .= ' '.$lang['hours'] ."\n"; + + $d .= $dx; + if ($cnt > 0) { $d .= '<br/><div align="right" style="width:10em;display:inline;float:left">'; $d .= '== '.makelink(addUrlParameter($link,'show=all'),hour_format($timesum,2),$lang['TimetrackOverview']).'</div>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-06 10:03:36
|
Revision: 998 http://sourceforge.net/p/tutos/code/998 Author: gokohnert Date: 2013-03-06 10:03:32 +0000 (Wed, 06 Mar 2013) Log Message: ----------- speedup of timetrack summaries Modified Paths: -------------- trunk/php/base.pinc trunk/php/bugtracking/bug.pinc trunk/php/installation/installation.pinc trunk/php/module_base.pinc trunk/php/scrum/log.js trunk/php/scrum/log_ajax.php trunk/php/scrum/scrum.pinc trunk/php/task.pinc trunk/php/testmanager/testmanager.pinc trunk/php/timetrack/timetrack.pinc trunk/php/timetrack/timetrack_overview.php trunk/php/webelements.p3 Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/base.pinc 2013-03-06 10:03:32 UTC (rev 998) @@ -366,11 +366,11 @@ /** * Return Info about the total time spent for this object */ - function readTimetrackSum() { + function readTimetrackSum(array $objs = null,$topic = '') { if ( ! class_exists ('timetrack') ) { loadmodule('timetrack'); } - readTimetrackSum($this); + readTimetrackSum($this,$objs,$topic); return; } Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/bugtracking/bug.pinc 2013-03-06 10:03:32 UTC (rev 998) @@ -1786,7 +1786,7 @@ } $obj->list[usebugtracking][1] = array(); $obj->list[usebugtracking][2] = array(); - $obj->tsum['Bugs'] = 0; + # $obj->tsum['Bugs'] = 0; $q = 'SELECT * from '. $obj->dbconn->prefix.$table['bugtracking'][name] .' where '; if($obj->getTypeId() == usebugtracking) { @@ -1801,12 +1801,15 @@ while ($a < $n) { $b = new bug($obj->dbconn); $b->read_result($r,$a); - $b->readTimetrackSum(); - $obj->tsum['Bugs'] += $b->timetracksum; + // $b->readTimetrackSum(); + // $obj->tsum['Bugs'] += $b->timetracksum; $obj->list[usebugtracking][1][$b->id] = &$b; $a++; unset($b); } + $obj->readTimetrackSum($obj->list[usebugtracking][1],'Bugs'); + + $r->free(); // Obj is Target for BugSolving @@ -1820,8 +1823,8 @@ while ($a < $n) { $b = new bug($obj->dbconn); $b->read_result($r,$a); - $b->readTimetrackSum(); - # $obj->tsum['Bugs'] += $b->timetracksum; + //$b->readTimetrackSum(); + //$obj->tsum['Bugs'] += $b->timetracksum; $obj->list[usebugtracking][2][$b->id] = &$b; $a++; unset($b); @@ -1853,7 +1856,7 @@ $s[$bug->state] = ''; } $b[$bug->state]++; - $t[$bug->state] += $bug->timetracksum; + // TODO $t[$bug->state] += $bug->timetracksum; if ($bug->see_ok()) { $s[$bug->state] = $bug->short; } @@ -1870,7 +1873,7 @@ $ret .= "<tr>\n"; $ret .= '<td nowrap="nowrap" align="left">'. makelink($vurl,$bug->getStateColorBlock($i).$bug->getState($i) ) ."</td>\n"; $ret .= '<td nowrap="nowrap" align="right"> '. $b[$i] ." </td>\n"; - $ret .= '<td nowrap="nowrap" align="right"> '. hour_format($t[$i]) .' '. $lang['hours'] ."</td>\n"; + // TODO $ret .= '<td nowrap="nowrap" align="right"> '. hour_format($t[$i]) .' '. $lang['hours'] ."</td>\n"; if ( ($f == 1) && ($s[$i] != '') ) { $ret .= "<td nowrap=\"nowrap\" align=\"left\"> (". $s[$i].") </td>\n"; } else { Modified: trunk/php/installation/installation.pinc =================================================================== --- trunk/php/installation/installation.pinc 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/installation/installation.pinc 2013-03-06 10:03:32 UTC (rev 998) @@ -683,7 +683,7 @@ } $obj->list[useinstmanagement] = array(); - $obj->tsum['Installations'] = 0; + //$obj->tsum['Installations'] = 0; $q = "SELECT * from ". $obj->dbconn->prefix .$table['installation'][name]; if ( $obj->getType() == "product" ) { @@ -700,15 +700,16 @@ if (class_exists('bug')) { bug::obj_read($inst); } - $inst->readTimetrackSum(); - $obj->tsum['Installations'] += $inst->timetracksum; - if (isset($inst->tsum['Bugs'])) { - $obj->tsum['Installations'] += $inst->tsum['Bugs']; - } + //$inst->readTimetrackSum(); + //$obj->tsum['Installations'] += $inst->timetracksum; + //if (isset($inst->tsum['Bugs'])) { + // $obj->tsum['Installations'] += $inst->tsum['Bugs']; + //} $obj->list[useinstmanagement][$inst->id] = &$inst; $a++; unset($inst); } + $obj->readTimetrackSum($obj->list[useinstmanagement],'Installations'); $r->free(); return; } Modified: trunk/php/module_base.pinc =================================================================== --- trunk/php/module_base.pinc 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/module_base.pinc 2013-03-06 10:03:32 UTC (rev 998) @@ -153,7 +153,12 @@ global $tutos; $r = ''; + $late = array(); foreach($tutos[activemodules] as $f) { + if (in_array($f,array('timetrack','counter'))) { + $late[] = $f; + continue; + } $x = new $tutos[modules][$f][name]($obj->dbconn); if ( ! is_subclass_of($x,'tutos_module') ) { continue; @@ -164,6 +169,18 @@ } $r .= $x->infolist($user,$obj,$cols,$format); } + foreach($late as $f) { + $x = new $tutos[modules][$f][name]($obj->dbconn); + if ( ! is_subclass_of($x,'tutos_module') ) { + continue; + //Fatal_Error("Wrong module class: ".$tutos[modules][$f][name]); + } + if ( $x->getType() != $f) { + Fatal_Error($f ." reports to be ".$x->getType()); + } + $r .= $x->infolist($user,$obj,$cols,$format); + } + return $r; } Modified: trunk/php/scrum/log.js =================================================================== --- trunk/php/scrum/log.js 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/scrum/log.js 2013-03-06 10:03:32 UTC (rev 998) @@ -1,5 +1,5 @@ // -// Copyright 2007 - 2011 by Gero Kohnert +// Copyright 2007 - 2013 by Gero Kohnert // SVN Info $Id$ // $Author$ // Modified: trunk/php/scrum/log_ajax.php =================================================================== --- trunk/php/scrum/log_ajax.php 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/scrum/log_ajax.php 2013-03-06 10:03:32 UTC (rev 998) @@ -1,18 +1,26 @@ <?php /** - * Copyright 2007 - 2011 by Gero Kohnert + * Copyright 2007 - 2013 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. + * * SVN Info $Id$ * $Author$ * */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; -loadmodule('scrumlog'); check_user(); +loadmodule('scrumlog'); + Header("Content-Type: text/xml"); Header("Connection: close"); @@ -42,7 +50,7 @@ if (isset($_REQUEST['diff']) && ($_REQUEST['diff'] != 0) ) { $diff = $_REQUEST['diff']; -# error_log("DIFF: ". $diff."\r\n",3,$tutos[errlog]); + # error_log("DIFF: ". $diff."\r\n",3,$tutos[errlog]); } if (isset($_REQUEST['add']) && isset($_REQUEST['del']) ) { @@ -53,13 +61,13 @@ if ($add == -3) { // next sprint $item->setSprint($item->sprint->next_id); -# error_log("SetSprint : ". $item->sprint->next_id ."\r\n",3,$tutos[errlog]); + # error_log("SetSprint : ". $item->sprint->next_id ."\r\n",3,$tutos[errlog]); } else { $item->setSprint($_REQUEST['sid']); -# error_log("SetSprint : ". $_REQUEST['sid'] ."\r\n",3,$tutos[errlog]); + # error_log("SetSprint : ". $_REQUEST['sid'] ."\r\n",3,$tutos[errlog]); } $item->setWorker($add); -# error_log("SetWorker : ". $add ."\r\n",3,$tutos[errlog]); + # error_log("SetWorker : ". $add ."\r\n",3,$tutos[errlog]); } } @@ -67,7 +75,7 @@ if (isset($_REQUEST['startts']) && ($_REQUEST['startts'] != 0) ) { $v1 = new TUTOS_Date_Time(0); $v1->setDateTimeTS($_REQUEST['startts']); -# error_log("Fixed Start : ". $v1->getDateTime() ."\r\n",3,$tutos[errlog]); + # error_log("Fixed Start : ". $v1->getDateTime() ."\r\n",3,$tutos[errlog]); $item->setStart($v1); $diff -= 1; unset($v1); @@ -78,19 +86,19 @@ if (isset($_REQUEST['park']) ) { # $task->setIntField('_fld_parked',1,$table['task']['parked']['lang']); # $task->setIntField('_fld_dormant',0,$table['task']['dormant']['lang']); -# error_log("Parked: \r\n",3,$tutos[errlog]); + # error_log("Parked: \r\n",3,$tutos[errlog]); } else if (isset($_REQUEST['dormant']) ) { // park a task in dormant slot for a FY $d = $_REQUEST['dormant']; # $task->setIntField('_fld_dormant',$d,$table['task']['dormant']['lang']); # $task->setIntField('_fld_parked',0,$table['task']['parked']['lang']); -# error_log("Dormant for:". $d ." \r\n",3,$tutos[errlog]); + # error_log("Dormant for:". $d ." \r\n",3,$tutos[errlog]); } else if ($diff != 0) { // move a item $v1 = $item->start_dt; $v1->addDays($diff); $item->setStart($v1); -# error_log("Moved Start : ". $item->start_dt->getDateTime() ."\r\n",3,$tutos[errlog]); + # error_log("Moved Start : ". $item->start_dt->getDateTime() ."\r\n",3,$tutos[errlog]); unset($v1); } @@ -102,7 +110,7 @@ # $task->setName($task->name . ".".$diff); if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'mod')) { $item->save(); -# error_log("-----\t ITEM saved \r\n",3,$tutos[errlog]); + # error_log("-----\t ITEM saved \r\n",3,$tutos[errlog]); } echo ' <task id="'. $item->id.'">'."\n"; Modified: trunk/php/scrum/scrum.pinc =================================================================== --- trunk/php/scrum/scrum.pinc 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/scrum/scrum.pinc 2013-03-06 10:03:32 UTC (rev 998) @@ -1496,7 +1496,7 @@ return; } $obj->list[USESCRUMSPRINT] = array(); - $obj->tsum['Sprint'] = 0; + # $obj->tsum['Sprint'] = 0; if ( ($obj->getTypeId() == useaddressbook) || ($obj->getTypeId() == useteams) ) { $q = 'SELECT a.* from '. $obj->dbconn->prefix .$table['scrumsprint'][name] .' a'; @@ -1519,11 +1519,12 @@ $o->read_result($r,$a); if ( $o->see_ok() ) { ScrumLog::obj_read($o); - foreach($o->list[USESCRUMLOG] as $o2) { - $o2->readTimetrackSum(); - $obj->tsum['Sprint'] += $o2->timetracksum; - } + // foreach($o->list[USESCRUMLOG] as $o2) { + // $o2->readTimetrackSum(); + // $obj->tsum['Sprint'] += $o2->timetracksum; + // } $obj->list[USESCRUMSPRINT][$o->id] = &$o; + $obj->readTimetrackSum($o->list[USESCRUMLOG],'Sprint'); } $a++; unset($o); Modified: trunk/php/task.pinc =================================================================== --- trunk/php/task.pinc 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/task.pinc 2013-03-06 10:03:32 UTC (rev 998) @@ -630,6 +630,7 @@ if ( ($this->volume_done == "") ) { $this->volume_done = 0; } + unset($this->timetracksum); } // Tasks with used volume are not longer in prestate @@ -2170,15 +2171,13 @@ global $table; if (! is_object($obj) ) return; - if ( isset($obj->tasklist) ) return; - $obj->tasklist = array(); + $obj->tasklist = array(); $obj->fulltasklist = array(); - $obj->pretasklist = array(); // predecessor + $obj->pretasklist = array(); // predecessor - - $obj->tsum['Tasks'] = 0; + // $obj->tsum['Tasks'] = 0; $readall = false; if ( ($obj->getType() == "address") || ($obj->getType() == "user") ) { $q = 'SELECT distinct t_id FROM '. $obj->dbconn->prefix .$table['taskworker'][name] ." WHERE "; @@ -2221,11 +2220,11 @@ } else { $t->tsum['Bugs'] = 0; } - $t->readTimetrackSum(); - $obj->tsum['Tasks'] += $t->timetracksum; + //$t->readTimetrackSum(); + //$obj->tsum['Tasks'] += $t->timetracksum; // Add Subtask-Sum - $obj->tsum['Tasks'] += $t->tsum['Tasks']; - $obj->tsum['Tasks'] += $t->tsum['Bugs']; + //$obj->tsum['Tasks'] += $t->tsum['Tasks']; + // TODO $obj->tsum['Tasks'] += $t->tsum['Bugs']; $obj->tasklist[$t->id] = &$t; $obj->fulltasklist[$t->id] = &$t; @@ -2236,6 +2235,8 @@ $a++; unset($t); } + $obj->readTimetrackSum($obj->fulltasklist,'Tasks'); + $r->free(); // find tasks where obj is predecessor Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/testmanager/testmanager.pinc 2013-03-06 10:03:32 UTC (rev 998) @@ -3253,7 +3253,7 @@ $q = 'SELECT * from '. $this->dbconn->prefix.$table['bugtracking'][name] .' where '; $q .= 'product_id = '. $this->ref_id; $q .= ' AND testcase > 0 '; - + // TODO bug limit to testcases $r = $this->dbconn->Exec($q); $n = $r->numrows(); $a = 0; Modified: trunk/php/timetrack/timetrack.pinc =================================================================== --- trunk/php/timetrack/timetrack.pinc 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/timetrack/timetrack.pinc 2013-03-06 10:03:32 UTC (rev 998) @@ -60,32 +60,88 @@ /** * Read a summary of times for given object */ -function readTimetrackSum (tutos_base $obj) { +function readTimetrackSum (tutos_base $obj,array $objs = null, $topic = '') { global $table; - $obj->timetracksum = 0; - $obj->distancesum = 0; - $obj->timetrack_w_sum = array(); - $obj->distance_w_sum = array(); + # echo $obj.'|'.(is_array($objs) ? count($objs):'null').'|'.$topic.'<br><pre>'; + # echo TUTOS_backtrace(); + # echo '</pre><br>'; - $q = 'SELECT adr_id,SUM(volume) as XX, SUM(distance) as YY FROM '. $obj->dbconn->prefix .$table['timetrack'][name]; + if (!isset($obj->timetracksum)) { + $obj->timetracksum = 0; + $obj->distancesum = 0; + $obj->timetrack_w_sum = array(); + $obj->distance_w_sum = array(); + $obj->tsum = array(); + $obj->dsum = array(); + } + if ($topic != '' && !isset($obj->tsum[$topic])) { + $obj->tsum[$topic] = 0; + $obj->dsum[$topic] = 0; + } + + $sub = false; + $pn = ''; + $q = 'SELECT adr_id,SUM(volume) as XX, SUM(distance) as YY FROM '. $obj->dbconn->prefix .$table['timetrack'][name]; $pre = ' WHERE'; if ( ($obj->getType() == "address") ||($obj->getType() == "user" ) ||($obj->getType() == "team" ) ) { // per user or team - $pq = $q.$pre. ' adr_id =$1'; - $q .= $pre . ' adr_id ='. $obj->id ; - $pn = 'TT1'; + if (is_array($objs)) { + if (count($objs) == 0) return; + $q .= $pre . ' adr_id ='. $obj->id ; + $pre = ' AND'; + $o = ''; + $opre = ''; + foreach ($objs as $i => $j) { + if (is_object($j)) { + $o .= $opre.$j->id; + } else if (is_numeric($j)) { + $o .= $opre.$j; + } else { + $o .= $opre.$i; + } + $opre = ','; + } + $q .= $pre . ' link_id in ('. $o .')' ; + + // here we have to substract fromo totals as ist always included in the normal search + $sub = true; + } else { + $pq = $q.$pre. ' adr_id =$1'; + $q .= $pre . ' adr_id ='. $obj->id ; + $pn = 'TT1'; + $pre = ' AND'; + } } else { // per project or whatever - $pq = $q.$pre. ' link_id =$1'; - $q .= $pre . ' link_id ='. $obj->id ; - $pn = 'TT2'; + if (is_array($objs)) { + if (count($objs) == 0) return; + $o = ''; + $opre = ''; + foreach ($objs as $i => $j) { + if (is_object($j)) { + $o .= $opre.$j->id; + } else if (is_numeric($j)) { + $o .= $opre.$j; + } else { + $o .= $opre.$i; + } + $opre = ','; + } + $q .= $pre . ' link_id in ('. $o .')' ; + $pre = ' AND'; + } else { + $pq = $q.$pre. ' link_id =$1'; + $q .= $pre . ' link_id ='. $obj->id ; + $pre = ' AND'; + $pn = 'TT2'; + } } - if ($obj->dbconn->prep) { + if ( ($pn != '') && $obj->dbconn->prep) { $pq .= ' GROUP BY adr_id'; $ps = $obj->dbconn->addPStatement($pq,$pn); $r = $obj->dbconn->execPStatement($pn,0,$obj->id); @@ -98,13 +154,23 @@ $r->free(); return; } + $a = 0; while ( $a < $n ) { $adr = $r->get($a,'adr_id'); $xx = $r->get($a,'XX'); $yy = $r->get($a,'YY'); - $obj->timetracksum += $xx; - $obj->distancesum += $yy; + if ($topic != '') { + $obj->tsum[$topic] += $xx; + $obj->dsum[$topic] += $yy; + if ($sub) { + $obj->timetracksum -= $xx; + $obj->distancesum -= $yy; + } + } else { + $obj->timetracksum += $xx; + $obj->distancesum += $yy; + } if (!isset($obj->timetrack_w_sum[$adr])) { $obj->timetrack_w_sum[$adr] = 0.0; $obj->distance_w_sum[$adr] = 0.0; @@ -882,17 +948,26 @@ if (count($obj->ttlist) == 0) return $r; } + $link = 'timetrack/timetrack_overview.php'; + if ( ($obj->getType() == "address") + ||($obj->getType() == "user" ) + ||($obj->getType() == "team" ) + ) { + $link = addUrlParameter($link,'adr_id='.$obj->id); + } else { + $link = addUrlParameter($link,'link_id='.$obj->id); + } if (method_exists($obj,'readTimetrackSum')) { $cnt = 0; $d .= '<div align="right" style="width:10em;display:inline;float:left">'; - $d .= makelink('timetrack/timetrack_overview.php?link_id='. $obj->id ,hour_format($obj->timetracksum),$lang['TimetrackOverview']).'</div>'; + $d .= makelink($link ,hour_format($obj->timetracksum),$lang['TimetrackOverview']).'</div>'; $d .= ' '.$lang['hours'] ."\n"; $timesum += $obj->timetracksum; if (isset($obj->tsum) && is_array($obj->tsum)) foreach ($obj->tsum as $i => $f) { if ( $obj->tsum[$i] > 0 ) { $d .= '<br/><div align="right" style="width:10em;display:inline;float:left">'; - $d .= makelink('timetrack/timetrack_overview.php?link_id='. $obj->id .'&show='.$i,hour_format($obj->tsum[$i]),$lang['TimetrackOverview']).'</div>'; + $d .= makelink(addUrlParameter($link,'show='.$i),hour_format($obj->tsum[$i]),$lang['TimetrackOverview']).'</div>'; $d .= ' '.$lang['hours'].' ('.$lang[$i].")\n"; $timesum += $obj->tsum[$i]; $cnt++; @@ -900,13 +975,13 @@ } if ($cnt > 0) { $d .= '<br/><div align="right" style="width:10em;display:inline;float:left">'; - $d .= '== '.makelink('timetrack/timetrack_overview.php?link_id='. $obj->id .'&show=all' ,hour_format($timesum,2),$lang['TimetrackOverview']).'</div>'; + $d .= '== '.makelink(addUrlParameter($link,'show=all'),hour_format($timesum,2),$lang['TimetrackOverview']).'</div>'; $d .= ' '.$lang['hours']."\n"; } if ($timesum == 0) return $r; } else { $d .= '<div align="right" style="width:10em;display:inline;float:left">'; - $d .= makelink('timetrack/timetrack_overview.php?link_id='. $obj->id ,hour_format($obj->ttsum),$lang['TimetrackOverview']).'</div>'; + $d .= makelink($link,hour_format($obj->ttsum),$lang['TimetrackOverview']).'</div>'; $d .= ' '.$lang['hours'] ."\n"; if ($obj->ttsum == 0) return $r; } Modified: trunk/php/timetrack/timetrack_overview.php =================================================================== --- trunk/php/timetrack/timetrack_overview.php 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/timetrack/timetrack_overview.php 2013-03-06 10:03:32 UTC (rev 998) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2012 by Gero Kohnert + * Copyright 1999 - 2013 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 @@ -16,6 +16,7 @@ * @package timetrack */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-03-05 14:06:16 UTC (rev 997) +++ trunk/php/webelements.p3 2013-03-06 10:03:32 UTC (rev 998) @@ -1159,13 +1159,13 @@ } /** - if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { - if ( session_id() != '' ) { - //$href .= $pre . session_name() .'='. session_id(); - $href .= $pre . SID; - $pre = $pre2; - } - } + if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { + if ( session_id() != '' ) { + //$href .= $pre . session_name() .'='. session_id(); + $href .= $pre . SID; + $pre = $pre2; + } + } */ return $href . $add; } @@ -1195,11 +1195,11 @@ $r .= ' <input type="hidden" name="ss" value="'. $_REQUEST['ss'] ."\" />\n"; } /** - if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { - if ( SID != '' ) { - $r .= ' <input type="hidden" name="'. session_name() .'" value="'. session_id() ."\" />\n"; - } - } + if ( (isset($tutos['SESSID'])) && (!isset($_COOKIE['TUTOS'])) ) { + if ( SID != '' ) { + $r .= ' <input type="hidden" name="'. session_name() .'" value="'. session_id() ."\" />\n"; + } + } */ return $r; } @@ -2191,7 +2191,7 @@ /** * add task ids of an object to a list */ -Function add_task_ids(&$ref,&$q,&$sep) { +Function add_task_ids(tutos_base $ref,&$q,&$sep) { // Read the tasks $ref->readTasks(); if ( count($ref->fulltasklist) > 0 ) { @@ -2206,7 +2206,7 @@ /** * add bug ids of an object to a list */ -Function add_bugs_ids(&$ref,&$q,&$sep) { +Function add_bugs_ids(tutos_base $ref,&$q,&$sep) { // Read the bugs if (! class_exists('bug')) { return; @@ -2223,7 +2223,7 @@ /** * add installation ids of an object to a list */ -Function add_inst_ids(&$ref,&$q,&$sep) { +Function add_inst_ids(tutos_base $ref,&$q,&$sep) { // Read the installations if (! class_exists('installation')) { return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-05 14:06:19
|
Revision: 997 http://sourceforge.net/p/tutos/code/997 Author: gokohnert Date: 2013-03-05 14:06:16 +0000 (Tue, 05 Mar 2013) Log Message: ----------- added PDF overview menu entry Modified Paths: -------------- trunk/php/address_overview.php Modified: trunk/php/address_overview.php =================================================================== --- trunk/php/address_overview.php 2013-03-05 13:51:19 UTC (rev 996) +++ trunk/php/address_overview.php 2013-03-05 14:06:16 UTC (rev 997) @@ -138,7 +138,7 @@ */ Function info_csv() { export_headers('TUTOS_adr_export','csv'); -# Header("Content-Type: text/plain"); + # Header("Content-Type: text/plain"); $r = ''; $n = $this->result->numrows(); $x = 0; @@ -576,6 +576,15 @@ ); $this->addMenu($x); } + if ( $this->format != "pdf" ) { + $ll = addUrlParameter($this->link1,'format=pdf'); + $x = array( url => $ll, + text => 'PDF', + info => 'PDF', + category => array('pdf','address','view',useaddressbook) + ); + $this->addMenu($x); + } if (class_exists('url')) { $this->addMenu(url::getAddLinkPreset($this->user,$this)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-05 13:51:24
|
Revision: 996 http://sourceforge.net/p/tutos/code/996 Author: gokohnert Date: 2013-03-05 13:51:19 +0000 (Tue, 05 Mar 2013) Log Message: ----------- support pictures for projects/products (added new database field) Modified Paths: -------------- trunk/html/default.css trunk/php/address.pinc trunk/php/address_new.php trunk/php/address_tools.p3 trunk/php/config_default.pinc trunk/php/db/table.pinc trunk/php/file/file_ins.php trunk/php/product.pinc trunk/php/product_ins.php trunk/php/product_new.php trunk/php/product_role_new.php trunk/php/product_show.php trunk/php/resource/resource.pinc Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/html/default.css 2013-03-05 13:51:19 UTC (rev 996) @@ -54,8 +54,15 @@ text-align: center; } +.logopic { + max-width: 220px; + max-height: 220px; + border: 0px solid black; +} + .file_preview { - width: 250px; + max-width: 350px; + max-height: 350px; } .img_preview { Modified: trunk/php/address.pinc =================================================================== --- trunk/php/address.pinc 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/address.pinc 2013-03-05 13:51:19 UTC (rev 996) @@ -40,13 +40,13 @@ print_r($this); FATAL_Error('nix'); } - $this->larray = array(); + $this->larray = array(); $this->birthday = new TUTOS_Date_Time(0); + $this->location = array(); $this->pic_id = -1; - $this->location = array(); - $this->pic_file = -1; - $this->rl1 = false; - $this->rl2 = false; + $this->pic_file = null; + $this->rl1 = false; + $this->rl2 = false; if (isset($dbconn)) { $this->tablename = $this->dbconn->prefix . $table['address'][name]; } @@ -67,24 +67,23 @@ parent::read_result($r,$pos); - $this->larray[] = "title"; - $this->larray[] = "l_name"; - $this->larray[] = "f_name"; - $this->larray[] = "m_name"; + $this->larray[] = 'title'; + $this->larray[] = 'l_name'; + $this->larray[] = 'f_name'; + $this->larray[] = 'm_name'; foreach($this->larray as $f) { $this->$f = $r->get($pos, $f); if (!isset($this->$f)) { - $this->$f = ""; + $this->$f = ''; } } - $this->birthday->setDateTime($r->get($pos, "birthday"),1); + $this->birthday->setDateTime($r->get($pos, 'birthday'),1); - $this->pic_id = $r->get($pos, "pic_id"); - $this->pic_file = new tutos_file($this->dbconn); + $this->pic_id = $r->get($pos, 'pic_id'); - $cid = $r->get($pos, "creator"); + $cid = $r->get($pos, 'creator'); if ( isset($cid) ) { if ( $cid != $this->id ) { $this->creator = getObject($this->dbconn,$cid); @@ -103,15 +102,20 @@ // no picture return; } + $this->pic_file = new TUTOS_file($this->dbconn); $this->pic_file = $this->pic_file->read($this->pic_id,$this->pic_file); + if (!is_object($this->pic_file)) { + $this->pic_id = -1; + $this->pic_file = null; + } } /** * Read all locations references */ function read_locs ($force = false) { - if ( ! class_exists ("location") ) { - require("location.pinc"); + if ( ! class_exists ('location') ) { + require('location.pinc'); } read_locs($this,$force); } @@ -120,8 +124,8 @@ * Read all locations data */ function read_locs_data ($force = false) { - if ( ! class_exists ("location") ) { - require("location.pinc"); + if ( ! class_exists ('location') ) { + require('location.pinc'); } read_locs_data($this,$force); } @@ -135,8 +139,8 @@ static function search_by_name(array &$arr,tutos_user $user,$name,$mode = 1) { global $table; - if ( trim($name) == "" ) return 0; - if (substr($name,0,1) == "!") { + if ( trim($name) == '' ) return 0; + if (substr($name,0,1) == '!') { $name = substr($name,1); $negate = true; } else { @@ -370,38 +374,38 @@ $q = new query($this->dbconn); $q->setTable($this->tablename); - $q->addFV("birthday",$this->birthday,"DATE"); - $q->addFV("title",$this->title,"STRING",$table['address']['title'][size]); - $q->addFV("f_name",$this->f_name,"STRING",$table['address']['f_name'][size]); - $q->addFV("m_name",$this->m_name,"STRING",$table['address']['m_name'][size]); - $q->addFV("l_name",$this->l_name,"STRING",$table['address']['l_name'][size]); - $q->addFV("pic_id",$this->pic_id,"INT"); + $q->addFV('birthday',$this->birthday,'DATE'); + $q->addFV('title',$this->title,'STRING',$table['address']['title'][size]); + $q->addFV('f_name',$this->f_name,'STRING',$table['address']['f_name'][size]); + $q->addFV('m_name',$this->m_name,'STRING',$table['address']['m_name'][size]); + $q->addFV('l_name',$this->l_name,'STRING',$table['address']['l_name'][size]); + $q->addFV('pic_id',$this->pic_id,'INT'); $this->save_custom_fields($q); if ( $this->id < 0 ) { $this->modified = array(); if ( isset($this->newid) ) { $this->id = $this->newid; - $q->addFV("id",$this->id,""); + $q->addFV('id',$this->id,''); } else { /* Get an new ID */ - $this->id = $q->addFV("id",-1,"NEXTID"); + $this->id = $q->addFV('id',-1,'NEXTID'); // Defaut Access Control acl_default($this,$current_user); acl_raise($this, EVERYBODY, $tutos[useok]); acl_raise($this,$this->id,$tutos[modok]); - $this->modified[] = array ( "field" => "created" , - "old" => $this->getType() , - "new" => $this->id, - "obj_id" => $this->id + $this->modified[] = array ( 'field' => 'created' , + 'old' => $this->getType() , + 'new' => $this->id, + 'obj_id' => $this->id ); } - $q->addFV("creator",$this->creator,"OBJ"); - $q->addFV("creation",$this->creation,"DATETIME"); + $q->addFV('creator',$this->creator,'OBJ'); + $q->addFV('creation',$this->creation,'DATETIME'); $query = $q->getInsert(); } else { - $q->addWC("id",$this->id,""); + $q->addWC('id',$this->id,''); $query = $q->getUpdate(); } Modified: trunk/php/address_new.php =================================================================== --- trunk/php/address_new.php 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/address_new.php 2013-03-05 13:51:19 UTC (rev 996) @@ -218,6 +218,7 @@ $r .= $lang['FldsRequired'] ."\n"; return $r; } + /** * Add a Form Entry */ @@ -254,6 +255,11 @@ $r .= '<br />'. $varvalue->getLink($lang['AdrPicture']); } } + if ($varvalue == null && ($mod == true) ) { + $r .= ' <input size="30" id="picture" name="file" type="file" value="" />'."\n"; + $this->addHidden("pic_id",-1); + } + } elseif ( $varname == 'category' ) { if ($varvalue > 2) { $r .= ' - <input type="hidden" id="category" name="'. $varname .'" value="'. $varvalue .'" />'; @@ -332,6 +338,7 @@ $r .= "</td></tr>\n"; return $r; } + /** * prepare */ @@ -451,6 +458,7 @@ if ( isset($_GET['bd']) ) { $this->obj->birthday->setDateTime($_GET['bd']); } + $this->obj->read_picture(); if (is_object($this->obj->pic_file)) { if ( isset($_GET['pic_path']) ) { $this->obj->pic_file->pic_path = $_GET['pic_path']; @@ -567,4 +575,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/address_tools.p3 =================================================================== --- trunk/php/address_tools.p3 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/address_tools.p3 2013-03-05 13:51:19 UTC (rev 996) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2012 by Gero Kohnert + * Copyright 1999 - 2013 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 @@ -11,6 +11,7 @@ * * Support Functions for address handling */ +$tutos['files'][__FILE__] = '$Rev$'; /** --------------------------------------------------------------------------- * @@ -108,11 +109,10 @@ } elseif ( $name == "title" ) { $r .= ' <td colspan="'. $s .'"> '. myentities($a->$name) ." </td>\n"; $r .= " <td colspan=\"1\" rowspan=\"5\" valign=\"top\" align=\"right\">\n"; - if ( class_exists('tutos_file') && ($a->pic_id > 1) && $current_user->feature_ok(usedocmanagement,PERM_SEE) ) { - $x = new tutos_file($a->dbconn); - $x->id = $a->pic_id; - $r .= makelink($x->getUrl() ."&format=show", - '<img alt="'. $a->getFullName() .'" height="100" border="0" src="'. addSessionKey($x->getUrl().'&format=show') .'">', + $a->read_picture(); + if ( is_object($a->pic_file) && $a->pic_file->see_ok() ) { + $r .= makelink($a->pic_file->getUrl() ."&format=show", + '<img alt="'. $a->getFullName() .'" class="logopic" src="'. addSessionKey($a->pic_file->getUrl().'&format=show') .'">', $a->getFullName()); } else { $r .= " "; Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/config_default.pinc 2013-03-05 13:51:19 UTC (rev 996) @@ -772,7 +772,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20130304'; +$tutos[version] = '1.9.20130305'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/db/table.pinc =================================================================== --- trunk/php/db/table.pinc 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/db/table.pinc 2013-03-05 13:51:19 UTC (rev 996) @@ -444,6 +444,7 @@ 'probability' => array(type => 'float', constraints => '', Desc => 'probability'), 'p_start' => array(type => 'TS_TYPE', constraints => '', Desc => 'start date'), 'p_end' => array(type => 'TS_TYPE', constraints => '', Desc => 'end date'), + 'pic_id' => array(type => 'ID_TYPE', constraints => '', Desc => 'file id of picture'), 'creator' => array(type => 'ID_TYPE', constraints => '', Desc => 'creator ID'), 'creation' => array(type => 'TS_TYPE', constraints => '', Desc => 'creation date') ); Modified: trunk/php/file/file_ins.php =================================================================== --- trunk/php/file/file_ins.php 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/file/file_ins.php 2013-03-05 13:51:19 UTC (rev 996) @@ -14,6 +14,7 @@ * @package file */ $tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -29,10 +30,10 @@ $msg = ''; -if ( empty($_POST['gotourl']) ) { +if ( empty($_REQUEST['gotourl']) ) { $gotourl = 'file/file_new.php'; } else { - $gotourl = $_POST['gotourl']; + $gotourl = $_REQUEST['gotourl']; } if (isset($_REQUEST['ss'])) { $gotourl= addUrlParameter($gotourl,'ss='. $_REQUEST['ss'],true); @@ -41,7 +42,7 @@ $f = new tutos_file($dbconn); // handle the alternative way of creating an filelink -if (isset($_POST['alt']) && $_POST['alt'] == 1) { +if (isset($_REQUEST['alt']) && $_REQUEST['alt'] == 1) { if ( isset($_REQUEST['file3id']) && $_REQUEST['file3id'] != -1 ) { $m = getObject($dbconn,$_REQUEST['file3id']); if ( is_object($m) ) { @@ -51,7 +52,7 @@ $gotourl = addBadField($gotourl,'file3',true); } } else if ( isset($_REQUEST['file3fn']) ) { - $m = check_field($_POST['file3fn'],"file3fn","file3l",array(usedocmanagement)); + $m = check_field($_REQUEST['file3fn'],"file3fn","file3l",array(usedocmanagement)); if ( is_object($m) ) { $f = $m; } else { @@ -98,12 +99,12 @@ if ( $f->id == -1 ) { // Versioning System could only be set at first save if ( isset($_REQUEST['vsys']) ) { - $f->vsys = $_POST['vsys']; + $f->vsys = $_REQUEST['vsys']; } } if ( isset($_REQUEST['save']) ) { - $f->savemode = $_POST['save']; + $f->savemode = $_REQUEST['save']; } if ( !isset($_REQUEST['link_id']) || !is_array($_REQUEST['link_id'])) { @@ -121,11 +122,11 @@ } // add a new reference -if (isset($_POST['reftype']) && ($_POST['reftype'] != "0") ) { +if (isset($_REQUEST['reftype']) && ($_REQUEST['reftype'] != "0") ) { $l = array(); // search the appropiate object class - $c = trim($_POST['reftype']); - $n = trim($_POST['refname']); + $c = trim($_REQUEST['reftype']); + $n = trim($_REQUEST['refname']); $gotourl = addUrlParameter($gotourl,"reftype=". UrlEncode($c),true); $gotourl = addUrlParameter($gotourl,"refname=". UrlEncode($n),true); if (class_exists($c)) { @@ -154,9 +155,9 @@ } // delete references -if ( isset($_POST['del']) && is_array($_POST['del'])) { - foreach($_POST['del'] as $i => $j) { -# unset($links[$j]); +if ( isset($_REQUEST['del']) && is_array($_REQUEST['del'])) { + foreach($_REQUEST['del'] as $i => $j) { + # unset($links[$j]); $f->delReference($j); $gotourl = addUrlParameter($gotourl,"del[]=". UrlEncode($j),true); } @@ -168,15 +169,15 @@ # $f->addReference($l); # } -# check for at least one reference -if (count($f->links) == 0) { - $msg = addLine($msg,sprintf($lang['Err0009'],$lang['FileReference'])); -} + # check for at least one reference + if (count($f->links) == 0) { + $msg = addLine($msg,sprintf($lang['Err0009'],$lang['FileReference'])); + } $file = 'none'; # Hack for Konquerer -if ( isset($_POST['file1']) ) { - $file = $_POST['file1']; +if ( isset($_REQUEST['file1']) ) { + $file = $_REQUEST['file1']; if ( $file != "none" ) { $farr = $_FILES["file1"]; if ( $farr['name'] == "" ) { @@ -254,7 +255,7 @@ $f->locked = $_REQUEST['locked']; } -if ( isset($_POST['afn']) ) { +if ( isset($_REQUEST['afn']) ) { // Check the author full name $author = check_field($_REQUEST['afn'],"afn","al",array(useaddressbook,useteams,usecompany,usedepartment)); } Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/product.pinc 2013-03-05 13:51:19 UTC (rev 996) @@ -394,6 +394,8 @@ $this->p_start = new TUTOS_Date_Time(0); // Estimated Start/Order $this->p_end = new TUTOS_Date_Time(0); // Estimated End + $this->pic_id = -1; + $this->pic_file = null; $this->tsum = array(); $this->invlist = array(); $this->tablename = $this->dbconn->prefix .$table['product'][name]; @@ -474,6 +476,7 @@ $this->creator = $r->getObject($pos, "creator"); $this->p_start = $r->getDateTime($pos, "p_start"); $this->p_end = $r->getDateTime($pos, "p_end"); + $this->pic_id = $r->get($pos, 'pic_id'); parent::read_result($r,$pos); // @@ -486,6 +489,22 @@ } /** + * Read picture object + */ + function read_picture () { + if ( $this->pic_id < 1 ) { + // no picture + return; + } + $this->pic_file = new TUTOS_file($this->dbconn); + $this->pic_file = $this->pic_file->read($this->pic_id,$this->pic_file); + if (!is_object($this->pic_file)) { + $this->pic_id = -1; + $this->pic_file = null; + } + } + + /** * read the different roles in this project */ function readroles () { @@ -1247,6 +1266,7 @@ } else { $q->addFV("cost","null",""); } + $q->addFV('pic_id',$this->pic_id,'INT'); $this->save_custom_fields($q); if ( $this->id < 0 ) { Modified: trunk/php/product_ins.php =================================================================== --- trunk/php/product_ins.php 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/product_ins.php 2013-03-05 13:51:19 UTC (rev 996) @@ -135,6 +135,26 @@ $gotourl= addUrlParameter($gotourl,"version=". UrlEncode($p->version),true); } +if ( isset($_POST['picid']) && $_POST['picid'] != -1 ) { + $m = getObject($dbconn,$_POST['picid']); + if ( is_object($m) && $m->use_ok() ) { + $p->pic_id = $m->id; + } else { + // $msg = addLine($msg,sprintf($lang['Err0009'],$lang['AdrPicture'])); + // $gotourl = addBadField($gotourl,'pic',true); + } +} else if ( isset($_POST['picfn']) ) { + $m = check_field($_POST['picfn'],"picfn","picl",array(usedocmanagement)); + if ( is_object($m) ) { + $p->pic_id = $m->id; + } else { + $p->pic_id = -1; + $p->pic_file = null; + // $msg = addLine($msg,sprintf($lang['Err0009'],$lang['AdrPicture'])); + // $gotourl = addBadField($gotourl,'pic',true); + } +} + if ( !isset($_POST['state']) ) { $msg = addLine($msg,sprintf($lang['Err0014'],$lang['ProdState'])); } else { Modified: trunk/php/product_new.php =================================================================== --- trunk/php/product_new.php 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/product_new.php 2013-03-05 13:51:19 UTC (rev 996) @@ -69,6 +69,12 @@ $r .= $this->showdata('<input id="prob" size="3" maxlength="3" name="prob" '.$check.' value="'. my_number_format($this->obj->probability,0) ."\" /> %",1); $r .= $this->EditRowEnd(); + // Picture + $r .= $this->EditRowStart(); + $r .= $this->showfieldc($lang['AdrPicture'],0,'pic'); + $r .= $this->showdata(select_from_array_or_input($this->obj,"pic",$this->obj->pic_file,1,array(usedocmanagement)),$this->width -1); + $r .= $this->EditRowEnd(); + // Roles of peoples and teams etc. $r .= $this->EditRowStart(); $r .= $this->showfield($lang['ProdRoles']); @@ -276,6 +282,7 @@ } $this->name = sprintf($lang['ProdModifyT'], $this->obj->getFullName()); $this->obj->readroles(); + $this->obj->read_picture(); } else if ( isset($_GET['tplid']) ) { $this->obj = $this->obj->read($_GET['tplid'],$this->obj); $this->template = true; @@ -391,4 +398,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/product_role_new.php =================================================================== --- trunk/php/product_role_new.php 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/product_role_new.php 2013-03-05 13:51:19 UTC (rev 996) @@ -3,6 +3,10 @@ * Copyright 1999 - 2013 by Gero Kohnert * cloning option added by Michal Salaban 2003 * + * 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. + * * create a new product_role or modify/clone an existing one * * @modulegroup product @@ -46,8 +50,8 @@ continue; } $r .= " <option value=\"". $role ."\"". - ($role == $tutos[defaultrole] ? " selected" : "") .">". - myentities($lang['ProdRole'][$role]) ."</option>\n"; + ($role == $tutos[defaultrole] ? " selected" : "") .">". + myentities($lang['ProdRole'][$role]) ."</option>\n"; } $r .= " </select>\n"; $r .= " </td>\n"; Modified: trunk/php/product_show.php =================================================================== --- trunk/php/product_show.php 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/product_show.php 2013-03-05 13:51:19 UTC (rev 996) @@ -81,7 +81,15 @@ $r .= $this->DataTableStart(); $r .= $this->headline_gui(); $r .= $this->CreatorInfoLine($this->obj,$this->width); - + if (is_object($this->obj->pic_file)) { + $r .= $this->ContentRowStart(); + $r .= $this->showfield(''); + $x = makelink($this->obj->pic_file->getUrl() ."&format=show", + '<img alt="'. $this->obj->getFullName() .'" class="logopic" src="'. addSessionKey($this->obj->pic_file->getUrl().'&format=show') .'">', + $this->obj->getFullName()); + $r .= $this->showdata($x,$this->width-1); + $r .= $this->ContentRowEnd(); + } $r .= $this->showfield_data_row($this->obj,$table['product']['name'],$this->width -1,1); $r .= $this->showfield_data_row($this->obj,$table['product']['version'],$this->width -1,1); @@ -306,6 +314,7 @@ $this->format = "html"; return; } + $this->obj->read_picture(); // Menu $x = product::getSelectLink($this->user,$lang['Search']); Modified: trunk/php/resource/resource.pinc =================================================================== --- trunk/php/resource/resource.pinc 2013-03-05 08:21:05 UTC (rev 995) +++ trunk/php/resource/resource.pinc 2013-03-05 13:51:19 UTC (rev 996) @@ -52,10 +52,12 @@ } } $unuseable = ''; + $cnt = 0; foreach ($current_user->reslist as $i => $f) { // Here we need the use permission if ( $f->use_ok() ) { $r .= ' <option value="'. $i .'"'; + $cnt++; if ( isset($obj->resuselist[$i]) || (isset($x[$i]) ) ) { $r .= ' selected="selected" '; } @@ -63,6 +65,7 @@ } else { if ( isset($obj->resuselist[$i]) || (isset($x[$i]) ) ) { if ( $f->see_ok() ) { + $cnt++; $unuseable .= $f->getFullName().'<br />'; } } @@ -70,6 +73,7 @@ } $r .= "</select>\n"; $r = $unuseable.$r; + if ($cnt == 0) return ''; return $r; } @@ -579,10 +583,11 @@ resource::obj_read($obj); if (count($current_user->reslist) == 0) return; - + $d = ResAskUse($obj,0,0); + if ($d == '') return ''; $r .= $user->layout->EditRowStart(); $r .= $user->layout->showfield($lang['Resource'],0,"res"); - $r .= $user->layout->showdata(ResAskUse($obj,0,0),$cols-1); + $r .= $user->layout->showdata($d,$cols-1); $r .= $user->layout->EditRowEnd(); return $r; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-05 08:21:12
|
Revision: 995 http://sourceforge.net/p/tutos/code/995 Author: gokohnert Date: 2013-03-05 08:21:05 +0000 (Tue, 05 Mar 2013) Log Message: ----------- memcache session handling Modified Paths: -------------- trunk/php/admin_show.php trunk/php/permission.p3 Modified: trunk/php/admin_show.php =================================================================== --- trunk/php/admin_show.php 2013-03-04 17:20:30 UTC (rev 994) +++ trunk/php/admin_show.php 2013-03-05 08:21:05 UTC (rev 995) @@ -784,6 +784,9 @@ if (ini_get('session.save_handler') == 'memcache') { $id = $_GET['mark']; $data = unserialize_session($tutos['memcache']->get($id)); + if (!isset($data['username'])) { + return; + } if ( ! $this->user->isAdmin() ) { $msg = addLine($msg,"Session for ". $data['username'] ." NOT killed. Only superusers are allowed to kill sessions"); } else { Modified: trunk/php/permission.p3 =================================================================== --- trunk/php/permission.p3 2013-03-04 17:20:30 UTC (rev 994) +++ trunk/php/permission.p3 2013-03-05 08:21:05 UTC (rev 995) @@ -717,8 +717,10 @@ if (ini_get('session.save_handler') == 'memcache') { $x = $tutos['memcache']->get('sessions'); + if ( ($x === false) || (count($x) == 0)) return; $y = array(); $d = $tutos['memcache']->get(array_keys($x)); + if ( ($d === false) || !is_array($d)) return; foreach ($d as $key => $data) { unset($x[$key]); $y[$key] = $data; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-04 17:20:34
|
Revision: 994 http://sourceforge.net/p/tutos/code/994 Author: gokohnert Date: 2013-03-04 17:20:30 +0000 (Mon, 04 Mar 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/admin/restore.php Modified: trunk/php/admin/restore.php =================================================================== --- trunk/php/admin/restore.php 2013-03-04 12:47:41 UTC (rev 993) +++ trunk/php/admin/restore.php 2013-03-04 17:20:30 UTC (rev 994) @@ -52,7 +52,7 @@ ReadLang($lang); $l = new Restore($current_user); -$l->PageHeader('RESTORE'); +$l->PrintHeader('RESTORE'); if (!file_exists($zipname)) { @@ -109,7 +109,7 @@ passthru("cat ".$tfile."; rm ".$tfile,$xx); echo "</pre>"; chdir ($cwd); - # mkdir($tutos['base'].'/'.$tutos[repository][$dbnr]); +# mkdir($tutos['base'].'/'.$tutos[repository][$dbnr]); chdir(dirname($tutos[repository][$dbnr])); $cmd = 'unzip -u '. $zipname .' "'. basename($tutos[repository][$dbnr]).'/*"'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-03-04 12:47:47
|
Revision: 993 http://sourceforge.net/p/tutos/code/993 Author: gokohnert Date: 2013-03-04 12:47:41 +0000 (Mon, 04 Mar 2013) Log Message: ----------- session kill for memcache stored sessions Modified Paths: -------------- trunk/php/admin_show.php Modified: trunk/php/admin_show.php =================================================================== --- trunk/php/admin_show.php 2013-03-04 12:40:11 UTC (rev 992) +++ trunk/php/admin_show.php 2013-03-04 12:47:41 UTC (rev 993) @@ -781,34 +781,45 @@ global $msg,$lang,$tutos,$info; if ( $_GET['action'] == "kill" ) { - $file = $_GET['mark']; - if ( ! preg_match("#^sess_#", $file) ) { - return; - } - $filename = $tutos[sessionpath] ."/". $file; - if ( filesize($filename) == 0 ) { - return; - } - if ( ! is_readable($filename) ) { - return; - } - $x = fopen($filename, 'rb'); - $contents = fread ($x, filesize ($filename)); - fclose($x); - $data = unserialize_session($contents); + if (ini_get('session.save_handler') == 'memcache') { + $id = $_GET['mark']; + $data = unserialize_session($tutos['memcache']->get($id)); + if ( ! $this->user->isAdmin() ) { + $msg = addLine($msg,"Session for ". $data['username'] ." NOT killed. Only superusers are allowed to kill sessions"); + } else { + $info = addLine($info,"Session for ". $data['username'] ." killed"); + $tutos['memcache']->delete($id); + } + } else if (ini_get('session.save_handler') == 'files') { + $file = $_GET['mark']; + if ( ! preg_match("#^sess_#", $file) ) { + return; + } + $filename = $tutos[sessionpath] ."/". $file; + if ( filesize($filename) == 0 ) { + return; + } + if ( ! is_readable($filename) ) { + return; + } + $x = fopen($filename, 'rb'); + $contents = fread ($x, filesize ($filename)); + fclose($x); + $data = unserialize_session($contents); - if (!isset($data['userid'])) { - return; + if (!isset($data['userid'])) { + return; + } + if (!isset($data['username'])) { + return; + } + if ( ! $this->user->isAdmin() ) { + $msg = addLine($msg,"Session for ". $data['username'] ." NOT killed. Only superusers are allowed to kill sessions"); + } else { + $info = addLine($info,"Session for ". $data['username'] ." killed"); + unlink($filename); + } } - if (!isset($data['username'])) { - return; - } - if ( ! $this->user->isAdmin() ) { - $msg = addLine($msg,"Session for ". $data['username'] ." NOT killed. Only superusers are allowed to kill sessions"); - } else { - $info = addLine($info,"Session for ". $data['username'] ." killed"); - unlink($filename); - } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |