tutos-commits Mailing List for TUTOS (Page 12)
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-05-21 09:30:39
|
Revision: 1067 http://sourceforge.net/p/tutos/code/1067 Author: gokohnert Date: 2013-05-21 09:30:33 +0000 (Tue, 21 May 2013) Log Message: ----------- better check of deprecated config values / handler config moved out of config_default Modified Paths: -------------- trunk/.htaccess trunk/apache.conf.in trunk/php/cia_factbook/cia.pinc trunk/php/config_default.pinc trunk/php/db.p3 trunk/php/email/email.pinc trunk/php/fax/README trunk/php/fax/fax.pinc trunk/php/fax/fax_ins.php trunk/php/fax/fax_new.php trunk/php/handler.pinc trunk/php/isbn/isbn.pinc trunk/php/layout/new2_layout.pinc trunk/php/oanda/oanda.pinc trunk/php/permission.p3 trunk/php/sms/README trunk/php/sms/sms.pinc trunk/php/subversion/revision.pinc trunk/php/webelements.p3 trunk/php/yahoo/yahoo_currency_converter.pinc Modified: trunk/.htaccess =================================================================== --- trunk/.htaccess 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/.htaccess 2013-05-21 09:30:33 UTC (rev 1067) @@ -62,6 +62,7 @@ #php_value ignore_repeated_errors "1" #php_value magic_quotes_gpc "0" #php_value arg_separator.output "&" +#php_value max_input_vars "2048" # php_value eaccelerator.enable "0" # php_value apc.enabled "0" </IfModule> Modified: trunk/apache.conf.in =================================================================== --- trunk/apache.conf.in 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/apache.conf.in 2013-05-21 09:30:33 UTC (rev 1067) @@ -35,6 +35,9 @@ php_flag child_terminate off php_flag last_modified off php_flag xbithack off + php_value max_input_vars "4000" + php_value memory_limit "256M" + php_value upload_max_filesize "20M" DirectoryIndex index.html Options MultiViews FollowSymLinks +Includes -Indexes AllowOverride All Modified: trunk/php/cia_factbook/cia.pinc =================================================================== --- trunk/php/cia_factbook/cia.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/cia_factbook/cia.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2002 - 2011 by Gero Kohnert + * Copyright 2002 - 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,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to cia world fact book @@ -17,7 +18,7 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $lang,$current_user; if (empty($arg)) { @@ -33,9 +34,9 @@ } $cn = strtolower($cn); -# TODO complete this list -# a translation table from tutos ISO to CIA -# I really like to know why they choose such a strange naming scheme ! + // TODO complete this list + // a translation table from tutos ISO to CIA + // I really like to know why they choose such a strange naming scheme ! $trans['de'] = 'gm'; $trans['ch'] = 'sz'; $trans['cn'] = 'ch'; @@ -63,10 +64,8 @@ $cn = $trans[$cn]; } $baseurl = 'https://www.cia.gov/library/publications/the-world-factbook'; - # $url = $baseurl . '/print/'. $cn .'.html'; $url = $baseurl . '/geos/'. strtolower($cn) .'.html'; - # $link2 = '<img alt="'. $arg .'" border="0" height="12" src="'. $baseurl .'/flags/'. $cn .'-flag.gif" />'; $link2 = '<img alt="'. $arg .'" border="0" height="12" src="'. $baseurl .'/graphics/flags/large/'. $cn .'-lgflag.gif" />'; if ($cnt == 1) { return '<a href="'. $url .'" target="map">'. $arg .' '. $link2 .'</a>'; @@ -77,9 +76,9 @@ /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { return true; } - } +} ?> \ No newline at end of file Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/config_default.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -284,43 +284,6 @@ // $tutos[memcache_hosts] = array(); // -// Fax features -// -// you have to install the HDL_fax package to use this -// -// (Disable this with usefax below) -// Mode 1 = via faxspool (from the mgetty package) -// Mode 2 = via mail (see above) -// -$tutos[faxmode] = 1; -// -// Mode 1 -// Where to find faxspool -// Set tutos[usefax] to 0 to disable faxing -// (This is preconfigured to work with the mgetty/sendfax package) -// -$tutos[faxspool] = '/usr/bin/faxspool'; -// -// Mode 2 -// Mailaddress to send the fax to -// A @NR@ String in the mailaddress will be replaced by the faxnumber -// Set tutos[usefax] to 0 to disable faxing -// (This is preconfigured to work with mail2fax from the mgetty package) -// To adapt the fax mechanism look at [tutosdir]/fax_ins.php -// -$tutos[faxmail] = 'fa...@tu...'; -$tutos[faxmail_user] = 'tutos'; -$tutos[faxmail_pass] = 'xxx'; -# $tutos[faxmail] = "[FAX:@NR@]"; -// -// SMS Mail -// if you have a Mail2SMS Gateway enter the mail address below -// @NR@ will be replaced with the phone number -// You have to install the HDL_sms package to use this -// disable this by setting to empty string -# $tutos[smsmail] = ""; -$tutos[smsmail] = 'sms@NR@@tutos.org'; -// // Path to freemind java applet (used to display freemind mindmap files in browser) // See http://freemind.sourceforge.net/ // @@ -778,4 +741,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> +?> \ No newline at end of file Modified: trunk/php/db.p3 =================================================================== --- trunk/php/db.p3 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/db.p3 2013-05-21 09:30:33 UTC (rev 1067) @@ -306,7 +306,7 @@ // require_once 'modules.pinc'; // set again the value from config_default -// some uses simply copy the whole config_default +// some users simply copy the whole config_default // and thus we dont get real version numbers in bug reports $tutos[version] = $x; unset($x); @@ -375,12 +375,12 @@ $tutos[use_check_dbacl] = 0; } // a software called tutos should do this -$tutos[useteams] = 1; -$tutos[useuser] = 1; -$tutos[usedbs] = 1; -$tutos[usecompany] = 1; +$tutos[useteams] = 1; +$tutos[useuser] = 1; +$tutos[usedbs] = 1; +$tutos[usecompany] = 1; $tutos[usedepartment] = 1; -$tutos[uselocation] = 1; +$tutos[uselocation] = 1; $tutos[activemodules] = array(); @@ -432,106 +432,66 @@ if (isset($tutos[invautoname])) { $confmsg .= '<br />check invautoname. Instead of $tutos[invautoname] in your config you should define it only '.makelink('invoice/invoice_config.php','here'); } -if (isset($tutos[taskautoname])) { - $confmsg .= '<br />check taskautoname. Instead of $tutos[taskautoname] in your config you should define it only '.makelink('admin/main_config.php','here'); +// global config check +$check = array( + taskautoname => 'taskautoname', + proxyhost => 'proyhost', + proxyport => 'proxyport', + classify_products => 'classify_products', + maxshow => 'maxshow', + maxshort => 'maxshort', + maxselect => 'maxselect', + timetolive => 'timetolive', + tasksincalendar => 'tasksincalendar', + task_skip_finished => 'task_skip_finished', + task_show_buginfo => 'task_show_buginfo', + task_show_fileinfo => 'task_show_fileinfo', + timetrackdefaultstate => 'timetrackdefaultstate', + fiscalstartmonth => 'fiscalstartmonth', + mailmode => 'mailmode', + sendmail => 'sendmail', + smtphost => 'smtphost', + smtpport => 'smtpport', + smtp_username => 'smtp_username', + smtp_password => 'smtp_password', + popbeforesmtp => 'popbeforesmtp', + popbeforesmtp_user => 'popbeforesmtp_user', + popbeforesmtp_pass => 'popbeforesmtp_pass', + logo => 'logo', + logolink => 'logolink', + ); +foreach($check as $i => $j) { + if (isset($tutos[$i])) { + $confmsg = addLine($confmsg,'check "'.$j.'". Instead of $tutos['.$j.'] in your config you should define it only '.makelink('admin/main_config.php','here')); + if ( $tutos[debug] != 0 ) { + // undefine + } + } } -if (isset($tutos[proxyhost])) { - $confmsg .= '<br />check proxyhost. Instead of $tutos[proxyhost] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[proxyport])) { - $confmsg .= '<br />check proxyport. Instead of $tutos[proxyport] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[classify_products])) { - $confmsg .= '<br />check classify_products. Instead of $tutos[classify_products] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[maxshow])) { - $confmsg .= '<br />check maxshow. Instead of $tutos[maxshow] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[maxshort])) { - $confmsg .= '<br />check maxshort. Instead of $tutos[maxshort] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[maxselect])) { - $confmsg .= '<br />check maxselect. Instead of $tutos[maxselect] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[timetolive])) { - $confmsg .= '<br />check timetolive. Instead of $tutos[timetolive] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[tasksincalendar])) { - $confmsg .= '<br />check tasksincalendar. Instead of $tutos[tasksincalendar] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[task_skip_finished])) { - $confmsg .= '<br />check task_skip_finished. Instead of $tutos[task_skip_finished] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[task_show_buginfo])) { - $confmsg .= '<br />check task_show_buginfo. Instead of $tutos[task_show_buginfo] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[task_show_fileinfo])) { - $confmsg .= '<br />check task_show_fileinfo. Instead of $tutos[task_show_fileinfo] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[fiscalstartmonth])) { - $confmsg .= '<br />check fiscalstartmonth. Instead of $tutos[fiscalstartmonth] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[timetrackdefaultstate])) { - $confmsg .= '<br />check timetrackdefaultstate. Instead of $tutos[timetrackdefaultstate] in your config you should define it only '.makelink('admin/main_config.php','here'); -} - -if (isset($tutos[mailmode])) { - $confmsg .= '<br />check mailmode. Instead of $tutos[mailmode] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[sendmail])) { - $confmsg .= '<br />check sendmail. Instead of $tutos[sendmail] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[smtphost])) { - $confmsg .= '<br />check mailmode. Instead of $tutos[smtphost] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[smtpport])) { - $confmsg .= '<br />check smtpport. Instead of $tutos[smtpport] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[smtp_username])) { - $confmsg .= '<br />check smtp_username. Instead of $tutos[smtp_username] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[smtp_password])) { - $confmsg .= '<br />check smtp_password. Instead of $tutos[smtp_password] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[popbeforesmtp])) { - $confmsg .= '<br />check popbeforesmtp. Instead of $tutos[popbeforesmtp] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[popbeforesmtp_user])) { - $confmsg .= '<br />check popbeforesmtp_user. Instead of $tutos[popbeforesmtp_user] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[popbeforesmtp_pass])) { - $confmsg .= '<br />check popbeforesmtp_pass. Instead of $tutos[popbeforesmtp_pass] in your config you should define it only '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[logo])) { - $confmsg .= '<br />check logo. Rename $tutos[logo] in your config.php to $tutos[\'logo\'] Runtime Logo will be defined '.makelink('admin/main_config.php','here'); -} -if (isset($tutos[logolink])) { - $confmsg .= '<br />check logolink. Rename $tutos[logolink] in your config.php to $tutos[\'logo\'] Runtime Logolink will be defined '.makelink('admin/main_config.php','here'); -} - -$tutos['jqplot'] = 1; -$tutos['prod_state_stc'] = -1; -$tutos['prod_activ_states'] = '0,1,4'; -$tutos['prod_finish_state'] = 2; -$tutos['task_state_stc'] = -1; -$tutos['task_autoname'] = '%Y-%m-X'; -$tutos['proxy_port'] = ''; -$tutos['proxy_host'] = ''; -$tutos['resolve_host'] = 0; -$tutos['prod_classify'] = 0; -$tutos['timetolive'] = 240; +unset($check); +$tutos['jqplot'] = 1; +$tutos['prod_state_stc'] = -1; +$tutos['prod_activ_states'] = '0,1,4'; +$tutos['prod_finish_state'] = 2; +$tutos['task_state_stc'] = -1; +$tutos['task_autoname'] = '%Y-%m-X'; +$tutos['proxy_port'] = ''; +$tutos['proxy_host'] = ''; +$tutos['resolve_host'] = 0; +$tutos['prod_classify'] = 0; +$tutos['timetolive'] = 240; $tutos['fiscal_start_month'] = 1; -$tutos['maxshow'] = 20; -$tutos['maxselect'] = 15; -$tutos['maxshort'] = 3; -$tutos['vat_list'] = '0.0'; -$tutos['tasksincalendar'] = 0; +$tutos['maxshow'] = 20; +$tutos['maxselect'] = 15; +$tutos['maxshort'] = 3; +$tutos['vat_list'] = '0.0'; +$tutos['tasksincalendar'] = 0; $tutos['task_skip_finished'] = 1; -$tutos['task_show_buginfo'] = 1; +$tutos['task_show_buginfo'] = 1; $tutos['task_show_fileinfo'] = 1; -$tutos['task_book_state'] = 1; -$tutos['task_finish_state'] = 2; +$tutos['task_book_state'] = 1; +$tutos['task_finish_state'] = 2; $tutos['task_exact'] = 0; $tutos['pref_mail'] = 'html'; if (!isset($tutos['mailmode'])) Modified: trunk/php/email/email.pinc =================================================================== --- trunk/php/email/email.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/email/email.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -11,6 +11,7 @@ * * handle email addresses */ +$tutos['files'][__FILE__] = '$Rev$'; /** * handle email addresses (formerly AsEmail in webelement.p3) @@ -19,7 +20,7 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $tutos,$lang,$current_user; $r = ''; @@ -51,13 +52,14 @@ } return $r; } + /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { // allways delivers something return true; } - } +} ?> \ No newline at end of file Modified: trunk/php/fax/README =================================================================== --- trunk/php/fax/README 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/fax/README 2013-05-21 09:30:33 UTC (rev 1067) @@ -12,4 +12,45 @@ this package is designed to work with the mail2fax software from the mgetty package (part of some Linux Installations) +for configuration see + $tutos[faxmode] + $tutos[faxspool] + $tutos[faxmail] + $tutos[faxmail_user] + $tutos[faxmail_pass] +in your config.php file + +Copy this to your config.php +----------------------------------------------- +// +// Fax features +// +// you have to install the HDL_fax package to use this +// +// (Disable this with usefax below) +// Mode 1 = via faxspool (from the mgetty package) +// Mode 2 = via mail (see above) +// +$tutos[faxmode] = 1; +// +// Mode 1 +// Where to find faxspool +// Set tutos[usefax] to 0 to disable faxing +// (This is preconfigured to work with the mgetty/sendfax package) +// +$tutos[faxspool] = '/usr/bin/faxspool'; +// +// Mode 2 +// Mailaddress to send the fax to +// A @NR@ String in the mailaddress will be replaced by the faxnumber +// Set tutos[usefax] to 0 to disable faxing +// (This is preconfigured to work with mail2fax from the mgetty package) +// To adapt the fax mechanism look at [tutosdir]/fax_ins.php +// +$tutos[faxmail] = 'fa...@tu...'; +$tutos[faxmail_user] = 'tutos'; +$tutos[faxmail_pass] = 'xxx'; +# $tutos[faxmail] = "[FAX:@NR@]"; +----------------------------------------------- + # $Id: README,v 1.4 2010/03/24 13:37:07 gokohnert Exp $ Modified: trunk/php/fax/fax.pinc =================================================================== --- trunk/php/fax/fax.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/fax/fax.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?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 @@ -9,6 +9,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to fax service @@ -17,8 +18,9 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $lang,$current_user; + if (empty($arg)) { return; } @@ -39,15 +41,20 @@ return '<span class="handler">['. makelink("fax/fax_new.php?nr=". UrlEncode($obj).$add,"fax",sprintf($lang['FaxSendTo'],$to)) .']</span>'; } } + /** * check if all is ok */ - function check(&$obj,$arg) { - global $current_user; + function check($obj,$arg) { + global $current_user,$tutos; + if ( ! $current_user->feature_ok(usefax,PERM_NEW) ) { return false; } + if ( !isset($tutos[faxmode]) || ($tutos[faxmode] != 1 && $tutos[faxmode] != 2) ) { + return false; + } return true; } - } +} ?> \ No newline at end of file Modified: trunk/php/fax/fax_ins.php =================================================================== --- trunk/php/fax/fax_ins.php 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/fax/fax_ins.php 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,11 +1,13 @@ <?php /** - * Copyright 1999 - 2009 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 + * 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. */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -16,11 +18,12 @@ loadmodules('fax','new'); $gotourl = 'fax/fax_new.php'; -$msg = ""; +$msg = ''; +$info = ''; $nr = ''; /* Check Input */ if ( !isset($_POST['nr']) || empty($_POST['nr']) ) { - $msg .= $lang['Err0031'] ."<br />\n"; + $msg = addLine($msg,$lang['Err0031']); } else { $nr = UrlDecode($_POST['nr']); $gotourl= addUrlParameter($gotourl,"nr=". UrlEncode($_POST['nr']),true); @@ -45,7 +48,7 @@ } $gotourl= addUrlParameter($gotourl,"fax=". Base64_Encode($_POST['fax']),true); -# Call faxspool +// Call faxspool if ( $msg == "" ) { if ( $tutos[faxmode] == 1 ) { $cmd = $tutos[faxspool]; @@ -58,7 +61,7 @@ $fd = popen($cmd ,"w"); fputs ($fd,$fax); pclose($fd); - $msg .= sprintf($lang['FaxSpooledTo'], $nr) ."<br />\n"; + $info = addLine($info,sprintf($lang['FaxSpooledTo'], $nr)); $gotourl = "fax/fax_new.php"; } else if ( $tutos[faxmode] == 2 ) { $hdr = ""; @@ -79,11 +82,11 @@ $hdr .= "\n"; $f = $hdr . $fax ."\n--\n"; $m->addBody($f); - $msg .= $m->send(); - $msg .= sprintf($lang['FaxSpooledTo'], $faxmail) ."<br />\n"; + $msg = addLine($msg,$m->send()); + $info = addLine($info,sprintf($lang['FaxSpooledTo'], $faxmail)); $gotourl = "fax/fax_new.php"; } else { - $msg .= "Unknown faxmode ". $tutos[faxmode] ." please fix config.php<br />"; + $msg = addLine($msg,"Unknown faxmode ". $tutos[faxmode] ." please fix config.php"); } if ( isset($_POST['savenote']) ) { if ( ! class_exists ("note") ) { @@ -96,13 +99,13 @@ $n->creator = $current_user; $n->link_id = $x->id; $dbconn->Begin("WORK"); - $msg .= $n->save(); + $msg = addLine($msg,$n->save()); $dbconn->Commit("WORK"); - $msg .= "Fax was saved as a note for ". $x->getLink() ."<br />"; + $info = addLine($info,'Fax was saved as a note for '. $x->getLink()); $gotourl = $a->getURL(); } } else { - $msg .= $lang['Err0030'] ."<br />\n"; + $msg = addLine($msg,$lang['Err0030']); } leave_insert($dbconn,'../'.$gotourl,$msg); @@ -110,4 +113,4 @@ * SVN Info $Id$ * $Author$ */ -?> +?> \ No newline at end of file Modified: trunk/php/fax/fax_new.php =================================================================== --- trunk/php/fax/fax_new.php 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/fax/fax_new.php 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,11 +1,13 @@ <?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 * Free Software Foundation; version 2 of the License. */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -78,6 +80,7 @@ $this->name = $lang['FaxCreate']; $this->obj = new location($this->dbconn); + $this->adr = null; $this->nr = ''; if ( !$this->user->feature_ok(usefax,PERM_NEW) ) { @@ -120,5 +123,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> +$Author$ +--> \ No newline at end of file Modified: trunk/php/handler.pinc =================================================================== --- trunk/php/handler.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/handler.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -14,7 +14,7 @@ /** * run handler for given input and type */ -Function handle($type,&$obj,$arg) { +Function handle($type,$obj,$arg) { global $tutos; $r = ''; @@ -78,13 +78,13 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { } /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { return false; } } Modified: trunk/php/isbn/isbn.pinc =================================================================== --- trunk/php/isbn/isbn.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/isbn/isbn.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,47 +1,53 @@ <?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 + * Free Software Foundation; version 2 of the License. + * * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to amazon book stock to get more info */ class isbn extends tutos_handler { - /** - * run the handler - */ - function handle(&$obj,$arg,$cnt) { - global $lang,$current_user; + /** + * run the handler + */ + function handle($obj,$arg,$cnt) { + global $lang,$current_user; - if (empty($arg)) { - return; + if (empty($arg)) { + return; + } + $x = trim($arg); + $x = preg_replace("<ISBN >","",$x); + $x = preg_replace("<isbn >","",$x); + $x = preg_replace("<->","",$x); + + // Alternatives + # $url = "http://www.amazon.com/exec/obidos/ASIN/".$x."/tutos-20"; + if (strlen($x) == 10) { + $url = "http://www.amazon.de/exec/obidos/ASIN/".$x."/wwwtutosde-21"; + $url = "http://astore.amazon.de/wwwtutosde-21/detail/".$x; + } else { + $url = "http://www.amazon.de/gp/search?keywords=".$x."&index=books&tag=wwwtutosde-21"; + } + # $url = "http://search.barnesandnoble.com/booksearch/isbninquiry.asp?ISBN=".$x; + $r = "<a href=\"". $url ."\" target=\"map\">". $arg ."</a>"; + return $r; } - $x = trim($arg); - $x = preg_replace("<ISBN >","",$x); - $x = preg_replace("<isbn >","",$x); - $x = preg_replace("<->","",$x); - # Alternatives -# $url = "http://www.amazon.com/exec/obidos/ASIN/".$x."/tutos-20"; - if (strlen($x) == 10) { - $url = "http://www.amazon.de/exec/obidos/ASIN/".$x."/wwwtutosde-21"; - $url = "http://astore.amazon.de/wwwtutosde-21/detail/".$x; - } else { - $url = "http://www.amazon.de/gp/search?keywords=".$x."&index=books&tag=wwwtutosde-21"; - } -# $url = "http://search.barnesandnoble.com/booksearch/isbninquiry.asp?ISBN=".$x; - $r = "<a href=\"". $url ."\" target=\"map\">". $arg ."</a>"; - return $r; - } /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { return true; } } -?> +?> \ No newline at end of file Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/layout/new2_layout.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -516,7 +516,7 @@ $x = htmlentities(delUrlParameter($x,"lg")); // Skip this as some browsers will call all alternatives // foreach($lang['lang'] as $i => $f) { - // echo " <link rel=\"Alternate\" href=\"". addUrlParaMeter($x,"lg=".$i) ."\" title=\"". myentities($lang['UserLanguage'] .": ".$f) ."\"". $c ."\n"; + // $r .= ' <link rel="alternate" hreflang="'.$i.'" href="'. addUrlParaMeter($x,"lg=".$i) .'"'. $c; // } $r .= $this->add_js_links_head(); Modified: trunk/php/oanda/oanda.pinc =================================================================== --- trunk/php/oanda/oanda.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/oanda/oanda.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2003 - 2011 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 @@ -9,6 +9,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to oanda currency converter service @@ -17,7 +18,7 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $tutos,$lang,$current_user; if (empty($arg)) { @@ -53,13 +54,14 @@ return '<span class="handler"> [<a target="map" href="'. $url ."\">oanda</a>]</span>"; } } + /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { // allways delivers something return true; } - } +} ?> \ No newline at end of file Modified: trunk/php/permission.p3 =================================================================== --- trunk/php/permission.p3 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/permission.p3 2013-05-21 09:30:33 UTC (rev 1067) @@ -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 @@ -42,7 +42,7 @@ if ($add == '') return $msg; $msg = trim($msg); if ($msg != '') - return $msg.'<br />'.$add; + return $msg."<br />\n".$add; return $add; } Modified: trunk/php/sms/README =================================================================== --- trunk/php/sms/README 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/sms/README 2013-05-21 09:30:33 UTC (rev 1067) @@ -8,10 +8,18 @@ $tutos[handler]['phone']['sms'] = 'sms/sms.pinc'; -Check the smsmail parameter in config.php if you have a mail 2 sms gateway +Add the smsmail parameter to config.php if you have a mail 2 sms gateway +-------------add this to cponfig.php ----------------------- +// +// SMS Mail +// if you have a Mail2SMS Gateway enter the mail address below +// @NR@ will be replaced with the phone number +// You have to install the HDL_sms package to use this +// disable this by setting to empty string +$tutos[smsmail] = 'sms@NR@@tutos.org'; +------------------------------------------------------------ - If this handler fails to realize your mobile phone numbers please have a look in the sms.pinc file. Modified: trunk/php/sms/sms.pinc =================================================================== --- trunk/php/sms/sms.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/sms/sms.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?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 @@ -9,6 +9,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to a sms sending page @@ -17,7 +18,7 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $current_user,$lang,$tutos; if (empty($arg)) { @@ -74,7 +75,7 @@ /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { global $current_user; if ( ! $current_user->feature_ok(usesms,PERM_SEE) ) { @@ -82,5 +83,5 @@ } return true; } - } +} ?> \ No newline at end of file Modified: trunk/php/subversion/revision.pinc =================================================================== --- trunk/php/subversion/revision.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/subversion/revision.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -73,7 +73,7 @@ /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { if (is_numeric($arg)) return true; return false; } Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/webelements.p3 2013-05-21 09:30:33 UTC (rev 1067) @@ -579,7 +579,9 @@ if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ) { $r .= "Language:\t". $_SERVER["HTTP_ACCEPT_LANGUAGE"] ."\n"; } - $r .= "URL:\t\t". $_SERVER["PHP_SELF"] ."\n"; + if (isset($_SERVER["PHP_SELF"])) { + $r .= "URL:\t\t". $_SERVER["PHP_SELF"] ."\n"; + } if (isset($_SERVER["REQUEST_URI"])) { $r .= "Request:\t". $_SERVER["REQUEST_URI"] ."\n"; } Modified: trunk/php/yahoo/yahoo_currency_converter.pinc =================================================================== --- trunk/php/yahoo/yahoo_currency_converter.pinc 2013-05-21 07:28:04 UTC (rev 1066) +++ trunk/php/yahoo/yahoo_currency_converter.pinc 2013-05-21 09:30:33 UTC (rev 1067) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2003 - 2011 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 @@ -9,6 +9,7 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; /** * link to oanda currency converter service @@ -17,7 +18,7 @@ /** * run the handler */ - function handle(&$obj,$arg,$cnt) { + function handle($obj,$arg,$cnt) { global $tutos,$lang,$current_user; if (empty($arg)) { @@ -74,10 +75,10 @@ /** * check if all is ok */ - function check(&$obj,$arg) { + function check($obj,$arg) { // allways delivers something return true; } - } +} ?> \ 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-05-21 07:28:15
|
Revision: 1066 http://sourceforge.net/p/tutos/code/1066 Author: gokohnert Date: 2013-05-21 07:28:04 +0000 (Tue, 21 May 2013) Log Message: ----------- write acl at once Modified Paths: -------------- trunk/php/acl.pinc trunk/php/acl_ins.php trunk/php/base.pinc trunk/php/scrum/scrum.pinc trunk/php/testmanager/testrun_new.php Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2013-05-19 14:12:59 UTC (rev 1065) +++ trunk/php/acl.pinc 2013-05-21 07:28:04 UTC (rev 1066) @@ -20,16 +20,6 @@ define ('ACLSHIFT',14); /** - * remove permissions for a given feature - */ -function feature_unset(array &$acl,$feature) { - foreach ($acl as $i => $f) { - if ($i != $feature) continue; - unset($acl[$i]); - } -} - -/** * set the default rights * adr = current_user or so * obj = the object that will get the default rights @@ -97,9 +87,7 @@ $obj->acl_read = true; $obj->acl_write = false; - if ($obj->noacl) return; - - if ( $obj->gettype() == "user" ) { + if ( $obj->gettypeid() == useuser ) { $id = $obj->uid; } else { $id = $obj->id; @@ -209,7 +197,7 @@ if ( $id < 0 ) return; if (!$obj->acl_write) { - // dterror_log('no need to save acl data for: '.$obj."\r\n",3,$tutos[errlog]); + dterror_log('no need to save acl data for: '.$obj.' '.print_r($obj->acl,true)."\r\n",3,$tutos[errlog]); return; } else { // dterror_log('save acl data for: '.$obj."\r\n",3,$tutos[errlog]); @@ -226,26 +214,36 @@ if ($obj->noacl) return; + $q = 'INSERT INTO '. $obj->dbconn->prefix.$table['acl'][name].' (obj_id,adr_id,perm) VALUES '; + $pre = ''; if ( isset($obj->acl[0]) && (count($obj->acl[0]) > 0) ) { foreach ($obj->acl[0] as $i => $f) { if ( ($i != -1) && (gettype($i) == "integer") && ($f > 0) ) { - $q = 'INSERT INTO '. $obj->dbconn->prefix.$table['acl'][name].' (obj_id,adr_id,perm) VALUES ('. $id .','. $i .','. $f .')'; - $r2 = $obj->dbconn->Exec($q); - $r2->free(); + $q .= $pre.'('. $id .','. $i .','. $f .')'; + $pre = ','; } } } + if ($pre != '') { + $r2 = $obj->dbconn->Exec($q); + $r2->free(); + } if (is_array($obj->acl)) { foreach ($obj->acl as $i1 => $f1) { if ($i1 == 0) continue; + $q = 'INSERT INTO '. $obj->dbconn->prefix.$table['aclf'][name].' (obj_id,adr_id,perm,feature) VALUES '; + $pre = ''; foreach ($obj->acl[$i1] as $i => $f) { if ( (gettype($i) == "integer") && ($f > 0) ) { - $q = 'INSERT INTO '. $obj->dbconn->prefix.$table['aclf'][name].' (obj_id,adr_id,perm,feature) VALUES ('. $id .','. $i .','. $f .','.$i1.')'; - $r2 = $obj->dbconn->Exec($q); - $r2->free(); + $q .= $pre.'('. $id .','. $i .','. $f .','.$i1.')'; + $pre = ','; } } + if ($pre != '') { + $r2 = $obj->dbconn->Exec($q); + $r2->free(); + } } } if($tutos['use_memcache']) { Modified: trunk/php/acl_ins.php =================================================================== --- trunk/php/acl_ins.php 2013-05-19 14:12:59 UTC (rev 1065) +++ trunk/php/acl_ins.php 2013-05-21 07:28:04 UTC (rev 1066) @@ -115,6 +115,9 @@ if ( isset($_POST['feature']) ) { $feature = $_POST['feature']; + if (!is_numeric($feature)) { + $msg = addLine($msg, 'Unknown feature'); + } foreach ($tutos[modules] as $m => $ma) { if (isset($ma['perm']) && $ma['perm'] == $feature ) { $ma['id'] = $m; @@ -129,75 +132,93 @@ $dbconn->Begin("WORK"); foreach (array_reverse($obj) as $val) { if ( ! $keep ) { - feature_unset($val->acl, $feature); + $val->acl_feature_unset($feature); } if ( isset($_POST['N']) ) { // set the read ok feature bit foreach ( $_POST['N'] as $f ) { - acl_raise_bit($val, $f, $feature, PERM_NEW); + $val->acl_raise_bit($f, $feature, PERM_NEW); } } if ( isset($_POST['R']) ) { // set the read ok feature bit foreach ( $_POST['R'] as $f ) { - acl_raise_bit($val, $f, $feature, PERM_SEE); + $val->acl_raise_bit($f, $feature, PERM_SEE); } } if ( isset($_POST['r']) ) { foreach ( $_POST['r'] as $f ) { - acl_raise($val, $f, $tutos[seeok]); + $val->acl_raise($f, $tutos[seeok]); } } if ( isset($_POST['u']) ) { foreach ( $_POST['u'] as $f ) { - acl_raise($val, $f, $tutos[useok]); + $val->acl_raise($f, $tutos[useok]); } } if ( isset($_POST['m']) ) { foreach ( $_POST['m'] as $f ) { - acl_raise($val, $f, $tutos[modok]); + $val->acl_raise($f, $tutos[modok]); } } if ( isset($_POST['d']) ) { foreach ( $_POST['d'] as $f ) { - acl_raise($val, $f, $tutos[delok]); + $val->acl_raise($f, $tutos[delok]); } } // check for named additions (ajax selected) "add_r" "add_u" ... if (isset($_POST['add_rid'])) { - acl_raise($val, $_POST['add_rid'], $tutos[seeok]); + $val->acl_raise($_POST['add_rid'], $tutos[seeok]); } else if (isset($_POST['add_rfn'])) { $m = check_field($_POST['add_rfn'], 'add_rfn', 'add_rl', 'at'); if ( is_object($m) ) { - acl_raise($val, $m->ida, $tutos[seeok]); + $val->acl_raise($m->ida, $tutos[seeok]); } } if (isset($_POST['add_uid'])) { - acl_raise($val, $_POST['add_uid'], $tutos[useok]); + $val->acl_raise($_POST['add_uid'], $tutos[useok]); } else if (isset($_POST['add_ufn'])) { $m = check_field($_POST['add_ufn'], 'add_ufn', 'add_ul', 'at'); if ( is_object($m) ) { - acl_raise($val, $m->ida, $tutos[useok]); + $val->acl_raise($m->ida, $tutos[useok]); } } if (isset($_POST['add_mid'])) { - acl_raise($val, $_POST['add_mid'], $tutos[modok]); + $val->acl_raise($_POST['add_mid'], $tutos[modok]); } else if (isset($_POST['add_mfn'])) { $m = check_field($_POST['add_mfn'], 'add_mfn', 'add_ml', 'at'); if ( is_object($m) ) { - acl_raise($val, $m->ida, $tutos[modok]); + $val->acl_raise($m->ida, $tutos[modok]); } } if (isset($_POST['add_did'])) { - acl_raise($val, $_POST['add_did'], $tutos[delok]); + $val->acl_raise($_POST['add_did'], $tutos[delok]); } else if (isset($_POST['add_dfn'])) { $m = check_field($_POST['add_dfn'], 'add_dfn', 'add_dl', 'at'); if ( is_object($m) ) { - acl_raise($val, $m->ida, $tutos[delok]); + $val->acl_raise($m->ida, $tutos[delok]); } } + // FEATURE + if (isset($_POST['add_Rid'])) { + $val->acl_raise_bit($_POST['add_Rid'], $feature, PERM_SEE); + } else if (isset($_POST['add_Rfn'])) { + $m = check_field($_POST['add_Rfn'], 'add_Rfn', 'add_Rl', 'at'); + if ( is_object($m) ) { + $val->acl_raise_bit($m->ida, $feature, PERM_SEE); + } + } + if (isset($_POST['add_Nid'])) { + $val->acl_raise_bit($_POST['add_Nid'], $feature, PERM_NEW); + } else if (isset($_POST['add_Nfn'])) { + $m = check_field($_POST['add_Nfn'], 'add_Nfn', 'add_Nl', 'at'); + if ( is_object($m) ) { + $val->acl_raise_bit($m->ida, $feature, PERM_NEW); + } + } + // per object config if ($feature != 0) { $x = $feature_info[name]; Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2013-05-19 14:12:59 UTC (rev 1065) +++ trunk/php/base.pinc 2013-05-21 07:28:04 UTC (rev 1066) @@ -579,6 +579,13 @@ } /** + * raise a feature bit + */ + Function acl_raise_bit($adr_id,$feature,$value) { + return acl_raise_bit($this,$adr_id,$feature,$value); + } + + /** * set permissions */ function acl_set($id, $perm) { @@ -610,6 +617,16 @@ } /** + * remove permissions for a given feature + */ + function acl_feature_unset($feature) { + if (isset($this->acl[$feature])) { + unset($this->acl[$feature]); + $this->acl_write = true; + } + } + + /** * check if a given feature is available for * the given user on this object * Modified: trunk/php/scrum/scrum.pinc =================================================================== --- trunk/php/scrum/scrum.pinc 2013-05-19 14:12:59 UTC (rev 1065) +++ trunk/php/scrum/scrum.pinc 2013-05-21 07:28:04 UTC (rev 1066) @@ -242,7 +242,7 @@ $r = $this->setIntField('state',$value,'ScrumLogState'); if ($r) { - feature_unset($this->acl,usetimetrack); + $this->acl_feature_unset(usetimetrack); // handle permissions if (($value == SCRUMLOGSTATE_DONE) || ($value == SCRUMLOGSTATE_MISSED)) acl_raise_bit($this,NOBODY,usetimetrack,PERM_NEW); Modified: trunk/php/testmanager/testrun_new.php =================================================================== --- trunk/php/testmanager/testrun_new.php 2013-05-19 14:12:59 UTC (rev 1065) +++ trunk/php/testmanager/testrun_new.php 2013-05-21 07:28:04 UTC (rev 1066) @@ -225,7 +225,7 @@ if ($this->mode == 'run') { $this->name = $lang['TestrunRun']; if(!$this->obj->use_ok()) { - $msg = addLine($msg,sprintf($lang['Err0001'],$lang[$this->obj->getType()])); + $msg = addLine($msg,sprintf($lang['Err0001'],$lang[$this->obj->getType()],$this->obj->getFullName())); $this->stop = true; return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-19 14:13:02
|
Revision: 1065 http://sourceforge.net/p/tutos/code/1065 Author: gokohnert Date: 2013-05-19 14:12:59 +0000 (Sun, 19 May 2013) Log Message: ----------- more check Modified Paths: -------------- trunk/php/graphs.pinc Modified: trunk/php/graphs.pinc =================================================================== --- trunk/php/graphs.pinc 2013-05-19 08:41:13 UTC (rev 1064) +++ trunk/php/graphs.pinc 2013-05-19 14:12:59 UTC (rev 1065) @@ -38,15 +38,17 @@ $colors1 = ''; $colors2 = ''; $pre = ''; - foreach($a['data'] as $e) { - $data.= $pre.'['; - $data .= '"'.addslashes($e['title']).' ('.$e['val'].')'; - $data .= '",'.$e['cnt']; - $data.= ']'; - if (isset($e['color'])) { - $colors1 .= $pre.'"'.$e['color'].'"'; + if (isset($a['data'])) { + foreach($a['data'] as $e) { + $data.= $pre.'['; + $data .= '"'.addslashes($e['title']).' ('.$e['val'].')'; + $data .= '",'.$e['cnt']; + $data.= ']'; + if (isset($e['color'])) { + $colors1 .= $pre.'"'.$e['color'].'"'; + } + $pre = ','; } - $pre = ','; } $data.= ']'; if ($colors1 != "") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-19 08:41:15
|
Revision: 1064 http://sourceforge.net/p/tutos/code/1064 Author: gokohnert Date: 2013-05-19 08:41:13 +0000 (Sun, 19 May 2013) Log Message: ----------- smaller graph Modified Paths: -------------- trunk/php/graphs.pinc Modified: trunk/php/graphs.pinc =================================================================== --- trunk/php/graphs.pinc 2013-05-19 08:18:44 UTC (rev 1063) +++ trunk/php/graphs.pinc 2013-05-19 08:41:13 UTC (rev 1064) @@ -291,7 +291,7 @@ $tutos['js_to_load'][] = '/html/js/plugins/jqplot.pointLabels.min.js'; $tutos['js_to_load'][] = '/html/js/plugins/jqplot.categoryAxisRenderer.min.js'; $tutos['css_to_load'][] = '/html/css/jquery.jqplot.min.css'; - $r .= '<div id="line'.$id.'" style="height:'.(GB_HEIGHT*1.5).'px;width:'.(GB_WIDTH*1.5).'px; "></div>'; + $r .= '<div id="line'.$id.'" style="height:'.(GB_HEIGHT*1.5).'px;width:'.(GB_WIDTH*1).'px; "></div>'; $options = " title:'".$a['title']."'"; $data = '['; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-19 08:18:47
|
Revision: 1063 http://sourceforge.net/p/tutos/code/1063 Author: gokohnert Date: 2013-05-19 08:18:44 +0000 (Sun, 19 May 2013) Log Message: ----------- fix wrong formatting/parsing of negative hh:mm times Modified Paths: -------------- trunk/html/js/tutos.js trunk/php/Date.pinc trunk/php/webelements.p3 Modified: trunk/html/js/tutos.js =================================================================== --- trunk/html/js/tutos.js 2013-05-18 14:36:11 UTC (rev 1062) +++ trunk/html/js/tutos.js 2013-05-19 08:18:44 UTC (rev 1063) @@ -158,7 +158,7 @@ /** * check input while typing */ - var RE_TIMEVOL_1 = /^[0-9]*:[0-9]{1,2}$/; + var RE_TIMEVOL_1 = /^[+-]{0,1}[0-9]*:[0-9]{1,2}$/; var RE_FLOAT_1 = /^[+]{0,1}([0-9]+|[0-9]*,[0-9]*)*$/; var RE_FLOAT_2 = /^[+]{0,1}([0-9]+|[0-9]*.[0-9]*)*$/; var RE_FLOAT_3 = /^[+-]{0,1}([0-9]+|[0-9]*,[0-9]*)*$/; Modified: trunk/php/Date.pinc =================================================================== --- trunk/php/Date.pinc 2013-05-18 14:36:11 UTC (rev 1062) +++ trunk/php/Date.pinc 2013-05-19 08:18:44 UTC (rev 1063) @@ -18,10 +18,12 @@ */ function hour_format($hours) { if ( ! is_numeric($hours) ) return; + $neg = ($hours < 0); + $hours = abs($hours); $hours = round($hours,3); $h = floor($hours); $m = 60.0 * ($hours - $h); - return $h .":".sprintf("%02.0f",$m); + return ($neg ? '-':'').$h .":".sprintf("%02.0f",$m); } /** @@ -152,7 +154,7 @@ $day = Date("d-m",$t); $day2 = Date("d-m-Y",$t); -# We need the easter date for some calculation + // We need the easter date for some calculation $J = Date("Y",$t); $a = $J % 19; $b = $J % 4; @@ -656,9 +658,9 @@ if ( $this->checkDMY() == false) { $this->setNoTime(); } -# settype($this->day,"integer"); -# settype($this->month,"integer"); -# settype($this->year,"integer"); + # settype($this->day,"integer"); + # settype($this->month,"integer"); + # settype($this->year,"integer"); $this->ts_def = $this->ts; if ( ($current_user->offset != 0) && ($notz == 0) ) { @@ -701,7 +703,7 @@ * */ function setDateTime($str,$notz = 0) { - global $current_user , $tutos, $message; + global $current_user , $tutos; if ( ! isset ($str) ) return; if ( empty ($str) ) return; @@ -818,9 +820,8 @@ $this->format = 17; } else { - echo ( "<br />DT: Unknown DateTimeFormat <span class=\"warn\">". $str ."</span> fix it in Date.pinc or register a DB specific format<br />"); + dterror_log ("DT: Unknown DateTimeFormat ". $str ." fix it in Date.pinc or register a DB specific format\n",3,$tutos[errlog]); $this->setNoTime(); -# FATAL_Error('DT:',$str); return; } @@ -1313,8 +1314,7 @@ $diff = $y - $x; return ';VALUE=DATE-TIME:'.strftime("%Y%m%dT%H%M%SZ",$x - $diff); - -# return sprintf ("%04d%02d%02dT%02d%02d%02dZ",$this->year,$this->month,$this->day,$this->hour,$this->min,$this->sec); + // return sprintf ("%04d%02d%02dT%02d%02d%02dZ",$this->year,$this->month,$this->day,$this->hour,$this->min,$this->sec); } function lessthan( &$DateObj ) { Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-05-18 14:36:11 UTC (rev 1062) +++ trunk/php/webelements.p3 2013-05-19 08:18:44 UTC (rev 1063) @@ -1352,8 +1352,12 @@ if ($allowempty && empty($value)) { return true; } - if ( preg_match( "#^([0-9]*):([0-5][0-9])$#im", $value, $regs )) { - $value = ($regs[1] * 60 + $regs[2]) / 60; + if ( preg_match( "#^([+-]{0,1}[0-9]*):([0-5][0-9])$#im", $value, $regs )) { + $neg = ($regs[1] < 0); + $value = (abs($regs[1]) * 60 + $regs[2]) / 60; + if ($neg) { + $value = -1 * $value; + } return true; } return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-18 14:36:20
|
Revision: 1062 http://sourceforge.net/p/tutos/code/1062 Author: gokohnert Date: 2013-05-18 14:36:11 +0000 (Sat, 18 May 2013) Log Message: ----------- acl handling in base class / sorting of teammembers / cleanups and typos Modified Paths: -------------- trunk/Makefile trunk/php/acl.pinc trunk/php/acl_new.php trunk/php/address.pinc trunk/php/appointment.pinc trunk/php/base.pinc trunk/php/bugtracking/bug.pinc trunk/php/checklist/checkfield.pinc trunk/php/checklist/checklist.pinc trunk/php/company.pinc trunk/php/config_default.pinc trunk/php/database.pinc trunk/php/db/db.pinc trunk/php/department.pinc trunk/php/doctracker/doctracker.pinc trunk/php/expense/expense.pinc trunk/php/file/file.pinc trunk/php/google_api/gapi_init.php trunk/php/group/group.pinc trunk/php/history_show.php trunk/php/installation/installation.pinc trunk/php/invoice/invoice.pinc trunk/php/layout/theme_blue.pinc trunk/php/layout/theme_white.pinc trunk/php/location.pinc trunk/php/login.pinc trunk/php/mailbox/mailbox.pinc trunk/php/module_template/AAA.pinc trunk/php/module_template/AAA_overview.php trunk/php/note/note.pinc trunk/php/permission.p3 trunk/php/product.pinc trunk/php/rate/rate.pinc trunk/php/reminder/reminder.pinc trunk/php/report-engine/report_show.php trunk/php/resource/resource.pinc trunk/php/rss/rss.pinc trunk/php/rss/rss_ins.php trunk/php/scrum/scrum.pinc trunk/php/scrum/sprint_show.php trunk/php/stc/stc.pinc trunk/php/stuff/stuff.pinc trunk/php/subversion/svn.pinc trunk/php/subversion/svn_new.php trunk/php/team.pinc trunk/php/team_new.php trunk/php/testmanager/testcase_new.php trunk/php/testmanager/testcase_show.php trunk/php/testmanager/testmanager.pinc trunk/php/testmanager/testrun_overview.php trunk/php/timetrack/timetrack.pinc trunk/php/url/url.pinc trunk/php/user.pinc trunk/test.sh trunk/upload.sh Added Paths: ----------- trunk/html/white/ trunk/html/white/delete.gif Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/Makefile 2013-05-18 14:36:11 UTC (rev 1062) @@ -44,6 +44,8 @@ $(PHP_RES_HLP) \ $(PHP_TT) \ $(PHP_TT_HLP) \ + $(PHP_EXPENSE) \ + $(PHP_EXPENSE_HLP) \ $(PHP_FILE) \ $(PHP_FILE_HLP) \ $(PHP_WATCH) \ @@ -66,8 +68,6 @@ $(PHP_COUNTER) \ $(PHP_COUNTER_HLP) \ $(PHP_REPORT_ALL) \ - $(PHP_EXPENSE) \ - $(PHP_EXPENSE_HLP) \ $(HDL_EMAIL) \ $(LIBS_BASE) \ $(LIBS_EXCEL) \ @@ -79,6 +79,27 @@ $(LIBS_PHPBARCODE) \ $(LIBS_GOOGLE) +PHP_MODS = \ + $(PHP_CHECKLIST) \ + $(PHP_CHECKLIST_HLP) \ + $(PHP_DOCTRACKER) \ + $(PHP_DOCTRACKER_HLP) \ + $(PHP_LDAP) \ + $(PHP_LDAP_HLP) \ + ${PHP_RSS} \ + ${PHP_RSS_HLP} \ + $(PHP_SCRUM) \ + $(PHP_SCRUM_HLP) \ + $(PHP_STUFF) \ + $(PHP_STUFF_HLP) \ + $(PHP_SUBVERSION) \ + $(PHP_SUBVERSION_HLP) \ + $(PHP_SUBVERSION_TPL) \ + $(PHP_TESTMANAGER) \ + $(PHP_TESTMANAGER_HLP) \ + $(PHP_TICKER) \ + $(PHP_TICKER_HLP) + SUBDIRS = localization admin bugtracking checklist counter doctracker expense file group installation invoice ldap mailbox module_template note palm phpweather rate reminder report-engine resource rss scrum subversion stc stuff timetrack testmanager ticker url watchlist xml PHP_TOP = $(wildcard php/*.php) \ @@ -114,6 +135,15 @@ php/bugtracking/templates/README \ $(wildcard php/bugtracking/templates/*.proto.*) +# Checklist Module (add-on) +PHP_CHECKLIST = $(wildcard php/checklist/*.php) \ + php/checklist/README \ + php/checklist/.htaccess \ + $(wildcard php/checklist/*.p3) \ + $(wildcard php/checklist/*.pinc) +PHP_CHECKLIST_HLP = php/checklist/help/.htaccess \ + $(wildcard php/checklist/help/*.html) + # Counter Module PHP_COUNTER = $(wildcard php/counter/*.php) \ php/counter/.htaccess \ @@ -123,6 +153,36 @@ PHP_COUNTER_HLP = php/counter/help/.htaccess \ $(wildcard php/counter/help/*.html) +# Doctracker Module (add-on) +PHP_DOCTRACKER = $(wildcard php/doctracker/*.php) \ + $(wildcard php/doctracker/*.p3) \ + $(wildcard php/doctracker/*.pinc) \ + $(wildcard php/report-engine/rep_doccheck/*php) \ + $(wildcard php/report-engine/rep_doccheck/*pinc) \ + $(wildcard php/report-engine/rep_doccheck/*p3) \ + php/doctracker/.htaccess \ + php/doctracker/README +PHP_DOCTRACKER_HLP = + +# Drawboard Module (add-on) +PHP_DRAWBOARD = $(wildcard php/drawboard/*.php) \ + $(wildcard php/drawboard/*.p3) \ + $(wildcard php/drawboard/*.pinc) \ + php/drawboard/.htaccess \ + php/drawboard/README \ + libs/drawboard/TUTOS-README \ + libs/drawboard/runserver.sh +PHP_DRAWBOARD_HLP = + +# Expense Module +PHP_EXPENSE = $(wildcard php/expense/*.php) \ + $(wildcard php/expense/*.p3) \ + $(wildcard php/expense/*.pinc) \ + php/expense/.htaccess \ + php/expense/README +PHP_EXPENSE_HLP = \ + php/expense/help/.htaccess + # Docmanagement Module PHP_FILE = $(wildcard php/file/*.php) \ php/file/.htaccess \ @@ -161,6 +221,15 @@ $(wildcard php/layout/*.p3) \ $(wildcard php/layout/*.pinc) +# LDAP Module (add-on) +PHP_LDAP = $(wildcard php/ldap/*.php) \ + php/ldap/README \ + php/ldap/.htaccess \ + $(wildcard php/ldap/*.p3) \ + $(wildcard php/ldap/*.pinc) +PHP_LDAP_HLP = php/ldap/help/.htaccess \ + $(wildcard php/ldap/help/*.html) + # Mailbox Module PHP_MBOX = $(wildcard php/mailbox/*.php) \ php/mailbox/.htaccess \ @@ -207,6 +276,15 @@ PHP_RATE_HLP = $(wildcard php/rate/help/*.html) \ php/rate/help/.htaccess +# RSS Feed Module (add-on) +PHP_RSS = $(wildcard php/rss/*.php) \ + $(wildcard php/rss/*.p3) \ + $(wildcard php/rss/*.pinc) \ + php/rss/.htaccess \ + php/rss/README +PHP_RSS_HLP = php/rss/help/.htaccess \ + $(wildcard php/rss/help/*.html) + # STC State Transition Control Module PHP_STC = $(wildcard php/stc/*.php) \ php/stc/.htaccess \ @@ -215,6 +293,65 @@ PHP_STC_HLP = php/stc/help/.htaccess \ $(wildcard php/stc/help/*.html) +# Scrum Module (add-on) +PHP_SCRUM = $(wildcard php/scrum/*.php) \ + $(wildcard php/scrum/*.p3) \ + $(wildcard php/scrum/*.pinc) \ + $(wildcard php/scrum/*.js) \ + $(wildcard php/scrum/*.css) \ + php/scrum/.htaccess \ + php/scrum/README +PHP_SCRUM_HLP = php/scrum/help/.htaccess \ + $(wildcard php/scrum/help/*.html) + +# Stuff Module (add-on) +PHP_STUFF = $(wildcard php/stuff/*.php) \ + $(wildcard php/stuff/*.p3) \ + $(wildcard php/stuff/*.pinc) \ + php/stuff/.htaccess \ + php/stuff/README +PHP_STUFF_HLP = php/stuff/help/.htaccess \ + $(wildcard php/stuff/help/*.html) + +# Subversion Module (add-on) +PHP_SUBVERSION = $(wildcard php/subversion/*.php) \ + $(wildcard php/subversion/*.p3) \ + $(wildcard php/subversion/*.pinc) \ + $(wildcard php/report-engine/rep_subversion/*.pinc) \ + $(wildcard php/report-engine/rep_subversion/*.p3) \ + php/report-engine/rep_subversion/config_default.php \ + php/subversion/.htaccess \ + php/subversion/README +PHP_SUBVERSION_HLP = php/subversion/help/.htaccess \ + php/report-engine/rep_subversion/README \ + $(wildcard php/subversion/help/*.html) +PHP_SUBVERSION_TPL = php/subversion/templates/.htaccess \ + php/report-engine/rep_subversion/templates/pre-commit \ + php/report-engine/rep_subversion/templates/post-commit \ + php/report-engine/rep_subversion/templates/%PROJECT%.URL \ + php/subversion/templates/*.proto.en \ + php/subversion/templates/*.proto.de + +# Testmanager Module (add-on) +PHP_TESTMANAGER = $(wildcard php/testmanager/*.php) \ + $(wildcard php/testmanager/*.p3) \ + $(wildcard php/testmanager/*.pinc) \ + php/testmanager/testmanager.js \ + php/testmanager/default.css \ + php/testmanager/.htaccess \ + php/testmanager/README +PHP_TESTMANAGER_HLP = php/testmanager/help/.htaccess \ + $(wildcard php/testmanager/help/*.html) + +# Ticker Module (add-on) +PHP_TICKER = $(wildcard php/ticker/*.php) \ + $(wildcard php/ticker/*.p3) \ + $(wildcard php/ticker/*.pinc) \ + php/ticker/.htaccess \ + php/ticker/README +PHP_TICKER_HLP = php/ticker/help/.htaccess \ + $(wildcard php/ticker/help/*.html) + # Timetrack Module PHP_TT = $(wildcard php/timetrack/*.php) \ php/timetrack/.htaccess \ @@ -335,9 +472,6 @@ LIBS_FREEMIND = \ libs/freemind/TUTOS-README -LIBS_DRAWBOARD = \ - libs/drawboard/TUTOS-README \ - libs/drawboard/runserver.sh LIBS_JPGRAPH = \ libs/jpgraph/TUTOS-README @@ -353,6 +487,7 @@ LANGFILES = \ php/localization/cs.p3 \ php/localization/de.p3 \ + php/localization/de-ch.p3 \ php/localization/el.p3 \ php/localization/en.p3 \ php/localization/en-us.p3 \ @@ -360,8 +495,11 @@ php/localization/es.p3 \ php/localization/es-mx.p3 \ php/localization/es-ni.p3 \ + php/localization/es-ve.p3 \ php/localization/fr.p3 \ + php/localization/hu.p3 \ php/localization/it.p3 \ + php/localization/ja.p3 \ php/localization/ko.p3 \ php/localization/nl.p3 \ php/localization/pl.p3 \ @@ -390,11 +528,7 @@ html/new_layout.css \ html/new2_layout.css \ html/classic_layout.css \ - html/nuke.css \ - html/red.css \ - html/blue.css \ - html/tutos.css \ - html/white.css + html/tutos.css TOPFILES = \ apache.conf \ @@ -409,14 +543,6 @@ shellfunc.sh \ createdb.sh - -THEMEBLUE = \ - $(wildcard html/blue/*gif) \ - $(wildcard html/blue/*png) -THEMERED = \ - $(wildcard html/red/*gif) \ - $(wildcard html/red/*png) - OTHERHP = \ homepage/.htaccess \ homepage/install.html \ @@ -468,8 +594,28 @@ html/js/plugins/jqplot.pieRenderer.min.js \ html/js/plugins/jqplot.pointLabels.min.js \ +THEMEBLUE = \ + html/blue.css \ + $(wildcard html/blue/*gif) \ + $(wildcard html/blue/*png) +THEMEWHITE = \ + html/white.css \ + $(wildcard html/white/*gif) \ + $(wildcard html/white/*png) +THEMERED = \ + html/red.css \ + $(wildcard html/red/*gif) \ + $(wildcard html/red/*png) + +THEMENUKE = README.nuke \ + html/nuke.css \ + $(wildcard html/nuke/*gif) \ + $(wildcard html/nuke/*png) + + OTHERH= $(TEMPLATES) \ $(THEMEBLUE) \ + $(THEMEWHITE) \ $(THEMENUKE) \ $(THEMERED) \ $(HTMLPICS) \ @@ -547,37 +693,6 @@ $(OTHERH) \ $(OTHERHP) -# -# Extrafiles (not part of the release but we need to know about) -# -EXTRAFILES = \ - ${THEMESQLI} \ - ${THEMEVISUAL} \ - ${LANG_CA} \ - ${LANG_HU} \ - ${LANG_JA} \ - ${LANG_PT} \ - ${LANG_ES-VE} \ - ${PHP_CHECKLIST} \ - ${PHP_CHECKLIST_HLP} \ - ${PHP_DRAWBOARD} \ - ${PHP_DRAWBOARD_HLP} \ - ${PHP_PALM} \ - ${PHP_PALM_HLP} \ - ${PHP_RSS} \ - ${PHP_RSS_HLP} \ - ${PHP_TICKER} \ - ${PHP_TICKER_HLP} \ - ${PHP_REQ} \ - ${PHP_RISK} \ - ${HDL_CIA} \ - ${HDL_MAP} \ - ${HDL_FAX} \ - ${HDL_SMS} \ - ${HDL_WEATHER} \ - ${HDL_SIPGATE} \ - ${HDL_ISBN} - # Edited for Debian GNU/Linux. DESTDIR = @@ -587,7 +702,6 @@ TARGETDIR = $(DESTDIR)$(REALPATH) UPLOADDIR = $(DESTDIR)$(REPOSITORY) -PERL = $(shell which perl) INSTALL = $(shell which install) SED = $(shell which sed) CHMOD = $(shell which chmod) @@ -602,7 +716,7 @@ HOST = $(shell hostname) INSTALLARGS = -.PHONY: all clean distclean tutos.spec apache.conf +.PHONY: all clean tutos.spec apache.conf .SUFFIXES: .sig .sgml .spec .conf @@ -629,9 +743,6 @@ -@$(RM) -f l.* *.list -@$(FIND) . -type f -name "*~" | $(XARGS) $(RM) -f -distclean: clean - -$(RM) config.log config.status config.cache apache.conf - # # Update the config.pinc with the Release Date # @@ -648,12 +759,6 @@ @$(CHMOD) 777 tutos_private/repository @$(CHMOD) 777 tutos_private/session # -# create a backup file with all neccessary files -# -backup: ${PHP} ${LANGFILES} ${OTHER} ${OTHERJ} ${HOMEP} ${HELP} ${EXTRAFILES} - tar cvjf tutos-all.tar.bz2 ${PHP} ${OTHER} ${OTHERJ} ${HOMEP} ${HELP} ${LANGFILES} ${EXTRAFILES} do-it - -# # PHP Release # # php.list: ${PHP} ${LANGFILES} ${OTHER} ${HELP} updateconfig @@ -664,7 +769,7 @@ @$(foreach d,${PHP} ${LANGFILES} ${OTHER} ${HELP}, \ echo $(d) >> tmp.$@; \ ) - @cat tmp.$@ | grep -v "custom.p3" | grep -v "ja.p3" | grep -v "pt.p3" | grep -v "hu.p3" | grep -v "ca.p3"| grep -v "es-ve.p3" | grep -v "php/config.pinc" | grep -v "php/config.php" | grep -v "table_custom.pinc" | grep -v "php/hooks.php" | grep -v "php/test.*.php" | sort -u > $@ + @cat tmp.$@ | grep -v "custom.p3" | grep -v "php/config.pinc" | grep -v "php/config.php" | grep -v "table_custom.pinc" | grep -v "php/hooks.php" | grep -v "php/test.*.php" | sort -u > $@ download-php: php.list additional @tar -T php.list --no-recursion -cjf TUTOS-php-${FULLVERSION}.tar.bz2 @@ -709,6 +814,19 @@ wget -O ${TESTPATH}/test3.html "http://${HOST}/tutos-test/php/admin/scheme.php?id=0&step=3" # +# install +# +install: updateconfig + @$(RM) -f tmp.$@ + @$(TOUCH) tmp.$@ + @$(foreach d,${PHP} ${LANGFILES} ${OTHER} ${HELP} , \ + echo $(DESTDIR)/usr/share/tutos/$(d) >> tmp.$@; \ + ) + @$(foreach d,${PHP_MODS} ${HDL_CIA} ${HDL_MAP} ${HDL_FAX} ${HDL_SMS} ${HDL_WEATHER} ${HDL_SIPGATE} ${HDL_ISBN}, \ + echo $(DESTDIR)/usr/share/tutos/$(d) >> tmp.$@; \ + ) + +# # RPM Release # rpm-php: tutos.spec download-php @@ -719,7 +837,7 @@ # # Check the CSS files for missing definitions # -cssdiff: ${CSSFILES} +cssdiff: cat html/tutos.css | egrep "{" > css.tutos cat html/blue.css | egrep "{" > css.blue cat html/red.css | egrep "{" > css.red @@ -780,24 +898,19 @@ # # additional: \ - catalan.zip \ - checklist.zip \ - doctracker.zip \ - drawboard.zip \ - hungarian.zip \ - japanese.zip \ - ldap.zip \ mod_template.zip \ - portuguese.zip \ - rssfeed.zip \ - scrum.zip \ - stuff.zip \ sqli.zip \ - subversion.zip \ - testmanager.zip \ - ticker.zip \ - venezuela.zip \ visual.zip \ + checklist \ + doctracker \ + drawboard \ + ldap \ + rss \ + scrum \ + stuff \ + subversion \ + testmanager \ + ticker \ HDL_cia_factbook.zip \ HDL_google_earth.zip \ HDL_fax.zip \ @@ -813,129 +926,15 @@ # palm.zip \ # -THEMENUKE = README.nuke \ - html/nuke.css \ - $(wildcard html/nuke/*gif) \ - $(wildcard html/nuke/*png) - # # -# MODULE Creation +# MODULE Creation (add-on) # # -# Checklist Module (nonstandard , need extra download) -PHP_CHECKLIST = $(wildcard php/checklist/*.php) \ - php/checklist/README \ - php/checklist/.htaccess \ - $(wildcard php/checklist/help/*.html) \ - $(wildcard php/checklist/*.p3) \ - $(wildcard php/checklist/*.pinc) -PHP_CHECKLIST_HLP = php/checklist/help/.htaccess \ - $(wildcard php/checklist/help/*.html) -checklist.zip: $(PHP_CHECKLIST) $(PHP_CHECKLIST_HLP) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f checklist.list - @$(TOUCH) checklist.list - @$(foreach d,$(PHP_CHECKLIST), \ - echo $(d) >> checklist.list; \ - ) - @$(foreach d,$(PHP_CHECKLIST_HLP), \ - echo $(d) >> checklist.list; \ - ) - cat checklist.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) checklist.zip TUTOS-MODULE-checklist-${FULLVERSION}.zip - -# Doctracker Module (nonstandard , need extra download) -PHP_DOCTRACKER = $(wildcard php/doctracker/*.php) \ - $(wildcard php/doctracker/*.p3) \ - $(wildcard php/doctracker/*.pinc) \ - $(wildcard php/report-engine/rep_doccheck/*php) \ - $(wildcard php/report-engine/rep_doccheck/*pinc) \ - $(wildcard php/report-engine/rep_doccheck/*p3) \ - php/doctracker/.htaccess \ - php/doctracker/README -PHP_DOCTRACKER_HLP = - -doctracker.zip: $(PHP_DOCTRACKER) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f doctracker.list - @$(TOUCH) doctracker.list - @$(foreach d,$(PHP_DOCTRACKER), \ - echo $(d) >> doctracker.list; \ - ) - cat doctracker.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < php/doctracker/README - @$(MV) doctracker.zip TUTOS-MODULE-doctracker-${FULLVERSION}.zip - -# Drawboard Module (nonstandard , need extra download) -PHP_DRAWBOARD = $(wildcard php/drawboard/*.php) \ - $(wildcard php/drawboard/*.p3) \ - $(wildcard php/drawboard/*.pinc) \ - php/drawboard/.htaccess \ - php/drawboard/README \ - $(LIBS_DRAWBOARD) -PHP_DRAWBOARD_HLP = - -drawboard.zip: $(PHP_DRAWBOARD) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f drawboard.list - @$(TOUCH) drawboard.list - @$(foreach d,$(PHP_DRAWBOARD), \ - echo $(d) >> drawboard.list; \ - ) - cat drawboard.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < php/drawboard/README - @$(MV) drawboard.zip TUTOS-MODULE-drawboard-${FULLVERSION}.zip - -# Expense Module (nonstandard , need extra download) -PHP_EXPENSE = $(wildcard php/expense/*.php) \ - $(wildcard php/expense/*.p3) \ - $(wildcard php/expense/*.pinc) \ - php/expense/.htaccess \ - php/expense/README -PHP_EXPENSE_HLP = \ - php/expense/help/.htaccess - -expense.zip: $(PHP_EXPENSE) $(PHP_EXPENSE_HLP) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f expense.list - @$(TOUCH) expense.list - @$(foreach d,$(PHP_EXPENSE), \ - echo $(d) >> expense.list; \ - ) - @$(foreach d,$(PHP_EXPENSE_HLP), \ - echo $(d) >> ldap.list; \ - ) - cat expense.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) expense.zip TUTOS-MODULE-expense-${FULLVERSION}.zip - -# LDAP Module (nonstandard , need extra download) -PHP_LDAP = $(wildcard php/ldap/*.php) \ - php/ldap/README \ - php/ldap/.htaccess \ - $(wildcard php/ldap/*.p3) \ - $(wildcard php/ldap/*.pinc) -PHP_LDAP_HLP = php/ldap/help/.htaccess \ - $(wildcard php/ldap/help/*.html) - -ldap.zip: $(PHP_LDAP) $(PHP_LDAP_HLP) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f ldap.list - @$(TOUCH) ldap.list - @$(foreach d,$(PHP_LDAP), \ - echo $(d) >> ldap.list; \ - ) - @$(foreach d,$(PHP_LDAP_HLP), \ - echo $(d) >> ldap.list; \ - ) - cat ldap.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) ldap.zip TUTOS-MODULE-ldap-${FULLVERSION}.zip - - # Palm Module (nonstandard , need extra download, outdated ) PHP_PALM = $(wildcard php/palm/*.php) \ $(wildcard php/palm/*.p3) \ @@ -958,159 +957,106 @@ cat palm.list | $(ZIP) $(ZIPARGS) -@ $@ @$(MV) palm.zip TUTOS-MODULE-palm-${FULLVERSION}.zip -# RSS Feed Module (nonstandard , need extra download) -PHP_RSS = $(wildcard php/rss/*.php) \ - $(wildcard php/rss/*.p3) \ - $(wildcard php/rss/*.pinc) \ - php/rss/.htaccess \ - php/rss/README -PHP_RSS_HLP = php/rss/help/.htaccess \ - $(wildcard php/rss/help/*.html) -rssfeed.zip: $(PHP_RSS) $(PHP_RSS_HLP) +checklist: $(PHP_CHECKLIST) $(PHP_CHECKLIST_HLP) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f rssfeed.list - @$(TOUCH) rssfeed.list - @$(foreach d,$(PHP_RSS), \ - echo $(d) >>rssfeed.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_CHECKLIST) $(PHP_CHECKLIST_HLP), \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_RSS_HLP), \ - echo $(d) >>rssfeed.list; \ + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README + +doctracker: $(PHP_DOCTRACKER) $(PHP_DOCTRACKER_HLP) + @$(ECHO) "# Make Filelist for $@" + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_DOCTRACKER) $(PHP_DOCTRACKER_HLP), \ + echo $(d) >> $@.list; \ ) - cat rssfeed.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) rssfeed.zip TUTOS-MODULE-rssfeed-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README -# Scrum Module (nonstandard , need extra download) -PHP_SCRUM = $(wildcard php/scrum/*.php) \ - $(wildcard php/scrum/*.p3) \ - $(wildcard php/scrum/*.pinc) \ - $(wildcard php/scrum/*.js) \ - $(wildcard php/scrum/*.css) \ - php/scrum/.htaccess \ - php/scrum/README -PHP_SCRUM_HLP = php/scrum/help/.htaccess \ - $(wildcard php/scrum/help/*.html) +drawboard: $(PHP_DRAWBOARD) $(PHP_DRAWBOARD_HLP) + @$(ECHO) "# Make Filelist for $@" + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_DRAWBOARD) $(PHP_DRAWBOARD_HLP), \ + echo $(d) >> $@.list; \ + ) + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README -scrum.zip: $(PHP_SCRUM) $(PHP_SCRUM_HLP) +ldap: $(PHP_LDAP) $(PHP_LDAP_HLP) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f scrum.list - @$(TOUCH) scrum.list - @$(foreach d,$(PHP_SCRUM), \ - echo $(d) >> scrum.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_LDAP) $(PHP_LDAP_HLP), \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_SCRUM_HLP), \ - echo $(d) >> scrum.list; \ + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README + +rss: $(PHP_RSS) $(PHP_RSS_HLP) + @$(ECHO) "# Make Filelist for $@" + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_RSS) $(PHP_RSS_HLP), \ + echo $(d) >> $@.list; \ ) - cat scrum.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < php/scrum/README - @$(MV) scrum.zip TUTOS-MODULE-scrum-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README -# Stuff Module (nonstandard , need extra download) -PHP_STUFF = $(wildcard php/stuff/*.php) \ - $(wildcard php/stuff/*.p3) \ - $(wildcard php/stuff/*.pinc) \ - php/stuff/.htaccess \ - php/stuff/README -PHP_STUFF_HLP = php/stuff/help/.htaccess \ - $(wildcard php/stuff/help/*.html) +scrum: $(PHP_SCRUM) $(PHP_SCRUM_HLP) + @$(ECHO) "# Make Filelist for $@" + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_SCRUM) $(PHP_SCRUM_HLP) , \ + echo $(d) >> $@.list; \ + ) + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README -stuff.zip: $(PHP_STUFF) $(PHP_STUFF_HLP) +stuff: $(PHP_STUFF) $(PHP_STUFF_HLP) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f stuff.list - @$(TOUCH) stuff.list - @$(foreach d,$(PHP_STUFF), \ - echo $(d) >> stuff.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_STUFF) $(PHP_STUFF_HLP) , \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_STUFF_HLP), \ - echo $(d) >> stuff.list; \ - ) - cat stuff.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < php/stuff/README - @$(MV) stuff.zip TUTOS-MODULE-stuff-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README - -# Subversion Module (nonstandard , need extra download) -PHP_SUBVERSION = $(wildcard php/subversion/*.php) \ - $(wildcard php/subversion/*.p3) \ - $(wildcard php/subversion/*.pinc) \ - $(wildcard php/report-engine/rep_subversion/*.pinc) \ - $(wildcard php/report-engine/rep_subversion/*.p3) \ - php/report-engine/rep_subversion/config_default.php \ - php/subversion/.htaccess \ - php/subversion/README -PHP_SUBVERSION_HLP = php/subversion/help/.htaccess \ - php/report-engine/rep_subversion/README \ - $(wildcard php/subversion/help/*.html) -PHP_SUBVERSION_TPL = php/subversion/templates/.htaccess \ - php/report-engine/rep_subversion/templates/pre-commit \ - php/report-engine/rep_subversion/templates/post-commit \ - php/report-engine/rep_subversion/templates/%PROJECT%.URL \ - php/subversion/templates/*.proto.en \ - php/subversion/templates/*.proto.de - -subversion.zip: $(PHP_SUBVERSION) $(PHP_SUBVERSION_HLP) $(PHP_SUBVERSION_TPL) +subversion: $(PHP_SUBVERSION) $(PHP_SUBVERSION_HLP) $(PHP_SUBVERSION_TPL) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f subversion.list - @$(TOUCH) subversion.list - @$(foreach d,$(PHP_SUBVERSION), \ - echo $(d) >> subversion.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_SUBVERSION) $(PHP_SUBVERSION_HLP) $(PHP_SUBVERSION_TPL), \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_SUBVERSION_HLP), \ - echo $(d) >> subversion.list; \ - ) - @$(foreach d,$(PHP_SUBVERSION_TPL), \ - echo $(d) >> subversion.list; \ - ) - cat subversion.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < php/subversion/README - @$(MV) subversion.zip TUTOS-MODULE-subversion-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README - -# Testmanager Module (nonstandard , need extra download) -PHP_TESTMANAGER = $(wildcard php/testmanager/*.php) \ - $(wildcard php/testmanager/*.p3) \ - $(wildcard php/testmanager/*.pinc) \ - php/testmanager/testmanager.js \ - php/testmanager/default.css \ - php/testmanager/.htaccess \ - php/testmanager/README -PHP_TESTMANAGER_HLP = php/testmanager/help/.htaccess \ - $(wildcard php/testmanager/help/*.html) - -testmanager.zip: $(PHP_TESTMANAGER) $(PHP_TESTMANAGER_HLP) +testmanager: $(PHP_TESTMANAGER) $(PHP_TESTMANAGER_HLP) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f testmanager.list - @$(TOUCH) testmanager.list - @$(foreach d,$(PHP_TESTMANAGER), \ - echo $(d) >> testmanager.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_TESTMANAGER) $(PHP_TESTMANAGER_HLP) , \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_TESTMANAGER_HLP), \ - echo $(d) >> testmanager.list; \ - ) - cat testmanager.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) testmanager.zip TUTOS-MODULE-testmanager-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README -# Ticker Module (nonstandard , need extra download) -PHP_TICKER = $(wildcard php/ticker/*.php) \ - $(wildcard php/ticker/*.p3) \ - $(wildcard php/ticker/*.pinc) \ - php/ticker/.htaccess \ - php/ticker/README -PHP_TICKER_HLP = php/ticker/help/.htaccess \ - $(wildcard php/ticker/help/*.html) - -ticker.zip: $(PHP_TICKER) $(PHP_TICKER_HLP) +ticker: $(PHP_TICKER) $(PHP_TICKER_HLP) @$(ECHO) "# Make Filelist for $@" - @$(RM) -f ticker.list - @$(TOUCH) ticker.list - @$(foreach d,$(PHP_TICKER), \ - echo $(d) >> ticker.list; \ + @$(RM) -f $@.list + @$(TOUCH) $@.list + @$(foreach d,$(PHP_TICKER) $(PHP_TICKER_HLP), \ + echo $(d) >> $@.list; \ ) - @$(foreach d,$(PHP_TICKER_HLP), \ - echo $(d) >> ticker.list; \ - ) - cat ticker.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(MV) ticker.zip TUTOS-MODULE-ticker-${FULLVERSION}.zip + cat $@.list | $(ZIP) $(ZIPARGS) -@ TUTOS-MODULE-$@-${FULLVERSION}.zip + $(ZIP) -z TUTOS-MODULE-$@-${FULLVERSION}.zip < php/$@/README # template Module PHP_MODTEMPLATE = $(wildcard php/module_template/*.php) \ @@ -1417,93 +1363,4 @@ @$(ZIP) $@ -z < README.visual @$(MV) visual.zip TUTOS-THEME-visual-${FULLVERSION}.zip -# -# -# LANGUAGE Creation -# -# - -LANG_CA = README.ca \ - $(wildcard php/*/ca.p3) \ - $(wildcard html/help/*_ca.html) \ - $(wildcard html/*.proto.ca) - -catalan.zip: $(LANG_CA) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f ca.list - @$(TOUCH) ca.list - @$(foreach d,$(LANG_CA), \ - echo $(d) >> ca.list; \ - ) - cat ca.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < README.ca - @$(MV) catalan.zip TUTOS-LANG-catalan-${FULLVERSION}.zip - -LANG_HU = README.hu \ - $(wildcard php/*/hu.p3) \ - $(wildcard html/help/*_hu.html) \ - $(wildcard html/*.proto.hu) - -hungarian.zip: $(LANG_HU) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f hu.list - @$(TOUCH) hu.list - @$(foreach d,$(LANG_HU), \ - echo $(d) >> hu.list; \ - ) - cat hu.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < README.hu - @$(MV) hungarian.zip TUTOS-LANG-hungarian-${FULLVERSION}.zip - -LANG_JA = README.ja \ - $(wildcard php/*/ja.p3) \ - $(wildcard html/help/*_ja.html) \ - $(wildcard html/*.proto.ja) - -japanese.zip: $(LANG_JA) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f ja.list - @$(TOUCH) ja.list - @$(foreach d,$(LANG_JA), \ - echo $(d) >> ja.list; \ - ) - cat ja.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < README.ja - @$(MV) japanese.zip TUTOS-LANG-japanese-${FULLVERSION}.zip - -LANG_PT = README.pt \ - $(wildcard php/*/pt.p3) \ - $(wildcard html/help/*_pt.html) \ - $(wildcard html/*.proto.pt) - -portuguese.zip: $(LANG_PT) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f pt.list - @$(TOUCH) pt.list - @$(foreach d,$(LANG_PT), \ - echo $(d) >> pt.list; \ - ) - cat pt.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < README.pt - @$(MV) portuguese.zip TUTOS-LANG-portuguese-${FULLVERSION}.zip - -LANG_ES-VE = README.es-ve \ - $(wildcard php/*/es-ve.p3) \ - php/localization/holiday_es_ve.pinc \ - $(wildcard html/help/*_es-ve.html) \ - $(wildcard html/*.proto.es-ve) - -venezuela.zip: $(LANG_ES-VE) - @$(ECHO) "# Make Filelist for $@" - @$(RM) -f es-ve.list - @$(TOUCH) es-ve.list - @$(foreach d,$(LANG_ES-VE), \ - echo $(d) >> es-ve.list; \ - ) - cat es-ve.list | $(ZIP) $(ZIPARGS) -@ $@ - @$(ZIP) $@ -z < README.es-ve - @$(MV) venezuela.zip TUTOS-LANG-venezuela-${FULLVERSION}.zip - - - # EOF Added: trunk/html/white/delete.gif =================================================================== (Binary files differ) Index: trunk/html/white/delete.gif =================================================================== --- trunk/html/white/delete.gif 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/html/white/delete.gif 2013-05-18 14:36:11 UTC (rev 1062) Property changes on: trunk/html/white/delete.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +image/gif \ No newline at end of property Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/acl.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -34,9 +34,11 @@ * adr = current_user or so * obj = the object that will get the default rights */ -Function acl_default(&$obj,&$adr) { +Function acl_default(tutos_base $obj,tutos_base $adr) { global $tutos; + $obj->acl_write = true; + $obj->acl[0][EVERYBODY] = 0; acl_raise($obj,$adr->id,$tutos[delok]); @@ -86,12 +88,15 @@ /** * read acl entries for an object */ -Function acl_read(tutos_base &$obj) { +Function acl_read(tutos_base $obj) { global $tutos,$g_hash,$table; + if ($obj->noacl) return; if ($obj->acl_read) return; - $obj->acl_read = true; + $obj->acl_read = true; + $obj->acl_write = false; + if ($obj->noacl) return; if ( $obj->gettype() == "user" ) { @@ -139,9 +144,9 @@ } $a = 0; while ($a < $n) { - $perm = (int)$res->get($a, 'perm'); + $perm = $res->getInt($a, 'perm'); if ( $perm > 0 ) { - $obj->acl[0][(int)$res->get($a, 'adr_id')] = $perm; + $obj->acl[0][$res->getInt($a, 'adr_id')] = $perm; } $a++; } @@ -171,17 +176,15 @@ } $a = 0; while ($a < $n) { - $perm = (int)$res->get($a, 'perm'); - $feature = (int)$res->get($a, 'feature'); - $adr_id = (int)$res->get($a, 'adr_id'); + $perm = $res->getInt($a, 'perm'); + $feature = $res->getInt($a, 'feature'); + $adr_id = $res->getInt($a, 'adr_id'); $obj->acl[$feature][$adr_id] = $perm; $a++; } - $res->free(); - if($tutos['use_memcache']) { $tutos['memcache']->set($memid,$obj->acl,0,$tutos['timetolive']*60); $g_hash['fail3']++; @@ -205,6 +208,14 @@ } if ( $id < 0 ) return; + if (!$obj->acl_write) { + // dterror_log('no need to save acl data for: '.$obj."\r\n",3,$tutos[errlog]); + return; + } else { + // dterror_log('save acl data for: '.$obj."\r\n",3,$tutos[errlog]); + } + $obj->acl_write = false; + $q = 'DELETE FROM '. $obj->dbconn->prefix .$table['acl'][name].' WHERE obj_id = '. $id; $res = $obj->dbconn->Exec($q); $res->free(); @@ -249,7 +260,7 @@ /** * delete acl entries for a object to be deleted */ -Function acl_delete_obj(tutos_base &$obj) { +Function acl_delete_obj(tutos_base $obj) { global $tutos,$table; if ( $obj->id < 0 ) return; @@ -283,7 +294,7 @@ * read defaultacl entries for an object * to be used with $tutos[defaultacl] = 2 */ -Function acl_readdefault(tutos_base &$obj) { +Function acl_readdefault(tutos_base $obj) { global $tutos,$table; if ( $obj->gettype() != "user" ) return; @@ -304,7 +315,7 @@ } $a = 0; while ($a < $n) { - $obj->acldefault[(integer)$res->get($a, 'adr_id')] = $res->get($a, 'perm'); + $obj->acldefault[$res->getInt($a, 'adr_id')] = $res->getInt($a, 'perm'); $a++; } $res->free(); @@ -315,7 +326,7 @@ * save acldefault entries for an object * to be used with $tutos[defaultacl] = 2 */ -Function acl_savedefault(tutos_base &$obj) { +Function acl_savedefault(tutos_base $obj) { global $table; if ( $obj->gettype() != "user" ) return; @@ -340,7 +351,7 @@ * delete acldefault entries for a object to be deleted * to be used with $tutos[defaultacl] = 2 */ -Function acl_deletedefault(tutos_base &$obj) { +Function acl_deletedefault(tutos_base $obj) { global $table; $msg = ''; @@ -354,7 +365,7 @@ /** * check access level ( > $level ) to an object */ -Function acl_ok(tutos_base &$obj,$level) { +Function acl_ok(tutos_base $obj,$level) { global $tutos,$current_user; if ( ($tutos[useacl] != 1) || $current_user->isAdmin()) { @@ -419,35 +430,33 @@ /** * check show access ( > 0 ) to an object */ -Function acl_see_ok(tutos_base &$obj) { +Function acl_see_ok(tutos_base $obj) { global $tutos; // if no permissions are defined the see is ok if (isset($obj->acl[0]) && (count($obj->acl[0]) > 0) ) { return acl_ok($obj,$tutos[seeok] -1); - } else { - return $tutos[seeok]; } + return $tutos[seeok]; } /** * check use access to an object */ -Function acl_use_ok(tutos_base &$obj) { +Function acl_use_ok(tutos_base $obj) { global $tutos; // if no permissions are defined the use is ok if (isset($obj->acl[0]) && (count($obj->acl[0]) > 0) ) { return acl_ok($obj,$tutos[useok] -1); - } else { - return $tutos[useok]; } + return $tutos[useok]; } /** * check modification access ( > 9 ) to an object */ -Function acl_mod_ok(tutos_base &$obj) { +Function acl_mod_ok(tutos_base $obj) { global $tutos; return acl_ok($obj,$tutos[modok] -1); @@ -456,7 +465,7 @@ /** * check deletion access ( > 19 ) to an object */ -Function acl_del_ok(tutos_base &$obj) { +Function acl_del_ok(tutos_base $obj) { global $tutos; return acl_ok($obj,$tutos[delok] -1); @@ -465,46 +474,51 @@ /** * raise a feature bit */ -Function acl_raise_bit(tutos_base &$obj,$adr_id,$feature,$value) { +Function acl_raise_bit(tutos_base $obj,$adr_id,$feature,$value) { if (! isset ($obj->acl[$feature][$adr_id])) { $obj->acl[$feature][$adr_id] = 0; } $obj->acl[$feature][$adr_id] |= $value; + $obj->acl_write = true; } /** * raise the permissions to given level if below */ -Function acl_raise(tutos_base &$obj,$adr_id,$level) { +Function acl_raise(tutos_base $obj,$adr_id,$level) { if (! isset ($obj->acl[0][$adr_id]) || ($obj->acl[0][$adr_id] < $level) ) { $obj->acl[0][$adr_id] = $level; } + $obj->acl_write = true; } /** * lower a feature bit */ -Function acl_lower_bit(tutos_base &$obj,$adr_id,$feature,$value) { +Function acl_lower_bit(tutos_base $obj,$adr_id,$feature,$value) { if (! isset ($obj->acl[$feature][$adr_id])) { $obj->acl[$feature][$adr_id] = 0; } $obj->acl[$feature][$adr_id] ^= $value; + $obj->acl_write = true; } /** * lower the permissions to given level if above */ -Function acl_lower(tutos_base &$obj,$adr_id,$level) { +Function acl_lower(tutos_base $obj,$adr_id,$level) { if (! isset ($obj->acl[0][$adr_id]) || ($obj->acl[0][$adr_id] > $level) ) { $obj->acl[0][$adr_id] = $level; } + $obj->acl_write = true; } /** * set the permissions to given level */ -Function acl_set(tutos_base &$obj,$adr_id,$level) { +Function acl_set(tutos_base $obj,$adr_id,$level) { $obj->acl[0][$adr_id] = $level; + $obj->acl_write = true; } /** @@ -795,18 +809,4 @@ return $url; } -/** - * copy acl of another object - * nofeatures == true is "do not copy feature bits" - */ -function copy_acl(tutos_base $obj,$nofeatures = false) { - $acl = array(); - if (!isset($obj->acl)) return $acl; - - foreach ($obj->acl as $i => $p) { - if (($i == 0) || ($nofeatures = false)) - $acl[$i] = $p; - } - return $acl; -} ?> \ No newline at end of file Modified: trunk/php/acl_new.php =================================================================== --- trunk/php/acl_new.php 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/acl_new.php 2013-05-18 14:36:11 UTC (rev 1062) @@ -20,11 +20,39 @@ loadmodules('acl','new'); loadlayout(); + /** * display and change permissions */ class Acl_new extends layout { /** + * sort selection list + */ + function acl_sort($a,$b) { + $ac = 3; + $bc = 3; + if (isset($this->user->t_parties[$a])) { + $ac = 2; + } + if (isset($this->user->a_parties[$a])) { + $ac = 1; + } + if (isset($this->user->t_parties[$b])) { + $bc = 2; + } + if (isset($this->user->a_parties[$b])) { + $bc = 1; + } + if ($ac != $bc) { + return $ac > $bc; + } + if ($this->user->parties[$a] == $this->user->parties[$b]) { + return 0; + } + return $this->user->parties[$a] > $this->user->parties[$b]; + } + + /** * sort menuentries */ function menusort($a,$b) { @@ -317,6 +345,9 @@ } } + // sort the stuff + uksort ($this->user->parties,array('acl_new','acl_sort')); + $r .= '<form action="'.$l.'" method="GET">'; $r .= $lang['Feature'].':<select name="feature">'; uasort($tutos[activemodules],array('Acl_new','menusort')); @@ -417,4 +448,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/address.pinc =================================================================== --- trunk/php/address.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/address.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -36,10 +36,6 @@ $this->init($dbconn,Tutos_address::getType()); - if (!isset($this->f_name)) { - print_r($this); - FATAL_Error('nix'); - } $this->larray = array(); $this->birthday = new TUTOS_Date_Time(0); $this->location = array(); @@ -255,7 +251,7 @@ */ function getFullname() { global $lang; - if ( $this->m_name != "") { + if ( $this->m_name != '') { return sprintf($lang['AdrFormat1'],$this->f_name, $this->m_name ,$this->l_name); } else { return sprintf($lang['AdrFormat2'],$this->f_name, $this->l_name); @@ -326,28 +322,28 @@ * set the title */ function setTitle($new) { - return $this->setStrField("title",$new,"AdrTitle"); + return $this->setStrField('title',$new,'AdrTitle'); } /** * set the first name */ function setFName($value) { - return $this->setStrField("f_name",$value,"AdrFirstName"); + return $this->setStrField('f_name',$value,'AdrFirstName'); } /** * set the last name */ function setLName($value) { - return $this->setStrField("l_name",$value,"AdrLastName"); + return $this->setStrField('l_name',$value,'AdrLastName'); } /** * set the middle name */ function setMName($value) { - return $this->setStrField("m_name",$value,"AdrMiddleName"); + return $this->setStrField('m_name',$value,'AdrMiddleName'); } /** @@ -358,7 +354,7 @@ $b = $name->getYYYYMMDD(); if ( $a != $b ) { - $this->modified[] = array ( "field" => "AdrBirthday", "old" => $a , "new" => $b ); + $this->modified[] = array ( 'field' => 'AdrBirthday', 'old' => $a , 'new' => $b ); $this->birthday = $name; } return; @@ -391,7 +387,7 @@ /* Get an new ID */ $this->id = $q->addFV('id',-1,'NEXTID'); // Defaut Access Control - acl_default($this,$current_user); + $this->acl_default(); acl_raise($this, EVERYBODY, $tutos[useok]); acl_raise($this,$this->id,$tutos[modok]); @@ -440,16 +436,16 @@ if ( ! $this->rl2 ) { $this->read_locs_data(); }; - $e = ""; + $e = ''; if ( isset($this->locall) ) { foreach($this->locall as $i => $f) { - if ( $f->email_1 != "") { + if ( $f->email_1 != '') { $e = $f->email_1; if ( $f->category == 2 ) { return $e; } - } elseif ( $f->email_2 != "" ) { + } elseif ( $f->email_2 != '' ) { $e = $f->email_1; if ( $f->category == 2 ) { return $e; @@ -467,16 +463,16 @@ if ( ! $this->rl2 ) { $this->read_locs_data(); }; - $e = ""; + $e = ''; if ( isset($this->locall) ) { foreach($this->locall as $i => $f) { - if ( $f->phone_1 != "") { + if ( $f->phone_1 != '') { $e = $f->phone_1; if ( $f->category == 2 ) { return $e; } - } elseif ( $f->phone_2 != "" ) { + } elseif ( $f->phone_2 != '' ) { $e = $f->phone_2; if ( $f->category == 2 ) { return $e; @@ -494,9 +490,9 @@ if ( isset($this->location) && count($this->location) > 0 ) { @reset($this->location); list ($j,$l) = @each ($this->location); - $url = "address_new.php?id=". $this->id ."&loc_id=". $l->id; + $url = 'address_new.php?id='. $this->id .'&loc_id='. $l->id; } else { - $url = "address_new.php?id=". $this->id; + $url = 'address_new.php?id='. $this->id; } if (isset($_REQUEST['ss'])) { return addUrlParameter($url,'ss='.$_REQUEST['ss']); @@ -508,7 +504,7 @@ * Return a URL to delete this address */ function getDelURL() { - return "address_del.php?id=". $this->id; + return 'address_del.php?id='. $this->id; } /** Modified: trunk/php/appointment.pinc =================================================================== --- trunk/php/appointment.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/appointment.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -864,21 +864,21 @@ // Manage the permissions $this->acl = array(); if ( $this->mod_allow == CAL_MODPRIV ) { - acl_raise($this,$this->creator->id,$tutos[delok]); - acl_raise($this,$this->getObjectGroupId(2),$tutos[delok]); + $this->acl_raise($this->creator->id,$tutos[delok]); + $this->acl_raise($this->getObjectGroupId(2),$tutos[delok]); } else if ( $this->mod_allow == CAL_MODUSER ) { - acl_default($this,$current_user); - acl_raise($this,$current_user->id,$tutos[delok]); + $this->acl_default(); + $this->acl_raise($current_user->id,$tutos[delok]); } else if ( $this->mod_allow == CAL_MODPART ) { - acl_default($this,$current_user); - acl_raise($this,$this->getObjectGroupId(2),$tutos[delok]); + $this->acl_default(); + $this->acl_raise($this->getObjectGroupId(2),$tutos[delok]); } else if ( $this->mod_allow == CAL_MODALL ) { - acl_default($this,$current_user); - acl_raise($this,$this->getObjectGroupId(2),$tutos[delok]); - acl_raise($this,0,$tutos[delok]); + $this->acl_default(); + $this->acl_raise($this->getObjectGroupId(2),$tutos[delok]); + $this->acl_raise(EVERYBODY,$tutos[delok]); } // Participants can (at least) SEE - acl_raise($this,$this->getObjectGroupId(2),$tutos[seeok]); + $this->acl_raise($this->getObjectGroupId(2),$tutos[seeok]); /* Now we add all references to the participants */ Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/base.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -71,25 +71,23 @@ function init(tutos_db $dbconn = null,$sector = '') { global $current_user,$table,$tutos; - $this->id = -1; - $this->dbconn = $dbconn; - $this->creator = $current_user; - $this->creation = new TUTOS_Date_Time(); - $this->list = array(); - $this->acl[0] = array(); - $this->modified = array(); - $this->history = array(); - $this->neighbours = array(); - $this->relations = array(); + $this->id = -1; + $this->dbconn = $dbconn; + $this->creator = $current_user; + $this->creation = new TUTOS_Date_Time(); + $this->list = array(); + $this->acl[0] = array(); + $this->modified = array(); + $this->history = array(); + $this->neighbours = array(); + $this->relations = array(); $this->back_relations = array(); // just to know - $this->addrel = array(); // managing additons and deletions - $this->delrel = array(); // managing additons and deletions + $this->addrel = array(); // managing additons and deletions + $this->delrel = array(); // managing additons and deletions + $this->tablename = 'UNKNOWN'; + $this->tablename_hash = $table['objectids'][name]; + $this->tablename_rel = $table['objrel'][name]; - $this->tablename = 'UNKNOWN'; - - $this->tablename_hash = $table['objectids'][name]; - $this->tablename_rel = $table['objrel'][name]; - // needed for initializing overloaded classes if ($sector != '') { $this->sector = $sector; @@ -97,12 +95,10 @@ $this->sector = $this->gettype(); } - if (isset($current_user->id)) { - acl_set($this,$current_user->id,$tutos[modok]); - } + $this->acl_read = false; // flag to indicate that acl was read from DB or not + $this->acl_write = false; // flag to indicate that acl needs to be saved (was modified) + $this->noacl = false; // we use (i.e. read and write) acls for this object - $this->acl_read = false; // flag to indicate that acl was read from DB or not - $this->noacl = false; // we use (i.e. read and write) acls for this object // // initialize automatable database fields // @@ -111,6 +107,10 @@ // initialize custom database fields // $this->init_custom($this->sector); + + if (isset($current_user->id)) { + $this->acl_set($current_user->id,$tutos[modok]); + } } /** @@ -149,6 +149,7 @@ } } } + /** * initialize custom database fields */ @@ -297,7 +298,7 @@ function read_result (result $r, $pos ) { global $g_hash,$table; - $this->id = $r->get($pos, 'id'); + $this->id = $r->getInt($pos, 'id'); $this->creation = $r->getDateTime($pos, 'creation'); // @@ -308,8 +309,7 @@ // we have a real object so we reset the acl # $this->acl[0] = array(); - if ($this->noacl == false) - acl_read($this); + acl_read($this); // TODO: save description // read relations @@ -323,13 +323,13 @@ $n = $rr->numrows(); $a = 0; while ($a < $n) { - $o = $rr->get($a,'obj_id'); - $b = $rr->get($a,'rel_id'); + $o = $rr->getInt($a,'obj_id'); + $b = $rr->getInt($a,'rel_id'); if ($o == $this->id) { - $this->relations[$rr->get($a,'type_id')][$b] = 1; + $this->relations[$rr->getInt($a,'type_id')][$b] = 1; } if ($b == $this->id) { - $this->back_relations[$rr->get($a,'type_id')][$o] = 1; + $this->back_relations[$rr->getInt($a,'type_id')][$o] = 1; } $a++; } @@ -565,6 +565,51 @@ } /** + * manage default acl + */ + function acl_default() { + return acl_default($this,$this->creator); + } + + /** + * raise permissions + */ + function acl_raise($id, $perm) { + return acl_raise($this,$id,$perm); + } + + /** + * set permissions + */ + function acl_set($id, $perm) { + return acl_set($this,$id,$perm); + } + + /** + * save permissions + */ + function acl_save() { + return acl_save($this); + } + + /** + * copy acl of another object + * nofeatures == true is "do not copy feature bits" + */ + function copy_acl(tutos_base $from,$nofeatures = false) { + if (!isset($from->acl)) return; + if (!isset($this->acl)) { + $this->acl = array(); + } + foreach ($from->acl as $i => $p) { + if (($i == 0) || ($nofeatures == false)) + $this->acl[$i] = $p; + } + $this->acl_write = true; + return; + } + + /** * check if a given feature is available for * the given user on this object * @@ -1322,8 +1367,9 @@ $msg = addLine($msg,$x->obj_save($current_user,$this)); } - if ($this->noacl == false) - $msg = addLine($msg,acl_save($this)); + if ($this->noacl == false) { + $msg = addLine($msg,$this->acl_save()); + } $msg = addLine($msg,history_save($this)); // save generic relations @@ -1548,7 +1594,7 @@ function __toString() { global $lang; - return 'TUTOS Object:'.$lang[$this->getType()].' '.$this->getFullName().' (ID='.$this->id.')'; + return 'TUTOS Object:'.(isset($lang[$this->getType()]) ? $lang[$this->getType()]:'?? '.$this->getType()).' '.$this->getFullName().' (ID='.$this->id.')'; } /** @@ -1828,5 +1874,15 @@ return array($r,$o); } + + /** + * sort function for TUTOS objects + */ + static function obj_sort(tutos_base $a, tutos_base $b) { + $x = $a->getFullName(); + $y = $b->getFullName(); + if ($x == $y) return 0; + return ($x < $y) ? -1 : 1; + } } ?> \ No newline at end of file Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/bugtracking/bug.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -378,18 +378,16 @@ $this->medium = 1; $this->plandate = new TUTOS_Date_Time(0); // planned solve date $this->solvedate = new TUTOS_Date_Time(0); // real solvedate - $this->tablename = $this->dbconn->prefix .$table['bugtracking'][name]; $this->tablename2 = $this->dbconn->prefix .$table['bug2'][name]; $this->tablename3 = $this->dbconn->prefix .$table['bug3'][name]; - acl_raise($this,$current_user->id,$tutos[modok]); - $this->bughist = array(); + $this->bughist = array(); + $this->lastmod = array(); + $this->nomail = false;; // sent no mail about current transaction - $this->lastmod = array(); - $this->nomail = false;; // sent no mail about current transaction - $this->lastrevision = ''; + $this->acl_raise($current_user->id,$tutos[modok]); $this->run_postinit_hook(); } @@ -1337,23 +1335,23 @@ } else { $this->id = $q->addFV("id",-1,"NEXTID"); - acl_default($this,$current_user); + $this->acl_default(); // Defaut Access Control inherit from parent - $this->acl = copy_acl($this->parent,true); + $this->copy_acl($this->parent,true); // solver may mod - acl_raise($this,$this->getObjectGroupId(2),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(2),$tutos[modok]); // reporter may use - acl_raise($this,$this->getObjectGroupId(3),$tutos[useok]); + $this->acl_raise($this->getObjectGroupId(3),$tutos[useok]); // all roles in a project - acl_raise($this,$this->getObjectGroupId(8),$tutos[useok]); + $this->acl_raise($this->getObjectGroupId(8),$tutos[useok]); if ( $this->parent->getType() == "product" ) { $this->parent->readroles(); // Set the permissions - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_MANAGER),$tutos[modok]); - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_MANAGER2),$tutos[modok]); - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_SALES),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_MANAGER),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_MANAGER2),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_SALES),$tutos[modok]); } @@ -1406,9 +1404,9 @@ if ( $this->parent->getType() == "product" ) { $this->parent->readroles(); // Set the permissions - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_MANAGER),$tutos[modok]); - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_MANAGER2),$tutos[modok]); - acl_raise($this,$this->getObjectGroupId(10+PROD_ROLE_SALES),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_MANAGER),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_MANAGER2),$tutos[modok]); + $this->acl_raise($this->getObjectGroupId(10+PROD_ROLE_SALES),$tutos[modok]); } // Save the additional desc Modified: trunk/php/checklist/checkfield.pinc =================================================================== --- trunk/php/checklist/checkfield.pinc 2013-05-16 12:10:30 UTC (rev 1061) +++ trunk/php/checklist/checkfield.pinc 2013-05-18 14:36:11 UTC (rev 1062) @@ -13,16 +13,16 @@ */ $tutos['files'][__FILE__] = '$Rev$'; -define("CF_TYPE_UNKNOWN" ,0); -define("CF_TYPE_TEXT" ,1); -define("CF_TYPE_CHECKBOX" ,2); -define("CF_TYPE_BOOL" ,3); -define("CF_TYPE_RANGE" ,4); -define("CF_TYPE_SCORE" ,5); -define("CF_TYPE_TRISTATE" ,6); -define("CF_TYPE_HEADLINE" ,7); +define('CF_TYPE_UNKNOWN' ,0); +define('CF_TYPE_TEXT' ,1); +define('CF_TYPE_CHECKBOX' ,2); +define('CF_TYPE_BOOL' ,3); +define('CF_TYPE_RANGE' ,4); +define('CF_TYPE_SCORE' ,5); +define('CF_TYPE_TRISTATE' ,6); +define('CF_TYPE_HEADLINE' ,7); -define("CF_TRISTATE_NOT_TESTED" ,99); +define('CF_TRISTATE_NOT_TESTED' ,99); /** */ function CheckfieldAskType ($default,$any) { @@ -68,24 +68,24 @@ * constructor */ function checkfield(tutos_db $dbconn) { - global $current_user; + global $current_user,$table; $this->init($dbconn); - $this->link_id = $current_user->id; - $this->tablename = $dbconn->prefix . "checkfields"; - $this->fid_in_class = -1; - $this->type = -1; - $this->value_n = 0; - $this->maxvalue = 4; - $this->comment = ''; + $this->link_id = $current_user->id; + $this->tablename = $dbconn->prefix .$table['checkfield'][name]; + $this->fid_in_class = -1; + $this->type = -1; + $this->value_n = 0; + $this->maxvalue = 4; + $this->comment = ''; $this->commentappendonly = false; /** comments will only be appended if true */ - $this->pos = -1; - $this->ref = null; - $this->value_t = ""; - $this->help_text = ""; - $this->modificator = $current_user; - $this->modification = new TUTOS_Date_Time(); - $this->name = ""; - $this->description = ""; + $this->pos = -1; + $this->ref = null; + $this->value_t = ''; + $this->help_text = ''; + $this->modificator = $current_user; + $this->modification = new TUTOS_Date_Time(); + $this->name = ''; + $this->description = ''; $this->run_postinit_hook(); } @@ -435,44 +435,44 @@ $q = new query($this->dbconn); $q->setTable($this->tablename); - $q->addFV("f_type",$this->type,"INT"); - $q->addFV("f_val_n",$this->value_n,"INT"); - $q->addFV("f_val_max",$this->maxvalue,"INT"); - $q->addFV("f_val_t",$this->value_t,"TEXT"); - $q->addFV("f_comment",$this->comment,"TEXT"); - $q->addFV("name",$this->name,"STRING",$table['checkfield']['name'][size]); - $q->addFV("text",$this->description,"TEXT"); - $q->addFV("help",$this->help_text,"TEXT"); - $q->addFV("cl_id",$this->link_id,"INT"); - $q->addFV("fidinclass",$this->fid_in_class,"INT"); - $q->addFV("modificator",$this->modificator,"OBJ"); - $q->addFV("modification",$this->modification,"DATETIME"); + $q->addFV('f_type',$this->type,'INT'); + $q->addFV('f_val_n',$this->value_n,'INT'); + $q->addFV('f_val_max',$this->maxvalue,'INT'); + $q->addFV('f_val_t',$this->value_t,'TEXT'); + $q->addFV('f_comment',$this->comment,'TEXT'); + $q->addFV('name',$this->name,'STRING',$table['checkfield']['name'][size]); + $q->addFV('text',$this->description,'TEXT'); + $q->addFV('help',$this->help_text,'TEXT'); + $q->addFV('cl_id',$this->link_id,'INT'); + $q->addFV('fidinclass',$this->fid_in_class,'INT'); + $q->addFV('modificator',$this->modificator,'OBJ'); + $q->addFV('modification',$this->modification,'DATETIME'); if ( $this->id < 0 ) { unset ($this->modified); if ( isset($this->newid) ) { $this->id = $this->newid; - $q->addFV("id",$this->id,""); - $q->addFV("f_pos",$this->pos,"INT"); + $q->addFV('id',$this->id,''); + $q->addFV('f_pos',$this->pos,'INT'); } else { - $this->id = $q->addFV("id",-1,"NEXTID"); - $q->addFV("f_pos",$this->id,"INT"); - acl_default($this,$current_user); - acl_raise($this,$this->creator->id,$tutos[delok]); + $this->id = $q->addFV('id',-1,'NEXTID'); + $q->addFV('f_pos',$this->id,'INT'); + $this->acl_default($current_user); + $this->acl_raise($this->creator->id,$tutos[delok]); unset ($this->modified); - $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->addFV("f_pos",$this->pos,"INT"); + $q->addWC('id',$this->id,''); + $q->addFV('f_pos',$this->pos,'INT'); $query = $q->getUpdate(); } @@ -528,7 +528,7 @@ * get the type of object */ static function getType () { - return "checkfield"; + return 'checkfield'; } /** * get the type id of obje... [truncated message content] |
From: <gok...@us...> - 2013-05-16 12:10:33
|
Revision: 1061 http://sourceforge.net/p/tutos/code/1061 Author: gokohnert Date: 2013-05-16 12:10:30 +0000 (Thu, 16 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/testmanager/testsuite_show.php Modified: trunk/php/testmanager/testsuite_show.php =================================================================== --- trunk/php/testmanager/testsuite_show.php 2013-05-15 12:51:55 UTC (rev 1060) +++ trunk/php/testmanager/testsuite_show.php 2013-05-16 12:10:30 UTC (rev 1061) @@ -47,7 +47,6 @@ // Handle Updates $mod = array(); $mod2 = array(); // what to clear afterwards - FATAL_Error('A'); foreach ($_POST as $p => $q) { if (preg_match("/^NZP([0-9]*)t(.*)$/",$p,$regs)) { if ($q == '') continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-15 12:51:57
|
Revision: 1060 http://sourceforge.net/p/tutos/code/1060 Author: gokohnert Date: 2013-05-15 12:51:55 +0000 (Wed, 15 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/testmanager/testrun_overview.php Modified: trunk/php/testmanager/testrun_overview.php =================================================================== --- trunk/php/testmanager/testrun_overview.php 2013-05-15 12:50:03 UTC (rev 1059) +++ trunk/php/testmanager/testrun_overview.php 2013-05-15 12:51:55 UTC (rev 1060) @@ -196,7 +196,7 @@ $r .= $this->OverviewBodyEnd(); $r .= $this->OverviewFootStart(); - $r .= $this->list_navigation($this->link1,$this->flds + $tutos[massupdate],$this->start,$a,$n); + $r .= $this->list_navigation(addUrlParameter($this->link1,'ss='.$this->ss),$this->flds + $tutos[massupdate],$this->start,$a,$n); if($showsum) { $r .= $this->OverviewRowStart(0,'','summary'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-15 12:50:07
|
Revision: 1059 http://sourceforge.net/p/tutos/code/1059 Author: gokohnert Date: 2013-05-15 12:50:03 +0000 (Wed, 15 May 2013) Log Message: ----------- fix sessionmanagement Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc trunk/php/testmanager/testrun_overview.php Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-05-15 07:54:50 UTC (rev 1058) +++ trunk/php/testmanager/testmanager.pinc 2013-05-15 12:50:03 UTC (rev 1059) @@ -1862,10 +1862,14 @@ * collect statistics for a testsuite */ function collectStats() { + global $lang; if (count($this->statarr) > 0) return; $this->statarr[0] = array(); // states + foreach($lang['TestcaseResults'] as $i2 => $f2) { + $this->statarr[0][$i2] = 0; + } $this->statarr[1] = null; // earliest $this->statarr[2] = null; // latest $this->statarr[3] = array(); // flat list of obj ids (cases and suites) @@ -1915,6 +1919,7 @@ } if ($sep == '') { foreach($this->statarr[0] as $i => $f) { + if ($f <= 0) continue; $m .= '<tr>'; $m .= ' <td>'.testcase::getResultColor($i).'</td>'; $m .= ' <td align="right">'.sprintf('%5s',$f).'</td>'; @@ -1927,6 +1932,7 @@ } else { $m .= $sep; foreach($this->statarr[0] as $i => $f) { + if ($f <= 0) continue; $m .= ' '.testcase::getResultColor($i); $m .= ' '.sprintf('%5s',$f).' = '.sprintf('%.2f %%',100.0 * $f/$sum).$sep; } @@ -2528,6 +2534,7 @@ } if ($sep == '') { foreach($this->statarr[0] as $i => $f) { + if ($f <= 0) continue; $m .= '<tr>'; $m .= ' <td>'.testcase::getResultColor($i).'</td>'; $m .= ' <td align="right">'.sprintf('%5s',$f).'</td>'; @@ -2540,6 +2547,7 @@ } else { $m .= $sep; foreach($this->statarr[0] as $i => $f) { + if ($f <= 0) continue; $m .= ' '.testcase::getResultColor($i); $m .= ' '.sprintf('%5s',$f).' = '.sprintf('%.2f %%',100.0 * $f/$sum).$sep; } Modified: trunk/php/testmanager/testrun_overview.php =================================================================== --- trunk/php/testmanager/testrun_overview.php 2013-05-15 07:54:50 UTC (rev 1058) +++ trunk/php/testmanager/testrun_overview.php 2013-05-15 12:50:03 UTC (rev 1059) @@ -51,13 +51,17 @@ $r .= "\r\n"; $a = 0; - $n = $this->result->numrows(); + $n = count($this->blist); while ($a < $n) { - $b = new testrun($this->dbconn); - $b->read_result($this->result,$a); + $b = &$this->blist[$a]; + if (!is_object($b)) { + $id = $b; + $b = new testrun($this->dbconn); + $b = $b->read($id,$b); + $b->read_reference(); + } $a++; if (!$b->see_ok()) continue; - $b->read_reference(); $b->collectstats(); $r .= txt2csv($b->id); @@ -83,11 +87,8 @@ return $this->info_csv(); } - $this->statarr = array(); - $this->statsum = 0; - $r = ''; - $n = $this->result->numrows(); + $n = count($this->blist); $showsum = false; if (!$this->head['ref_id'] && ($n < 20)) { @@ -98,30 +99,7 @@ if (! $this->head['stat']) { $showsum = false; } - $nav = $this->getSubSession(); - $nav['link'] = $this->link1; - $nav['list'] = array(); - $a = 0; - while ($a < $n) { - $nav['list'][] = $this->result->get($a, "id"); - if ($showsum) { - $b = new testrun($this->dbconn); - $b->read_result($this->result,$a); - if (!$b->see_ok()) continue; - $b->read_reference(); - $b->collectstats(); - foreach($b->statarr[0] as $si => $sf) { - if (!isset($this->statarr[$si])) - $this->statarr[$si] = 0; - $this->statarr[$si] += $sf; - $this->statsum += $sf; - } - } - $a++; - } - $ss = $this->putSubSession($nav); - if ( $this->start == -1 ) { // Show the last part $a = $n - $tutos['maxshow']; @@ -142,12 +120,12 @@ $this->flds = 1; $r .= $this->orderHeader('name',$lang['TestrunName'],$this->link2); if ($this->head['ref_id']) { - $r .= $this->orderHeader('ref_id',$lang['TestrunRef'],$this->link2); + $r .= $this->orderHeader('',$lang['TestrunRef'],$this->link2); $this->flds++; $prestat++; } if ($this->head['test_id']) { - $r .= $this->orderHeader('test_id',$lang['TestrunSuiteB'],$this->link2); + $r .= $this->orderHeader('',$lang['TestrunSuiteB'],$this->link2); $this->flds++; $prestat++; } @@ -169,18 +147,22 @@ $line = 1; while ( ($a < $n) && ($a < $end) ) { - $b = new testrun($this->dbconn); - $b->read_result($this->result,$a); + $b = &$this->blist[$a]; + if (!is_object($b)) { + $id = $b; + $b = new testrun($this->dbconn); + $b = $b->read($id,$b); + $b->read_reference(); + } if (!$b->see_ok()) { $a ++; continue; } - $b->read_reference(); $r .= $this->OverviewRowStart($line); $x = $this->mark_filter(myentities($b->getFullName()),'name'); - $r .= $this->OverviewRowBlock($b->getLink($x,'ss='.$ss),'title over_l'); + $r .= $this->OverviewRowBlock($b->getLink($x,'ss='.$this->ss),'title over_l'); if ($this->head['ref_id']) { if(is_object($b->ref)) { @@ -204,16 +186,14 @@ } if ($this->head['stat']) { $r .= $this->OverviewRowBlock($b->getStats(),'over_l'); - if($showsum) { - } } $r .= show_custom_overview_data($this,'testrun',$b); $r .= $this->MassUpdateField($b); $r .= $this->OverviewRowEnd($line++); $a++; + unset($b); } - $this->result->free(); $r .= $this->OverviewBodyEnd(); $r .= $this->OverviewFootStart(); $r .= $this->list_navigation($this->link1,$this->flds + $tutos[massupdate],$this->start,$a,$n); @@ -223,6 +203,7 @@ $r .= ' <td colspan="'.$prestat.'"></td>'; $r .= ' <td><table border="0" cellpadding="0" cellspacing="0">'; foreach($this->statarr as $si => $sf) { + if ($sf <= 0) continue; $r .= '<tr><td>'.testcase::getResultColor($si) .'</td><td align="right">'.$sf.'</td><td align="right">'.sprintf('%.2f %%',100.0 * $sf/$this->statsum).'</td>'; } $r .= ' </table></td>'; @@ -408,13 +389,56 @@ // sorting $xxx = ""; $this->link2 = $this->link1; - order_parse($this->q,$this->link1,$xxx,$this,array('creation',2)); - $this->result = $this->dbconn->Exec($this->q); + $this->nav = $this->getSubSession(); + $this->nav['link'] = $this->link1; + $this->blist = array(); + $this->statarr = array(); + $this->statsum = 0; + foreach($lang['TestcaseResults'] as $i2 => $f2) { + $this->statarr[$i2] = 0; + } + if ( !isset($this->nav['list']) ) { + $this->nav['list'] = array(); + order_parse($this->q,$this->link1,$xxx,$this,array('creation',2)); + $res = $this->dbconn->Exec($this->q); - $this->link2 = $this->link1; + $n = $res->numrows(); + $a = 0; + while ( $a < $n ) { + $b = new testrun($this->dbconn); + $b->read_result($res,$a); + $a++; + if (!$b->see_ok()) continue; + $b->read_reference(); + $b->collectstats(); + $this->blist[] = &$b; + $this->nav['list'][] = $b->id; + + foreach($b->statarr[0] as $si => $sf) { + if (!isset($this->statarr[$si])) + $this->statarr[$si] = 0; + $this->statarr[$si] += $sf; + $this->statsum += $sf; + } + unset($b); + } + $this->nav['statarr'] = $this->statarr; + $this->nav['statsum'] = $this->statsum; + $res->free(); + } else { + // subsession found + foreach ($this->nav['list'] as $i) { + $this->blist[] = $i; + } + $this->statarr = $this->nav['statarr']; + $this->statsum = $this->nav['statsum']; + } + $this->ss = $this->putSubSession($this->nav); + $l = addUrlParameter($this->link1,'format=paper'); + $l = addUrlParameter($l,'ss='.$this->ss); $x = array( url => $l, image => $this->user->layout->theme->getImage(testrun::getHtmlIcon(),'menu'), text => $lang['Printable'], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-15 07:54:56
|
Revision: 1058 http://sourceforge.net/p/tutos/code/1058 Author: gokohnert Date: 2013-05-15 07:54:50 +0000 (Wed, 15 May 2013) Log Message: ----------- prepare for not applicable testcases Modified Paths: -------------- trunk/php/testmanager/de.p3 trunk/php/testmanager/default.css trunk/php/testmanager/en.p3 trunk/php/testmanager/testcase_ins.php trunk/php/testmanager/testcase_new.php trunk/php/testmanager/testmanager.pinc trunk/php/testmanager/testrun_ins.php trunk/php/testmanager/testrun_new.php trunk/php/testmanager/testsuite_show.php Modified: trunk/php/testmanager/de.p3 =================================================================== --- trunk/php/testmanager/de.p3 2013-05-15 07:53:16 UTC (rev 1057) +++ trunk/php/testmanager/de.p3 2013-05-15 07:54:50 UTC (rev 1058) @@ -24,12 +24,13 @@ $lang['TestcaseCreateInfo'] = 'neue Testfälle für "%s" anlegen'; $lang['TestcaseDetail'] = 'Testfall Detail'; $lang['TestcaseOverview'] = 'Testfall Übersicht'; -$lang['TestcaseDelete'] = 'delete this testcase'; -$lang['TestcaseDeleteI'] = 'delete testcase %s'; -$lang['TestcaseMod'] = 'modify this testcase'; -$lang['TestcaseLinkInfo'] = 'a testcase for %s'; +$lang['TestcaseDelete'] = 'diesen Testfall löschen'; +$lang['TestcaseDeleteI'] = 'lösche Testfall %s'; +$lang['TestcaseMod'] = 'diesen Testfall ändern'; +$lang['TestcaseLinkInfo'] = 'ein Testfall für %s'; $lang['TestcaseResult'] = 'Ergebnis'; $lang['TestcaseResults'][-1] = 'initial'; +$lang['TestcaseResults'][-2] = 'nicht anwendbar'; $lang['TestcaseResults'][0] = 'fail'; $lang['TestcaseResults'][1] = 'pass'; $lang['TestcaseResults'][2] = 'skip'; @@ -43,8 +44,8 @@ $lang['Testsuite'] = 'Testspezifikation'; $lang['Testsuites'] = 'Testspezifikationen'; $lang['TestsuiteRef'] = 'Referenz'; -$lang['TestsuiteCreation'] = 'Create a Testsuite'; -$lang['TestsuiteCreate'] = 'Add a Testsuite'; +$lang['TestsuiteCreation'] = 'Eine Testspezifikation anlegen'; +$lang['TestsuiteCreate'] = 'Testspezifikation anlegen'; $lang['TestsuiteCreateInfo'] = 'neue Testspezifikation in "%s" anlegen'; $lang['TestsuiteDetail'] = 'Testspezifikation Detail'; $lang['TestsuiteOverview'] = 'Testspezifikation Übersicht'; @@ -141,4 +142,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Modified: trunk/php/testmanager/default.css =================================================================== --- trunk/php/testmanager/default.css 2013-05-15 07:53:16 UTC (rev 1057) +++ trunk/php/testmanager/default.css 2013-05-15 07:54:50 UTC (rev 1058) @@ -49,6 +49,12 @@ display: block; } +SPAN.tcresult_-2 { + color: #555; +} +TD.tcresult_-2 { + background: #555; +} SPAN.tcresult_0 { color: red; Modified: trunk/php/testmanager/en.p3 =================================================================== --- trunk/php/testmanager/en.p3 2013-05-15 07:53:16 UTC (rev 1057) +++ trunk/php/testmanager/en.p3 2013-05-15 07:54:50 UTC (rev 1058) @@ -29,6 +29,7 @@ $lang['TestcaseLinkInfo'] = 'a testcase for "%s"'; $lang['TestcaseResult'] = 'Result'; $lang['TestcaseResults'][-1] = 'initial'; +$lang['TestcaseResults'][-2] = 'not applicaple'; $lang['TestcaseResults'][0] = 'fail'; $lang['TestcaseResults'][1] = 'pass'; $lang['TestcaseResults'][2] = 'skip'; @@ -135,4 +136,4 @@ $lang['testsuite'] = &$lang['Testsuite']; $lang['testcase'] = &$lang['Testcase']; $lang['testrun'] = &$lang['Testrun']; -?> \ No newline at end of file +?> Modified: trunk/php/testmanager/testcase_ins.php =================================================================== --- trunk/php/testmanager/testcase_ins.php 2013-05-15 07:53:16 UTC (rev 1057) +++ trunk/php/testmanager/testcase_ins.php 2013-05-15 07:54:50 UTC (rev 1058) @@ -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 @@ -13,6 +13,8 @@ * @module testcase_ins * @package testcase */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -74,6 +76,13 @@ if ( isset($_POST['pos_'.$i]) && !empty($_POST['pos_'.$i]) ) { $obj[$i]->setPosition($_POST['pos_'.$i]); } + if ( isset($_POST['na_'.$i]) ) { + if ($_POST['na_'.$i] == 1) { + $obj[$i]->setResult(TC_NA); + } + } else { + $obj[$i]->setResult(TC_FAIL); + } // // Parse additional custom fields // Modified: trunk/php/testmanager/testcase_new.php =================================================================== --- trunk/php/testmanager/testcase_new.php 2013-05-15 07:53:16 UTC (rev 1057) +++ trunk/php/testmanager/testcase_new.php 2013-05-15 07:54:50 UTC (rev 1058) @@ -66,7 +66,6 @@ $r .= " </td>\n"; $r .= "</tr>\n"; } - $r .= $this->submit_reset_row(0,-1,2,1,2,0); $r .= $this->DataTableEnd(); @@ -134,7 +133,14 @@ $r .= " </td>\n"; $r .= "</tr>\n"; + $r .= "<tr>\n"; + $r .= $this->showfieldc($lang['TestcaseResults'][-2],0,'na'); + $r .= ' <td colspan="2">'."\n"; + $r .= '<input name="na_1" type="checkbox" value="1"'.($this->obj->result == -2 ? ' checked="checked"':'').'></input>'; + $r .= " </td>\n"; + $r .= "</tr>\n"; + // Edit additional custom fields $r .= edit_custom_fields($this,$this->obj->gettype(),$this->obj,6); // References to modules @@ -260,4 +266,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2013-05-15 07:53:16 UTC (rev 1057) +++ trunk/php/testmanager/testmanager.pinc 2013-05-15 07:54:50 UTC (rev 1058) @@ -19,6 +19,7 @@ define('TC_SKIP',2); define('TC_UNTESTED',3); define('TC_PREVFAIL',4); // previously failed in another test +define('TC_NA',-2); // not applicable (initially skipped) define('TR_UNDEF',0); define('TR_ACTIV',1); @@ -800,7 +801,8 @@ $url = addUrlParameter($url,'name=');; if ($this->activ != 1) { - $this->result = TC_UNTESTED; // untested + if ($this->result != TC_NA) + $this->result = TC_UNTESTED; // untested } $this->read_reference(); $r = ''; @@ -863,25 +865,32 @@ // Result $r .= ' <td class="xinputrow" width="90" valign="top">'; $pre = ''; - foreach($lang['TestcaseResults'] as $i2 => $f2) { - if($i2 < 0) { - continue; - } - $r .= $pre.'<label for="tcresult_'.$this->id.$i2.'" class="tcresult"><input class="result_'.$i2.'" type="radio" id="tcresult_'.$this->id.$i2.'"'; + if ($this->activ == 1 && $this->result == TC_NA ) { + $r .= $lang['TestcaseResults'][-2]; + } else { + foreach($lang['TestcaseResults'] as $i2 => $f2) { + if($i2 < 0) { + continue; + } + $r .= $pre.'<label for="tcresult_'.$this->id.$i2.'" class="tcresult"><input class="result_'.$i2.'" type="radio" id="tcresult_'.$this->id.$i2.'"'; - if ($this->activ == 1) { - $r .= ' name="result_'.$this->id.'"'; + if ($this->activ == 1) { + $r .= ' name="result_'.$this->id.'"'; + } + $r .= ' value="'.$i2.'"'; + $r .= ($this->result == $i2 ? ' checked="checked"':''); + $r .= ' />'. $this->getResultColor($i2) .'</label>'."\n"; } - $r .= ' value="'.$i2.'"'; - $r .= ($this->result == $i2 ? ' checked="checked"':''); - $r .= ' />'. $this->getResultColor($i2) .'</label>'."\n"; + if ($this->mod_ok() && ($this->activ != 1) && !isset($this->test) ) { + $r .= '<br />'; + $r .= '<input name="NA_'.$this->id.'" value="1" '.($this->result == -2 ? 'checked="checked" ':' ').'type="checkbox">'.$lang['TestcaseResults'][-2].'</input>'; + } + $r .= '<br /><br />'; + if ($this->activ == 1 && (!is_object($tr) || $tr->state != TR_CLOSED) ) { + $r .= '<input name="OK_'.$this->id .'" type="submit" value="'.$lang['Enter'].'" title="'.$lang['Enter'].'" />'; + } + $r .= ' </td>'; } - $r .= '<br /><br />'; - if ($this->activ == 1 && (!is_object($tr) || $tr->state != TR_CLOSED) ) { - $r .= '<input name="OK_'.$this->id .'" type="submit" value="'.$lang['Enter'].'" title="'.$lang['Enter'].'" />'; - } - $r .= ' </td>'; - // Comment $txt = $this->comment; $r .= ' <td class="TCcomment xinputrow" style="max-width:'.TCCOLS.'em;" valign="top">'; @@ -1602,6 +1611,10 @@ $this->acl = $this->ref->acl; acl_default($this,$this->creator); + if ( $this->ref->getType() == "product" ) { + acl_raise($this,$this->getObjectGroupId(8),$tutos[modok]); + } + // Prepare the history if (!isset($this->quite) || $this->quite != true) { $this->modified[] = array ( "field" => "TestsuiteCreate" , @@ -1967,7 +1980,7 @@ } /** - * get a array with virtual groups + * get a array with virtual groups for testsuites */ function getObjectGroups() { global $lang,$tutos; @@ -1984,7 +1997,7 @@ } /** - * get a array with virtual groups members + * get a array with virtual groups members for testsuites */ function getObjectGroupList($id) { global $lang,$tutos; @@ -1997,15 +2010,18 @@ $x = parent::getObjectGroupList($id); + if (!is_object($this->ref)) { + $this->read_reference(); + } if (is_object($this->ref) && ($this->ref->getTypeId() == useprojects) ) { - $this->ref->readroles(); if ($id2 == 8) { $x = $this->ref->getObjectGroupList(8); - } - foreach ($lang['ProdRole'] as $role => $f) { - if ( $tutos[rolecheck][$role] == "p") continue; - if ($role+10 == $id2) { - $x = $this->ref->getObjectGroupList($role+128); + } else { + foreach ($lang['ProdRole'] as $role => $f) { + if ( $tutos[rolecheck][$role] == "p") continue; + if ($role+10 == $id2) { + $x = $this->ref->getObjectGroupList($role+128); + } } } } @@ -2666,6 +2682,8 @@ $obj->result = TC_PREVFAIL; // prevoisly failed } else if ( $obj->result == TC_PREVFAIL ) { $obj->result = TC_PREVFAIL; // still previously failed + } else if ( $obj->result == TC_NA ) { + $obj->result = TC_NA; // still not applicable } else { $obj->result = TC_UNTESTED; // all other will be untested } @@ -3122,7 +3140,7 @@ } /** - * get a array with virtual groups + * get a array with virtual groups for testrun */ function getObjectGroups() { global $lang,$tutos; @@ -3139,7 +3157,7 @@ } /** - * get a array with virtual groups members + * get a array with virtual groups members for testrun */ function getObjectGroupList($id) { global $lang,$tutos; @@ -3152,15 +3170,18 @@ $x = parent::getObjectGroupList($id); + if (!is_object($this->ref)) { + $this->read_reference(); + } if (is_object($this->ref) && ($this->ref->getTypeId() == useprojects) ) { - $this->ref->readroles(); if ($id2 == 8) { $x = $this->ref->getObjectGroupList(8); - } - foreach ($lang['ProdRole'] as $role => $f) { - if ( $tutos[rolecheck][$role] == "p") continue; - if ($role+10 == $id2) { - $x = $this->ref->getObjectGroupList($role+128); + } else { + foreach ($lang['ProdRole'] as $role => $f) { + if ( $tutos[rolecheck][$role] == "p") continue; + if ($role+10 == $id2) { + $x = $this->ref->getObjectGroupList($role+128); + } } } } Modified: trunk/php/testmanager/testrun_ins.php =================================================================== --- trunk/php/testmanager/testrun_ins.php 2013-05-15 07:53:16 UTC (rev 1057) +++ trunk/php/testmanager/testrun_ins.php 2013-05-15 07:54:50 UTC (rev 1058) @@ -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 @@ -13,6 +13,8 @@ * @module testrun_ins * @package testrun */ +$tutos['files'][__FILE__] = '$Rev$'; + $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; @@ -108,11 +110,11 @@ $gotourl= addUrlParameter($gotourl,"desc=". UrlEncode($obj->desc),true); } -# -# 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()); Modified: trunk/php/testmanager/testrun_new.php =================================================================== --- trunk/php/testmanager/testrun_new.php 2013-05-15 07:53:16 UTC (rev 1057) +++ trunk/php/testmanager/testrun_new.php 2013-05-15 07:54:50 UTC (rev 1058) @@ -225,7 +225,7 @@ if ($this->mode == 'run') { $this->name = $lang['TestrunRun']; if(!$this->obj->use_ok()) { - $msg = addLIne($msg,sprintf($lang['Err0054'],$lang[$this->obj->getType()])); + $msg = addLine($msg,sprintf($lang['Err0001'],$lang[$this->obj->getType()])); $this->stop = true; return; } @@ -244,7 +244,7 @@ } } if ( ! is_object($this->obj) ) { - $msg = addLIne($msg,sprintf($lang['Err0040'],$lang['Testrun'])); + $msg = addLine($msg,sprintf($lang['Err0040'],$lang['Testrun'])); $this->stop = true; $this->format = "html"; return; @@ -283,4 +283,4 @@ $l = new Testrun_new($current_user); $l->display(); $dbconn->Close(); -?> +?> \ No newline at end of file Modified: trunk/php/testmanager/testsuite_show.php =================================================================== --- trunk/php/testmanager/testsuite_show.php 2013-05-15 07:53:16 UTC (rev 1057) +++ trunk/php/testmanager/testsuite_show.php 2013-05-15 07:54:50 UTC (rev 1058) @@ -47,6 +47,7 @@ // Handle Updates $mod = array(); $mod2 = array(); // what to clear afterwards + FATAL_Error('A'); foreach ($_POST as $p => $q) { if (preg_match("/^NZP([0-9]*)t(.*)$/",$p,$regs)) { if ($q == '') continue; @@ -145,6 +146,24 @@ unset($ox); } $mod2['P'.$o->ref_id] = $o->ref; + } else if (preg_match("/^NA_([0-9]*)$/",$p,$regs)) { + // not applicable + $id = $regs[1]; + $o = getObject($this->dbconn,$id); + if (!is_object($o)) continue; + if (!$o->mod_ok()) { + $r .= sprintf($lang['Err0024'],$o->getLink()); + continue; + } + if ($q == 1) { + $res = $o->setResult(TC_NA); // if changed + } else { + $res = $o->setResult(TC_UNTESTED); // if changed + } + if($res) { + $mod[$o->id] = $o; + } + unset($o); } else if (preg_match("/^ID([0-9]*)t$/",$p,$regs)) { // exisiting testsuite description $id = $regs[1]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-15 07:53:21
|
Revision: 1057 http://sourceforge.net/p/tutos/code/1057 Author: gokohnert Date: 2013-05-15 07:53:16 +0000 (Wed, 15 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/webelements.p3 Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-05-14 11:16:56 UTC (rev 1056) +++ trunk/php/webelements.p3 2013-05-15 07:53:16 UTC (rev 1057) @@ -2915,8 +2915,6 @@ } $x++; } - if ($obj->id == 1552) - print_r($obj->tutos); $r->free(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-14 11:17:02
|
Revision: 1056 http://sourceforge.net/p/tutos/code/1056 Author: gokohnert Date: 2013-05-14 11:16:56 +0000 (Tue, 14 May 2013) Log Message: ----------- csv export Modified Paths: -------------- trunk/php/testmanager/testrun_overview.php Modified: trunk/php/testmanager/testrun_overview.php =================================================================== --- trunk/php/testmanager/testrun_overview.php 2013-05-13 09:02:28 UTC (rev 1055) +++ trunk/php/testmanager/testrun_overview.php 2013-05-14 11:16:56 UTC (rev 1056) @@ -9,6 +9,9 @@ * @modulegroup testmanager * @module testrun_overview * @package testrun + * + * SVN Info $Id$ + * $Author$ */ $tutos['files'][__FILE__] = '$Rev$'; @@ -30,11 +33,56 @@ */ class Testrun_overview extends layout { /** + * get CSV info + */ + function info_csv() { + global $lang; + + export_headers('TUTOS_testrun_export','csv'); + + $r = ''; + $r .= txt2csv('id'); + $r .= txt2csv($lang['TestrunName']); + $r .= txt2csv($lang['TestrunRef']); + $r .= txt2csv($lang['TestrunState']); + foreach($lang['TestcaseResults'] as $i2 => $f2) { + $r .= txt2csv($lang['TestcaseResult'].' '.$f2); + } + $r .= "\r\n"; + + $a = 0; + $n = $this->result->numrows(); + while ($a < $n) { + $b = new testrun($this->dbconn); + $b->read_result($this->result,$a); + $a++; + if (!$b->see_ok()) continue; + $b->read_reference(); + $b->collectstats(); + + $r .= txt2csv($b->id); + $r .= txt2csv($b->getFullName()); + $r .= txt2csv($b->ref->getFullName()); + $r .= txt2csv($lang['TestrunStates'][$b->state]); + foreach($lang['TestcaseResults'] as $i2 => $f2) { + $r .= txt2csv(isset($b->statarr[0][$i2]) ? $b->statarr[0][$i2]:0); + } + $r .= "\r\n"; + } + + return $r; + } + + /** * the data display part */ Function info() { global $tutos,$lang; + if ($this->format == "csv" ) { + return $this->info_csv(); + } + $this->statarr = array(); $this->statsum = 0; @@ -386,6 +434,16 @@ $m = testcase::getSelectLink($this->user); $this->addmenu($m); + $ll = addUrlParameter($this->link1,'format=csv'); + $ll = addUrlParameter($ll,'ss='.$this->ss); + $x = array( url => $ll, + text => $lang['Export'] ."(CSV)", + info => $lang['ExportInfo'], + category => array('excel',bug::getType(),'view',usetestrun) + ); + $this->addMenu($x); + + if (class_exists('url')) { $this->addMenu(url::getAddLinkPreset($this->user,$this)); } @@ -396,8 +454,4 @@ $dbconn->Close(); -?> -<!-- -SVN Info $Id$ -$Author$ ---> \ No newline at end of file +?> \ 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-05-13 09:02:31
|
Revision: 1055 http://sourceforge.net/p/tutos/code/1055 Author: gokohnert Date: 2013-05-13 09:02:28 +0000 (Mon, 13 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/app_new_r.php Modified: trunk/php/app_new_r.php =================================================================== --- trunk/php/app_new_r.php 2013-05-13 08:58:59 UTC (rev 1054) +++ trunk/php/app_new_r.php 2013-05-13 09:02:28 UTC (rev 1055) @@ -234,10 +234,10 @@ if ( $this->user->id == $this->obj->creator->id ) { $this->obj->allowed = 2; } - if ( $this->obj->visitor != -1 ) { + if ( !(is_numeric($this->obj->visitor) && $this->obj->visitor == -1) ) { $this->obj->xfn['v'] = $this->obj->visitor->getFullName(); } - if ( $this->obj->product != -1 ) { + if ( !(is_numeric($this->obj->product) && $this->obj->product == -1) ) { $this->obj->xfn['p'] = $this->obj->product->getFullName(); } foreach($this->obj->participant as $i => $f) { @@ -303,8 +303,8 @@ $msg = addLine($msg,sprintf($lang['Err0024'],$lang[$this->obj->getType()])); $this->stop = true; } -# menu - $m = appointment::getSelectLink($this->user); + # menu + $m = appointment::getSelectLink($this->user); $m[category][] = 'obj'; $this->addmenu($m); $m = appointment::getAddLink($this->user,$this->obj); @@ -345,4 +345,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-05-13 08:59:04
|
Revision: 1054 http://sourceforge.net/p/tutos/code/1054 Author: gokohnert Date: 2013-05-13 08:58:59 +0000 (Mon, 13 May 2013) Log Message: ----------- urls attached to appointments Modified Paths: -------------- trunk/php/expense/expense.pinc trunk/php/file/file.pinc trunk/php/note/note.pinc trunk/php/product.pinc trunk/php/rate/rate.pinc trunk/php/resource/resource.pinc trunk/php/url/mconfig.pinc trunk/php/url/url.pinc Modified: trunk/php/expense/expense.pinc =================================================================== --- trunk/php/expense/expense.pinc 2013-05-08 11:34:43 UTC (rev 1053) +++ trunk/php/expense/expense.pinc 2013-05-13 08:58:59 UTC (rev 1054) @@ -957,7 +957,7 @@ /** * create a smalllist of expenses attached to the given object */ - static function small_infolist ($user,$obj) { + static function small_infolist (tutos_user $user,tutos_base $obj) { global $lang; $r = ''; Modified: trunk/php/file/file.pinc =================================================================== --- trunk/php/file/file.pinc 2013-05-08 11:34:43 UTC (rev 1053) +++ trunk/php/file/file.pinc 2013-05-13 08:58:59 UTC (rev 1054) @@ -1645,7 +1645,7 @@ /** * create a smalllist of products related to the given object */ - static function small_infolist ($user,$obj) { + static function small_infolist (tutos_user $user,tutos_base $obj) { global $lang; $r = ''; Modified: trunk/php/note/note.pinc =================================================================== --- trunk/php/note/note.pinc 2013-05-08 11:34:43 UTC (rev 1053) +++ trunk/php/note/note.pinc 2013-05-13 08:58:59 UTC (rev 1054) @@ -530,7 +530,7 @@ /** * create a smalllist of notes attached to the given object */ - static function small_infolist ($user,$obj) { + static function small_infolist (tutos_user $user,tutos_base $obj) { global $lang; $r = ''; @@ -543,12 +543,14 @@ note::obj_read($obj); $sep = ''; if ( count($obj->list[usenotes]) > 0 ) { + $icon = $user->layout->theme->getImage(note::getHtmlIcon(),'list'); + $r .= '<span class="right">'; foreach ($obj->list[usenotes] as $i => $f) { - $r .= $sep.'-'.$f->getLink(); + $r .= $sep.$icon.$f->getLink(); $sep = '<br />'; } unset($f); - $r .= '<div style="clear: both;" />'; + $r .= '</span><div style="clear: both;" />'; } return $r; } Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2013-05-08 11:34:43 UTC (rev 1053) +++ trunk/php/product.pinc 2013-05-13 08:58:59 UTC (rev 1054) @@ -1737,7 +1737,7 @@ /** * create a smalllist of products related to the given object */ - static function small_infolist ($user,$obj) { + static function small_infolist (tutos_user $user,tutos_base $obj) { global $lang; $r = ''; Modified: trunk/php/rate/rate.pinc =================================================================== --- trunk/php/rate/rate.pinc 2013-05-08 11:34:43 UTC (rev 1053) +++ trunk/php/rate/rate.pinc 2013-05-13 08:58:59 UTC (rev 1054) @@ -580,7 +580,7 @@ /** * create a smalllist of rates attached to the given object */ - static function small_infolist ($user,$obj) { + static function small_infolist (tutos_user $user,tutos_base $obj) { global $lang; $r = ''; Modified: trunk/php/resource/resource.pinc =================================================================== --- trunk/php/resource/resource.pinc 2013-05-08 11:34:43 UTC (rev 1053) +++ trunk/php/resource/resource.pinc 2013-05-13 08:58:59 UTC (rev 1054) @@ -328,7 +328,7 @@ /** * create a smalllist of resources used by the given object */ - static function small_infolist ($user,$obj) { + static function small_infolist (tutos_user $user,tutos_base $obj) { global $lang; $r = ''; Modified: trunk/php/url/mconfig.pinc =================================================================== --- trunk/php/url/mconfig.pinc 2013-05-08 11:34:43 UTC (rev 1053) +++ trunk/php/url/mconfig.pinc 2013-05-13 08:58:59 UTC (rev 1054) @@ -8,10 +8,10 @@ * $Author$ */ $tutos['files'][__FILE__] = '$Rev$'; -# -# Every module must have an individual ID ( < 0 > -100 ). -# this is module 20 and 37 -# +// +// Every module must have an individual ID ( < 0 > -100 ). +// this is module 20 and 37 +// define ('useurl',-20); define ('useurlcat',-37); $tutos[modules]['url'] = array( @@ -28,17 +28,17 @@ 'overview' => 'url/url_select.php', 'perm' => useurlcat ); -# -# globally enable this module -# +// +// globally enable this module +// if (!isset($tutos[useurl])) $tutos[useurl] = 1; $tutos[useurlcat] = $tutos[useurl]; -# -# List of objects/modules where we do something with this module -# and need to include this module -# +// +// List of objects/modules where we do something with this module +// and need to include this module +// $tutos[modulesinc]['url'][] = 'team'; $tutos[modulesinc]['url'][] = 'address'; $tutos[modulesinc]['url'][] = 'ldap'; @@ -50,9 +50,10 @@ $tutos[modulesinc]['url'][] = 'scheme'; $tutos[modulesinc]['url'][] = 'mytutos'; $tutos[modulesinc]['url'][] = 'res_cal'; -# -# skip -# +$tutos[modulesinc]['url'][] = 'appointment'; +// +// skip +// #$permskip[useurl][PERM_MYTUTOS] = 1; $permskip[useurlcat][PERM_MYTUTOS] = 1; -?> +?> \ No newline at end of file Modified: trunk/php/url/url.pinc =================================================================== --- trunk/php/url/url.pinc 2013-05-08 11:34:43 UTC (rev 1053) +++ trunk/php/url/url.pinc 2013-05-13 08:58:59 UTC (rev 1054) @@ -331,7 +331,7 @@ return '<a class="external_link" href="'.$this->url .'" target="url" title="'.myentities($this->getTargetUrl()).'">'. $text . '</a>'; } else { return makelink($this->getURL(),$text,myentities($this->getTargetUrl()),$this->getPopInfo(),'url',$this->id); -# return '<a class="external_link" href="'.$this->getUrl() .'" target="url" title="'.myentities($this->getTargetUrl()).'">'. $x . '</a>'; + # return '<a class="external_link" href="'.$this->getUrl() .'" target="url" title="'.myentities($this->getTargetUrl()).'">'. $x . '</a>'; } } @@ -607,6 +607,34 @@ } /** + * create a smalllist of urls attached to the given object + */ + static function small_infolist (tutos_user $user,tutos_base $obj) { + global $lang; + + $r = ''; + if (! is_object($obj) ) return $r; + if ( $obj->id < 0 ) return $r; + + if ( ! $user->feature_ok(useurl,PERM_SEE) ) { + return $r; + } + url::obj_read($obj); + $sep = ''; + if ( count($obj->list[useurl]) > 0 ) { + $icon = $user->layout->theme->getImage(link,'list'); + $r .= '<span class="right">'; + foreach ($obj->list[useurl] as $i => $f) { + $r .= $sep.$icon.$f->getLink(); + $sep = '<br />'; + } + unset($f); + $r .= '</span><div style="clear: both;" />'; + } + return $r; + } + + /** * create a link where a url to for the given object could be added */ static function getaddlink (tutos_user $user,tutos_base $obj,$text = "") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-08 11:34:48
|
Revision: 1053 http://sourceforge.net/p/tutos/code/1053 Author: gokohnert Date: 2013-05-08 11:34:43 +0000 (Wed, 08 May 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/html/js/new_layout.js Modified: trunk/html/js/new_layout.js =================================================================== --- trunk/html/js/new_layout.js 2013-05-03 07:54:19 UTC (rev 1052) +++ trunk/html/js/new_layout.js 2013-05-08 11:34:43 UTC (rev 1053) @@ -41,7 +41,6 @@ $("form").submit(function() { if(this.target == '') { loading(1); - alert('on'); } return true; }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-03 07:54:23
|
Revision: 1052 http://sourceforge.net/p/tutos/code/1052 Author: gokohnert Date: 2013-05-03 07:54:19 +0000 (Fri, 03 May 2013) Log Message: ----------- export multiple ical events Modified Paths: -------------- trunk/html/js/new2_layout.js trunk/html/js/new_layout.js trunk/php/app_overview.php trunk/php/app_show.php trunk/php/appointment.pinc trunk/php/layout/new_layout.pinc Modified: trunk/html/js/new2_layout.js =================================================================== --- trunk/html/js/new2_layout.js 2013-05-02 16:29:14 UTC (rev 1051) +++ trunk/html/js/new2_layout.js 2013-05-03 07:54:19 UTC (rev 1052) @@ -42,10 +42,10 @@ $('form').submit(function(event) { var isFormValid = true; - var t = ''; + var t = ''; $('#'+event.currentTarget.id+' .required_fld').each(function(){ -// t = t+ this.id +" 2\n"; -// t = t+ event.currentTarget.id +" 3\n"; +// t = t+ this.id +" 2\n"; +// t = t+ event.currentTarget.id +" 3\n"; if ($.trim($(this).val()).length == 0){ $(this).addClass("bad"); isFormValid = false; @@ -55,11 +55,11 @@ }); if(!isFormValid) { event.stopImmediatePropagation(); -// t += event.currentTarget.id +"\n"+ this.id +"\n"; - t += "Please fill in all the required fields"; +// t += event.currentTarget.id +"\n"+ this.id +"\n"; + t += "Please fill in all the required fields"; alert(t); } else { - if(this.target == '') + if(this.target == '') loading(1); } return isFormValid; Modified: trunk/html/js/new_layout.js =================================================================== --- trunk/html/js/new_layout.js 2013-05-02 16:29:14 UTC (rev 1051) +++ trunk/html/js/new_layout.js 2013-05-03 07:54:19 UTC (rev 1052) @@ -37,3 +37,11 @@ $(".m_field").change(function(){ $(this).closest('tr').toggleClass("line_selected"); }); + +$("form").submit(function() { + if(this.target == '') { + loading(1); + alert('on'); + } + return true; +}); Modified: trunk/php/app_overview.php =================================================================== --- trunk/php/app_overview.php 2013-05-02 16:29:14 UTC (rev 1051) +++ trunk/php/app_overview.php 2013-05-03 07:54:19 UTC (rev 1052) @@ -166,8 +166,18 @@ $r .= " <select name=\"action\">\n"; $r .= ' <option value="-1" selected="selected">'. $lang['ActionNil'] ."</option>\n"; $r .= ' <option value="-2">'. $lang['Delete'] ."</option>\n"; + $r .= ' <option value="ical">'. $lang['AppGetIcal'] ."</option>\n"; $r .= "</select>\n"; $r .= $this->UpdateRowEnd(2); + // TODO: on submit with ical disable loading + $tutos['pagescript'] .= " +$('#actionform').submit(function(event) { + if ($('#action_select').val() == 'ical') { + loading(0); + } + return true; +}); +"; } $r .= $this->OverviewFootEnd(); $r .= $this->OverviewTableEnd(); @@ -199,6 +209,27 @@ } $this->dbconn->Commit("WORK"); } + if ( $_REQUEST['action'] == 'ical' ) { + $r = appointment::getIcalHead(); + foreach ($_REQUEST['mark'] as $val) { + $b = new appointment($this->dbconn); + $b = $b->read($val,$b); + if ( $b->id != $val ) { + continue; + } + if ( !$b->see_ok() ) { + continue; + } + $r .= $b->getIcal(); + } + $r .= appointment::getIcalBottom(); + export_headers_base(); + Header("Content-type: text/calendar"); + Header("Content-Disposition: attachment; filename=\"appointments.ics\""); + Header("Content-Description: Upload from TUTOS" ); + echo $r; + die(); + } } /** Modified: trunk/php/app_show.php =================================================================== --- trunk/php/app_show.php 2013-05-02 16:29:14 UTC (rev 1051) +++ trunk/php/app_show.php 2013-05-03 07:54:19 UTC (rev 1052) @@ -53,7 +53,7 @@ Header("Content-type: text/calendar"); Header("Content-Disposition: attachment; filename=\"appointment.ics\""); Header("Content-Description: Upload from TUTOS" ); - return $this->obj->getIcal(); + return $this->obj->getIcalHead().$this->obj->getIcal().$this->obj->getIcalBottom(); } else if ( $this->format == "xml") { $r .= $this->obj->exportXMLHeader(); $r .= $this->obj->exportXML(); Modified: trunk/php/appointment.pinc =================================================================== --- trunk/php/appointment.pinc 2013-05-02 16:29:14 UTC (rev 1051) +++ trunk/php/appointment.pinc 2013-05-03 07:54:19 UTC (rev 1052) @@ -669,7 +669,7 @@ $mb->setContentType('text/calendar'); $mb->setContentDisponame('IcalEntry.vcs'); $mb->setContentDispotype('attachment'); - $mb->body = $this->getIcal(); + $mb->body = $this->getIcalHead().$this->getIcal().$this->getIcalBottom(); $m->addBodyObj($mb); } if ( $tutos[usevcard] == 1 ) { @@ -1176,6 +1176,28 @@ } /** + * ical head + */ + static function getIcalHead() { + $r = ''; + $r .= "BEGIN:VCALENDAR\n"; + $r .= "PRODID:-//hacksw/handcal//NONSGML v1.0//EN\n"; + $r .= "VERSION:2.0\n"; + $r .= "METHOD:REQUEST\n"; + $r .= "CALSCALE:GREGORIAN\n"; + return $r; + } + + /** + * ical head + */ + static function getIcalBottom() { + $r = ''; + $r .= "END:VCALENDAR\n"; + return $r; + } + + /** * Return a ical description of this appointment as described in rfc2445 * see http://www.imc.org/rfc2445 */ @@ -1189,11 +1211,6 @@ } $url = getBaseURL(true) . $this->getURL(); $ical = ''; - $ical .= "BEGIN:VCALENDAR\n"; - $ical .= "PRODID:-//hacksw/handcal//NONSGML v1.0//EN\n"; - $ical .= "VERSION:2.0\n"; - $ical .= "METHOD:REQUEST\n"; - $ical .= "CALSCALE:GREGORIAN\n"; $ical .= "BEGIN:VEVENT\n"; $ical .= "UID:TUTOS_ID-". $this->id ."\n"; $ical .= "DTSTART"; @@ -1295,7 +1312,6 @@ $ical .= "END:VALARM\n"; } $ical .= "END:VEVENT\n"; - $ical .= "END:VCALENDAR\n"; return $ical; } Modified: trunk/php/layout/new_layout.pinc =================================================================== --- trunk/php/layout/new_layout.pinc 2013-05-02 16:29:14 UTC (rev 1051) +++ trunk/php/layout/new_layout.pinc 2013-05-03 07:54:19 UTC (rev 1052) @@ -441,11 +441,6 @@ global $tutos; $tutos['pagescript'] .= " -$('form').submit(function() { - if(this.target == '') - loading(1); - return true; -}); "; $r = ''; $r .= $this->add_css_links_end(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-05-02 16:29:18
|
Revision: 1051 http://sourceforge.net/p/tutos/code/1051 Author: gokohnert Date: 2013-05-02 16:29:14 +0000 (Thu, 02 May 2013) Log Message: ----------- update line graph Modified Paths: -------------- trunk/php/config_default.pinc trunk/php/graphs.pinc Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-04-30 13:57:30 UTC (rev 1050) +++ trunk/php/config_default.pinc 2013-05-02 16:29:14 UTC (rev 1051) @@ -772,7 +772,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20130427'; +$tutos[version] = '1.9.20130502'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/graphs.pinc =================================================================== --- trunk/php/graphs.pinc 2013-04-30 13:57:30 UTC (rev 1050) +++ trunk/php/graphs.pinc 2013-05-02 16:29:14 UTC (rev 1051) @@ -298,16 +298,23 @@ $pre = ''; $options .= ",\n series:["; foreach($a['data'] as $e) { + $ticks = '['; + $tpre = ''; $ppre = ''; $data .= $pre.'['; foreach($e['points'] as $i => $p) { if (!is_numeric($i)) { $i = '"'.$i.'"'; + $ticks .= $tpre.$i; + $tpre = ','; + $data .= $ppre.$p; + } else { + $data .= $ppre.'['.$i.','.$p.']'; } - $data .= $ppre.'['.$i.','.$p.']'; $ppre = ','; } $data .= ']'; + $ticks .= ']'; $options .= $pre.'{'; $options .= 'fill:false'; @@ -326,6 +333,22 @@ $tutos['pagescript'] .= " $.jqplot('line".$id."',".$data.",{ ".$options.", + highlighter: { + show: true, + sizeAdjust: 1, + tooltipAxes: 'y', + useAxesFormatters : true, + tooltipOffset: 9 + }, + seriesDefaults: { + showMarker: true, + fill: true, + fillAndStroke: true, + rendererOptions: { + highlightMouseDown: true, + smooth: false, + }, + }, grid: { backgroundColor: \"transparent\", borderWidth: 0, @@ -348,17 +371,20 @@ }, axes: { xaxis: { + renderer: $.jqplot.CategoryAxisRenderer, labelRenderer: $.jqplot.CanvasAxisLabelRenderer, tickOptions:{ - angle: -90 + angle: -45, + labelPosition: 'middle' }, + ticks: ".$ticks.", pad: 0, label: '".$a['xtitle']."' }, yaxis: { labelRenderer: $.jqplot.CanvasAxisLabelRenderer, tickOptions:{ - angle: 20 + angle: 0, }, labelOptions:{ angle: -90 @@ -368,6 +394,7 @@ } } }); +$('.jqplot-highlighter-tooltip').addClass('ui-corner-all'); \n"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-04-30 13:57:46
|
Revision: 1050 http://sourceforge.net/p/tutos/code/1050 Author: gokohnert Date: 2013-04-30 13:57:30 +0000 (Tue, 30 Apr 2013) Log Message: ----------- some fixes Modified Paths: -------------- trunk/html/default.css trunk/php/config_default.pinc trunk/php/graphs.pinc trunk/php/module_template/AAA.pinc trunk/php/modules.pinc trunk/php/report-engine/mconfig.pinc trunk/php/report-engine/report_list_default.php trunk/php/report-engine/reporter.pinc trunk/php/webelements.p3 Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2013-04-28 15:33:05 UTC (rev 1049) +++ trunk/html/default.css 2013-04-30 13:57:30 UTC (rev 1050) @@ -100,6 +100,10 @@ white-space: pre; } +.bold { + font-weight: bold; +} + .configbox tr td.pre { border-top: 1px solid lightgrey; } Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-04-28 15:33:05 UTC (rev 1049) +++ trunk/php/config_default.pinc 2013-04-30 13:57:30 UTC (rev 1050) @@ -772,7 +772,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20130417'; +$tutos[version] = '1.9.20130427'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/graphs.pinc =================================================================== --- trunk/php/graphs.pinc 2013-04-28 15:33:05 UTC (rev 1049) +++ trunk/php/graphs.pinc 2013-04-30 13:57:30 UTC (rev 1050) @@ -269,8 +269,114 @@ } /** - * draw bar chart + * draw line chart */ +function line(array $a) { + global $lang,$tutos; + + $r = ''; + if (!isset($a['ytitle'])) + $a['ytitle'] = ''; + if (!isset($a['xtitle'])) + $a['xtitle'] = ''; + + if ($tutos['jqplot'] == 1) { + $id = uniqid(); + $tutos['js_to_load'][] = '/html/js/jquery.jqplot.min.js'; + $tutos['js_to_load'][] = '/html/js/plugins/jqplot.canvasTextRenderer.min.js'; + $tutos['js_to_load'][] = '/html/js/plugins/jqplot.canvasAxisLabelRenderer.min.js'; + $tutos['js_to_load'][] = '/html/js/plugins/jqplot.canvasAxisTickRenderer.min.js'; + $tutos['js_to_load'][] = '/html/js/plugins/jqplot.enhancedLegendRenderer.min.js'; + $tutos['js_to_load'][] = '/html/js/plugins/jqplot.highlighter.min.js'; + $tutos['js_to_load'][] = '/html/js/plugins/jqplot.pointLabels.min.js'; + $tutos['js_to_load'][] = '/html/js/plugins/jqplot.categoryAxisRenderer.min.js'; + $tutos['css_to_load'][] = '/html/css/jquery.jqplot.min.css'; + $r .= '<div id="line'.$id.'" style="height:'.(GB_HEIGHT*1.5).'px;width:'.(GB_WIDTH*1.5).'px; "></div>'; + + $options = " title:'".$a['title']."'"; + $data = '['; + $pre = ''; + $options .= ",\n series:["; + foreach($a['data'] as $e) { + $ppre = ''; + $data .= $pre.'['; + foreach($e['points'] as $i => $p) { + if (!is_numeric($i)) { + $i = '"'.$i.'"'; + } + $data .= $ppre.'['.$i.','.$p.']'; + $ppre = ','; + } + $data .= ']'; + + $options .= $pre.'{'; + $options .= 'fill:false'; + if (isset($e['color'])) { + $options .= ',color:"'.$e['color'].'"'; + } + if (isset($e['title'])) { + $options .= ',label:"'.$e['title'].'"'; + } + $options .= '}'; + $pre = ','; + } + $options .= ']'; + $data .= ']'; + + $tutos['pagescript'] .= " + $.jqplot('line".$id."',".$data.",{ + ".$options.", + grid: { + backgroundColor: \"transparent\", + borderWidth: 0, + shadow: false + }, + legend: { + renderer: $.jqplot.EnhancedLegendRenderer, + backgroundColor: \"#aaa\", + rendererOptions:{ + seriesToggle: true, + disableIEFading: false + }, + show: true, + placement: 'outsideGrid', + location: 'ne', + rowSpacing: 0.5 + }, + axesDefaults: { + tickRenderer: $.jqplot.CanvasAxisTickRenderer + }, + axes: { + xaxis: { + labelRenderer: $.jqplot.CanvasAxisLabelRenderer, + tickOptions:{ + angle: -90 + }, + pad: 0, + label: '".$a['xtitle']."' + }, + yaxis: { + labelRenderer: $.jqplot.CanvasAxisLabelRenderer, + tickOptions:{ + angle: 20 + }, + labelOptions:{ + angle: -90 + }, + pad: 0, + label: '".$a['ytitle']."' + } + } +}); +\n"; + } + + return $r; +} + +/** + * draw burndown chart + */ function burndown(array $a) { global $lang,$tutos; Modified: trunk/php/module_template/AAA.pinc =================================================================== --- trunk/php/module_template/AAA.pinc 2013-04-28 15:33:05 UTC (rev 1049) +++ trunk/php/module_template/AAA.pinc 2013-04-30 13:57:30 UTC (rev 1050) @@ -338,7 +338,7 @@ /** * create a link where a AAA for the given object could be added */ - static function getaddlink (tutos_user $user,tutos_base $obj,$text = "") { + static function getAddLink (tutos_user $user,tutos_base $obj,$text = "") { global $lang; if (! is_object($obj) ) return ''; Modified: trunk/php/modules.pinc =================================================================== --- trunk/php/modules.pinc 2013-04-28 15:33:05 UTC (rev 1049) +++ trunk/php/modules.pinc 2013-04-30 13:57:30 UTC (rev 1050) @@ -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 @@ -12,111 +12,111 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; +// +// Modules for TUTOS could be found here: +// +// http://sourceforge.net/project/showfiles.php?group_id=8047 -# -# Modules for TUTOS could be found here: -# -# http://sourceforge.net/project/showfiles.php?group_id=8047 +// +// If you like to modify some module specific settings in config.php +// you should add a include line explicitly in config.php +// modules.pinc is read AFTER config.php but uses include_once statements +// -# -# If you like to modify some module specific settings in config.php -# you should add a include line explicitly in config.php -# modules.pinc is read AFTER config.php but uses include_once statements -# - -# -# State transition management -# -@include_once("stc/mconfig.pinc"); -# -# The document management module -# allows you to attach documents to objects -# Author: Gero Kohnert -# -@include_once("file/mconfig.pinc"); -# -# The bugtracking module -# Author: Gero Kohnert -# -@include_once("bugtracking/mconfig.pinc"); -# -# Timetrack Module -# +// +// State transition management +// +@include_once('stc/mconfig.pinc'); +// +// The document management module +// allows you to attach documents to objects +// Author: Gero Kohnert +// +@include_once('file/mconfig.pinc'); +// +// The bugtracking module +// Author: Gero Kohnert +// +@include_once('bugtracking/mconfig.pinc'); +// +// Timetrack Module +// @include_once('timetrack/mconfig.pinc'); -# -# The installations module -# allows you to define installations of a product/project -# Author: Gero Kohnert -# -@include_once("installation/mconfig.pinc"); -# -# The group module -# allows you to define groups where you can add addresses/companies and departments -# classical CRM support -# Author: Gero Kohnert -# -@include_once("group/mconfig.pinc"); -# -# The invoice module -# Author: Gero Kohnert -# -@include_once("invoice/mconfig.pinc"); -# -# The notes module -# allows you to define attach notes to nbearly everything -# Author: Gero Kohnert -# -@include_once("note/mconfig.pinc"); -# -# The rates module -# allows you to define attach rates (default cph) to nearly everything -# Author: Gero Kohnert & Andreas Metz -# -@include_once("rate/mconfig.pinc"); -# -# The reminder module -# allows you to define reminders for all types of objects -# Author: Gero Kohnert -# -@include_once("reminder/mconfig.pinc"); -# -# The reporter module -# allows you to define and use reports for all types of objects/pages -# Author: Gero Kohnert -# -@include_once("report-engine/mconfig.pinc"); -# -# The resource module -# allows you to define resources and use thiese resources -# Author: Gero Kohnert -# -@include_once("resource/mconfig.pinc"); -# -# The mailbox module -# allows you to use imap/pop mailboxes -# Author: Gero Kohnert -# -@include_once("mailbox/mconfig.pinc"); -# -# The watchlist module -# allows you to add objects to a watchlist -# if that object is modified a email is sent out -# Author: Gero Kohnert -# -@include_once("watchlist/mconfig.pinc"); -# -# The url module -# allows you to add links to objects -# Author: Gero Kohnert -# -@include_once("url/mconfig.pinc"); -# -# Counter Module -# counts accesses to objects -# -@include_once("counter/mconfig.pinc"); -# -# Expense Module (needed by invoice / stuff etc) -# +// +// The installations module +// allows you to define installations of a product/project +// Author: Gero Kohnert +// +@include_once('installation/mconfig.pinc'); +// +// The group module +// allows you to define groups where you can add addresses/companies and departments +// classical CRM support +// Author: Gero Kohnert +// +@include_once('group/mconfig.pinc'); +// +// The invoice module +// Author: Gero Kohnert +// +@include_once('invoice/mconfig.pinc'); +// +// The notes module +// allows you to define attach notes to nbearly everything +// Author: Gero Kohnert +// +@include_once('note/mconfig.pinc'); +// +// The rates module +// allows you to define attach rates (default cph) to nearly everything +// Author: Gero Kohnert & Andreas Metz +// +@include_once('rate/mconfig.pinc'); +// +// The reminder module +// allows you to define reminders for all types of objects +// Author: Gero Kohnert +// +@include_once('reminder/mconfig.pinc'); +// +// The reporter module +// allows you to define and use reports for all types of objects/pages +// Author: Gero Kohnert +// +@include_once('report-engine/mconfig.pinc'); +// +// The resource module +// allows you to define resources and use thiese resources +// Author: Gero Kohnert +// +@include_once('resource/mconfig.pinc'); +// +// The mailbox module +// allows you to use imap/pop mailboxes +// Author: Gero Kohnert +// +@include_once('mailbox/mconfig.pinc'); +// +// The watchlist module +// allows you to add objects to a watchlist +// if that object is modified a email is sent out +// Author: Gero Kohnert +// +@include_once('watchlist/mconfig.pinc'); +// +// The url module +// allows you to add links to objects +// Author: Gero Kohnert +// +@include_once('url/mconfig.pinc'); +// +// Counter Module +// counts accesses to objects +// +@include_once('counter/mconfig.pinc'); +// +// Expense Module (needed by invoice / stuff etc) +// @include_once('expense/mconfig.pinc'); ?> \ No newline at end of file Modified: trunk/php/report-engine/mconfig.pinc =================================================================== --- trunk/php/report-engine/mconfig.pinc 2013-04-28 15:33:05 UTC (rev 1049) +++ trunk/php/report-engine/mconfig.pinc 2013-04-30 13:57:30 UTC (rev 1050) @@ -39,6 +39,7 @@ // $tutos[modulesinc]['report-engine'][] = 'address'; $tutos[modulesinc]['report-engine'][] = 'group'; +$tutos[modulesinc]['report-engine'][] = 'team'; $tutos[modulesinc]['report-engine'][] = 'company'; $tutos[modulesinc]['report-engine'][] = 'product'; $tutos[modulesinc]['report-engine'][] = 'bugtracking'; @@ -52,4 +53,4 @@ $permskip[usereporter][PERM_DEL] = 1; $permskip[usereporter][PERM_MYTUTOS] = 1; -?> +?> \ No newline at end of file Modified: trunk/php/report-engine/report_list_default.php =================================================================== --- trunk/php/report-engine/report_list_default.php 2013-04-28 15:33:05 UTC (rev 1049) +++ trunk/php/report-engine/report_list_default.php 2013-04-30 13:57:30 UTC (rev 1050) @@ -155,9 +155,12 @@ ); // for using the doctracker module install doctracker package and uncomment -#@include("rep_doccheck/config.php"); +if (file_exists($tutos['base'].'/php/report-engine/rep_doccheck/config.php')) { + include_once("rep_doccheck/config.php"); +} // for using the subversion module install subversion package and uncomment -#@include("rep_subversion/config.php"); - +if (file_exists($tutos['base'].'/php/report-engine/rep_subversion/config.php')) { + @include("rep_subversion/config.php"); +} ?> \ No newline at end of file Modified: trunk/php/report-engine/reporter.pinc =================================================================== --- trunk/php/report-engine/reporter.pinc 2013-04-28 15:33:05 UTC (rev 1049) +++ trunk/php/report-engine/reporter.pinc 2013-04-30 13:57:30 UTC (rev 1050) @@ -30,13 +30,13 @@ global $tutos,$current_user,$table; $this->init($dbconn); - $this->category = 1; - $this->class = ''; - $this->type = ''; + $this->category = 1; + $this->class = ''; + $this->type = ''; $this->rep_obj_id = -1; - $this->rep_obj = -1; - $this->report = -1; - $this->target = 'report'; + $this->rep_obj = -1; + $this->report = -1; + $this->target = 'report'; } /** @@ -68,8 +68,8 @@ /** * show the report */ - function show () { - return $this->report->show(); + function show (layout $ly) { + return $this->report->show($ly); } /** @@ -131,7 +131,7 @@ /** * create a link to a search page */ - static function getSelectLink (&$user,$text = "") { + static function getSelectLink (tutos_user $user,$text = "") { global $lang,$tutos; if ( ! $user->feature_ok(usereporter,PERM_USE) ) { @@ -164,7 +164,7 @@ /** * create a link where a report for the given object could be found */ - static function getaddlink (&$user,&$obj,$text = "") { + static function getaddlink (tutos_user $user,tutos_base $obj,$text = "") { global $lang,$tutos; if (! is_object($obj) ) return ''; Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-04-28 15:33:05 UTC (rev 1049) +++ trunk/php/webelements.p3 2013-04-30 13:57:30 UTC (rev 1050) @@ -2859,6 +2859,7 @@ $r = $dbconn->Exec($q); $n = $r->numrows(); $x = 0; + while ( $x < $n ) { $cname = $r->get($x, 'cname'); $cvalue = $r->get($x, 'cvalue'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-04-28 15:33:08
|
Revision: 1049 http://sourceforge.net/p/tutos/code/1049 Author: gokohnert Date: 2013-04-28 15:33:05 +0000 (Sun, 28 Apr 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/file/file_overview.php Modified: trunk/php/file/file_overview.php =================================================================== --- trunk/php/file/file_overview.php 2013-04-25 09:36:41 UTC (rev 1048) +++ trunk/php/file/file_overview.php 2013-04-28 15:33:05 UTC (rev 1049) @@ -154,7 +154,7 @@ $r .= $this->MassUpdateField($f); $r .= $this->OverviewRowEnd($line++); - unset($flist[$a]); + unset($this->flist[$a]); unset($f); $a++; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-04-25 09:36:48
|
Revision: 1048 http://sourceforge.net/p/tutos/code/1048 Author: gokohnert Date: 2013-04-25 09:36:41 +0000 (Thu, 25 Apr 2013) Log Message: ----------- swiss extra fomratting Modified Paths: -------------- trunk/php/webelements.p3 Added Paths: ----------- trunk/php/localization/de-ch.p3 Added: trunk/php/localization/de-ch.p3 =================================================================== --- trunk/php/localization/de-ch.p3 (rev 0) +++ trunk/php/localization/de-ch.p3 2013-04-25 09:36:41 UTC (rev 1048) @@ -0,0 +1,9 @@ +<?php +// $Id: en-us.p3 11 2011-02-13 14:05:50Z gokohnert $ +// +setlocale(LC_TIME,'de_CH'); + +$lang['DecPoint'] = '.'; +$lang['ThousandPoint'] = '\''; + +?> \ No newline at end of file Property changes on: trunk/php/localization/de-ch.p3 ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-php \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2013-04-24 20:42:46 UTC (rev 1047) +++ trunk/php/webelements.p3 2013-04-25 09:36:41 UTC (rev 1048) @@ -265,6 +265,10 @@ include $path ."/". "en.p3"; $ok = true; } + if ( ("de-ch" == $lg) && file_exists(getcwd()."/".$path ."/de-ch.p3") && is_readable(getcwd()."/".$path ."/de-ch.p3") ) { + include $path ."/". "de.p3"; + $ok = true; + } if ( file_exists(getcwd()."/".$path ."/". $lg .".p3") && is_readable(getcwd()."/".$path ."/". $lg .".p3") ) { include $path ."/". $lg .".p3"; $ok = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-04-24 20:42:50
|
Revision: 1047 http://sourceforge.net/p/tutos/code/1047 Author: gokohnert Date: 2013-04-24 20:42:46 +0000 (Wed, 24 Apr 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/timetrack/timetrack.pinc Modified: trunk/php/timetrack/timetrack.pinc =================================================================== --- trunk/php/timetrack/timetrack.pinc 2013-04-24 10:30:00 UTC (rev 1046) +++ trunk/php/timetrack/timetrack.pinc 2013-04-24 20:42:46 UTC (rev 1047) @@ -587,7 +587,7 @@ $q = new Query($this->dbconn); $q->setTable($this->tablename); $q->addFV('link_id',$this->link_id,''); - $q->addFV('adr_id',is_object($this->worker ? $this->worker->id:-1),''); + $q->addFV('adr_id',(is_object($this->worker) ? $this->worker->id:-1),''); $q->addFV('volume',$this->volume,'FLOAT'); $q->addFV('distance',$this->distance,'FLOAT'); $q->addFV('volume_todo',$this->volume_todo,'FLOAT'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-04-24 10:30:10
|
Revision: 1046 http://sourceforge.net/p/tutos/code/1046 Author: gokohnert Date: 2013-04-24 10:30:00 +0000 (Wed, 24 Apr 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/timetrack/timetrack.pinc trunk/php/timetrack/timetrack_overview.php Modified: trunk/php/timetrack/timetrack.pinc =================================================================== --- trunk/php/timetrack/timetrack.pinc 2013-04-18 07:44:08 UTC (rev 1045) +++ trunk/php/timetrack/timetrack.pinc 2013-04-24 10:30:00 UTC (rev 1046) @@ -587,7 +587,7 @@ $q = new Query($this->dbconn); $q->setTable($this->tablename); $q->addFV('link_id',$this->link_id,''); - $q->addFV('adr_id',$this->worker->id,''); + $q->addFV('adr_id',is_object($this->worker ? $this->worker->id:-1),''); $q->addFV('volume',$this->volume,'FLOAT'); $q->addFV('distance',$this->distance,'FLOAT'); $q->addFV('volume_todo',$this->volume_todo,'FLOAT'); @@ -779,7 +779,7 @@ } else { $ref = $lang['HistoryDeleted']; } - if ( $this->worker->id > 0 ) { + if (is_object($this->worker)) { $w = $this->worker->getFullName(); } else { $w = $lang['HistoryDeleted']; @@ -790,7 +790,7 @@ $r .= txt2csv($ref); $r .= txt2csv($this->desc); $r .= txt2csv(my_number_format($this->volume,2)); - $r .= txt2csv($this->cph); + $r .= txt2csv(my_number_format($this->cph,2)); $r .= txt2csv($this->currency); $r .= txt2csv($this->state); $r .= txt2csv($this->wday->getYYYYMMDD()); Modified: trunk/php/timetrack/timetrack_overview.php =================================================================== --- trunk/php/timetrack/timetrack_overview.php 2013-04-18 07:44:08 UTC (rev 1045) +++ trunk/php/timetrack/timetrack_overview.php 2013-04-24 10:30:00 UTC (rev 1046) @@ -118,7 +118,7 @@ $c = 0; $this->excel->ws[$ws]->write_number($x,$c++, $a->id,$this->excel->format_default); - $this->excel->ws[$ws]->write_string($x,$c++, myiconv($a->worker->getFullName()),$this->excel->format_default); + $this->excel->ws[$ws]->write_string($x,$c++, myiconv(is_object($a->worker) ? $a->worker->getFullName():$lang['HistoryDeleted']),$this->excel->format_default); $this->excel->ws[$ws]->write_number($x,$c++, $a->volume,$this->excel->format_default); $this->excel->ws[$ws]->write_number($x,$c++, $a->cph,$this->excel->format_default); $this->excel->ws[$ws]->write_number($x,$c++, $a->cph * $a->volume,$this->excel->format_default); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-04-18 07:44:15
|
Revision: 1045 http://sourceforge.net/p/tutos/code/1045 Author: gokohnert Date: 2013-04-18 07:44:08 +0000 (Thu, 18 Apr 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/app_overview.php trunk/php/config_default.pinc trunk/php/product_role_new.php trunk/test.sh Modified: trunk/php/app_overview.php =================================================================== --- trunk/php/app_overview.php 2013-04-17 06:51:01 UTC (rev 1044) +++ trunk/php/app_overview.php 2013-04-18 07:44:08 UTC (rev 1045) @@ -40,16 +40,19 @@ $r = ''; if ( $this->format == "xml" ) { - $n = $this->result->numrows(); $a = new appointment($this->dbconn); $r .= $a->exportXMLHeader(); $r .= $a->exportXML_head(); $r .= "<appointment_set>\n"; foreach ($this->alist as $a) { + if (!is_object($a)) { + $id = $a; + $a = new appointment($this->dbconn); + $a = $a->read($id,$a); + } $r .= $a->exportXML(false); } $r .= "</appointment_set>\n"; - $this->result->free(); return $r; } @@ -312,7 +315,7 @@ $x = 0; while ( $x < $n ) { $a = new appointment($this->dbconn); - $a->read_result($this->result,$x); + $a->read_result($res,$x); $x++; if ( ! is_object($a) || !$a->see_ok()) { unset($a); @@ -323,7 +326,7 @@ unset($a); } $this->nav['list'] = $np; - $this->result->free(); + $res->free(); } else { // subsession found foreach ($this->nav['list'] as $i) { Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2013-04-17 06:51:01 UTC (rev 1044) +++ trunk/php/config_default.pinc 2013-04-18 07:44:08 UTC (rev 1045) @@ -772,7 +772,7 @@ // // The TUTOS Version number // -$tutos[version] = '1.9.20130313'; +$tutos[version] = '1.9.20130417'; // ### Local Variables: *** ### mode:iso-accents *** Modified: trunk/php/product_role_new.php =================================================================== --- trunk/php/product_role_new.php 2013-04-17 06:51:01 UTC (rev 1044) +++ trunk/php/product_role_new.php 2013-04-18 07:44:08 UTC (rev 1045) @@ -159,8 +159,8 @@ if ( isset($_GET['id']) ) { $this->obj = $this->obj->read($_GET['id'],$this->obj); - 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[useprojects])); $this->stop = true; return; } @@ -169,8 +169,8 @@ } 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[useprojects])); $this->stop = true; return; } Modified: trunk/test.sh =================================================================== --- trunk/test.sh 2013-04-17 06:51:01 UTC (rev 1044) +++ trunk/test.sh 2013-04-18 07:44:08 UTC (rev 1045) @@ -287,9 +287,14 @@ admin/create_config.php?lg=$LG admin/crontab_maker.php?lg=$LG admin/customize_show.php?lg=$LG + admin/customize_ins.php?lg=$LG admin/table_custom_show.php?lg=$LG admin/main_config.php?lg=$LG admin/phpinfo.php?lg=$LG + admin/eaccelerator.php?lg=$LG + admin/apc.php?lg=$LG + admin/memcache.php?lg=$LG + admin/hooks.php?lg=$LG admin/update.php?id=$NOID&lg=$LG bugtracking/bug_ins.php?lg=$LG bugtracking/bug_select.php?lg=$LG @@ -450,6 +455,9 @@ 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 + report-engine/report_show.php?name=rep_envelope1&type=show&class=address&id=$ADR + report-engine/report_show.php?name=rep_index&fid=11&type=show&class=address&id=$P_ID + report-engine/report_show.php?name=rep_spine&fid=11&pos=0&type=show&class=address&id=$P_ID requirements/req_new.php?lg=$LG requirements/req_new.php?id=$NOID&lg=$LG requirements/req_new.php?link_id=$NOID&lg=$LG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-04-17 06:51:04
|
Revision: 1044 http://sourceforge.net/p/tutos/code/1044 Author: gokohnert Date: 2013-04-17 06:51:01 +0000 (Wed, 17 Apr 2013) Log Message: ----------- allow custom footer line in PDF exports Modified Paths: -------------- trunk/php/pdf2.pinc trunk/php/testmanager/de.p3 trunk/php/testmanager/en.p3 trunk/php/testmanager/testrun_show.php Modified: trunk/php/pdf2.pinc =================================================================== --- trunk/php/pdf2.pinc 2013-04-17 05:32:53 UTC (rev 1043) +++ trunk/php/pdf2.pinc 2013-04-17 06:51:01 UTC (rev 1044) @@ -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 @@ -11,13 +11,14 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; if ($tutos[tcpdfpath] != '') { if (!file_exists($tutos['base'] .'/'. $tutos[tcpdfpath].'/tcpdf.php')) { $msg = addLine($msg,"<br />NO TCPDF support. <br />\nSee \$tutos[tcpdfpath] in config. <br />\nmissing:".$tutos['base'] ."/". $tutos[tcpdfpath].'/tcpdf.php');return; } require_once $tutos['base'] ."/". $tutos[tcpdfpath].'/tcpdf.php'; -# require_once $tutos['base'] ."/". $tutos[tcpdfpath].'/config/lang/eng.php'; + # require_once $tutos['base'] ."/". $tutos[tcpdfpath].'/config/lang/eng.php'; } else { return; } @@ -107,7 +108,9 @@ //Position at 1.5 cm from bottom //Arial italic 8 $this->SetFont('helvetica','I',8); + $this->SetY(-12); + // Date of creation $this->SetX(10); $this->Cell(0,10,$d->getDateTime(),0,0,'L'); //Page number @@ -116,12 +119,17 @@ // LABEL $this->SetFont('helvetica','',6); $this->SetX(10); - $this->Cell(0,10,"generated by TUTOS ".$tutos[version],'T',1,'R',0,"http://www.tutos.org"); + $this->Cell(0,10,'generated by TUTOS '.$tutos[version],'T',1,'R',0,'http://www.tutos.org'); $this->SetY(-8); + $this->SetX(10); $this->Cell(0,10,$current_user->getFullName(),0,0,'L'); + $this->SetFont('helvetica','B',8); + $this->SetX(10); + $this->Cell(0,10,$this->footer_central,0,0,'C'); + return; } Modified: trunk/php/testmanager/de.p3 =================================================================== --- trunk/php/testmanager/de.p3 2013-04-17 05:32:53 UTC (rev 1043) +++ trunk/php/testmanager/de.p3 2013-04-17 06:51:01 UTC (rev 1044) @@ -114,6 +114,7 @@ $lang['TestrunSignature'] = 'Unterschrift'; $lang['TestrunCSVExport'] = 'CSV Export'; $lang['TestrunCSVExportI'] = 'dieser Testlauf als CVS Datei'; +$lang['TestrunPDFFooter'] = ''; $lang['TestmanagerConfig'] = 'Testmanager Konfiguration'; $lang['TestCaseHelpMassAdd'] = 'Zahl der auf einmal hinzufügbaren Testfälle über den "neuer Testfall" link.'; @@ -140,4 +141,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> +?> \ No newline at end of file Modified: trunk/php/testmanager/en.p3 =================================================================== --- trunk/php/testmanager/en.p3 2013-04-17 05:32:53 UTC (rev 1043) +++ trunk/php/testmanager/en.p3 2013-04-17 06:51:01 UTC (rev 1044) @@ -113,6 +113,7 @@ $lang['TestrunSignature'] = 'Signature'; $lang['TestrunCSVExport'] = 'CSV Export'; $lang['TestrunCSVExportI'] = 'export this testrun as CSV'; +$lang['TestrunPDFFooter'] = ''; $lang['TestmanagerConfig'] = 'Testmanager configuration'; $lang['TestCaseHelpMassAdd'] = 'How many testcases could be added at once using the "add testcase" link.'; @@ -134,4 +135,4 @@ $lang['testsuite'] = &$lang['Testsuite']; $lang['testcase'] = &$lang['Testcase']; $lang['testrun'] = &$lang['Testrun']; -?> +?> \ No newline at end of file Modified: trunk/php/testmanager/testrun_show.php =================================================================== --- trunk/php/testmanager/testrun_show.php 2013-04-17 05:32:53 UTC (rev 1043) +++ trunk/php/testmanager/testrun_show.php 2013-04-17 06:51:01 UTC (rev 1044) @@ -177,6 +177,7 @@ global $lang,$tutos; $pdf=new tutospdf($this->obj->dbconn,'L'); + $pdf->footer_central = $lang['TestrunPDFFooter']; $pdf->Open(); // problems with older adobe // $pdf->SetProtection(array('modify'),'','',3); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2013-04-17 05:32:57
|
Revision: 1043 http://sourceforge.net/p/tutos/code/1043 Author: gokohnert Date: 2013-04-17 05:32:53 +0000 (Wed, 17 Apr 2013) Log Message: ----------- fix Modified Paths: -------------- trunk/php/admin/apc.php Modified: trunk/php/admin/apc.php =================================================================== --- trunk/php/admin/apc.php 2013-04-15 19:14:30 UTC (rev 1042) +++ trunk/php/admin/apc.php 2013-04-17 05:32:53 UTC (rev 1043) @@ -37,6 +37,7 @@ Function info() { global $lang,$tutos; + $line = 0; $r = ''; $x = apc_cache_info(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |